cancel
Showing results for 
Search instead for 
Did you mean: 

BATMAS03 idoc..not extending Batch to plant

0 Kudos

Hi SAP experts,

I am using BATMAS03 idoc (BATMAS message type) for one of our legacy to SAP interface. If we pass a new batch, plant, storage location, material number, Date of Mfr, SLED, etc, system will create this batch master in SAP (similar to tcode msc1n). If we send a pre-existing batch and other concerned fields, it will update the current batch with the new values (similar to msc2n).

Now I have a situation..batch X is already created in SAP in a plant A, either through msc1n directly or through a previous BATMAS interface. Now, if I send a BATMAS interface for same batch X, but plant B with other details, I was expecting that batch would get generated (extended) to plant B as I am passing all the needed fields. However, what I am seeing is, the idoc fails with an error that material / batch is not existing in plant B. So, instead of triggering a msc1n (to create the batch under new plant B), it is kind of going into msc2n and failing, because it doesnt find the batch extended to the plant B.

My question is -> whether this is standard behaviour for BATMAS03 idoc? is there any field in idoc which can indicate 'batch creation' versus 'updation'? Or is there any other idoc type I should use? Or,will this need some kind of ABAP enhancement? Pls advise/ share your thoughts.

Regards. Pankaj

Accepted Solutions (0)

Answers (2)

Answers (2)

JL23
Active Contributor
0 Kudos

The Idoc replicates a batch and is basically designed for the ALE distribution process.

The prerequisites can be seen in the docu Distribution of Batch Data - Special Processes in Logistics - SAP Library

where you also find info in which case a distribution will not happen.

Plant and storage location are usually not filled, as the data of the batch applies to all plants and storage locations, if the batch level is material or client level.  If you fill the plant then a batch record with plant is created first and after that the updates from the general data is made in the target system.

Detailed docu can be found in transaction BAPI at Batch.SaveReplica :

"If you do specify the plant, the system additionally creates a plant batch and issues an information message.

If the batch level is on plant level, you must specify a plant."

former_member233510
Active Contributor
0 Kudos

Basic type BATMAS03 supports you to create Batch master, but extending batch master from one Plant to another is not possible since the fields reference Plant, Material and Batch are missing in the segment structure. According to my knowledge, the enhancement is required and need to add above said missing fields under the segment structure.