Skip to Content
avatar image
Former Member

How can I use BAPI_OUTB_DELIVERY_CHANGE ?

Hello Experts ,

I can't used this bapi for update my fields. I tried to update delivery quantity but didn't result. I tested by t-code se37 and I used commit to done the process. But I don't have any result. Can you please give me an example how can I use this ?

Best Regards

Cristina Rodrigues

Add comment
10|10000 characters needed characters exceeded

  • Former Member

    Hi Cristina,

    Pls. check the FM Documentation...details are provided there. Examples are also provided.

    Let me know in case of further information.

    Regards,

    Praphul

  • Former Member Former Member

    Thank you for your answer.


    I followed the documentation with my colleague and I have the same result type: E , ID: VLBAPI, NUM: 004. I searched on the forum and in other places and nothing work. Do you can use this function well ?

    Best Regards

    Cristina Rodrigues

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Dec 12, 2016 at 07:38 PM

    Have you debugged your code? Check the sy-subrc value and also the return table to see if an error is populated

    Keep in mind this is not working code, more an example to get the return table for you to investigate further.

    DATA: lt_return    TYPE STANDARD TABLE OF bapiret2,
          ls_head_data LIKE bapiobdlvhdrchg,
          ls_head_cont LIKE bapiobdlvhdrctrlchg,
          ls_delivery  LIKE bapiobdlvhdrchg-deliv_numb.
    
    " You need to insert your structure population logic here before passing to the function module
    " I dont know how you are currently doing that and i have left them blank - You may also use additional structures/tables
    " in the BAPI call.
    
    CALL FUNCTION 'BAPI_OUTB_DELIVERY_CHANGE'
      EXPORTING
        header_data    = ls_head_data
        header_control = ls_head_cont
        delivery       = ls_delivery
    *   TECHN_CONTROL  =
    *   HEADER_DATA_SPL =
    *   HEADER_CONTROL_SPL =
    *   SENDER_SYSTEM  =
      TABLES
    *   HEADER_PARTNER =
    *   HEADER_PARTNER_ADDR =
    *   HEADER_DEADLINES  =
    *   ITEM_DATA      =
    *   ITEM_CONTROL   =
    *   ITEM_SERIAL_NO =
    *   SUPPLIER_CONS_DATA =
    *   EXTENSION1     =
    *   EXTENSION2     =
        return         = lt_return
    *   TOKENREFERENCE =
    *   ITEM_DATA_SPL  =
    *   COLLECTIVE_CHANGE_ITEMS =
    *   NEW_ITEM_DATA  =
    *   NEW_ITEM_DATA_SPL =
    *   NEW_ITEM_ORG   =
    *   ITEM_DATA_DOCU_BATCH =
      .
    
    BAPI_TRANSACTION_COMMIT.
    

    Alternatively use SE37, populate your data as before and execute in debug mode. Or first execute normally and look at the Return table for any errors. Debug further if necessary.

    1.png

    Let us know if you can get any more useful information from there and we can assist further.

    EDIT: I just noticed your comment above with the error. Please read the following links to see if it helps with your same error issue.

    https://archive.sap.com/discussions/thread/533728

    http://sap.ittoolbox.com/groups/technical-functional/sap-log-sd/doubts-in-bapi_outb_delivery_change-850269#M850526

    Add comment
    10|10000 characters needed characters exceeded