Monday, 15 January 2018

Exchange Rate Sync using IDoc

In the source system: in my case it was ECC – D01 800

Tcode: BD64 – Distribution Model

SAP ABAP Certifications, SAP ABAP Guides, SAP ABAP Tutorial and Materials

Click on Edit, Select the node and click on Add BAPI

SAP ABAP Certifications, SAP ABAP Guides, SAP ABAP Tutorial and Materials

Add the Obj Name/Interface: ExchangeRate and Method: SaveReplica

SAP ABAP Certifications, SAP ABAP Guides, SAP ABAP Tutorial and Materials

SAP ABAP Certifications, SAP ABAP Guides, SAP ABAP Tutorial and Materials

Go to Environment -> Change Partner Profile

SAP ABAP Certifications, SAP ABAP Guides, SAP ABAP Tutorial and Materials

This takes us to tcode WE20 for partner profile maintenance

SAP ABAP Certifications, SAP ABAP Guides, SAP ABAP Tutorial and Materials

For partner type LS (Logical System), choose the destination system (D09CLNT100 in this case)

SAP ABAP Certifications, SAP ABAP Guides, SAP ABAP Tutorial and Materials

Add a new parameter in the Outbound Parameters section

SAP ABAP Certifications, SAP ABAP Guides, SAP ABAP Tutorial and Materials

Message Type: EXCHANGE_RATE; Basic Type: EXCHANGE_RATE01

SAP ABAP Certifications, SAP ABAP Guides, SAP ABAP Tutorial and Materials

Once saved, go back to the Distribution Model tcode BD64. Select the model view -> Edit -> Model View -> Distribute. Select the receiver of the model view from the list

SAP ABAP Certifications, SAP ABAP Guides, SAP ABAP Tutorial and Materials

Log is displayed

SAP ABAP Certifications, SAP ABAP Guides, SAP ABAP Tutorial and Materials

In the destination system (in my case it is RAR D09 100)

Go to tcode WE57 – Idoc assignment of FM to Log. Message and Idoc Type (Cross Client Settings). Create the following assignment:

SAP ABAP Certifications, SAP ABAP Guides, SAP ABAP Tutorial and Materials

Go to tcode BD51 – Characteristics of Inbound Functional Modules. Add entry for FM BAPI_EXCHANGERATE_SAVEREPLICA (Cross Client Settings)

SAP ABAP Certifications, SAP ABAP Guides, SAP ABAP Tutorial and Materials

Go to tcode WE20 to maintain partner profiles for Partner Type LS and Partner No. = <Source Partner System> (D01 800 in this case)

SAP ABAP Certifications, SAP ABAP Guides, SAP ABAP Tutorial and Materials

Add a new inbound parameter

SAP ABAP Certifications, SAP ABAP Guides, SAP ABAP Tutorial and Materials

New parameter details: Message Type – EXCHANGE_RATE; Process Code – BAPI

SAP ABAP Certifications, SAP ABAP Guides, SAP ABAP Tutorial and Materials

Once the Idoc is setup, in the source system make a change in the forex using tcode OB08

SAP ABAP Certifications, SAP ABAP Guides, SAP ABAP Tutorial and Materials

Current setup in destination system:

SAP ABAP Certifications, SAP ABAP Guides, SAP ABAP Tutorial and Materials

Run program RFALEX00 in the source system to transfer the changes through Idoc.

SAP ABAP Certifications, SAP ABAP Guides, SAP ABAP Tutorial and Materials

Log is displayed

SAP ABAP Certifications, SAP ABAP Guides, SAP ABAP Tutorial and Materials

In the target system check that the update has happened as expected

SAP ABAP Certifications, SAP ABAP Guides, SAP ABAP Tutorial and Materials

Idocs can be viewed in tcode BD87/WE02

SAP ABAP Certifications, SAP ABAP Guides, SAP ABAP Tutorial and Materials

No comments:

Post a Comment