‎2005 Aug 17 12:01 PM
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
‎2005 Aug 17 12:13 PM
‎2005 Aug 17 12:17 PM
Hi,
also look at
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
Regards,
Vin
‎2005 Aug 17 12:20 PM
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
‎2005 Aug 17 12:42 PM
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
‎2005 Aug 17 12:31 PM
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
‎2005 Aug 17 12:54 PM
Hi,
See FM BAPI_MATERIAL_SAVEDATA.
See the documentation of this FM
Regards,
Vin