2014 Apr 01 3:10 PM
Dear all,
Does anyone know how I can change the delivery quantity ?
What we ant to achieve is the following:
- an order has been created with a quantity in sales units for example 10 BAG
- at creation of delivery, we would like to convert the sales order quantity to the unit of issue (MARC-AUSME) if this one is different from the sales order sales unit (for example PAL iso BAG) ...
I tried a few things yet to change the quantity (and unit) to the converted one, but it all didn't work ...
Any idea how this can be done ?
Thanks in advance !
Greetz,
Kurt.
2014 Apr 10 9:30 AM
Problem will be 'solved' by changing the values only on printouts ...
Thanks to everyone anyway for thinking about this problem !
Dear all,
Does anyone know how I can change the delivery quantity ?
What we ant to achieve is the following:
- an order has been created with a quantity in sales units for example 10 BAG
- at creation of delivery, we would like to convert the sales order quantity to the unit of issue (MARC-AUSME) if this one is different from the sales order sales unit (for example PAL iso BAG) ...
I tried a few things yet to change the quantity (and unit) to the converted one, but it all didn't work ...
Any idea how this can be done ?
Thanks in advance !
Greetz,
Kurt.
2014 Apr 01 3:18 PM
SO is this just a UOM thing? You need to change the UOM and have the quantity change as calculated by UOM conversion? There are FM's to do that.
Please correct me.
Neal
2014 Apr 01 3:28 PM
Hoi Neal,
First of all thanks for the answer !
It's not only the UoM that must change, but also the quantity ...
For example : the sales order has been created with quantity 10 BAG
The material has as unit of issue 'PAL', so the delivery-quantity should be in PAL ... Normally at delivery-creation, the quantity should also be 10 BAG, but we want it in PAL ... When I do the conversion at 'USEREXIT_MOVE_FIELD_TO_LIPS', it has no effect ...
So, what I need to know is the place where I can do the conversion to be effective ?
Greetz,
Kurt.
2014 Apr 01 3:39 PM
2014 Apr 01 4:08 PM
select single kwmeng vrkme into (lv_kwmeng,lv_vrkme)
from vbap
where vbeln = lips-vgbel
and posnr = lips-vgpos.
select single ausme into lv_ausme from marc
where matnr = lips-matnr
and werks = lips-werks.
if sy-subrc eq 0 and lv_ausme is not initial.
call function 'ZCF_UT_UNIT_CONVERSION'
exporting
matnr_imp = lips-matnr
unit_new_imp = lv_ausme
unit_old_imp = lv_vrkme
value_old_imp = lv_kwmeng
importing
value_new_exp = lv_lfimg
exceptions
invalid_input = 1
invalid_output = 2
overflow = 3
others = 4.
if sy-subrc <> 0.
* message id sy-msgid type sy-msgty number sy-msgno
* with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
lips-lfimg = lv_lfimg.
lips-vrkme = lv_ausme.
endif.
2014 Apr 01 4:10 PM
I suppose you called MD_CONVERT_MATERIAL_UNIT to calculate new quantity.
And coded it in form USEREXIT_MOVE_FIELD_TO_LIPS of include MV50AFZ1 or method FILL_DELIVERY_ITEM of BAdI LE_SHP_DELIVERY_PROC, but this may be too late as onmy provided to fill customer fields.
Could you try method SAVE_DOCUMENT_PREPARE of BAdI LE_SHP_DELIVERY_PROC ?
Regards,
Raymond
2014 Apr 01 5:58 PM
I guess I would add, remember to condition what you change on document type and other components like that...
Neal
2014 Apr 10 9:30 AM
Problem will be 'solved' by changing the values only on printouts ...
Thanks to everyone anyway for thinking about this problem !
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |