Skip to Content
0
Former Member
Feb 18, 2009 at 04:32 PM

Sales - Document Flow

85 Views

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