10-24-2007 9:12 AM
Hi everybody,
how can I change customer fields in table VBKD by using BAPI BAPI_CUSTOMERCONTRACT_CHANGE.
10-24-2007 9:22 AM
Hi..
This is the Sample code. Change it as per ur need.
d_VBELN = '50000172'.
contract_header_inx-updateflag = 'U'.
CLEAR contract_items_in.
contract_items_in-itm_number = '100'.
contract_items_in-material = 'H51-YY019'.
contract_items_in-target_qty = '2'.
APPEND contract_items_in.
contract_items_inx-updateflag = 'U'.
contract_items_inx-itm_number = '100'.
contract_items_inx-material = 'X'.
contract_items_inx-target_qty = 'X'.
APPEND contract_items_inx.
CALL FUNCTION 'BAPI_CUSTOMERCONTRACT_CHANGE'
EXPORTING
SALESDOCUMENT = D_VBELN
contract_header_in = contract_header_in
contract_header_inx = contract_header_inx
TABLES
return = return
contract_item_in = contract_items_in
contract_item_inx = contract_items_inx.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
<b>Reward if Helpful.</b>
10-24-2007 9:39 AM
I´m afraid that does not answer my question... sorry if it wasn´t clear.
The code you posted will change standard VBKD-fields, so far so good.
What I need to change are customer fields added to VBKD with an append.
10-24-2007 10:09 AM
08-01-2012 6:40 PM
How to update VBKD customer fields:
- Extend structure VBKDKOM as VBKD was extended.
- Extend structure VBKDKOMX
- Extend structure BAPE_VBAK with VBKD customer fields
- Extend structure BAPE_VBAKX
- In bapi, use the table parameter extension_in with your VBKD customer fields filled in bape_vbak.