cancel
Showing results for 
Search instead for 
Did you mean: 

Populating maximum Line Items on restriction of number

former_member193466
Participant
0 Kudos

Hi,

I have a scenario where in I have to populate by default 4 Line Items for each header.

Here the line Items will be added in case of more than one <Type> field in source. This restriction is due to the LineItem restriction in ECC that max of 999 only.

1st LineItem  will occur 445 times

2nd LineItem will occur 1 time

3rd LineItem will occur 445 Items

4th LineItem will occur 1 time

If there are more than 2000 records then there should be 3 Headers with above logic of LineItems.

Source:

<Details>

<Date>Date</Date>

<Type>Type</Type>

</Details>

<Details>

<Date>Date1</Date>

<Type>Type1</Type>

</Details>

<Details>

<Date>Date2</Date>

<Type>Type2</Type>

</Details>

Accepted Solutions (0)

Answers (2)

Answers (2)

javier_alcubilla
Contributor
0 Kudos

Hi VR

I don't know if this will be useful for you. I had to use multimapping for create messages every a number of records [constant]. Below mapping makes the function:

Regards

Javi

former_member193466
Participant
0 Kudos

Hi Javi,

Thanks for the reply.

Can you please let me know if I can use multi mapping for splitting of messages?

1. MT_Source

2. MT_Target

Now I am mapping MT_Source to MT_Target.

Again I will map MT_Target to MT_Target(0..unbounded) with different mapping logic.

will that work fine or I should have different name for second mapping source message type?

Thank you.

regards

VR

javier_alcubilla
Contributor
0 Kudos

Yes.

At mapping, in the signature tab, your target must be 0..unbounded

Then apply the above mapping to your root tag (i.e SyncItemMaster). (Messages -> Message1 strucuture is generated automatically changing the occurence)

Regards

Javi

gagandeep_batra
Active Contributor
0 Kudos

Hi VR

yOu can change the occurance of message  in mapping  and create the target node based on condition

Regards

GB

former_member193466
Participant
0 Kudos

Hi GB,

can you please let me know if this can be achieved without splitting the file.i.e I will send all the data in a shot through proxy, but in that each Header is having 990 LineItems.

iaki_vila
Active Contributor
0 Kudos

Hi VR,

To poppulate by default you have the standard functions copyvalue or mapwithdefault (Message Mapping....... Untouched Part - Process Integration - SCN Wiki), but i think your requirements are a bit more complicated. Could you share an example with the source XML and the target?, it will be easier to help you in this way.

Regards.

former_member193466
Participant
0 Kudos

Hi,

I think this can be acieved through Multi Message mapping. can you share if you any step-by step for this.

I have to send the data to ECC through proxy.

Thanks.