on 08-26-2009 11:32 AM
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.
Hi swetha,
Am new to XI,Can you please elaborate on how to use the global conatainer and all...
Thanks,
Akkasali.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need to write UDF and in that you have to set the global container variable.
Please see the below links.
http://help.sap.com/saphelp_nw04/helpdata/en/22/e127f28b572243b4324879c6bf05a0/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/75/8e0f8f3b0c2e4ea5f8d8f9faa9461a/content.htm
Shweta.
Hi Swarup,
But how to get the first idoc field value ,further when other idocs come.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
Hi,
How are you collecting the IDOCs. Are you using BPM or IDOC packaging?
Shweta.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.