cancel
Showing results for 
Search instead for 
Did you mean: 

SAP PI Mapping - based on a qualifier on source msg

Former Member
0 Kudos

Hi Team,

i have a requirement where the source message is as below. Based on the L1 value , I have to map to different Idoc fields on the target. Can you please let me know how an UDF would look like to achieve this .

<Header>
  <Details>
      <L1> X <L1>
      <L2> D <L1>
<Details>

<Details>
      <L1> Y <L1>
      <L2> Q <L1>
<Details>

<Details>
      <L1> Z <L1>
      <L2> P<L1>
<Details>


....

....

Thanks,

Prem

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Thanks for the response , the Requirement is :

If L1 = X , then map L2 value to Target field F1 or

if L1 = Y ,  then map L2 value to Target field F2 or ......

former_member184720
Active Contributor
0 Kudos

then simply use graphical functionss.

L1 ->remove context->string(equals)->X->if then->L2->remove context for F1

L1 ->remove context->string(equals)->Y->if then->L2->remove context for F2

Former Member
0 Kudos

Thanks ..

Here X can occur at any sequence in L1 .. will this still work..

Anyhow, I will try the above logic and get back ..

former_member184720
Active Contributor
0 Kudos

Doesn't matter.. It should return the corresponding L2.

Former Member
0 Kudos

Thanks Hareesh, Its working ...

Regards,

Prem

Answers (1)

Answers (1)

former_member184720
Active Contributor
0 Kudos

Hi Prem - Your requirement is not clear. Why do you need a UDF and what is the mapping logic?

Please provide more details.