cancel
Showing results for 
Search instead for 
Did you mean: 

Recommended IDOC to mass upload Materials in a live SAP production system

Former Member
0 Kudos

Hi All,

We used IDOC type - MATMAS03, Message Type - MATMAS to create/update Materials for legacy to SAP conversion until we went live. We followed the standard BPDM design and generated the SAP Material Numbers externally and passed it to the IDOC for the same regardless of whether the number range set in SAP was Internal/External.

However, post go live, we still have some Delta load requests to create Materials. And, before we got these requests, a lot of Materials were manually created as well. We are looking at re-using our conversion program to handle these requests however we have a manual intervention to identify the last number used in SAP and manually calculate the next number to prepare input data for the IDOC load.

What is the best way to avoid this manual intervention and automate the process of creating Materials post go live by letting SAP determine the next number and we not having to pass it externally? Is there an existing IDOC that can be used for the same? We would like to have minimal development effort to take care of this.

Please advise. Thank you!

Accepted Solutions (0)

Answers (1)

Answers (1)

JL23
Active Contributor
0 Kudos

do you have link to this "We followed the standard BPDM design and generated the SAP Material Numbers externally "


How did you generate the Material numbers externally in detail?


I load material masters already for decades, and SAP has a function module  NUMBER_GET_NEXT as well for such a long time to fetch the next internal number from the number range. So it very convenient to call this function module right on time while you prepare the data for the IDoc load. I do it usually in the conversion step in LSMW.

Just minutes before the Idocs are processed.

This number is taken from the number range and will not be taken from any other ongoing activity. So I will never ever have any issue with numbers.






Former Member
0 Kudos

To give you more background, we converted legacy data using SAP BODS ETL tool into SAP. Our target structure in BODS is MATMAS03 IDOC and we are required to pass the SAP Material number externally regardless of the internal/external number range setting in SAP.

The standard BPDM (Best Practice Data Migration) package by SAP provides a custom function that can be used within BODS to generate the next number for Internal number ranges and assign to each legacy record that needs to be converted. The Legacy to SAP number assignment is stored within a database table in the BODS layer called MGMT_NUMBER_ALLOCATION which is finally mapped to the transformed dataset and then to the IDOC.

The above approach works fine for one time conversion, but post go live once manual updates are done in SAP, we cannot use the same custom function to get the next number since we now need to look into SAP to get the last number used. I read about the NUMBER_GET_NEXT function module to dynamically get the next number while IDOC is getting processed, but this requires the IDOC to be enhanced.

Do you know if there is any other IDOC or standard code already available using this function module that we can directly use to mass upload new materials in our live system?

JL23
Active Contributor
0 Kudos

first of all there is no other IDOC for the same object, that would not make much sense.

I do not yet know this BODS ETL thing. But it would be a very strange development if you could only use it just once in a system, right in the beginning only,  as you assumed.

What if your company does an Akquisition in a few years? 

I am moving this discussion to Data Migration forum as this problem is more related to the ETL tool than to a material master or MM process.

vijy_mukunthan
Active Contributor
0 Kudos

Hi Preethi

  I have done this successfully when for material master the numbers will be generated by SAP based on material type. What i did there is BAPI called BAPI_MATERIAL_GETINTNUMBER which should be used in your transformation job itself. Based on the no of materials pass the material type it will generate the material no in SAP and reserve it. This number you pass it to MGMT_NUMBER_ALLOCATION field which will create the materials successfully.


Thanks and Regards

Vijay