on 07-03-2008 5:53 PM
Hi all,
I'm doing a file-idoc scenario and this is my out structure:
0000300027,xxxxxxxxxxxxxxxxxxxx,SOLD_TO,SHIP_TO,BILL_TO,0000300027,0000300016,0000300016
But I want the structure in 3 different rows like:
0000300027,xxxxxxxxxxxxxxxxxxxx,SOLD_TO,0000300027
0000300027,xxxxxxxxxxxxxxxxxxxx,SHIP_TO,0000300016
0000300027,xxxxxxxxxxxxxxxxxxxx,BILL_TO,0000300016
so is there a way to do it with FCC or with the mapping?
Thanks,
Srini
Edited by: Srinivas Davuluri on Jul 3, 2008 12:55 PM
Hi,
Your output is with field seperator as ",".
You can take whole as Single String and then with UDF you can break it as per new rows in Result List
The logic will be to add new ROW after 4 Commas.
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 Srinivas,
It is very difficult to convert your current output to your required out put.
I would rather suggest you to create a new target structure
if your old structure is something like this
Root 1:1
--Record 0:unbounded
-
field1
-
field2
-
field3
-
field4
-
field5
-
field6
-
field7
-
field8
-
field9
change it to:
Root 1:1
--Record 0:unbounded
-
field1
-
field2
-
field3
-
field4
IN the message mapping map the record node to the The segment that has the partner data in the IDOC.
The fields should be appropriately mapped .
Finally you can use the content conversion in adapter.
Regards,
Ravi
Ravi,
I can still have the same DT right just have to map record node to the the segment that has the partner data in the IDOC. I have also duplicated 2 of the target fields to get that particular o/p previously, all I have to do is remove the duplication right.
Any suggestions on my approach.
--
Srini
Raj,
This is how I changed the target structure to,
MT
-DT
---Recordset (0..unbounded)
-
field1
-
field2
-
field3
-
field4
-
field5
---Record (0..unbounded)
-
partner field1 (SHIP_TO, SOLD_TO, BILL_TO)
-
partner field2 (100,200,100)
I want the output in this way:
field1,field2,field3,field4,field5,SHIP_TO,100
field1,field2,field3,field4,field5,SOLD_TO,200
field1,field2,field3,field4,field5,BILL_TO,100
Thanks,
Srini
Edited by: Srinivas Davuluri on Jul 6, 2008 7:18 PM
Hi Srinivas,
Use the node function useOneAsMany for your target nodes fields field1,field2,field3,field4,field5. Thus it will produce these fields for each value of partner field1or partner field2. Then you will have your target structure like you have mentioned above:
MT
-DT
---Recordset (0..unbounded)
-
field1
-
field2
-
field3
-
field4
-
field5
---Record (0..unbounded)
-
partner field1 (SHIP_TO, SOLD_TO, BILL_TO)
-
partner field2 (100,200,100)
Try it and let us know.
Regards,
Sanjeev.
Hi,
My target looks like this with some sample test data:
MT
-DT
---Recordset (0..unbounded)
-
field1
-
field2
-
field3
-
field4
-
field5
---Record (0..unbounded)
-
field1 (SHIP_TO)
-
field2 (100)
---Record (0..unbounded)
-
field1 (SOLD_TO)
-
field2 (200)
---Record (0..unbounded)
-
field1 (BILL_TO)
-
field2 (100)
This my source structure with the same sample data:
<DEBMAS06> (1..1)
---<IDOC> (1..1)
-
<E1KNA1M> (1..1)
-
<f1>field1</f1> (0..1)
-
<f2>field2</f2> (0..1)
-
<f3>field3</f3> (0..1)
-
<f4>field4</f4> (0..1)
-
<f5>field5</f5> (0..1)
-
<E1KNVVM> (0..unbounded)
-
<E1KNVPM> (0..unbounded)
-
<field1>SHIP_TO</field1> (0..1)
-
<field2>100</field2> (0..1)
-
</E1KNVPM>
-
<E1KNVPM>
-
<field1>SOLD_TO</field1>
-
<field2>200</field2>
-
</E1KNVPM>
-
<E1KNVPM>
-
<field1>BILL_TO</field1>
-
<field2>100</field2>
-
</E1KNVPM>
-
</E1KNVVM>
-
</E1KNA1M>
---</IDOC>
</DEBMAS06>
Even if I use the node function useOneAsMany I'm not able to produce result like this:
MT
-DT
---Recordset (0..unbounded)
-
field1
-
field2
-
field3
-
field4
-
field5
---Record (0..unbounded)
-
field1 (SHIP_TO)
-
field2 (100)
---Recordset (0..unbounded)
-
field1
-
field2
-
field3
-
field4
-
field5
---Record (0..unbounded)
-
field1 (SOLD_TO)
-
field2 (200)
---Recordset (0..unbounded)
-
field1
-
field2
-
field3
-
field4
-
field5
---Record (0..unbounded)
-
field1 (BILL_TO)
-
field2 (100)
Can you guys suggest what are the 3 input fields to the node function useOneAsMany and the context.
Thanks,
Srini
Edited by: Srinivas Davuluri on Jul 8, 2008 11:20 AM
Hi Srinivas,
<<<<Can you guys suggest what are the 3 input fields to the node function useOneAsMany and the context.>>>>>
For the useOneAsMany the 3 inputs are as following:
1) Here you will have to provide the field which you want to repeat n number of times.
2) Here you will provide the field based upon which you will determine how many times your 1st field should replicate itself.
3) Here you will provide the field based upon which the 1st field should replicate.
The 2nd and the 3rd fields can be same or different.
For more info refer this:
http://help.sap.com/saphelp_nw04/helpdata/en/ef/df564b6aa24fc9ab0d685460747de5/frameset.htm
Regards,
Sanjeev.
Hi,
You can get the data in a single string or every field on a new line as you prefer. And then make use of useOneAsMany function in the message mapping.
See the below link for a workaround to convert flat file to nested structures -
[Convert Flat File to Deeply Nested XML Structures|http://www.riyaz.net/blog/index.php/2008/05/20/xipi-convert-flat-file-to-deeply-nested-xml-structures-using-only-graphical-mapping/]
Regards,
Riyaz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
You have to map IDoc Segment E1EDKA1.
Your qualifer for
Sold-To = AG,
Ship-To = WE ,
Bill-To = RE
Thanks & Regards,
Surya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Srinivas,
YOur target structure should be declared as the 2nd structure that you have defined.
YOu mapping has tobe modified accordingly.
Regards,
Ravi Kanth Talagana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
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.