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

Former Member
0 Likes
585

Using BAPI_MATERIAL_SAVEDATA trying to create a Material but ended up with the following error:

Unit of measure ****** is not defined; check your entry

can any one give some tipps to overcome this error?

Satish.

4 REPLIES 4
Read only

Former Member
0 Likes
552

Hi,

Check the Unit Of Measure (UOM) you are giving, is it defined in the system. Consult your functional consultant.

Thanks & Regards,

Navneeth K.

Read only

Former Member
0 Likes
552

Hello,

It will help you try in this way.

DATA : y_wa_bapi_header TYPE bapimathead,

y_wa_return TYPE bapiret2,

DATA : y_i_extin TYPE STANDARD TABLE OF bapiparex,

y_i_extinx TYPE STANDARD TABLE OF bapiparexx.

y_wa_bapi_header-material = y_wa_yrevlev-indust_refer.

y_wa_bapi_header-matl_type = mara- mtart.

y_wa_bapi_header-mrp_view = 'X'.

y_wa_extin-structure = 'BAPI_TE_MARC'.

y_wa_extin-valuepart1+0(4) = y_wa_yrevlev-werks.

y_wa_extin-valuepart1+17(2) = y_wa_yrevlev-rev_lev.

APPEND y_wa_extin TO y_i_extin.

y_wa_extinx-structure = 'BAPI_TE_MARCX'.

y_wa_extin-valuepart1+0(4) = y_wa_yrevlev-werks.

y_wa_extinx-valuepart1+17(2) = y_lk_x.

APPEND y_wa_extinx TO y_i_extinx.

CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'

EXPORTING

headdata = y_wa_bapi_header

IMPORTING

return = y_wa_return

TABLES

extensionin = y_i_extin

extensioninx = y_i_extinx.

APPEND y_wa_return TO y_i_return.

Read only

0 Likes
552

check that those 2 fields are in you're bapi data

bapi_mara-base_uom = 'PCS' . "youre unit of mease variabele can ofcours be in stead of PCS

bapi_marax-base_uom = 'X'.

kind regards

arthur de smidt

Read only

0 Likes
552

Hello All,

I solved the problem by specifing the unit in "BASE_UOM_ISO" instead of "BASE_UOM"

Thanks for your suggestion!

-Satish.