2016 Feb 10 11:11 AM
Hi All,
FM 'WS_DELIVERY_UPDATE_2' is not working when we use alternate UOM in sales document.
In my case in material master the UOM is 'EA'. But I used UOM is 'PAC' in SO. Now by using one Z program 1 am doing PGI but the picking quantity is changed.If I pass picking quantity 2 then after PGI it will 1.
Can anyone suggest me how to erase this issue.
Thanks,
Satya
2016 Feb 10 12:04 PM
Hi Guys,
I found the solution. Here we have to pass the actual quantity LIPS-LGMNG. because the FM could not understand the relation between the Alternate UOM between material master and sales document. So If we pass the value to the table vbpok_tab. Then the problem is solved now.
Thanks and Cheers...
Satya
2016 Feb 10 11:17 AM
You have to fill these fields for each item
UMVKZ | 1 Types | UMVKZ | DEC | 5 | 0 | Numerator (factor) for conversion of sales quantity into SKU |
UMVKN | 1 Types | UMVKN | DEC | 5 | 0 | Denominator (Divisor) for Conversion of Sales Qty into SKU |
VRKME | 1 Types | VRKME | UNIT | 3 | 0 | Sales unit |
MEINS | 1 Types | MEINS | UNIT | 3 | 0 | Base Unit of Measure |
If you already got the delivery, you have them on LIPS table, otherwise UMVKZ and UMVKN are read from MARM with VRKME (took from VBAP) and MEINS (took from MARA)
I do not remember (do some tests by yourself) if you also need UMREV field
2016 Feb 10 11:17 AM
2016 Feb 10 11:34 AM
Sorry but which other clue you need?
I gave you the fields you MUST fill to avoid the issue and I also explained where to retrieve them.
Whatelse you need?
2016 Feb 10 11:55 AM
Hi
Always good to use BAPI's instead of FM's
Sample code I used for updating the quantity and UoM, Also there is a difference in passing UoM values....need to convert UoM values into their ISO codes.. for example PCE should be ST and so on.
ls_header_data-deliv_numb = ls_delivery_update-vbeln.
ls_header_control-deliv_numb = ls_delivery_update-vbeln.
lv_delivery = ls_delivery_update-vbeln.
ls_tech_control-upd_ind = 'U'.
CLEAR ls_delivery_update.
LOOP AT lt_delivery_update INTO ls_delivery_update.
ls_item-deliv_numb = ls_delivery_update-vbeln.
ls_item-deliv_item = ls_delivery_update-posnr.
ls_item-dlv_qty = ls_delivery_update-nista.
ls_item-base_uom = ls_delivery_update-meins.
ls_item-sales_unit = ls_delivery_update-vrkme.
ls_item-fact_unit_nom = ls_delivery_update-umvkz.
ls_item-fact_unit_denom = ls_delivery_update-umvkn.
APPEND ls_item TO lt_item.
ls_item_control-deliv_numb = ls_delivery_update-vbeln.
ls_item_control-deliv_item = ls_delivery_update-posnr.
ls_item_control-chg_delqty = 'X'.
APPEND ls_item_control TO lt_item_control.
ENDLOOP.
CALL FUNCTION 'BAPI_OUTB_DELIVERY_CHANGE'
EXPORTING
header_data = ls_header_data
header_control = ls_header_control
delivery = lv_delivery
techn_control = ls_tech_control
TABLES
item_data = lt_item
item_control = lt_item_control
return = lt_return.
READ TABLE lt_return INTO ls_return WITH KEY type = 'E'.
IF sy-subrc = 0.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
lv_error_flag = 'X'.
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
ENDIF.
Regards
Dwaraka
2016 Feb 10 12:04 PM
Hi Guys,
I found the solution. Here we have to pass the actual quantity LIPS-LGMNG. because the FM could not understand the relation between the Alternate UOM between material master and sales document. So If we pass the value to the table vbpok_tab. Then the problem is solved now.
Thanks and Cheers...
Satya