‎2007 Sep 27 4:13 AM
Hi Experts,
I am beginner in bapi. I have done data transfer using bdc but now have to done using BAPI. Please help,as it's urgent.
Points sure.
Anshu
‎2007 Sep 27 4:29 AM
BAPI as the simplest form of BDC
Let me give you an example, it will give you some idea...
Let us use BAPI FM "BAPI_ACC_GOODS_MOV_REV_CHECK" i.e Goods Movement Reversal
It has two parameters,
REVERSAL
RETURN
and you have to pass populate your internal table and pass to the parameters and in return your internal table will be populated with respective values and messages...
<u>Reversal document number contains:</u> should be populated and send to <b>REVERSAL</b>
OBJ_TYPE Sender ID
OBJ_KEY Reference number of the reversal document (source document)
OBJ_SYS Logical system
OBJ_KEY_R Reference number of the document to be reversed.
You will see RETURN populated in return with
The first message contains the general status of processing:
Type ID Number Message
S RW 605 Document posted successfully
S RW 614 Document check without errors
A RW 609 Error in document
The fields MESSAGE_V1, MESSAGE_V2 and MESSAGE_V3 contain the following information:
Reference transaction ( OBJ_TYPE)
Reference key ( OBJ_KEY)
Logical system of source document ( OBJ_SYS)
Additional messages are transferred with the following information:
Parameter ( PARAMETER)
Row ( ROW)
Field ( FIELD)
in which the error occurred.
Regards,
SaiRam
‎2007 Sep 27 4:18 AM
Hi Anshu,
Do you mean to say data upload?
If yes then just treat the BAPI as the more precise format of BDC and pass all the data to relevent tables in the BAPI and call the BAPI.
Just search the forum with BAPI material and you will get lots of material.
Regards,
Atish
‎2007 Sep 27 4:29 AM
BAPI as the simplest form of BDC
Let me give you an example, it will give you some idea...
Let us use BAPI FM "BAPI_ACC_GOODS_MOV_REV_CHECK" i.e Goods Movement Reversal
It has two parameters,
REVERSAL
RETURN
and you have to pass populate your internal table and pass to the parameters and in return your internal table will be populated with respective values and messages...
<u>Reversal document number contains:</u> should be populated and send to <b>REVERSAL</b>
OBJ_TYPE Sender ID
OBJ_KEY Reference number of the reversal document (source document)
OBJ_SYS Logical system
OBJ_KEY_R Reference number of the document to be reversed.
You will see RETURN populated in return with
The first message contains the general status of processing:
Type ID Number Message
S RW 605 Document posted successfully
S RW 614 Document check without errors
A RW 609 Error in document
The fields MESSAGE_V1, MESSAGE_V2 and MESSAGE_V3 contain the following information:
Reference transaction ( OBJ_TYPE)
Reference key ( OBJ_KEY)
Logical system of source document ( OBJ_SYS)
Additional messages are transferred with the following information:
Parameter ( PARAMETER)
Row ( ROW)
Field ( FIELD)
in which the error occurred.
Regards,
SaiRam
‎2007 Sep 27 4:33 AM
‎2007 Sep 27 4:36 AM
Hi Anshu,
check below link
http://www.erpgenie.com/sap/abap/example_code.htm
you can find some sample code here.
Regards,
Atish