2010 Feb 25 9:07 AM
Hi,
If anyone have had worked on VBAP/VBAK extension with more than one custom fields and have used BAPI_SALES ORDER_CHANGE to update the Sales order, please help with a sample code how to implement it..
Thanks in adv,
Shiv
2010 Feb 27 8:45 AM
Hi,
To use user defined field that is extension you need to populate extension structure as well as communication structures.
If you are adding to the header level then add fields to below structure
BAPE_VBAK
BAPE_VBAKX
If you are adding to the header level then add fields to below structure
BAPE_VBAP
BAPE_VBAPX.
2010 Feb 27 8:45 AM
Hi,
To use user defined field that is extension you need to populate extension structure as well as communication structures.
If you are adding to the header level then add fields to below structure
BAPE_VBAK
BAPE_VBAKX
If you are adding to the header level then add fields to below structure
BAPE_VBAP
BAPE_VBAPX.
2010 Mar 02 11:42 AM
Hi Rohit,
Thanks for your inputs. I have maintained the below structures with the new custom fields.
VBAPKOZ, VBAPKOZX
BAPE_VBAP, BAPE_VBAPX
I am updating at the item level.
I just wanted to have idea on the coding part. Could anyone send me some sample code which updates more than 1 custom fields through BAPI...?
Thanks in adv,
Shiv
2010 Mar 09 5:17 AM
Hi,
Suppose i want to add 2 fields in extnesion.
w_pricing
w_shipping
Then,
data: ls_ext_head TYPE bape_vbak,
ls_ext_headx TYPE bape_vbakx,
MOVE w_pricing TO ls_ext_head-zzmatm.
MOVE w_shipping TO ls_ext_head-zzmatmshp.
MOVE: 'BAPE_VBAK' TO ls_bapiparex-structure,
ls_ext_head TO ls_bapiparex+30(960).
APPEND ls_bapiparex TO lt_bapiparex.
CLEAR : ls_ext_head,
ls_bapiparex.
MOVE U TO ls_ext_headx-zzmatm.
MOVE U TO ls_ext_headx-zzmatmshp.
MOVE: 'BAPE_VBAKX' TO ls_bapiparex-structure,
ls_ext_headx TO ls_bapiparex+30(960).
APPEND ls_bapiparex TO lt_bapiparex.
Send lt_bapiparex to BAPI.
Please rewards if it helps you to do further design.
2010 Mar 15 9:46 AM