cancel
Showing results for 
Search instead for 
Did you mean: 

IDOC Message Mapping

Former Member
0 Kudos

In File to IDOC senario,

I have a Mapping Condition like this:

IF A02 = 'X' map 'VER ' + A05 + '- ACCEPTED'
IF A02 = 'Y' map 'REJECTED'
IF A02 = 'Z' map 'VER ' + A05 + ' -  EXCEPTIONS'
IF A02 = 'A' map 'VER ' + A05 + ' -  HOLD'
IF A02 = '' map 'VER ' + A05 + ' -  ACK'

Note: Trim any leading zeros in A05 while forming string. If A05 is not available, then use prefix 'VER UNK - '.

Sourcefield : A02

Target field : E1EDK02 - BELNR

                     QUALF = 002

I am unable to map it correctly.

Give some mapping example and Tips.

Explain this.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

Do the mapping like below

Use the following entries in fix value

Output:

Let me know if any issues.

Former Member
0 Kudos

I tred with this mapping sample.

Everything is good, but If B05 not exist, then add ' VER UNK - ', this only not coming.

Error: I didn t give the input value for B05, that time also this if condition tbeome true  and give ouput as 'VER'.

I mentioned this  in the figure. see it.


And help me..........

Former Member
0 Kudos

Hi

You have written

'Note: Trim any leading zeros in A05 while forming string. If A05 is not available, then use prefix 'VER UNK - '.

So if A05 is missing then add VER UNK.

See the last line of test result, There is no A05 and hence the output start with VER UNK-

Now you are saying it's B05 . Please check and adjust the mapping.

Former Member
0 Kudos

Sorry that is A05 only. but even i tried, that first if condtion always take true condition only.

so that, even if i will not give value to A05, then it s Add 'VER' only.

am strucking here only.

Former Member
0 Kudos

Hi

Please update the test data you are using. Also I have designed mapping based on the assumption that

If there is no A05 field, then only it will pass VER UNK-

If A05 is there and there is no value then it will pass VER.

Please check the logic and let me know if my assumption was correct or not.

Former Member
0 Kudos

yhea! I checked it. n my senario ,

The concept is existing of value of the field not Field.

I adjusted the map wth based on checikng the  length of the field .

If length of the field A05  is equal to 0 then Output is ' VER UNK-'

else Output should be 'VER' + ...

Your Mapping is Exactly  Correct with the above point.

Rreally, Thankq so much.

Answers (1)

Answers (1)

Former Member
0 Kudos

output = "";

if (A02.equals("X"))

{

output = output+VER ' +A05.replaceAll("^0*", "")+'- ACCEPTED' ;

}

else if (A02.equals("Y"))

{

output = output+REJECTED ;

}

//ly do for rest

return output ;

Let me know if you struck with any issue .

Regards

Venkat

Former Member
0 Kudos

i need the Mapping Sample snap also.

Can u show me now?

what argument i have to pass for this in the UDF?

show to create UDF for this with snap.

Because i have a confusion and not clear wth this Mapping condition that s what.


anand_shankar10
Active Participant
0 Kudos

You can even get this result by Graphical Mapping using "IfThenElse" Node function with Concatenate node.

Thanks

Anand

Former Member
0 Kudos

Can you show the Mapping snap ?

Former Member
0 Kudos

For UDF select single values.

A02  argument string

A05 argument  string

if (A02.equals("X"))

{

output = output+"VER " +A05.replaceAll("^0*", "")+"- ACCEPTED" ;

}

else if (A02.equals("Y"))

{

output = output+"REJECTED" ;

}

else if (A02.equals("Z"))

{

output = output+"VER " +A05.replaceAll("^0*", "")+"- EXCEPTIONS" ;

}

//ly do for rest

return output ;