06-24-2022 4:13 PM
Hello All,
I am trying to use BAPI_OUTB_DELIVERY_CHANGE to add a Bill Of Lading to a given OBD.
I have found numerous posts about it and have been unsuccessful in implementing a JCo function that accomplishes this task.
JCoTable ext = function.getTableParameterList().getTable("EXTENSION2");
ext.appendRow();
ext.setValue("PARAM", "LIKP");
ext.setValue("FIELD", "BOLNR");
ext.setValue("VALUE", "<SOME BILL OF LADING>");
As well I have specified:
JCoStructure tech = function.getImportParameterList().getStructure("TECHN_CONTROL");
tech.setValue("UPD_IND", 'X');
When I run the function and display the RETURN table I get no errors but BOLNR on the OBD is still blank.
Any advise would be greatly appreciated.
Thanks,
Droughtrye
06-24-2022 5:16 PM
All,
I found the solution:
Instead of using BAPI_OUTB_DELIVERY_CHANGE to change the Bill of Lading. I used WS_DELIVERY_UPDATE.
This enabled me to specify the delivery and a VBKOK structure specifying the BOLNR on that.
As long as you use the commit flag then it will take.
Example:
function.getImportParameterList().setValue("DELIVERY", "0300999584");
function.getImportParameterList().setValue("COMMIT", "X");
JCoStructure vbkok = function.getImportParameterList().getStructure("VBKOK_WA");
vbkok.setValue("BOLNR", "<SOME BILL OF LADING>");
function.execute(destination);
Thanks,
Adam.
06-24-2022 4:41 PM
Hi Ada,
Has the 'SMOD_V50B0001' BADI been implemented appropriately in your back-end system to pass the data from the EXTENSION2 structure to the VBKOK structure?
Regards,
Ryan Crosby
06-24-2022 5:13 PM
Hello,
I am not sure and I don't have the access to the T-Code to check.
I found the solution answering below.
Thanks,
Adam.
06-24-2022 5:16 PM
All,
I found the solution:
Instead of using BAPI_OUTB_DELIVERY_CHANGE to change the Bill of Lading. I used WS_DELIVERY_UPDATE.
This enabled me to specify the delivery and a VBKOK structure specifying the BOLNR on that.
As long as you use the commit flag then it will take.
Example:
function.getImportParameterList().setValue("DELIVERY", "0300999584");
function.getImportParameterList().setValue("COMMIT", "X");
JCoStructure vbkok = function.getImportParameterList().getStructure("VBKOK_WA");
vbkok.setValue("BOLNR", "<SOME BILL OF LADING>");
function.execute(destination);
Thanks,
Adam.