Skip to Content
0

Use one as many were contexts don't match

Jan 16 at 01:04 PM

71

avatar image

Hi

Hopefully someone can point me in the right direction please.

I have a file adapter interface where the source file is of the following structure:

Recordset containing

File header (1 occurrence)

Payment header (multiple)

Payment detail lines (multiple)

Payment trailer lines (multiple)

This is mapping to Idoc (FIDCCP02) structures - where payment header (and associated details and trailer) go to comprise a single Idoc and its segments.

However, there is a single field on the File header that needs to populate each occurrence of USNAM, within the Idoc header E1FIKPF

It doesn't like UseOneAsMany

I tried File.field (param1) payment.detail (parameter2) and a.pay.detail.field (parameter3) which is all wrong as 1&2 need to match no of contexts and 2&3 need to match no of values (I think).

Is there a way I can do this please?

I have been wondering if I could use a UDF to call multiple times, one to save the value from the file header, and the rest to use it...(procedural programming background, can't get my head around queues and contexts) but not sure if the values in a UDF can be retained through multiple use.

Many thanks

Elizabeth

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Best Answer
Evgeniy Kolmakov Jan 16 at 01:44 PM
1

Hi Elizabeth!

You could try to create variable in target structure and put your value there. After that you can populate the value from that variable to target elements as constant.

Regards, Evgeniy.

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

Hi Evgeniy,

Brilliant, that sorted it. Many thanks

Elizabeth

0
Anurag Gupta Jan 16 at 04:50 PM
0

Can you post a screenshot of the Processing Queue ? Want to see source Queue and the target queue

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

Hi Anurag, see attachecapture.pngd. Though I have fixed it by following Evgeniy's suggestion and creating a variable

capture.png (12.2 kB)
0
Manoj K Jan 16 at 05:19 PM
0

UseOneHasmany parameters :

1st param The values which need to be repeated.

2nd param how many no of times it has to be repeated.

3rd Once they are repeated how to arrange them in context wise.

So you should use like :File.field (param1) payment.detail (parameter2) and a payment.detail (parameter3)

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

Hi Manoj,

Yes, this is what I did, but the number of contexts between 1 and 2 mismatched

Thanks

0
Juan Vasquez Jan 16 at 08:16 PM
0

Hi Elizabeth

use map with default, in the second and third parameter, then you get the right number of repetitions.

Is this what you need?

Regards

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

Hi Juan,

sorry, this made no difference with the number of contexts/repetitions.

Thanks

0
Elizabeth Stapleton

Hi Elizabeth

Could you please send more details?

Immage

XML

0