Skip to Content
avatar image
Former Member

Weight/ volume in delivery document from MARA

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Jan 04, 2010 at 08:08 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 07, 2010 at 07:36 AM

    still not ansverd

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 23, 2010 at 07:50 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 02, 2011 at 08:06 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded