Skip to Content
avatar image
Former Member

LSMW Methods - BAPI and IDOC - why used together?


There are four mathods available in LSMW:

- Direct Input




Among these BAPI and IDOC always go hand in hand. In case we choose to go in for IDOC, we will have to enter the partner profile settings for an inbound IDOC. But in case we choose to go with th BAPI method, even then we have to mention the inbound IDOC settings.

I would like to know why is this so; if there is a provision for two separate methods, why do we need to use IDOC if a BAPI is selected.

Please advise.



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Oct 10, 2008 at 08:09 PM

    In LSMW, BAPI method by default uses iDoc as a medium exchange in order to be passed as parameters to it. Actually, a text file is created when you convert the data with iDoc format. From there, you have two options: Either go on with LSMW steps (create idocs from text file, then run idoc transactions) OR go on with SXDA workbench (create a project there and run a job which essentially calls the BAPI).

    There are two different methods because SAP developed them at different times. First, they had the ALE layer (as middleware for SAP to SAP/non-SAP communication) that uses the idoc as medium exchange, then at a later time BAPIs were developed as RFC function modules/object methods. Since idoc were already in place, they used that as medium exchange for BAPIs, too.

    I hope that is clearer now.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 27, 2008 at 11:31 AM

    IDOC came in before BAPIs. BAPIs came in an enhanced version of SAP which included the functionality of IDOCs as well.

    Add comment
    10|10000 characters needed characters exceeded