Skip to Content
0

How can I use BAPI_OUTB_DELIVERY_CHANGE ?

Dec 12, 2016 at 10:55 AM

136

avatar image

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

10 |10000 characters needed characters left characters exceeded

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

0

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

0
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Dan Kennedy Dec 12, 2016 at 07:38 PM
2

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


1.png (27.5 kB)
Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hello Dan ,

Thank you very much for answer my question

I solved my problem with your suggestions, I was trying with the first method call the bapi in report and test. But the return table give me the same result error 004.

So I read the foruns you mention and the problem was solved, beacuse I was doing the item_data table mapping wrong .

Best Regards

Cristina Rodrigues

1

Excellent glad i could help :)

1