cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping Condition.

Former Member
0 Kudos

Hi,

IDoc to flat file:

Multiple IDOCs to one file.

I have target file structure as below,

Structure

...........field1

...........field2

Structure

...........field1

...........field2

the same structure is repeated ,mappings are different for both segments.

Now the question is ,there is a condition.,

IF (The IDOC(i).field1==re && IDOC(i).field2==ht)&&(IDOC(0).field1==yt) then the above two structures should come.

If its not satisfied then only second structure should come.

Note:Idoc(i) where 'i' can be any index.

This implies,

1)Multiple idocs will be coming,When first IDOC comes the above condition will not be satisfied hence only second structure should come.Now the file has totally one record.

2)When second iDOC comes with field1=re and field2=ht and also if the first idoc has field1=yt then both structures should be mapped.Now the file will be having totally 3 records(1 record from first idoc and 2 records from second idoc).

I tried mapping this condition to parent node of structure 1(i.e structure )

when first idoc comes only one record comes as per my requirement,

but when second idoc comes and the second condition (numbered 2) is satisfied(i.e field1=re and field2=ht also first idoc field1=yt) then am getting only one record instead of two.(totally there should have been 3 records but i have 2 records at this point).

How to achieve this please help.

thanks,

Akkasali.

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi swetha,

Am new to XI,Can you please elaborate on how to use the global conatainer and all...

Thanks,

Akkasali.

Former Member
0 Kudos
Former Member
0 Kudos

Hi Swarup,

But how to get the first idoc field value ,further when other idocs come.

Former Member
0 Kudos

Hi,

I think based on condition structure 1 or 2 is populated in multiple IDOCs.

If in case your 1st condition get failed you need to either supress the node or pass some default value.

That will help to maintain the queue and will not create the mess.

Thanks

Swarup

Former Member
0 Kudos

Hi swetha,

how to collect IDOCs is not yet decided can u please providde solution if i use BPM for collecting the IDOC.

Thanks,

Akkasali

Former Member
0 Kudos

Hi,

As per my understanding, You need to refer the previous processed Idoc field while selecting the segments of the current processing IDOC. In that case you can save the required field value in Global Container while processing the first IDOC and refer this Filed when you are processing the second IDOC. But this will work only when you collect the IDOCs and process it together.

Regards,

Shweta.

Former Member
0 Kudos

Hi,

How are you collecting the IDOCs. Are you using BPM or IDOC packaging?

Shweta.