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: 

Creation of Storage Location using BAPI

Former Member
0 Kudos

Hi ABAP Gurus,

I want to create a Storage Location using a BAPI , namely 'BAPI_MATERIAL_SAVEDATA'.

I am passing the required parameters like Material, Material Type,Base unit of measure ,Plant and

the parameter Storage Location(STGE_LOC) as well as corresponding X Structures for the fields.

But by using these parameters , the BAPI is not creating the Storage Location.

Please help regarding this.

12 REPLIES 12

Former Member
0 Kudos

Are you passing required data in relevant parameters using structures STORAGELOCATIONDATA & STORAGELOCATIONDATAX?

Former Member
0 Kudos

Hi,

I am passing the relevant data using STORAGELOCATIONDATA and STORAGELOCATIONDATAX.

In the first one, I am passing the value of Storage Location to be created and in the second one,

I am passing XXXX to the field.

But I am getting the following error message.Plz help me regarding this.

Key fields for use data PLANTDATA and checkbox structure PLANTDATAX are different.

0 Kudos

Hi,

Please check are you passing like this.

PLANTDATA-plant = '3210'.

PLANTDATAX-plant = 'X'. or you try like this PLANTDATAX-plant = '3210'. (because the comp. type is WERKS_D)

Regards

GK.

0 Kudos

In Both the strcutures (STORAGELOCATIONDATA & STORAGELOCATIONDATAX), you should pass PLANT code and STORAGE LOCATION code.

Edit : don't pass 'XXXX' to STORAGELOCATIONDATAX-PLANT & STGE_LOC. Pass the actual values to these structure fields (same as the values passed to STORAGELOCATIONDATA-PLANT & STGE_LOC).

Former Member
0 Kudos

Hi,

Thanks for ur suggestion.

But still I am getting an error message as follows.

Storage Location 0001 does not exist in plant 1000.

But I have cross checked this from MARD table and the valuse are fine.

Please help me.

0 Kudos

Are you passing the value 'X' to the structure field HEADDATA-STORAGE_VIEW ?

0 Kudos

Check the table T001L for the available storage locations for the Plant 1000. The storage location you are passing in BAPI should be available in this table. We faced a similar scenario where the storage location was '10' and the data passed in BAPI was 0010 (considering the length of field) which resulted in simliar error.

Former Member
0 Kudos

Hi,

Yes, I am passing the value 'X' to the structure field HEADDATA-STORAGE_VIEW and HEADDATA-QUALITY_VIEW.

But still , I am getting the same error.

Plz help me.

Former Member
0 Kudos

Hi,

yes , I have checked t001l table.I have seen the available storage location for the plant 1000.

The storage location 0001 is present in t001l table but it is not assigned with plant 1000.

What should I do next?

Plz help me.

0 Kudos

This is to be done through configuration (Enterprise Structure -> Definition -> Material Management). Contact the functional consultant to get this settings done.

Former Member
0 Kudos

Hi,

Thank u very much for your help. I will be ever grateful to you. Bye.Take care

0 Kudos

Close the thead if the problem is resolved.