Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Transfer Data from SAP to existed System on Save and Update Using BADI Functions

Former Member
0 Kudos
238

Hello Gurus,

I am a newbie on SAP, we have newly implemented SAP, and we are doing the integration with the already existing system. What we want to to do is transfer the data to our old system on any new or update record on the MIGO and MIRO.

Please advice what is the best way to do so.

Thank you in advance.

Jack

3 REPLIES 3

matt
Active Contributor
0 Kudos
114

What mechanisms does your old system offer to interface to it?

Former Member
0 Kudos
114

Web service

Former Member
114

Hello Jack,

there are basically two ways of realizing this requirement:

1) Using SAP standard interface technology

You can use the standard IDoc interface technology of SAP to trigger an sending process each time when a goods or invoice document is created or changed. The relevant IDoc types can be found easily and you need to make sure, that the change pointers for the IDoc types are activated in transaction BD61.

Then you can create a web service out of the outbound IDoc like described here:

https://blogs.sap.com/2017/03/07/outbound-idoc-as-web-service-xmljson/

Each time, when den SAP standard IDoc framework triggers an IDoc, this is sent out to the partner system. The advantage is, that you don't need to do much coding and maintain customer code later on.

2) Programming a BAdI with manual service call

You can also have a look for a BAdI, which is processed when a SAVE event is triggered in MIGO or MIRO. If you don't know, how to find a BAdI, this article will help you:

https://wiki.scn.sap.com/wiki/display/ABAP/Find+a+BADI+in+a+minute

You can then finally implement the web service call like described in this very good article within the BAdI:

https://blogs.sap.com/2013/06/06/create-an-sap-web-service-consumer-calling-external-web-service-fro...

You should maybe put this coding in a wrapper function module and call this in a separate process to make sure, that the web service call does not affect or delay the main SAVE process in MIGO or MIRO.

I would prefer variant 1, as it is more SAP standard conform and you can use all out-of-the-box features of IDoc framework.

Hope this helps you to solve your issue.

Best regards

Markus