2008 Mar 29 10:43 AM
Hi All,
I am changing a Sales Doc. using following Module.
I need to change the value of 'Billing Block' as 02 or space (at header level in VA02) depending on some condition.
Code is as follows.
GW_HEADER-COLLECT_NO = gv_vbeln
gw_header-BILL_BLOCK = gv_faksk " 02 or space
gw_item-UPDATEFLAG = 'U'
GW_ITEM-BILL_BLOCK = 'X'
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
salesdocument = gv_vbeln
ORDER_HEADER_IN = gw_header
order_header_inx = gw_item
SIMULATION = 'X'
tables
return = gt_return.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
now in the return parameter gt_return is getting message 'ORDER_HEADER_IN' is processed successfuly.
But when i am checking in VA02, the screen field is not changed accordingly.
Please help me.
Thanks in Advance,
Subhani.
2008 Mar 31 3:40 AM
Note that irrespective of what fields we need to change, we have pass the values for the Key Fields like Sales orgn, Dist. Chan, Div... with the update indicators. Try passing the same for the FM and check.
2008 Mar 31 5:17 AM
Hi,
Can you try commiting using WAIT parameter as space.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
Reward points if it helpful.
Thanks,
Prasanna
2008 Mar 31 9:39 AM
2008 Apr 01 6:49 PM
Hello Subhani,
First, clear the SIMULATION parameter.
When this doesn't work, set a break-point at the IF-block after the COMMIT WORK AND WAIT in the FM BAPI_TRANSACTION_COMMIT and see of the COMMIT is successfully performed.
Hope this helps,
Heinz
2008 Nov 28 2:57 PM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |