Showing results for 
Search instead for 
Did you mean: 

File -> IDoc need to change material

Former Member
0 Kudos

Hello all.

I have a scenario set up in which a legacy system is creating a XML file, which is then being picked up by XI and processed into an IDoc to create a material in ECC. That part works fine.

However, from time to time changes will be made to a material in the legacy system. Those changes need to be updated in the ECC system. So the material in ECC needs to be changed instead of creating a new material.

The first time a material is exported from the legacy system and sent to ECC, there will be no material number (matnr), so ECC will generate a material number, and an aknowledgement back to the legacy system with the material number it generated. That material number will then be updated in the legacy system.

The second time a material is exported, when it's been changed, from the legacy system, I want ECC to change the existing material instead of producing a new one.

So in my mapping I added a conditional statement for the field MSGFN, which I thought was the code to determine whether or not to create or edit the material. The statement says "if a material number exists, map MSGFN to 002. If it does not exist, map MSGFN to 005". I thought this would allow for the material to be created in ECC the first go round, then edited in ECC whenever a change is made in the legacy system.

So let me restate --

If MATNR = true, then MSGFN = 002

If MATNR = false, then MSGFN = 005

However, in ECC, regardless of the MSGFN code (which I have verified is correctly being mapped), a new material is always generated. Does anyone have any idea why this is happening? What am I doing wrong? Does the MSGFN field have no bearing on the creation of the IDoc?

Thanks in advance for your help

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Nevermind, I'm an idiot.

We had implemented a custom ABAP program last week that creates a material number for IDoc's coming in from that legacy system. Unfortunately it was ALWAYS creating a material number, even if one existed.

Once that was changed back it worked fine.

Message was edited by:

Harrison Holland