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

Material master upload

Former Member
0 Kudos
3,730

Hello ,

I want to extend material master from storage location to another storage location managed warehouse and WH views.

We have huge list of material master so we want the fastest way to upload material master. Which will be a faster way to extend material master for storage location and WH views:

1. Bapi - BAPI_MATERIAL_SAVEREPLICA. For bapi I understand we can't run in background. We only want to run background due to lot of materials. Even creating variant will not help as we have to upload materials with different bins.

2. LSMW Standard batch input method - Can i use it to extend material master view for storage location and WH views only

regards

Anand

18 REPLIES 18
Read only

Former Member
0 Kudos
2,341

Hi Anand,

Where is your Source data , is it from file(.txt or .xls)  or "?".

Using BAPI , Call  the above standard BAPI into "Z" or 'Y" Custom program , and Run that Custom Program(i.e. "Z" or 'Y") in background mode with data .

Regard's

Smruti

Read only

0 Kudos
2,341

Hi,

I understand from my ABAPer that BAPI can't run in background mode, it can only execute in foreground. We would use .txt file for upload.

Read only

Former Member
0 Kudos
2,341

Hi Anand,

             You can use BDC( Call Transaction or Session Method) or In LSMW u can use BDC Method.

It will helpful for u. i have done same requrement using BDC.if u use BDC Session method u can do in Background mode.

Regards,

OmChandra

Read only

Former Member
0 Kudos
2,341

Hi,

1. Direct input method: Using this method, its not possible to run in background. Because it doesnt create any session in SM35. The program name is RMDATIND. It directly posts the data to data base.

2. BAPI: Use the below method in LSMW:

Business Object      BUS1001006  

Method               SAVEDATA

Message Type         MATMAS_BAPI

Basic Type           MATMAS_BAPI03

It creates and process IDOC's.

Since you have huge number of records i recommend 2nd option. creating IDOC's and processing is faster when compared to direct input method.

Read only

Former Member
0 Kudos
2,341

Hi,

BDC session is very slow to upload, even background is very slow.

regards

Read only

0 Kudos
2,341

Yes. BDC is not a good option in this case.

Read only

Former Member
0 Kudos
2,341

Hey Anand,

Mailed you the code and corresponding file format. See if it helps. Ask questions whenever unclear.

BR.

Read only

0 Kudos
2,341

hello Ankit,

Thanks alot. Can you let me know what is the way or option to upload material in background if i use BAPI. We have 500,000 material master to be extended to Warehouse view.

BR

Read only

0 Kudos
2,341

Hi Anand,

I am not telling that we dont get error log using direct input method. But only thing i told is by using BAPI method, the process will be fast when compared to direct method. By using BAPI method, IDOC's will be generated and then we just process, upload the data.

Please check the below links where we have complete documentation how to implement the BAPI lsmw for material master:

http://scn.sap.com/community/erp/logistics-mm/blog/2012/12/27/lsmw-material-master-by-bapi-method--p...

http://scn.sap.com/community/erp/logistics-mm/blog/2012/12/27/lsmw-material-master-by-bapi-method--p...

Regards,

Revanth

Read only

0 Kudos
2,341

Hi Anand,

Call this "BAPI_MATERIAL_SAVEREPLICA" into SE38 - Z Program and run this Z Program in background mode with data  .

Regard's

Smruti

Read only

0 Kudos
2,341

I agree with Smruti--wrap the BAPI in an ABAP program and schedule/execute in background. That'll be the fastest and least error prone. Additional functionality can be added to generate load status/log spools for post load recon/validation.

Read only

Former Member
0 Kudos
2,341

Hi Anand,

How many fields you want to add values during extension?

If it is 5 or 6 the easiest way is to go for recording method. That you can run in background and it doesn't matter how many records you have.

Read only

Former Member
0 Kudos
2,341

Hello,

Thanks everyone, I am uploading 6 fields, so we decided to use "BAPI_MATERIAL_SAVEREPLICA". Save the file in application server.

Can we save the flat file in desktop to upload? My abaper says we can't upload from our desktop if we want to run it in background.

Many thanks. regards

Read only

0 Kudos
2,341

To run in background, you need to keep the noepad on application server

Read only

Former Member
0 Kudos
2,341

Hello,

I am unable to use BAPI_MATERIAL_SAVEREPLICA bapi to update storage bin. I am able to extend material to storage location, warehouse, storage type but not able to update bin.The field remains blank.

Please advise.

regards

Anand

Read only

JL23
Active Contributor
0 Kudos
2,341

about which bin field are you talking? can you tell the table and field name from material master screens, and the structure and field name that you are using in the BAPI?

Read only

Former Member
0 Kudos
2,341

Hello,

I was able to resolve thanks, i was not updating X for the field STGE_BIN (LGTYP) in STORAGETYPEDATAX, so system was not updating bin in material master.

Thanks for reverting back so soon.

regards

anand

Read only

0 Kudos
1,964

Hi Anand,

Hope this message finds you hale and healthy!

I have a similar requirement to use LSMW for uploading attachments to material master. Could you please tell me which BAPI you used in your case.

Thank you,

Poongodi Elangovan.