Table of Contents
A. Enterprise Service Repository ............................................................................................................... 2
1. Imported Objects .............................................................................................................................. 2
2. Message Mappings ........................................................................................................................... 2
a. Create mapping ‘MM_Request_autorizarComprobante_XML_Archive’ ..................................... 2
b. Modify message mapping ‘MM_Response_autorizarComprobante’ ........................................... 9
3. Operation Mapping ......................................................................................................................... 17
c. Modify Operation Mapping OP_autorizarComprobante ............................................................ 17
B. Configuration on Integration Directory .............................................................................................. 21
1. Modify Interface Determination ..................................................................................................... 21
a. | BS_QV6_700 | 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’
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;
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.
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 in the response parameters.
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 of 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)
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.
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 of the receiver
communication channel created for lookup token and sign.
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.
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))
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.
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.
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.