cancel
Showing results for 
Search instead for 
Did you mean: 

Variables in target structure - behaviour

markus_schalk
Participant
0 Kudos

Hello,

i am wondering about the specific functionality of varibles in mappings:

1. Are they really limited to take only a queue with one value in it?

I tested it, and the varible doesn't see to mind about getting bigger queus, but always takes just randomly one value...

2. Does the variable behave like a generating function?

see [http://help.sap.com/saphelp_nwpi711/helpdata/en/c0/18907d03b7c04ca9d07c7efeb5e1a9/frameset.htm|http://help.sap.com/saphelp_nwpi711/helpdata/en/c0/18907d03b7c04ca9d07c7efeb5e1a9/frameset.htm]

Thanks in advance!

Kind regards,

Markus Schalk

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi Markus,

Is it graphical variables of PI 7.1 that you mention here? Because i have faced the same issue while using graphical variables in PI7.1

During mapping to the variable, we have every value populated correctly in the queue. However, when this same variable is used elsewhere in the mapping in the source side :-

1. all values of the queue will be considered if mapped directly to the target side

2. only first value of the queue will be considered if we do a map with default before mapping to the target side.

3. any string udf or the general functions like 'if' will accept all values of the queue. But do remember that using 'mapwithdefault' to the variable causes only the first value to be taken.

4. only first value of the queue will be considered if we are mapping the variable to a context or queue udf. In such cases, if we try to concatenate a value which contains the contexts that you require and nullify that value(kind of trying to use one as many), but we cant use oneasmany cause it will also only take the first value.

Regards,

Ninu

markus_schalk
Participant
0 Kudos

Hi Ninu,

yes i am using PI 7.11...

i can not confirm all your satements, but it sounds like the variables are producing undefined errors and behaviours...

Best regards,

Markus

stefan_grube
Active Contributor
0 Kudos

> but it sounds like the variables are producing undefined errors and behaviours...

sad but true...

Answers (2)

Answers (2)

Shabarish_Nair
Active Contributor
0 Kudos

it is advised to use variables only with one values.

A queue is not recommended.

As mentioned by Stefan, we have seen the same results during our usage.

Hmmmm... might be a good idea to raise a message with SAP?

markus_schalk
Participant
0 Kudos

Hi,

thanks for your replies.

I can just say that the documentation sometimes seems to be a black hole, if you want to know the specific behaviour of different functionalities :(....

I can handle the situation that the variable can only take one value...

But is there a official statement (maybe even code) which proofs that it behaves like a generating function?

Best regards,

Markus

Edited by: Markus Schalk on Jun 3, 2011 5:19 PM

Shabarish_Nair
Active Contributor
0 Kudos

> But is there a official statement (maybe even code) which proofs that it behaves like a generating function?

doesnt say anywhere

you could raise a message with SAP for clarification as help doesnt mention its usage very clearly.

But still, i wud say it is subjected to interpretation of being a single or multiple queue

stefan_grube
Active Contributor
0 Kudos

I do not know any statement from SAP, but I have the impression, that a graphical variables does not behave like a generating function.

There is a weblog by William Li about graphical variables, but even Bill works for SAP, I do not think that it is an "official statement"

markus_schalk
Participant
0 Kudos

Wow, i have a great strange behaviour now...

Using the variables leeds to exceptions not having enough values in queue:

>>Values missing in queue context. Target XSD requires a value for this element, but the target-field mapping does not create one.

But using the defined mapping of the varible without the variable just works fine!

Beside that, the target value is optional, so this exception shouldn't even been thrown! lol...

So i am going the avoid the variables now!

Thanks for your help!

I would appreciate a notification to sap, to clarify this issue!

But at the moment i am short of time....

Best regards,

Markus

stefan_grube
Active Contributor
0 Kudos

I used the variables a lot and figured out, that they do not behave as expected.

For example: when the queue has more contexts, the target is not always populated by the correct context.

Finally I removed all varaibles. I think you can use variables properly only, when you have just one entry in it.

For more entries the behaviour is not even documented.