Skip to Content
avatar image
Former Member

VBAP table is not getting updated through BAPI_SALESORDER_CHANGE

Hi Experts,

I have suspended an order, there is a back ground job which use to reinstate it automatically but now it not changing its status to reinstate i have checked that inside BAPI_SALESORDER_CHANGE , i am getting error message adline status can not be changed and sales document was not changed.

Please help me on this.

Thanks,

Trupti

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Sep 20, 2010 at 01:44 PM

    Hi,

    Check the Lock statsu of the sales order.

    and check whether are you passing the Item detials .

    above all check the Bapi return messages for correct reason.

    Prabhudas

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 20, 2010 at 01:45 PM

    What number and class message the system returns?

    I cannot understand the error type you get :\

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 21, 2010 at 10:16 AM

    after 'BAPI_SALESORDER_CHANGE u have to call 'BAPI_TRANSACTION_COMMIT

    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
      EXPORTING
        salesdocument     = p_vbeln
        order_header_in   = s_order_header_in
        order_header_inx  = s_order_header_inx
        behave_when_error = 'P'
      TABLES
        return            = it_return
        order_item_in     = i_order_item_in
        order_item_inx    = i_order_item_inx
        schedule_lines    = i_sched
        schedule_linesx   = i_schedx.
    
    
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
      EXPORTING
        wait = 'X'.
    
    LOOP AT it_return.
      WRITE / it_return-message.
    ENDLOOP.
    

    Add comment
    10|10000 characters needed characters exceeded