Application Development 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: 

Material Master Upload using Bapi getting error "****** not a valid unit of

Former Member
0 Kudos

Hi Gurus,

i am uploading material master using BAPI Material_master_save_data , where the volume and Unit of Volume is Blank, Still i am getting error as "****** not a valid unit of volume ".kindly help me to resolve the issue.Many Thanks In advance.

7 REPLIES 7

JL23
Active Contributor
0 Kudos

the volume can be found in the MARA structure and in the MARM structure. Please check again your data.

the ***** are place holders for units that cannot be identified as ISO units. In an BAPI you have to make use of ISO units e.g. KGM instead of the unit KG.

Former Member
0 Kudos

HI,

I Have used the ISO Unit as well in my Bapi, but after that i am getting Unit of measure ****** is not defined; check your entry error message .

JL23
Active Contributor
0 Kudos

What unit did you use?

this unit has to be defined in dimension VOLUME in CUNI transaction. this is validated.

and if must be available in the language you use to process this BAPI

Former Member
0 Kudos

Hi Jurgen,

Currently Volume and UOM Volume is Blank , from the Data File its cming as Blank.

But I tried using some Unit like CCM , M3(In debug Mode by changing the value from blank to CCM) and which is maintain in CUNI tcode aslo, Again i am getting the same error as Unit of measure ****** is not defined; check your entry .

JL23
Active Contributor
0 Kudos

this is a different message now.

first it was: "****** not a valid unit of volume

now it is: Unit of measure ****** is not defined

or have you been creative while writing here?

There are units used in different views of a material master like sales unit, goods issue unit, WM unit, order unit, and all alternative units

As this message is not specific to one of the fields you have to check all your unit fields

Former Member
0 Kudos

Jurgen,

I could able to solve the issue for invalid unit Error ....Now i am getting **** unit of measure is not defined , pls check your entry or else i am getting alternate unit of mesure is same as base unit of measure .

I have used below logic for Purchase Order Unit and Base Unit of measure .

if wa_upload-unmsr EQ wa_upload-ord_uom .

bapi_mara1-base_uom = wa_upload-unmsr.

bapi_mara1-po_unit = wa_upload-ord_uom .

elseif wa_upload-unmsr NE wa_upload-ord_uom.

wa_upload-ord_uom = wa_upload-alt_uom.

bapi_mara1-po_unit = wa_upload-ord_uom.

endif.

Many Thanks for your help.

JL23
Active Contributor
0 Kudos

if you could give the values for each field in your coding, then I could evetually tell you what is wrong, but I dont know what you have in wa_upload-unmsr and from where this is picking its value.