Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

bapi_material_savedata error with conversion factor

Former Member
0 Likes
1,379

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

1 ACCEPTED SOLUTION
Read only

nkr1shna
Contributor
0 Likes
883

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

3 REPLIES 3
Read only

nkr1shna
Contributor
0 Likes
884

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

Read only

Former Member
0 Likes
883

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.

Read only

0 Likes
883

---