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: 

LSMW Question...

Former Member
0 Kudos

How to decide if we should use BAPI, IDOC or Direct input for LSMW ?

Which is the best choice.

Thanks.

Regards,

Tushar.

3 REPLIES 3

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Well, I would say that if there is a direct input or batch input routine which is already defined by SAP, then I would use that. Next choice would be to use BAPI.

I have never used Idocs, so I don't really have a comment on that.

Regards,

Rich Heilman

0 Kudos

You have to understand your requirement and what advantages and disadvantages each of these methods offer and decide what is best for your requirement.

When you have standard objects to load data into the system, then doing it through LSMW is the best option. LSMW relieves you of the pains of mapping, file activities etc. But its disadvantage is that if you have some complex requirement, then coding that into the mapping at the appropriate locations can be very tricky.

Direct input has the advantage of saving time because it hits the database directly without going through screens which will take up the time of loading screens, going through screen flow etc. Disadvantage is that if there are errors, it is very difficult to recover.

BAPIs are real time, so you get the messages back and you have to decide what to do with those messages. So you have to code for handling the messages. Advantage is that you can it is real time so you can do something else based on the return status.

IDOC are asynchronously posted to the application(exceptions are there). Data in IDOC format is persistantly stored and so you don't have to go back to the source to get the data. Disadvantage, apart from being asynchronous, is that formatting your source data into an IDOC can be tedious. Again this depends on whether it is outbound or inbound.

All said and done, LSMW uses all the above methods(Direct Input, BDC, BAPI, IDOC), so you need to make the same decisions even if you are using LSMW. Some BAPIs use IDOCs internally.

You also have to remember that all these data transfer tools came in at different points of time. As SAP evolved, new tools are introduced. That does not mean that newer tools are best suited than older ones, but you have to weigh each one of them against your requirements.

Questions to ask.

Will standard ones achieve all the data transfer or do I need to do a second pass?

Once data is read, do I want system to hold the data in some format or discard it?

Do I need data to be loaded, all or none mode or whatever that can be loaded mode?

Do I have to do additional processing after each transaction(realtime vs asynchronous/batch processing)?

Happy decision making!!!

Srinivas

Former Member
0 Kudos

Hi Tushar,

Check this thread out

SESSION & CALL TRANSACTION

What is the difference between batch input and call transaction in BDC?

Session method.

1) synchronous processing.

2) can tranfer large amount of data.

3) processing is slower.

4) error log is created

5) data is not updated until session is processed.

Call transaction.

1) asynchronous processing

2) can transfer small amount of data

3) processing is faster.

4) errors need to be handled explicitly

5) data is updated automatically

<b>BAPI VS IDOC</b>

http://www.sap-img.com/fu033.htm

<b>LSMW</b>

http://www.sap-img.com/sap-data-migration.htm

Regards,

Santosh