2024 Jul 18 9:11 AM - edited 2024 Jul 18 9:26 AM
Hi, I have this requirement where in exit ZXLTOU02 I create an HU with BAPI_HU_CREATE and then assign this HU to the outbound delivery with BAPI_HU_CHANGE_HEADER.
I tried to pack the material of the outbound delivery with BAPI_HU_PACK in the same user exit ZXLTOU02.
My problem here is that I can get all done but in the outbound delivery I have the HU with a packed material but not the one in the outbound delivery. I'ts like the material item is not linked to the outbound delivery.
Here 2 pics.
The first one with my HU and its material linked to it.
The second one showing that, the material of the outbound delivery remains unpacked even though the first pick shows other thing.
I have read that you can update the outbound delivery and assign the HU and it's content through WS_DELIVERY_UPDATE but I can not find where I should implement this.
Any idea is welcome
Hello @Daderiga
You can't pack deliveries with like BAPI_HU_PACK. It is explained in the note 581282 - Packing of deliveries via BAPI or function module
The note recommends to use either WHSCON IDocs or the WS_DELIVERY_UPDATE function. The former is preferable as the function is not released for customer usage.
I'd suggest to trigger WHSCON IDoc from the ZXLTOU02 exit. The IDoc functionality is documented on SAP Help Delivery Interface This way you'll have a SAP supported solution with a robust, workflow enabled error handling out-of-the-box.
Best regards
Dominik Tylczynski
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Daderiga
No, I don't know that of the top of my head. However you can easily figure it out by yourself. Use WE19 to build WHSCON IDoc as described on the SAP Help page that I have provided previously. Once you are satisfied with how the IDoc packs the delivery, put a break point in WS_DELIVERY_UPDATE and WS_DELIVERY_UPDATE_2 - WHSCON IDocs are processed by one of those functions, I don't remember by which one exactly. This way you can get the right parameters to call the function.
However, I'd suggest to use WHSCON IDocs, instead of calling WS_DELIVERY_UPDATE directly. It's much better - standard solution supported by SAP, robust error processing.
Best regards
Dominik Tylczynski
User | Count |
---|---|
109 | |
8 | |
8 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.