Skip to Content
0

useOneAsMany mapping error

Jul 03, 2017 at 01:16 PM

59

avatar image

Hello expert,

I am trying a node function "useOneAsMany", in display queue getting error like : Too many values in the first queue in function useOneAsMany.


Scenario:

  • if input4 exist map it to output4.

input4 is in header part. see below mapping.

Diaplay queue :

I have done some thing wrong after if condition.

please guide me.

Thanks,

Ravi

useoneasmany.jpg (108.2 kB)
useoneasmany-1.jpg (113.9 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Evgeniy Kolmakov Jul 03, 2017 at 01:41 PM
1

Hi Ravi!

First of all: I'd suggest using variable instead of "UseOneAsMany" function. It could really simplify the mapping.

Second: "If" function is not necessary in your case. It's enough to use: input4->MapWithDefault["NotExist"]->...

Also you can read about using "UseOneAsMany" function in this blog:

https://blogs.sap.com/2015/02/20/useoneasmany-in-sap-pi/

Regards, Evgeniy.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Evgeniy,

actually I am practicing for node function, so I took random example.

But thank you, I found another way to do the same.

Thanks,

Ravi

0
Adalid Andrés Hernández 4 days ago
0

Hi Ravi,

There are three input parameters to consider for useOneAsMany() function:

1.- What is the item you need to repeat.

2.- How many times you need to repeat the item mentioned above in 1.-

3.- An item from the same context of the item you need to repeat.

so following this from your example, TEST is not at the same level of context of Input4,

Regards,
Adalid.

Share
10 |10000 characters needed characters left characters exceeded