‎2009 Jan 20 6:05 PM
Hi,
I'm creating caterials using BAPI_MATERIAL_SAVEDATA but I have a problem because BAPI is throwing me the following error:
"Maintain the conversion factor for the alternative unit CV"
I've been searching for this error and I found that I have to fill UNITSOFMEASSURE BAPI table parameter, and I'm filling as follows:
wa_bapi_marm-ALT_UNIT = p_lrmei. " CV
wa_bapi_marm-numerator = p_umrez. " 1
wa_bapi_marm-denominatr = p_umren. " 1
wa_bapi_marmx-ALT_UNIT = p_lrmei. "CV
wa_bapi_marmx-numerator = 'X'.
wa_bapi_marmx-denominatr = 'X'.
append wa_bapi_marm to bapi_marm.
append wa_bapi_marmx to bapi_marmx.
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
headdata = bapi_head
clientdata = bapi_mara
clientdatax = bapi_marax
plantdata = bapi_marc
plantdatax = bapi_marcx
storagelocationdata = bapi_mard
storagelocationdatax = bapi_mardx
valuationdata = bapi_mbew
valuationdatax = bapi_mbewx
warehousenumberdata = bapi_mlgn
warehousenumberdatax = bapi_mlgnx
salesdata = bapi_mvke
salesdatax = bapi_mvkex
storagetypedata = bapi_mlgt
storagetypedatax = bapi_mlgtx
IMPORTING
return = bapi_return
TABLES
materialdescription = it_makt
UNITSOFMEASURE = bapi_marm
UNITSOFMEASUREX = bapi_marmx
And it supossed to be fixed with this parameters in the BAPI but the program keeps sending that message error.
I hope you can help me.
Regards ,
Moises Grappin
‎2009 Jan 20 6:44 PM
HI,
Please check how the unit of measure stores internally in SAP system, this might be the problem.
Also check whether alternative unit of measure CV exists in your system and applicable for your material / material group?
Best Regards,
Krishna
‎2009 Jan 20 6:44 PM
HI,
Please check how the unit of measure stores internally in SAP system, this might be the problem.
Also check whether alternative unit of measure CV exists in your system and applicable for your material / material group?
Best Regards,
Krishna
‎2009 Jan 21 12:54 AM
What you have to do is to insert all different conversion in table MARM for BAPI, i.e. If you have 3 units of meassure you have to set rules for those 3 units, for example CS ==> ST 1,1 and CS ==> PIC 1,1, we have three units CS, ST and PIC, so you have to insert this three combinations of data in table BAPI_MARM
Regards.
‎2009 Apr 02 11:33 AM