Skip to Content

Use one as many were contexts don't match

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Jan 16 at 01:44 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 16 at 04:50 PM

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

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 16 at 05:19 PM

    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)

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 16 at 08:16 PM

    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

    Add comment
    10|10000 characters needed characters exceeded