Skip to Content
author's profile photo Former Member
Former Member

how to load gross weight and volume using BAPI_MATERIAL_SAVEDATA

hi,

i am using BAPI_MATERIAL_SAVEDATA to load weights and dimensions.the structure BAPI_MARA in this BAPI doesn't have the field corresponding to MARA-BRGEW which is the field for gross weight ,MARA-VOLUM for volume and MARA-VOLEH for volume unit . Can anyone please suggest how to load these values using this bapi.

thanks,

nanik

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 31, 2007 at 04:35 PM

    Using the following BAPI structure : <b>unitsofmeasure</b>

      unitsofmeasure-gross_wt    = p_brgew.
      unitsofmeasurex-gross_wt   = 'X'.
    
      unitsofmeasure-unit_of_wt  = p_gewei.
      unitsofmeasurex-unit_of_wt = 'X'.
    
      unitsofmeasure-unit_of_wt_iso  = p_gewei.
      unitsofmeasurex-unit_of_wt_iso = 'X'.
    * volume
      unitsofmeasure-volume          = p_volum.
      unitsofmeasurex-volume         = 'X'.
    
      unitsofmeasure-volumeunit      = p_voleh.
      unitsofmeasurex-volumeunit     = 'X'.
    
      unitsofmeasure-volumeunit_iso  = p_voleh.
      unitsofmeasurex-volumeunit_iso = 'X'.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      May be you'll have to fill some mandatory field before :

        unitsofmeasure-alt_unit    = 'ST'.
        unitsofmeasurex-alt_unit   = 'ST'.
      
        unitsofmeasure-alt_unit_iso    = 'ST'.
        unitsofmeasurex-alt_unit_iso   = 'ST'.
      
        unitsofmeasure-numerator   = '1'.
        unitsofmeasurex-numerator  = 'X'.
      
        unitsofmeasure-denominatr  = '1'.
        unitsofmeasurex-denominatr = 'X'.

      Hope this helps,

      Erwan

  • Posted on Jan 31, 2007 at 04:35 PM

    Hi Nani,

    Please check field GROSS_WT in table UNITSOFMEASUREX.

    Check this sample code from other thread.

    PREPARE UNITS OF MEASURE
    MOVE IT_MARA-VOLUM TO IT_MARM-VOLUME.
    MOVE C_YES TO IT_MARMX-VOLUME.
    MOVE IT_MARA-VOLEH TO IT_MARM-VOLUMEUNIT.
    MOVE C_YES TO IT_MARMX-VOLUMEUNIT.
    MOVE IT_MARA-BRGEW TO IT_MARM-GROSS_WT.
    MOVE C_YES TO IT_MARMX-GROSS_WT.
    MOVE IT_MARA-GEWEI TO IT_MARM-UNIT_OF_WT.
    MOVE C_YES TO IT_MARMX-UNIT_OF_WT.
    
    CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
    EXPORTING
    HEADDATA = WA_HEAD
    CLIENTDATA = WA_MARA
    CLIENTDATAX = WA_MARAX
    PLANTDATA = WA_MARC
    PLANTDATAX = WA_MARCX
    FORECASTPARAMETERS = WA_MPOP
    FORECASTPARAMETERSX = WA_MPOPX
    PLANNINGDATA = WA_MPGD
    PLANNINGDATAX = WA_MPGDX
    STORAGELOCATIONDATA = WA_MARD
    STORAGELOCATIONDATAX = WA_MARDX
    VALUATIONDATA = WA_MBEW
    VALUATIONDATAX = WA_MBEWX
    WAREHOUSENUMBERDATA = WA_MLGN
    WAREHOUSENUMBERDATAX = WA_MLGNX
    SALESDATA = WA_MVKE
    SALESDATAX = WA_MVKEX
    STORAGETYPEDATA = WA_MLGT
    STORAGETYPEDATAX = WA_MLGTX
    * FLAG_ONLINE = ' '
    * FLAG_CAD_CALL = ' '
    IMPORTING
    RETURN = BAPI_RETURN
    TABLES
    MATERIALDESCRIPTION = IT_DESCR
    UNITSOFMEASURE = IT_MARM
    UNITSOFMEASUREX = IT_MARMX
    * INTERNATIONALARTNOS =
    MATERIALLONGTEXT = IT_LTXT.
    * taxclassifications = it_mlan
    * RETURNMESSAGES =
    * PRTDATA =
    * PRTDATAX =
    * EXTENSIONIN =
    * EXTENSIONINX =

    Regards,

    Ferry Lianto

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.