cancel
Showing results for 
Search instead for 
Did you mean: 

Putting filter in message mapping

rajan_s
Participant
0 Kudos

I am trying to put a filter for company codes such that if a type of company code comes in the file from source, it will filter out and send it to target system. I have set of company codes and values that I want to pass but want to filter out some company codes with certain values only. How can I achieve that? One possible way I can think of is If/then/Else logic with fixed values mapping.

Is there a blog or step by step guide? Can anyone help how I can do this in message mapping?

Thanks for your help.

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Rajan,

You can do Conditional receiver Determination wherein , you can do content based routing.

If you want to do the filtering in your mapping, then you can use the If..then.. else Function of graphical mapping. Take a look at this link for the same,

http://help.sap.com/saphelp_nw04/helpdata/en/5d/db0e83e8e74202a5bff527055ab7e5/content.htm

Regards,

Bhavesh

Former Member
0 Kudos

Hi Rajan,

All you have yo do in the message mapping is:

Companycode>Ifelse>Parent node.

But you have to make sure as to there will be one record in the file which will be valid else your receiver structure will not be created and mapping will go into error.

Else, if there is a condtion that there might be no valid records in the file then you can check that in Module of the file adpater and reject hte file if there is no data.

Regards

Vijaya

Answers (2)

Answers (2)

Former Member
0 Kudos

Filtering of the records based on values of the fields is possible.

See SAP Help: [MapExampleFilterRecordsByQualifier|http://help.sap.com/saphelp_nw70/helpdata/en/84/e8763c997fda50e10000000a11405a/frameset.htm]

Note The conditional field is assigned to the higher context so that it can be read before the target field (to be filtered) is created.

Former Member
0 Kudos

Rajan

Using FixedValues might be a solution, you can use a Key-Value pair to fix values to CompanyCodes from input file,with an option to filter out the rest with default or empty value..

If not then using IF-ELSE would be your solution

rajan_s
Participant
0 Kudos

Thank you all,

I had to use combination of all suggestions on detail level.

- I created If/Else condition to pass only the required records

- I had to create fixed values to pass only certain values.

Thanks all for your help.

Former Member
0 Kudos

hi,

if you filter multi-row record for source, if/else, not solution, you should look at this blog, if XI is 3.0 version, /people/venkataramanan.parameswaran/blog/2006/03/17/illustration-of-enhanced-receiver-determination--sp16

Does anybody know how to handle this with XI 7.0?

because SAP_BASIS_7.0 does not have http://sap.com/xi/system, ReceiverDetermination for Message Interface under interface object.

thanks

venjamin

rajan_s
Participant
0 Kudos

This might be another option I could have tried but the previous one worked. Thanks for the alternative suggestion.