on 02-18-2009 4:32 PM
Hi All,
I am trying to manually update the document flow on an order in a follow up function from a notification.
After the order is created I am calling BAPI_SALESORDER_CHANGE to update the flow like this:
call function 'BAPI_SALESORDER_CHANGE'
exporting
salesdocument = vbak-vbeln
order_header_inx = la_head_chg
tables
return = lt_return
order_item_in = lt_order_item_in
order_item_inx = lt_order_item_inx.
call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = 'X'.
commit work and wait.
This seems to work fine and I can see the correct flow in the diagram on the order. However the table VBFA is not being updated with a corresponding entry which seems strange as I can't see any other document flow tables.
This is causing an issue where I am trying to update the profit center with a field from the flow at a later stage.
Any ideas what's happening here?
Thanks
Gregor
Hi George
Also include salesdocument = vbak-vbelv under exporting and then check wheather VBFA table is getting updated or not for document flow
I have included the salesdocument = vbak-vbelv in the program and thats why i have copied your program and updated the program by including the salesdocument = vbak-vbelv , so just check this and check this updated program , wheather the VBFA table is working or not
call function 'BAPI_SALESORDER_CHANGE'
exporting
salesdocument = vbak-vbeln
salesdocument = vbak-vbelv
order_header_inx = la_head_chg
tables
return = lt_return
order_item_in = lt_order_item_in
order_item_inx = lt_order_item_inx.
call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = 'X'.
commit work and wait.
Regards
Srinath
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Srinath,
Those document numbers are specified in the import structure order_item in:
wa_order_item_in-itm_number = la_vbap-posnr.
wa_order_item_in-material = g_bvbapkom-matnr.
wa_order_item_in-ref_doc = la_contract-vbeln.
wa_order_item_in-ref_doc_it = la_contract-posnr.
* wa_order_item_inx-profit_ctr = la_contract-vbeln.
wa_order_item_in-ref_doc_ca = 'G'. "G = Contract
append wa_order_item_in to lt_order_item_in.
Something weird is going on!
Hi Gregor
In the import structure order_item you have given that wa_order_item_in-ref_doc_ca = 'G'. "G = Contract, that means only the contract reference documents will be getting updated. Just include another logic telling that wa_order_item_in-ref_doc = la_contract-vbelv .After including then check wheather that table is getting updated or not
Also integrate with the ABAP consultants and then check
Regards
Srinath
User | Count |
---|---|
89 | |
7 | |
7 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.