cancel
Showing results for 
Search instead for 
Did you mean: 

condition flag in message mapping

rajan_s
Participant
0 Kudos

I am trying to create flag in Message Mapping with the following condition from Legacy - XI - R/3:

If there are <b>new</b> customers from source, then pass <b>N</b> flag to Target.

If there are <b>changes</b> to existing customers, then pass <b>U</b> flag to Target.

Can anybody give me steps on how I can accomplish this in message mapping?

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Rajan,

If I understood correctly...

In both the cases, the data that u get from the legacy system will be different. ie for a new customer u will receive all the data including Name, contact address etc. But in the case of an update, u will receive only the data that's been changed.

-Naveen.

Answers (2)

Answers (2)

moorthy
Active Contributor
0 Kudos

Hi,

As per the given info

This condition, you can do with If-Else logic in the mapping. But think about other 2 cases mentioned .

1)I hope you will get source info thru file from Legacy system.

If so, just write a Adapter Module in the Sender Adapter, and set the Flag there itself. Then just map as it is . Provided you are able to differentiate these 2 types from the file itself.

2)In another thought, how are you finding out who is new customer/Changes ? Are you using any Lookups in the Mapping..

Regards,

Moorthy

rajan_s
Participant
0 Kudos

This flag will turn on or turn off other flags on the source side and will send appropriate data (New or Update) to the target system.

moorthy
Active Contributor
0 Kudos

<i>This flag will turn on or turn off other flags on the source side and will send appropriate data (New or Update) to the target system.</i>

>>

brief the entire scenario.. As I already mentioned 2 ways..

rajan_s
Participant
0 Kudos

From source file, a flag has to pass either U or N to the target system field. So I created If/then/Else mapping where if the source file has flag as U then it will send blank space or blank value; otherwise the default value N will be sent. But when I run the test file, I am getting message mapping error. Where could I go wrong in mapping? Is there any blog or message thread anyone can give?

moorthy
Active Contributor
0 Kudos

HI Rajan,

What is the error ?

Can you test your mapping in the IR with Test Tab by providing input xml from the SXMB_MONI.

For this you can refer this-

/people/michal.krawczyk2/blog/2005/09/16/xi-how-to-test-your-mapping-in-real-life-scenarios

Also make sure that , your xml structure is valid.

Regards,

Moorthy

rajan_s
Participant
0 Kudos

Hi Moorthy:

Thanks for your prompt reply. I was able to fix the problem. The error I was getting was MAPPING> EXCEPTION_DURING_EXECUTE - RuntimeException in Message-Mapping transformation, because I had equal function mapping from boolean instead of text function. That solved the problem.

Former Member
0 Kudos

Can you elaborate more on ur scenario ?

Vara