Skip to Content

useOneAsMany mapping error

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)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jul 03, 2017 at 01:41 PM

    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.

    Add comment
    10|10000 characters needed 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

  • Apr 17 at 04:46 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded