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: 

BAPI_MATERIAL_SAVEDATA

Former Member
0 Kudos

Hi,

I am using BAPI_MATERIAL_SAVEDATA webservice to create a "MATERIAL", but unfortunately I am getting following error

Field MATNR has been transferred inconsistently or is blank

If I check the parameters list, I didn't find out any field called "MATNR".

any valuable tips?

Thanks & Regards,

Satish.

8 REPLIES 8

Former Member
0 Kudos

Hi,

e.g.

lhead-material = dmatnr.

CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'

EXPORTING

HEADDATA = lhead

IMPORTING

RETURN = dreturn

TABLES

MATERIALLONGTEXT = ltext.

The field dmatnr is filled before with the material i wan to change or create.

\[removed by moderator\]

Nicole

Edited by: Jan Stallkamp on Jul 17, 2008 10:57 AM

0 Kudos

Nicole,

do not ask for points.earning poins! is this your motive to helping other?

Amit.

0 Kudos

Hi Amit,

what a stupid question? :O((

Did you see, how often I post answer and how much points I have?

So, what should this question? A lot of people forget to give points and a lot o people write this information behind there answer. So....what is my fault to do this?

0 Kudos

Hi Nicole,

Please read the [Rules of Engagement|https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement] - specifically the bit about asking for points.

Gareth.

former_member642890
Participant
0 Kudos

In this bapi, if you check in the import parameter, we have

HEADDATA, if you double click on BAPIMATHEAD then you can view all the fields which are related to that parameter.

There we can find MATNR which is a mandate field for uploading the data..

Whenever you find any BAPI for your task try to execute that BAPI to know which are all fields are mandatory so that you can provide the relevant fields.

Thanks..

0 Kudos

Hello Rohith,

Thanks for your wonderful explanation. I understood it, but the problem is, I am calling this BAPI as webservice and using corresponding WSDL to create the material.

In the WSDL, I didn't find any field call "MATNR" in HEADDATA. Following is the parameters list of HEADDATA.

                                          <HEADDATA>
				<MATERIAL>SDH_005_fromSOAP</MATERIAL>
				<IND_SECTOR>Retail</IND_SECTOR>
				<MATL_TYPE>Additionals</MATL_TYPE>
				<BASIC_VIEW>X</BASIC_VIEW>
				<SALES_VIEW></SALES_VIEW>
				<PURCHASE_VIEW></PURCHASE_VIEW>
				<MRP_VIEW></MRP_VIEW>
				<FORECAST_VIEW></FORECAST_VIEW>
				<WORK_SCHED_VIEW></WORK_SCHED_VIEW>
				<PRT_VIEW></PRT_VIEW>
				<STORAGE_VIEW></STORAGE_VIEW>
				<WAREHOUSE_VIEW></WAREHOUSE_VIEW>
				<QUALITY_VIEW></QUALITY_VIEW>
				<ACCOUNT_VIEW></ACCOUNT_VIEW>
				<COST_VIEW></COST_VIEW>
				<INP_FLD_CHECK></INP_FLD_CHECK>
				<MATERIAL_EXTERNAL>123456789123456789</MATERIAL_EXTERNAL>
				<MATERIAL_GUID></MATERIAL_GUID>
				<MATERIAL_VERSION></MATERIAL_VERSION>			
			</HEADDATA>

Note: I downloaded this BAPI WSDL from ECC6.0

Thanks & Regards,

Satish.

0 Kudos

Hi Satish,

The parameter "MATERIAL" is probably the one you should be populating - this will likely be mapped to a MATNR type field within the processing. If you go to transaction SE37 you can view the documentation for the BAPI and see what is mandatory and how to populate the parameters for different scenario's.

Are you using internal or external number assignment as this will also have an impact?

Gareth.

Former Member
0 Kudos

Hi Satish.

I would like to suggest a reference, it is quite similar to your issue,

[SDN - Reference for BAPI_MATERIAL_SAVEDATA error handling |;

[SDN - Reference for Inconsistency/Blank error in BAPI_MATERIAL_SAVEDATA |;

Hope that's usefull.

Good Luck & Regards.

Harsh Dave