cancel
Showing results for 
Search instead for 
Did you mean: 

Repeat the segment(E1BPACCR01) for each ITEM

former_member350687
Participant
0 Kudos


If ITEMNO_ACC is repated two times then E1BPACCR01 should populate two times. And the values in the sub- elements should be populated.

Please see the below structure.

For each ITEMNO_ACC --> E1BPACCR01 segment should be repeated and the sub nodes(ITEMNO_ACC,CURRENCY,AMT_DOCCUR) in the E1BPACCR01 also should be repeated.

Now i am able to populate only ITEMNO_ACC.

So can you hlep me in populating all the sub elements in E1BPACCR01 node.

Thanks.

Mahi.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello,

By looking ur source and target strcurture, i believe that u want to map CURRECNY_CODE (present under header) to CURRENCY target field?

If yes, then u have to use "useoneas many" function and ur mapping will be:

CURRECNY_CODE-----

LINE_IETM-----------------useoneasmany---splitby value(Each value) ----CURRENCY

LINE_IETM-----------------

Thanks

Amit Srivastava

Muniyappan
Active Contributor
0 Kudos

Hi,

If currency and AMT_DOCCUR come in sender side it will get populated.

Are you doing this based on node or field?

Can you share input payload?

Regards,

Muniyappan

former_member350687
Participant
0 Kudos


Hi Muniyappan,

The field are from target side and need to be populated baded on the root node.

<RECORD>

      <HEADER>

         <VENDOR_NUMBER>50357354</VENDOR_NUMBER>

         <INVOICE_NUMBER>163285</INVOICE_NUMBER>

         <POSTING_DATE>12/12/2013</POSTING_DATE>

         <CURRENCY_CODE>USD</CURRENCY_CODE>

         <INVOICE_REF_TEXT>201100276</INVOICE_REF_TEXT>

         <INVOICE_AMOUNT>1495.32</INVOICE_AMOUNT>

      </HEADER>

      <LINE_ITEM>

         <COMPANY_CODE>2646=9</COMPANY_CODE>

         <PROFIT_CENTER>800003=14410041</PROFIT_CENTER>

         <IO_CAR>9=9</IO_CAR>

         <AMOUNT_ALLOCATED>1495.32</AMOUNT_ALLOCATED>

      </LINE_ITEM>

   </RECORD>

Muniyappan
Active Contributor
0 Kudos

Hi Mahi,

i believe you are mapping LINE_ITEM to E1BPACCR01

<LINE_ITEM>

         <COMPANY_CODE>2646=9</COMPANY_CODE>

         <PROFIT_CENTER>800003=14410041</PROFIT_CENTER>

         <IO_CAR>9=9</IO_CAR>

         <AMOUNT_ALLOCATED>1495.32</AMOUNT_ALLOCATED>

      </LINE_ITEM>

as per your input xml it has one occurrence only.


<LINE_ITEM>

         <COMPANY_CODE>2646=9</COMPANY_CODE>

         <PROFIT_CENTER>800003=14410041</PROFIT_CENTER>

         <IO_CAR>9=9</IO_CAR>

         <AMOUNT_ALLOCATED>1495.32</AMOUNT_ALLOCATED>

      </LINE_ITEM>

hence you are getting one in the output.

it this LINE_ITEM node repeated two times you will get it.

Regards,

Muniyappan.

Former Member
0 Kudos

Hi Mahi

If the CURRENCY and AMT_DOCCUR values will be taken from header and the same value needs to be replicated for each E1BPACCR01 segment, then you need to use the node function call 'UseOneAsMany'

so the mapping would be

Currency ( header ) ---> UseOneAsMany---> splitby value(Each value) ----CURRENCY ( target )

AMT_DOCCUR ( header ) ---> UseOneAsMany---> splitby value(Each value) ----AMT_DOCCUR ( target )