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: 

when to use a BAPI ?

Former Member
0 Kudos

Hi,

This might seem like a simple question to all the experts here. Can anyone give me some real time scenario where BAPIs "must be" used.

I completely understand how to call BAPIs from ABAP, java etc.. I have the compete list of all Standardized BAPIs. My question is when will we decide that in this situation we need to use the standardized BAPIs or create a new BAPI ??

When I browse for samples I get code such as to create a sales order thru a BAPI. When will we go for creating a sales order thru a BAPI and not the standard SAP screen ??

Just need some clear understanding on this..

thanks for ur time

6 REPLIES 6

Former Member
0 Kudos

Hi Rad,

1. Lets say you are moving your legacy data into SAP system at this time you can use BAPI to load the data.

2. You have two comapnies and parent company is on SAP and the other one on some other ERP, you need to move the data from one system to other then also you can download data in flat files and use BAPI to load the data.

Regards,

Atish

Former Member
0 Kudos

Hi,

I will explain w.r.t sales order.

If you want to create the sales order by screen method you have to record every screen and you have to write the BDC program to create the sales order.Even though there is possiblity to errors in the sales order there is different screens for different tabs.

In the case of BAPI simply you have to fill the differnet internal tables as per your requirement and simply pass to bapi function module then BAPI will take care the sales order creation.

2) If you use BAPI there is a option that TEST RUN i.e. you can test with the given data what is probable erors or success messages.By using this method you can delete the errors in the file then you can create the sales order with correct data.

3)If you use the BAPI then all the messages will be come into BAPIRETURN internal table you can simply display in the output.In the case of BDC you have the write the code to populate the messages.

Thanks and regards,

shyla

0 Kudos

Thanks a lot Atish and Shyla. Examples are fine.

We have something called LSMW, ALE (IDOC) ... Why do we have these then ?? For data migration or transfer , why SAP is having these different techniques like LSMW, ALE, BDC, BAPI ?? There must be some reason, right ??

Can you give me an example which clearly distinguishes in a situation, like any of the other techniques cannot be used and hence we need to go for using the BAPI ??

Ur explanation says BAPI is like a substitute to LSMW or ALE(IDOC) to make the job easier. I need a scenario which can be exclusively achieved only thru use of BAPI ??

thanks in advance...

0 Kudos

Hi,

BAPI's are supported thourgh releasechanges. with LSMW and BDC changes in screens (by SAP or by custom screen changes) can have unwanted effects on the BDC and LSMW

Regards,

Omkar.

0 Kudos

Thanks Omkaram.

Former Member
0 Kudos

hi

just refer to the link below

http://www.sapmaterial.com/?gclid=CN322K28t4sCFQ-WbgodSGbK2g

u may probably dont have any doubt after lookink it.

regards

ravish

<b>plz dont forget to reward points if helpful</b>