Application Development 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: 

Filtering out MATMAS IDoc based on a condition

Former Member
0 Kudos

Hi All,

We are distributing a Material Master IDoc (Message Type MATMAS / IDoc Type MATMAS05) from an ECC 6.0 (WebAS 700) system to an external Non-SAP system via SAP XI.

Now our requirement is that the users will maintain a Z-table with all the SAP plants that are relevant for the external system. They can add or delete plants from this table in the future

If the MATMAS Idoc is created/extended for a plant which is not in the Z-Table then it should not get distributed.

E.g. If MATMAS IDoc contains plant 5000 and 5000 is not in the Z-Table then the Idoc should not even be created

We Tried a lot of enhancements: -

SMOD Enhancement - MGV00001

Enhancement Spot - ES_SAPLMV01 at different call up points

But none of them give the required exact result.

If we implement the enhancement spot inside the function module MASTERIDOC_CREATE_MATMAS, we get a message "1 Master IDoc created, 0 Communication IDocs created". So something is getting created and that's incomplete anyway.

So I am not sure how reliable this is

<b>One last approach I have is</b>: -

1) Send the IDoc to XI (without filtering)

2) Let XI look at the Plant code and compare with the Z-Table in ECC (via a Z-RFC function module) and then decide whether to send the IDoc or not send it to external system

Please let me know if my approch is correct or I am missing something here

Thanks and Regards,

Aditya

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Aditya,

If the Communication Idoc is not created it means that the IDOC is not sent out of the system. The Master Idoc creation does not mean the Idoc is sent to the XI adapter.

The purpose of Restricting at the Plant level will be satisfied if you delete the Idoc data with in the function module MASTERIDOC_CREATE_MATMAS.

It will work. Consequently you can add an additional check in XI to do this check, but this will increase the number of connections made to R3.

Hope it helps.

Thanks,

1 REPLY 1

Former Member
0 Kudos

Hi Aditya,

If the Communication Idoc is not created it means that the IDOC is not sent out of the system. The Master Idoc creation does not mean the Idoc is sent to the XI adapter.

The purpose of Restricting at the Plant level will be satisfied if you delete the Idoc data with in the function module MASTERIDOC_CREATE_MATMAS.

It will work. Consequently you can add an additional check in XI to do this check, but this will increase the number of connections made to R3.

Hope it helps.

Thanks,