on 01-04-2010 4:45 AM
Dear Friends,
I want to change the weight determination in the delivery document. In the standard system weight/ volume is taken from the sales document, but I want to pick weight/ volume to the delivery document from the material master (MARA) instead.
I tried with a data transfer routine in copy control, (Sales doc to delivery - item category level) as below, but it doesnu2019t work. System overrides the weight determined with this function with a subsequent program.
* Weight
* lips-ntgew = cvbap-ntgew.
* lips-brgew = cvbap-brgew.
DATA : LV_BRGEW TYPE MARA-BRGEW.
DATA : LV_NTGEW TYPE MARA-NTGEW.
DATA : LV_VOLUM TYPE MARA-VOLUM.
SELECT SINGLE BRGEW NTGEW VOLUM
FROM MARA
INTO (LV_BRGEW, LV_NTGEW, LV_VOLUM)
WHERE MATNR EQ CVBAP-MATNR.
LIPS-NTGEW = LV_NTGEW * CVBAP-KWMENG.
LIPS-BRGEW = LV_BRGEW * CVBAP-KWMENG.
LIPS-VOLUM = LV_VOLUM * CVBAP-KWMENG.
Please provide a solution for above requirement. Thanks in advance for all answers!
Regards,
Nelson
Hej Nelson,
I'm working on the same issue and have the same problems as you write.
It seems that the system overrides the weight again.
I tried the copy rules and the user exit 'MV50AFZ1' -> USEREXIT_SAVE_DOCUMENT without succes. I was wondering if you have found a solution for this.
Best regards,
Chris.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
try this code at the same place of your existing code
DATA: lda_mengl TYPE f,
lda_kwmeng TYPE vbap-kwmeng. " Quantity with 3 decimals
DATA: lda_ntgew TYPE f,
lda_brgew TYPE f,
lda_volum TYPE f,
lda_ntgewn TYPE f,
lda_brgewn TYPE f,
lda_volumn TYPE f,
lda_*mengl TYPE f.
vbap = cvbap. *vbap = cvbap.
lda_kwmeng = vbap-kwmeng * vbap-umziz / vbap-umzin.
Hope this helps
Sai
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
still not ansverd
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
CVBAP must have the weight of the master data, ie: from MARA. But if you want to recovery the last weight (eg: a change of weight after the SO creation) you must think in unit of measure. So, in your ABAP coding you can use the function module MD_CONVERT_MATERIAL_UNIT.
I hope this helps you
Regards,
Eduardo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.