RG2904: PI/XI Configuration for XML Archiving Table of Contents A.
Enterprise Enter prise Service Repository Reposito ry ................................... .................. ................................... ................................... ................................... ................................... ....................... ...... 2 1.
Imported Impor ted Objects Object s ................................. ................ .................................. ................................... ................................... .................................. ................................... ........................ ...... 2
2.
Message Messag e Mappings .................................... .................. ................................... .................................. ................................... ................................... ................................... .................. 2 a.
Create mapping ‘MM_Request_autorizarComprobante_XML_Archive’ ‘MM_Request_autorizarComprobante_XML_Archive’ ..................................... 2
b.
................. .......................... ......... 9 Modify message mapping ‘MM_Response_autorizarComprobante’ ..................................
3.
Operation Opera tion Mapping .................................... .................. ................................... .................................. ................................... ................................... ................................. ................ 17 c.
B.
Modify Operation Mapping OP_autorizarComprobante................... ............................ .................. .................. .................. .............. ..... 17
Configuration on Integration Directory ............. ...................... .................. .................. ................... ................... .................. .................. .................. ................. ........ 21 1.
Modify Interface Inter face Determination Determ ination ................................. ................ .................................. ................................... .................................... ................................. ............... 21 a.
| BS_QV6_700 | BAPI_AR_WS_DOMESTIC BAPI_AR_WS_DOMESTIC | | BC_AFIP................... ............................ .................. .................. .................. .............. ..... 21
A. Enterprise Service Repository 1. Imported Objects Import the RFC BAPI_AR_WS_ARCHIVE_XML into Enterprise Service Repository and then activate it.
2. Message Mappings a. Create mapping ‘MM_Request_autorizarComprobante_XML_Archive’
Create a message mapping ‘MM_Request_autorizarComprobante_XML_Archive‘ under the software component version CNT-LOC 6.05 and namespace ‘http://sap.com/xi/CNT-
LOC/AR_ElectronicInvoiceMTXCAService’. Below are the steps given to map the request attributes. i.
Drag and drop the corresponding WSDL object “ED_mtxcaservice_WSDL” into both Source and Target messages. Select the request “autorizarComprobanteRequest” in both the messages.
ii.
Create a User-Defined Function (UDF) with name ‘GetMessageID’. Give the attributes as mentioned below.
Copy the below code and paste it within the above mentioned UDF. java.util.Map map;
String messageID; map = container.getTransformationParameters(); messageID = (String) map.get(StreamTransformationConstants.MESSAGE_ID); return messageID; iii.
Save the mapping.
iv.
Map each Target node to the corresponding same node of the source except for the node ‘comprobanteCAERequest’.
v.
Create RFC lookup mapping for the node ‘ comprobanteCAERequest’. Select Conversions for Functions and then drag the RFC Lookup button into the mapping area.
vi.
Once the RFC Lookup is available in mapping, double-click on it to provide its attributes.
It will be as shown below.
vii.
Choose
.
Then a screen with selection for BAPI will be displayed as given below.
Select the BAPI ‘BAPI_AR_WS_ARCHIVE_XML’ and then click on Apply button.
viii.
Select each field as given in the order and add them to the request parameters list using the button
.
a.
CUIT_COMP_CODE
b.
BRNCH
c.
CBTE_TIPO
d.
BUDAT
e.
ODN_FROM
f.
QUANTITY
g.
REQUEST_XML
h.
XML_MSGID
i.
REGIME
Also, select the RETURN field using the button
ix.
The screen would appear as below.
in the response parameters.
Then choose OK. x.
Under the Signature tab, create a parameter as RFCAdapter.
The ‘Type’ should be selected as RFC and must be compatible with your PI system version.
For example, if the version is PI 7.11, then select as highlighted below and choose Apply .
The above software component version must match with that o f the receiver communication channel created for lookup token and sign.
Reference screenshot for RFC receiver communication channel:-
xi.
After creating the parameter ‘RFC Adapter’ in the Signature tab, now open the Definition tab.
xii.
Double click on RFC lookup in the mapping.
xiii.
Select RFCAdapter from the Communication Channel and choose OK .
xiv.
Do the mapping as per the below screenshot for RFC lookup.
The source node comprobanteCAERequest highlighted in red color must be set to “Return as XML”. You can set this by right clicking on the node.
The target mapping for the node ‘comprobanteCAERequest’ looks as shown below.
/ns0:autorizarComprobanteRequest/comprobanteCAERequest=mapWithDefault(rfclo okup(rfctempl=com.sap.aii.ib.bom.flib.types.MTRfcTempl@11b1f33, channel=$RFCAdapter$, mt$insize=8, mt$outsize=1, useExc=false, ref=Function Module BAPI_AR_WS_ARCHIVE_XML | urn:sap-com:document:sap:rfc:functions (CNT-LOC 6.05)), default_value=, result) xv.
Save and activate the message mapping.
b. Modify mapping ‘MM_Response_autorizarComprobante’
i.
Create RFC lookup mapping for the node ‘TYPE’ (path:
/ns1:BAPI_AR_WS_DOMESTIC.Response/RETURN/item/TYPE). Select Conversions for Functions and then drag the RFC Lookup button into the mapping area.
ii.
Once the RFC Lookup is available in mapping, double-click on it to provide its attributes.
It will be as shown below.
iii.
Click on the button
or Choose
.
Then a screen with selection for BAPI will be displayed as given below.
Select the BAPI ‘BAPI_AR_WS_ARCHIVE_XML’ and then click on Apply button.
iv.
Select each field as given in the order and add them to the list using the button a.
CUIT_COMP_CODE
b.
BRNCH
c.
CBTE_TIPO
d.
BUDAT
e.
ODN_FROM
f.
QUANTITY
g.
RESPONSE_XML
h.
XML_MSGID
i.
CAE_STATUS
j.
REGIME
.
v.
The screen would appear as below.
Then choose OK. vi.
Under the Signature tab, create a parameter as RFCAdapter .
The ‘Type’ should be selected as RFC and must be compatible with your PI system version.
For example, if the version is PI 7.11, then select as highlighted below and choose Apply .
The above software component version must match with that o f the receiver communication channel created for lookup token and sign. Reference screenshot for RFC receiver communication channel:-
vii.
After creating the parameter ‘RFC Adapter’ in the Signature tab, now open the Definition
tab. viii.
Double click on RFC lookup in the mapping.
ix.
Select RFCAdapter from the Communication Channel and choose OK .
x.
Do the mapping as per the below screenshot for RFC lookup.
Maintain the parameters for “DateTrans” as given below.
The output date format should be with empty date separator. You can use backspace to remove the default value in that to make it as empty.
The source node ns0:autorizarComprobanteResponse highlighted in red color must be set with “Return as XML”. You can set this by right clicking on the node.
The target mapping for the node ‘TYPE’ looks as shown below.
/ns1:BAPI_AR_WS_DOMESTIC.Response/RETURN/item/TYPE=rfclookup(rfctempl =com.sap.aii.ib.bom.flib.types.MTRfcTempl@299fa7, channel=$RFCAdapter$, mt$insize=8, mt$outsize=1, useExc=false, ref=Function Module BAPI_AR_WS_ARCHIVE_XML | urn:sap-com:document:sap:rfc:functions (CNT-LOC 6.05)) xi.
Save and activate the message mapping.
3. Operation Mapping c.
Modify Operation Mapping OP_autorizarComprobante Interface mapping in PI 7.0 is c alled Operation mapping in PI 7.1. So modify interface mapping in PI 7.0 instead of Operation Mapping.
i.
Choose Definition tab. Under this choose Request tab and then click on
under
Mapping Program. ii.
Add the message mapping ‘MM_Request_autorizarComprobante_XML_Archive’ after the existing entry.
iii.
Choose the Parameters button and the Request tab and create the parameter of type Adapter as shown below.
For the parameter ‘TYPE ’, click on F4 help.
Select the relevant Adapter and choose Apply . The above software component version must match with that of the receiver communication channel created for lookup token and sign.
Reference screenshot for RFC receiver communication channel:-
iv.
Click on button to do the binding for the highlighted message Mapping Parameter under Request tab.
v.
Click on button to do the binding for the message Mapping Parameter under Response tab.
vi.
Save and activate the mapping.
B. Configuration on Integration Directory 1. Modify Interface Determination a. | BS_QV6_700 | BAPI_AR_WS_DOMESTIC | | BC_AFIP
Here BS_QV6_700 is the sender business system (relevant to your SAP system) and BC_AFIP is the business component corresponding to AFIP. a) Choose the RFC Receiver Adapter for the corresponding system as a parameter as shown.
Save and activate it.