cancel
Showing results for 
Search instead for 
Did you mean: 

Weight/ volume in delivery document from MARA

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (4)

Answers (4)

0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

still not ansverd

Former Member
0 Kudos

Hi,

Copy control for delivery (from Order) T.code VTLA, pl add you code in copy control routine at item level for item category detmined in delivery, under data transfer - item data.

My doubt is here, whether you have assign the code on write place.

Try and revert.

regards

Vivek.

Former Member
0 Kudos

Vivek ,

still not working ...

Manish Kadam

eduardo_hinojosa
Active Contributor
0 Kudos

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