12-12-2016 10:55 AM
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
12-12-2016 7: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.
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.
12-12-2016 12:01 PM
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
12-12-2016 4:09 PM
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
12-12-2016 7: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.
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.
12-13-2016 10:13 AM
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
12-15-2016 3:08 AM