Combination of Bapi and Bdc
All are familiar how to use BDC recording and update the records. Similarly using of BAPI function modules we can create and get the records. In this document we will see how to use the combination.
There is a good class CMD_EI_API to create customer but we do not have any standard bapi to create customer. Few years back i got the requirement to map ba[i fields to create customers. I tried this combination and got it.
1) Created on ZBAPI_CUST_CREATE
2) Record the transaction XD01 and create customer with the record fields
3) Copy the BDC program into a zprogram
4) Create the required structure for the mapping fields.Need to declare a table with bdcdata,bapiret1,bdcmsgcol.
5)In the zprogram at the start-of-selection import the data from bapi fm . In the zprogram there is a function module used ‘CONVERT_BDCMSGCOLL_TO_BAPIRET2’. The return parameters if this fm is the input return parameter to zbapi _cust_create .
Output after creating customer
Yours Suggestions are Welcome