cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping error with Graphical Variable

Former Member
0 Kudos

Hello,

I've problem with mapping.

I want to filled PO_MESSAGE only the first variable that contains data. When is the first works well. If the first is not informed and if the second, the node PO_MESSAGE is not created


What am I doing wrong?


Another thing that surprises me is that when I try display the queue of the variables does
nothing happens, this is so in the graphic variables?

Regards,

Silvia

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

I'm thinking of another way to do this and need help. Using a UDF that receives the 3 variables and return the first one you find informed, how would this UDF code?

Former Member
0 Kudos

Hi,

What do u mean by this:

>>I want to filled PO_MESSAGE only the first variable that contains data

If i am not wrong u are using 3 diff graphical variables and there might be a case that first variable may not exist then u have to pass the value of var2??

if yes, then use map with default in the graphical varaibles mapping.

Input---MapWithDefault--VAR1

Input---MWD----VAR2

Please correct me if i have misunderstood ur req.

Thanks

Amit Srivastava

Former Member
0 Kudos

Hi Amit,

You're right. I'm using 3 diff graphical variables. They may have all filled or not (only some). I want to inform PO_MESSAGE with only one value, the first one that is filled.

I do not understand how I can help the MWD, I have no default.

Former Member
0 Kudos

Hi,

>>I do not understand how I can help the MWD, I have no default.

In the mapping you are checking the length of input variable right, so if ur first variable is having valid input (for ex 1234) ur condition gets satisfy and mapping executes, now suppose when the first variable itself does not exist then how can u check its length as a result mapping is failing??

so to avoid this use MWD.

U must be doing some mapping for the graphical varaibles...so just use MWD over there..so it will ensure that the varibale exist and in the main mapping u are already checking the condition that if length is greater than 0 pass its value else go to other branch....do these changes and then share ur testing results here

I hope u get my point.

Thanks

Amit Srivastava

Former Member
0 Kudos

Thanks Amit,

I did what you say and the problem continue.

When vble1 (v_message_plant) is filled the response is ok:

But if v_message_plant is initial and v_message_mov is filled the response is wrong:

Former Member
0 Kudos

Hi,

Use Map with default just before the variable in the mapping shown above (after IfWithoutElse) and then try?

Thanks

Amit Srivastava

Former Member
0 Kudos

Hi Amit,

I just try and the result is the same

Former Member
0 Kudos

I have also tried and it does not work

Former Member
0 Kudos

Hi,

U hAve to map MWD in the graphical variable mapping as shown below....

I have tested this and getting the desired result..

Thanks

Amit Srivastava

Former Member
0 Kudos

>> Another thing that surprises me is that when I try display the queue of the variables does nothing happens, this is so in the graphic variables?

Have a look here: http://scn.sap.com/people/william.li/blog/2008/02/13/sap-pi-71-mapping-enhancements-series-using-gra...

Antonello

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

>>>

If the first is not informed and if the second, the node PO_MESSAGE is not created

have a look at this blog on how to handle contexts and you will understand how to work with message mapping contexts

http://scn.sap.com/people/riyaz.sayyad/blog/2006/04/23/introduction-to-context-handling-in-message-m...

Regards,

Michal Krawczyk