idoc message variant code in idoc









T SAP IDoc message variant code


D SAP IDoc message variant code to trigger same idoc for different purposes
& Help SAP IDoc message variant code


If you need to trigger the same IDoc but perform different process or trigger differnt endpoint the IDoc message variant EDIDC-MESCOD field is the ideal way to do this.

It also means you create separate entries in WE20 so you can also tweak the setting in here for each outbound message too. So you can link each to a different output type etc.

Setup IDoc variant in WE20



To setup the partner profile with a message variant MESCOD it the same as setting up a normal partner profile

idoc message variant code step 1



But instead of leaving the message code blank you enter a value in here. It can be any value but rememebr if you are building you idoc send manually you need to pass this same value to trigger.

Note if you pass a value that does not exist in WE20 it will fail.
idoc message variant code step 2



This values is then store in the message variant. Not sure why it is called message code on one screen and messsage variant on the other but hey this is SAP for you.
idoc message variant code step 3



IDoc message variant code


See table EDIDC table for message code filed MESCOD
idoc message variant code step 4