Application Development and Automation 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: 
Read only

Bapi's help

Former Member
0 Likes
963

Hi all

i have to replace BDC PRograms by bapi's.And i have no idea how to proceed. Can anyone help me in understanding of BAPIS. I have no idea abt it but if someone help i will be able to do the changes.

Plz can anyone help.

Thanks in advance

6 REPLIES 6
Read only

jayanthi_jayaraman
Active Contributor
Read only

Former Member
Read only

athavanraja
Active Contributor
0 Likes
798

BAPI is nothing but a RFC enabled function module. there are BAPI available for some of the transactions.(not all)

for example if you want to create a user (instead of generating BDC for SU01) you just call BAPI_USER_CREATE with all the details filled in. then call BAPI_TRANSACTION_COMMIT to commit the changes to the database.

check out transaction BAPI for list of available BAPI's and its documentation.

Regards

Raja

Read only

0 Likes
798

hi

there is a BDC program for:

1.Update Material status based on LTB dates

2.Call transaction MM02

and in loop it call transaction:

CALL TRANSACTION 'MM02' USING BDC_TAB

MODE 'N'

UPDATE 'S'.

So can u help me in knowing which BAPI can be used for this source type to replace with bdc. And If possible can gave me the sample source code also.

thanks

Read only

Former Member
0 Likes
798

Hi Anu,

To give u an abstract idea regarding BAPIs, SAP has designed its applications from OO point of view wherein lots of standard objects like puchase order, notification, prodoction order etc exists. These objects carries data with them which needs manipulation like getting,modifying,uploading the data.

Every object provides standard methods for manipulation of the data. U can not touch the data directly; this concept serves the concept of "Encapsulation".

These standard methods are called as BAPI standing for Business Application Programming Interface. U can view these methods using TCODE "BAPI"

The information about objects is maintained in BOR i.e. Business Object Repository. So BAPI is simply a function module having its entry in BOR. Check Tcode SWO1.

So there exists some standard BAPIs just to get data like "BAPI_FUNCLOC_GETDETAIL". and equally to update the data like "BAPI_FUNCLOC_CHANGE"

In ur case u want to replace BDCs by BAPIs. So just analyse for which objects the BDCs are. Check using BAPI transaction if there exists BAPI for the same functionality. Test the BAPI using SE37 for given test data. Remember that if u r updating ur data using BAPI; u should use BAPI_TRASACTION_COMMIT which will commit the data.

This was very abstract view. If u need further assistance, revert back to me. If u r satisfied with answer, award the same appropriately.

Regards,

Nitin

Read only

Former Member
0 Likes
798

Hi,

See FM BAPI_MATERIAL_SAVEDATA.

See the documentation of this FM

Regards,

Vin