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
Madhu.
Combination example is very talktosonic, i really found something interesting to learn.
All survey types, including online surveys, follow the same steps: Determine your objectives. Select respondents. Create a data analysis plan. Develop the survey. Pre-test the survey. Distribute and conduct the survey.
https://takesurveyz.onl/
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 the zprogram there is a function module used 'CONVERT_BDCMSGCOLL_TO_BAPIRET2'. ...krogerfeed.........
*”*”Local Interface:
*” IMPORTING
*” VALUE(MATNR) TYPE ZBAPI_ADIIMPORT-MATNR
*” EXPORTING
*” VALUE(RETURN) TYPE BAPIRETURN
*” TABLES
*” ZTABLE STRUCTURE ZBAPI_ADIEXPORT
*”———————————————————————-select matnr werks from marc
into TABLE ztable
where matnr eq matnr.
if sy-subrc eq 0.
“Update BAPI return table accordingly to show success here
else.
“Update BAPI return table accordingly to show failure here
ENDIF.
ENDFUNCTION.
Logic of our BAPI is simple; it fetches matnr and werks 192.168.0.1 value from marc table based on input matnr values and fills the BAPI table. Lets test the FM, click execute and input a test data