Approach With the release of SAP Process Integration 7.31 it is possible to run the system as an AEX (Advanced Adapter Engine Extended /Java-only / single stack) installation. In the current release of the PI content of SAP NFE, ccBPM processes are used for government communication. These ccBPM processes are not supported on a Java installation since they are based on ABAP. To enable the NFE scenarios to run on a Java-only PI installation, new adapter modules replicating the ccBPM logic in combination with the existing RequestResponseBean and ResponseOnewayBean are used. The new adapter modules read and store, add, and remove values from the payload. Furthermore, acknowledgement handling is achieved by using specific adapter modules. In the remainder of this note, it is described how to configure the SEFAZ communication in PI.
Copyright/Trademark
Configuration Steps The configuration of AEX PI contains of several steps: 1. Configure NWA Destination 2. Configure integration scenarios 3. Manual post processing 4. Complete configuration
1.
NWA Destination Configuration
Configure NWA Destination for delivering acknowledgement to the SAP NFE backend. For doing this open NWA (http://[HOST]:[PORT]/nwa) -> Configuration -> Infrastructure -> Destinations and maintain the HTTP destination GRC_NFE_WAS with the following URL. http://[HOST]:[PORT]/sap/xi/engine?type=entry&sap-client=[CLIENT]&sap-language=EN Use HOST, PORT and CLIENT values of your SAP NFE backend In case you have multiple SAP NFE backends you need to define separate destinations (destination name is arbitrary) per backend.
2.
Configure Integration Scenarios
Open the Integration Directory and create a configuration scenario based on integration scenario from ESR. In the following sections, the NF-e Status Check (NFESC) is used as an example.
For AEX PI configuration integration scenarios with the infix “AEX” have to be used . In this case, the integration scenario NFESC_AEX_WebAS_Outbound_NFeStatusCheck is configured. First, create the Configuration Scenario and select the relevant Process Integration Scenario. Then, open the Model Configurator and ensure the ‘Configuration for Advanced Adapter Engine’ flag is checked.
Select the Web AS Template swim lane and choose your SAP NFE backend. Use ‘Without Header Mapping’ option for the second group of colons.
Copyright/Trademark
Select Government System swim lane and add all required SEFAZ systems to the swim lane. Select the (first) connection from Web AS to government system and maintain the Communication Channel. Please create communication channels with template using the New button. The sender channel AEX_WAS_XI_SND can be reused across all scenarios; the receiver channel is scenario specific.
When you create AEX_WAS_XI_SND channel check the tab “Acknowledgement Handling” tab.
It contains a name of an NWA HTTP Destination pointing to the SAP NFE backend for delivering XI acknowledgements (see previous step). Select the second connection and complete the channel configuration. Use templates to generate communication channels. You can reuse both sender and receiver channel across all scenarios.
Save the model and perform the generation using ‘Integrated Configuration’ scope. Close the generator wizard and switch to the Objects tab in the configuration scenario. For every SEFAZ system there will be a separate integrated configuration. In addition there will be one integrated configuration with the SAP NFE backend as the sender.
3.
Manual post-processing
3.1. Copy ‘response’ Integrated Configurations Generated integrated configuration objects in request-response scenarios need to be post processed. List of affected scenarios:
Open the ‘response’ integrated configuration having SEFAZ as sender party/service. Click on ‘Copy Object’ toolbar button and provide the NFE Backend system as virtual receiver. Assign the resulting integrated configuration to the configuration scenario. Delete original integrated configuration.
3.2. Copy Integrated Configur ations for B2B Generated integrated configuration objects for B2B scenarios need to be manually post processed. List of affected scenarios: http://sap.com/xi/NFE/006 ETB2B_AEX_WebAS_Outbound_B2B_Event NTB2B_AEX_WebAS_Outbound_B2B_NFe
Open the integrated configuration. Click on ‘Copy Object’ toolbar button. Select “Sender uses Virtual Receiver” checkbox. Enter * (asterix) as value of virutual party and service. Assign the resulting integrated configuration to the configuration scenario. Delete original integrated configuration.
3.3. Select enhanced NF-e Int erface Mapping for Sefaz BA For the communication with Sefaz Bahia (BA) you need further adjustments to complete the configuration process. The reason is that some Sefaz systems created separate web services for NF-e schema version 3.1 with naming conflicts in the web service request and response message. SAP delivers adapted PI content to resolve the conflicts and allow NF-e issuing in these Sefaz systems. The affected web services are: BA: NfeStatusServico, NfeConsulta PR: NfeStatusServico3, NFeInutilizacao3, NFeConsulta3
The delivered enhanced interface mappings must only for BA be assigned to the corresponding configuration scenario: 1. Within the Configuration Integration Builder go to the configuration scenario you created for SRVSC. 2. Open the Integrated Configuration (‘… _OB’) -> tab ‘Receiver Interfaces’ and switch to modify. 3. Under ‘Receiver’ select the line with the Communication Component for party BA. 4. Under ‘Receiver Interfaces’ open the F4 help for 'Operation Mapping'. 5. You can now select between two mappings. Select the one ending in ‘_BA’. 6. Save and activate. 7. Repeat step 2 to 5 for the Configuration Scenario you created for NFESC. 4.
Complete Configuration
Save and activate all changes.
Copyright/Trademark
Settings on NFE WebAS ABAP Configure ABAP proxy communication to call the AEX (Java-only) directly. How this can be done is described in the How-To Guide “How To Set Up the Communication between ABAP Backend and SOAP Adapter using XI Protocol” in the SCN (http://scn.sap.com/docs/DOC-16242) or in SAP Help under Process Integration Advanced Adapter Engine Extended (AEX). A sample screenshot for the required RFC destination of Type G is given below:
Path Prefix: /XISOAPAdapter/MessageServlet?ximessage=true In case of a PI 7.31 double-stack system, you can use the AEX connection (e.g. for performance reasons) by creating specific Sender IDs in transaction sxmb_adm (Configure Sender/Receiver ID). Assign the new RFC destination to the Sender IDs of the NFE interfaces in the Integration Engine Configuration as shown on the screenshot below (Sender ID = Subparameter).
The proxy connection for the other interfaces would then remain the standard ABAP to ABAP connection.