‎2006 Aug 10 11:25 PM
Hi. I'm using bapi BAPI_MATERIAL_SAVEDATA to create a material and I have a problem with this. Although material is created correctly, I need to fill BRGEW (gross weight) field using the bapi, but there's not a structure which contain such field.
I tried filling EXTENSIONIN parameter but not success. Is this way possible for standard fields?
Can anybody help me please?
Kind regards!
‎2006 Aug 10 11:44 PM
Hi,
The gross weight GROSS_WT is available in the UNITSOFMEASURE tables parameter.
I updated the gross weight using the UNITOFMEASURE parameter and it worked.
Thanks,
Naren
Message was edited by: Narendran Muthukumaran
‎2006 Aug 11 2:30 PM
Hi Naren.
I already do this by it didn't work. Here's a piece of my code:
DATA:BEGIN OF it_units OCCURS 0.
INCLUDE STRUCTURE bapi_marm.
DATA:END OF it_units.
DATA:BEGIN OF it_unitsx OCCURS 0.
INCLUDE STRUCTURE bapi_marmx.
DATA:END OF it_unitsx.
it_units-alt_unit = 'ST'.
it_units-gross_wt = '1'.
it_units-unit_of_wt = 'KG'.
APPEND it_units.
it_unitsx-alt_unit = 'X'.
it_unitsx-gross_wt = 'X'.
it_unitsx-unit_of_wt = 'X'.
APPEND it_unitsx.
There is also another problem. Trying the way you say, gross weight GROSS_WT is updated in table MARM, but I need gross weight to use it in transaction MM03 (or MM01) in which this field pertains to MARA table. How can resolve this?
Thanks for any answer.
‎2006 Aug 11 5:28 PM
Hi,
It's working for me..Its updating the field MARA-BRGEW. Anyway check the following.
Make sure in the UNITOFMEASURE parameter given in the ALT_UNIT is the base unit of measure available in the material master (MARA-MEINS).
In the parameter HEADDATA make sure the BASIC_VIEW is checked.
Please let me know if you have problems..
Thanks,
Naren
Message was edited by: Narendran Muthukumaran
Message was edited by: Narendran Muthukumaran
Message was edited by: Narendran Muthukumaran
‎2006 Aug 11 9:04 PM
Hi.
Still it isn't working. I checked the value given in ALT_UNIT (ST) and it is available in the material master (MARA-MEINS). I also noted that data is not being inserted (updated) in table MARM; I have checked all parameters and I don`t know what's wrong...
Here is another piece of my code, I'll be grateful if you can check it and look for any error:
Views defined
reg_headdata-matl_type = 'ROH'.
reg_headdata-ind_sector = 'W'.
reg_headdata-basic_view = 'X'.
reg_headdata-sales_view = 'X'.
reg_headdata-purchase_view = 'X'.
reg_headdata-account_view = 'X'.
reg_headdata-storage_view = 'X'.
reg_headdata-warehouse_view = 'X'.
it_matdescr-matl_desc = bapimatnr-material_name.
it_matdescr-langu = 'S'.
APPEND it_matdescr.
CLIENTDATA
reg_clientdata-matl_group = '0GEPOECOL'.
reg_clientdata-division = bapimatnr-sector.
reg_clientdata-item_cat = 'NORM'.
reg_clientdata-base_uom = 'ST'.
reg_clientdata-net_weight = '1'.
reg_clientdata-mat_grp_sm = 'SUEL'.
reg_clientdata-trans_grp = '0002'.
reg_clientdata-unit_of_wt = 'KG'. "new
IF bapimatnr-sales_org EQ '0004'.
reg_clientdata-stor_conds = '01'.
reg_clientdatax-stor_conds = 'X'.
ENDIF.
reg_clientdatax-base_uom = 'X'.
reg_clientdatax-matl_group = 'X'.
reg_clientdatax-division = 'X'.
reg_clientdatax-item_cat = 'X'.
reg_clientdatax-base_uom = 'X'.
reg_clientdatax-net_weight = 'X'.
reg_clientdatax-mat_grp_sm = 'X'.
reg_clientdatax-trans_grp = 'X'.
reg_clientdatax-matl_group = 'X'.
reg_clientdatax-unit_of_wt = 'X'. "new
IF bapimatnr-sales_org EQ '0004'.
reg_clientdatax-stor_conds = 'X'.
ENDIF.
UNITSOFMEASURE
it_units-alt_unit = 'ST'.
it_units-ALT_UNIT_ISO = 'ST'.
it_units-NUMERATOR = '1'.
it_units-DENOMINATR = '1'.
it_units-LENGTH = '2'.
it_units-WIDTH = '3'.
it_units-HEIGHT = '4'.
it_units-UNIT_DIM = 'KGV'.
it_units-UNIT_DIM_ISO = 'KGV'.
it_units-VOLUME = '7'.
it_units-VOLUMEUNIT ='DM3'.
it_units-VOLUMEUNIT_ISO ='DM3'.
it_units-gross_wt = '1'.
it_units-unit_of_wt = 'KG'.
APPEND it_units.
it_unitsx-alt_unit = 'X'.
it_unitsx-gross_wt = 'X'.
it_unitsx-unit_of_wt = 'X'.
it_unitsx-ALT_UNIT_ISO = 'X'.
it_unitsx-NUMERATOR = 'X'.
it_unitsx-DENOMINATR = 'X'.
it_unitsx-LENGTH = 'X'.
it_unitsx-WIDTH = 'X'.
it_unitsx-HEIGHT = 'X'.
it_unitsx-UNIT_DIM = 'X'.
it_unitsx-UNIT_DIM_ISO = 'X'.
it_unitsx-VOLUME = 'X'.
it_unitsx-VOLUMEUNIT ='X'.
it_unitsx-VOLUMEUNIT_ISO ='X'.
APPEND it_unitsx.
SALESDATA
reg_ventas-delyg_plnt = 'BGTA'.
reg_ventas-cash_disc = 'X'.
reg_ventas-matl_stats = '1'.
reg_ventas-mat_pr_grp = 'A6'.
reg_ventas-acct_assgt = 'AE'.
reg_ventas-item_cat = 'NORM'.
reg_ventas-matl_grp_1 = 'REP'.
reg_ventas-matl_grp_4 = 'IND'.
reg_ventas-sales_org = bapimatnr-sales_org.
reg_ventas-distr_chan = '02'.
reg_ventasx-delyg_plnt = 'BGTA'.
reg_ventasx-cash_disc = 'X'.
reg_ventasx-matl_stats = 'X'.
reg_ventasx-mat_pr_grp = 'X'.
reg_ventasx-acct_assgt = 'X'.
reg_ventasx-item_cat = 'X'.
reg_ventasx-matl_grp_1 = 'X'.
reg_ventasx-matl_grp_4 = 'X'.
reg_ventasx-sales_org = bapimatnr-sales_org.
reg_ventasx-distr_chan = '02'.
PLANTDATA
reg_plantdata-availcheck = 'KP'.
reg_plantdata-loadinggrp = '0001'.
reg_plantdata-neg_stocks = 'X'.
reg_plantdata-plant = 'BGTA'.
reg_plantdata-profit_ctr = w_prtctr.
reg_plantdata-countryori = bapimatnr-country.
reg_plantdata-pur_group = w_ekgrp.
reg_plantdatax-plant = 'BGTA'.
reg_plantdatax-availcheck = 'X'.
reg_plantdatax-loadinggrp = 'X'.
reg_plantdatax-neg_stocks = 'X'.
reg_plantdatax-profit_ctr = 'X'.
reg_plantdatax-countryori = 'X'.
reg_plantdatax-pur_group = 'X'.
VALUATIONDATA
reg_valuationdata-val_class = w_bklas.
reg_valuationdata-price_ctrl = 'V'.
reg_valuationdata-price_unit = '1'.
reg_valuationdata-val_area = 'BGTA'.
reg_valuationdatax-val_area = 'BGTA'.
reg_valuationdatax-val_class = 'X'.
IF bapimatnr-var_price IS INITIAL.
reg_valuationdata-moving_pr = '1'.
reg_valuationdatax-moving_pr = 'X'.
ELSE.
reg_valuationdata-moving_pr = bapimatnr-var_price.
reg_valuationdatax-moving_pr = 'X'.
ENDIF.
reg_valuationdatax-price_ctrl = 'X'.
reg_valuationdatax-price_unit = 'X'.
STORAGELOCATIONDATA
reg_storagelocationdata-plant = 'BGTA'.
reg_storagelocationdata-stge_loc = bapimatnr-store.
reg_storagelocationdatax-plant = 'BGTA'.
reg_storagelocationdatax-stge_loc = bapimatnr-store.
TAXCLASSIFICATIONS
it_tax-taxclass_1 = '9'.
it_tax-tax_type_1 = 'MWST'.
IF w_herkl EQ 'CO'.
it_tax-depcountry = 'CO'.
it_tax-tax_ind = 'E'.
ELSE.
it_tax-depcountry = w_herkl.
it_tax-tax_ind = 'A'.
ENDIF.
APPEND it_tax.
Thanks for your help, kind regards...
‎2006 Aug 11 10:25 PM
Hi,
I found the error.
In the unitofmeasureX parameter in the field ALT_UNIT_ISO pass the value 'ST' instead of 'X'.
As this field is not a update field and it actually expects the value.
Hope this works.
THanks,
Naren
Message was edited by: Narendran Muthukumaran
‎2006 Aug 11 11:23 PM
Hi again.
Sorry, but it didn't work. Any other idea? I've spent a lot of time looking for an answer and it has been not succesful...
It is very important to find a solution to this. Thanks for any help.
‎2006 Aug 14 2:08 PM
Hi!
I was checking my code again and I solved the problem. In the unitofmeasureX parameter in the field ALT_UNIT I passed the value 'ST' instead of 'X' and it worked!!!
Thanks very much!