cancel
Showing results for 
Search instead for 
Did you mean: 

Need help on message mapping

Former Member
0 Kudos

Hi,

Need ur help on below situation.

I have input file structure as

- <G_SPO1>

- <S_PO1>

<D_350>0001</D_350>

<D_330>6</D_330>

<D_355>EA</D_355>

<D_212>151</D_212>

<D_235>VC</D_235>

<D_234>40421-821/1920-02</D_234>

<D_235_2>SK</D_235_2>

<D_234_2>427Y73226</D_234_2>

- <S_REF>

<D_128>SU</D_128>

<D_127>0060325940</D_127>

</S_REF>

- <S_REF>

<D_128>SU</D_128>

<D_127>0060325957</D_127>

</S_REF>

- <S_REF>

<D_128>SU</D_128>

<D_127>0060325964</D_127>

</S_REF>

- <S_REF>

<D_128>SU</D_128>

<D_127>0060325971</D_127>

</S_REF>

- <S_REF>

<D_128>SU</D_128>

<D_127>0060325988</D_127>

</S_REF>

- <S_REF>

<D_128>SU</D_128>

<D_127>0060325995</D_127>

</S_REF>

- <S_REF>

<D_128>CR</D_128>

<D_127>WHITEHOUSE,RYAN</D_127>

</S_REF>

</S_PO1>

</G_SPO1>

I need to map D_127 elements to target field.

here i need to check conditions.

IF D_128 = SU then only i need to map D_127 to target field. otherwise ignore that record.

Plzz let me know how would i map thid field to target field.

Thanks,

Singh.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member556603
Active Contributor
0 Kudos

Hi singh,

You can use iWithoutElse

need to map D_127 elements to target field.

here i need to check conditions.

IF D_128 = SU then only i need to map D_127 to target field. otherwise ignore that record.

Plzz let me know how would i map thid field to target field.

You can map If IF D_128 = SU then pass D_127 and mapped to target filed.

Former Member
0 Kudos

Hi,

Satya thanks, for ur reply.

Here i need to check PO1 element also i.e. 001

if i use like the above condition u said

I am getting error as Exception:[com.sap.aii.mappingtool.tf7.FunctionException: Cannot cast 'SU' to boolean] in class com.sap.aii.mappingtool.flib7.Bool method equalsBoolean[SU, SU, com.sap.aii.mappingtool.tf7.rt.Context@c171667]

Plzz clarify y i am getting that error

Thanks,

Singh.

Edited by: vcpsingh on Mar 11, 2010 1:47 PM

former_member200962
Active Contributor
0 Kudos

In the IF block you seem to be passing SU to the if-section....it is not permitted if-section should only get boolean values 0/1 (true/ false)

Former Member
0 Kudos

How would i map below condition in graphical mapping in PI

If IF D_128 = SU then pass D_127 and mapped to target filed.

Thanks,

Singh.

former_member200962
Active Contributor
0 Kudos
D_128 -->
                --> equalS --> If (D_127 --> Then) --> Target
Constant(SU) -->

Maintain proper Context for D_128 otherwise only first instance will be checked.

former_member556603
Active Contributor
0 Kudos

Hi,

You can Use IF Function.

IF D_128 = SU and

PO1 = 001

then Pass D_127

else pass Blank constant

and mapped to the Target filed.

Thanks,

Satya

Former Member
0 Kudos

Hi Satya ,

then wat abt if PO1 = 0002 value occurs.

Thanks,

Singh.

Former Member
0 Kudos

just change the 0001 with the given value ie 0002 and Follow the same Mapping procedure , which the experts have advised above. if your requrement is same as you mentioned for PO1 = 0001 .

Regards,

Aziz khan .

Former Member
0 Kudos

- <G_SPO1>

- <S_PO1>

<D_350>0001</D_350>

<D_330>6</D_330>

<D_355>EA</D_355>

<D_212>151</D_212>

<D_235>VC</D_235>

<D_234>40421-821/1920-02</D_234>

<D_235_2>SK</D_235_2>

<D_234_2>427Y73226</D_234_2>

- <S_REF>

<D_128>SU</D_128>

<D_127>0060325940</D_127>

</S_REF>

- <S_REF>

<D_128>SU</D_128>

<D_127>0060325957</D_127>

</S_REF>

- <S_REF>

<D_128>SU</D_128>

<D_127>0060325964</D_127>

</S_REF>

- <S_REF>

<D_128>SU</D_128>

<D_127>0060325971</D_127>

</S_REF>

- <S_REF>

<D_128>SU</D_128>

<D_127>0060325988</D_127>

</S_REF>

- <S_REF>

<D_128>SU</D_128>

<D_127>0060325995</D_127>

</S_REF>

- <S_REF>

<D_128>CR</D_128>

<D_127>WHITEHOUSE,RYAN</D_127>

</S_REF>

</S_PO1>

</G_SPO1>

if i used D_128 Context as S_PO1 and

D_127 Context as S_REF then i am getting output as

0060325940

0060325940

0060325940

0060325940

0060325940

0060325940

0060325957

0060325957

Plzzz tell me which context i have to use.

Thanks,

Singh.

Former Member
0 Kudos

Hi,

Please let us know of the output you are looking for

Former Member
0 Kudos

Lakshmi,

for PO1 first element is 0001 i need output as

0060325940

0060325957

0060325964

0060325971

0060325988

0060325995

for next PO1 first element is 0002 then i need output as

0070325940

0070325957

0070325964

These below fields are present in input file. the above file i mentioned only for PO1 first element D_350 = 0001.

Presnetly i am geting output as

0060325940

0060325957

0060325964

0060325971

0060325988

0060325995

0070325940

0070325957

0070325964

but i need to differentiate this output as separate based on D_350 = 0001.

finally required output is

if PO1 1st element D-350 = 0001

then output is

0060325940

0060325957

0060325964

0060325971

0060325988

0060325995

if PO1 1st element D_350 = 0002

then

0070325940

0070325957

0070325964

Plzzzz let me know.

Thanks,

Singh.