on 05-25-2006 2:47 PM
Hi
My File Structure is: I have Datatype with header fields and within it an Item level fields and within it a SubItem level fields.
I am getting an IDoc and want to map with the above file structure.
In message mapping I have mapped <b>Subitems>Removecontext>Datatype</b>
Also for items I have used <b>UseOneAsMany(with idoc, subitems, subitems)>SplitByValue(EachValue)>Items</b>.
Also for Subitems I have mapped <b>Subitems>SplitByValue(EachValue)>SubItems</b>.
Then I am getting my output as:
Current Output structure what we are getting from message mapping:
HEADER1,LINEITEM1,SUBITEM1
HEADER1,LINEITEM2,SUBITEM2
HEADER1,LINEITEM3,SUBITEM3
HEADER1,<blank> ,SUBITEM1
HEADER1,<blank>,SUBITEM2
HEADER1,<blank>,SUBITEM1
HEADER1,<blank>,SUBITEM2
In LineItem1 there are 3substructures and LineItem2 there are 2 substructures and 2 in third line item. I am getting fine for Subitems. But i am not getting Lineitems what i was expecting. I am gettng lineitems displayed but no values because it is already displaying. So I have to keep lineitem1 for the first 3subitems and lineitem2 for the second 2 subitems and lineitem3 for the third subitem.
Expected Output structure:
HEADER1,LINEITEM1,SUBITEM1
HEADER1,LINEITEM1,SUBITEM2
HEADER1,LINEITEM1,SUBITEM3
HEADER1,LINEITEM2,SUBITEM1
HEADER1,LINEITEM2,SUBITEM2
HEADER1,LINEITEM3,SUBITEM1
HEADER1,LINEITEM3,SUBITEM2
Any help would be greatly appreciated and regarded...
Regards,
---Satish
Hi Satish,
your exact problem is described in this <a href="/people/claus.wallacher/blog/2006/04/17/replication-of-nodes-using-the-graphical-mapping-tool">weblog</a>.
Please have a look at it, it should solve your problem. If you still have issues, I can guide you through the process.
Regards,
Claus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Claus
I will explain to you what is my scenario:
I have my file datatype as:
A Datatype with Details(having 10 Header fields) and within it the 11th field is my Items(having 5 fields)and within it I have 10Subfields. So it has Same Header, Multiple Items and Multiple Subitems.
I am using BOMMAT03 Idoc.
Also I have seen your weblog and with solution 2 i tried to resolve. After implementing that solution I have got the output as;
H1L1S1S2S3
H1L2S1S2
H1L3S1S2
But my requirement is:
H1L1S1
H1L1S2
H1L1S3
H1L2S1
H1L2S2
H1L3S1
H1L3S2
Could you pl. give me your mail id so that I can send you some screenshots(to let you know my datatype and idoc structure, mappings done etc)
Regards,
---Satish
Hi Satish,
you find my email in my business card (I just opened it).
Regards,
Claus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Satish,
First of all your target structure is a File Structure right ? Then make your Target Structure as a flat structure.
Then use XSLT mapping to handle this context.
More on XSLT mapping- http://www.w3schools.com/xsl
Thanks,
Moorthy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Satish,
One Simple Solution is using User-Defined Solution in Graphical mapping.
for taht You give LineItem then give Remove Context as the first input,Subitem(set its context to LineItem) as the second input.You define userdefined function as Queue type.Name first parameter as a,second parameter as b and then write this following code in the function..
int j=0;
for(int i=0;i<b.length;i++)
{
if(b<i>.equalsIgnoreCase(ResultList.CC))
{
result.addValue(ResultList.CC);
j=j+1;
}
else
result.addValue(a[j]);
)
}
now give the output of the userdefined function directly to the target..you will get expected output..
Regards,
Sundararamaprasad.
Message was edited by: Sundararamaprasad
Message was edited by: Sundararamaprasad
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.