on 08-23-2007 7:17 PM
Hi All,
I have a Flat file on the sender side ..and i need to do the file content conversion .
I have doubts abt the File (FCC) adapter capabalities.Please let me know if i can build the following structure by using FCC
My Flat file will look some thing like this , I have all the header rows followed by all the detail rows followed by all the subdetail rows for all the details .
HEADER1 fields
HEADER2 fields
DETAIL11 fields for HEADER1
DETAIL21 fields for HEADER1
DETAIL12 fields for HEADER2
DETAIL22 fields for HEADER2
SUBDETAIL111 fields for DETAIL11
SUBDETAIL211 fields for DETAIL21
SUBDETAIL121 fields for DETAIL12
SUBDETAIL222 fields for DETAIL22
And i want to convert the flat file to the following format
<HEADER1>
<Filed1> ..</Field1>
<Filed2> ..</Field2>
<DETAIL1>
<Field1>..</Field1>
<Filed2> ..</Field2>
<SUBDETAIL1>
<Field1>..</Field1>
<Filed2> ..</Field2>
</SUBDETAIL1>
<SUBDETAIL2>
<Field1>..</Field1>
<Filed2> ..</Field2>
</SUBDETAIL2>
</DETAIL1>
<DETAIL2>
<Field1>..</Field1>
<Filed2> ..</Field2>
<SUBDETAIL1>
<Field1>..</Field1>
<Filed2> ..</Field2>
</SUBDETAIL1>
<SUBDETAIL2>
<Field1>..</Field1>
<Filed2> ..</Field2>
</SUBDETAIL2>
</DETAIL2>
<HEADER1>
<HEADER2>
<Filed1> ..</Field1>
<Filed2> ..</Field2>
<DETAIL1>
<Field1>..</Field1>
<Filed2> ..</Field2>
<SUBDETAIL1>
<Field1>..</Field1>
<Filed2> ..</Field2>
</SUBDETAIL1>
<SUBDETAIL2>
<Field1>..</Field1>
<Filed2> ..</Field2>
</SUBDETAIL2>
</DETAIL1>
<DETAIL2>
<Field1>..</Field1>
<Filed2> ..</Field2>
<SUBDETAIL1>
<Field1>..</Field1>
<Filed2> ..</Field2>
</SUBDETAIL1>
<SUBDETAIL2>
<Field1>..</Field1>
<Filed2> ..</Field2>
</SUBDETAIL2>
</DETAIL2>
<HEADER2>
Regards,
Tarun.
Please try with this structure there might be some changes which you might have to make for this to work though. Once you get the below mentioned output structure then you will can you DOM parser in the java mapping to easily realign the substructures accordingly.
DT_PO
PurchaceOrder 1..n
---Header 1
-
field name -H
---Details 1..n
-
field name- D
---SubDetails 1..n
-
fieldnames -SD
Recordset name - PurchaseOrder
Recordset structure - Header,1, Details,1,Subdetails,*
RecordsetSequence - variable
key field -- according to your file
FCC parameters
Header.fieldname -
header field namess
Header.fixedfieldlength/ key value based on your file
Header.endseparator
Details.fieldname --- detail field name
Details.fixedfieldlength/ key value --- based on your file
Detail.endseparator
Subdetails.fieldname -- subdetail field names
Subdetails.fixedfieldlength/ key value --- based on your file
Sbdetails.endseparator
Cheer's
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Recordset Structure
Enter the sequence and the number of sub structures as follows: <NameA,nA,NameB,nB,...>. Therefore, nA=1,2,3,... or * (for a variable, unlimited number, including 0).
Thanks & Regards,
Akshay Jamgaonkar.
Reward Pints If Helpful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
What are the occcurences of your nodes?
Regards,
Akshay.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dreamcatcher,
I want to implement the soultion provided by you , i want to get all the node into single level and use java mapping to convert that into target message(IDOC) format , Can you please provide how my record set and data type on sender side should look .
So if my text file is in the following format what should i provide in the <b>record structure</b> field of the file adapter ?? . If possible can you provide me how the sender side <b>DATA type</b> should look.
H ==> Header item
D ==> Detail item
S ==> Subdetail item
H : field1 , field2.........field N
😧 dfield1 , dfield2......dfield N
S: sfield1 , sfield2......sfield N
S: sfield1 , sfield2......sfield N
😧 dfield1 , dfield2......dfield N
S: sfield1 , sfield2......sfield N
S: sfield1 , sfield2......sfield N
H : field1 , field2.........field N
😧 dfield1 , dfield2......dfield N
S: sfield1 , sfield2......sfield N
S: sfield1 , sfield2......sfield N
😧 dfield1 , dfield2......dfield N
S: sfield1 , sfield2......sfield N
S: sfield1 , sfield2......sfield N
Thanks for your help .
hey
the XML you want to create is not valid
you have two roots in XML namely <Header1> and <Header2> which is not allowed in XML ,you need to have only 1 root
Thanx
Aamir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI ,
Thanks for the reply ..forgot to mention the top node .Below is the modified structure , Please tell me
if it is possible to get this structure using FCC.
Sourde Flat file :
HEADER1 fields
HEADER2 fields
DETAIL11 fields for HEADER1
DETAIL21 fields for HEADER1
DETAIL12 fields for HEADER2
DETAIL22 fields for HEADER2
SUBDETAIL111 fields for DETAIL11
SUBDETAIL211 fields for DETAIL21
SUBDETAIL121 fields for DETAIL12
SUBDETAIL222 fields for DETAIL22
Target File after FCC :
<root>
<b><HEADER1></b>
.........<Filed1> ..</Field1>
..........<Filed2> ..</Field2>
...............<b><DETAIL1></b>
......................<Field1>..</Field1>
......................<Filed2> ..</Field2>
...........................<b><SUBDETAIL1></b>
.................................<Field1>..</Field1>
.................................<Filed2> ..</Field2>
...........................<b></SUBDETAIL1></b>
...........................<b><SUBDETAIL2></b>
.................................<Field1>..</Field1>
.................................<Filed2> ..</Field2>
...........................<b></SUBDETAIL2></b>
...............<b></DETAIL1></b>
...............<b><DETAIL2></b>
....................<Field1>..</Field1>
....................<Filed2> ..</Field2>
.........................<b><SUBDETAIL1></b>
..............................<Field1>..</Field1>
..............................<Filed2> ..</Field2>
.........................<b></SUBDETAIL1></b>
.........................<b><SUBDETAIL2></b>
..............................<Field1>..</Field1>
..............................<Filed2> ..</Field2>
.........................<b></SUBDETAIL2></b>
..............<b></DETAIL2></b>
<b><HEADER1></b>
<b><HEADER2></b>
.........<Filed1> ..</Field1>
..........<Filed2> ..</Field2>
...............<b><DETAIL1></b>
......................<Field1>..</Field1>
......................<Filed2> ..</Field2>
...........................<b><SUBDETAIL1></b>
.................................<Field1>..</Field1>
.................................<Filed2> ..</Field2>
...........................<b></SUBDETAIL1></b>
...........................<b><SUBDETAIL2></b>
.................................<Field1>..</Field1>
.................................<Filed2> ..</Field2>
...........................<b></SUBDETAIL2></b>
...............<b></DETAIL1></b>
...............<b><DETAIL2></b>
....................<Field1>..</Field1>
....................<Filed2> ..</Field2>
.........................<b><SUBDETAIL1></b>
..............................<Field1>..</Field1>
..............................<Filed2> ..</Field2>
.........................<b></SUBDETAIL1></b>
.........................<b><SUBDETAIL2></b>
..............................<Field1>..</Field1>
..............................<Filed2> ..</Field2>
.........................<b></SUBDETAIL2></b>
..............<b></DETAIL2></b>
<b><HEADER2></b>
</root>
Regards,
Tarun.
No, you won't be able to use content conversion to get the required multi level hierarchical output structure.
<HEADER1>
.........<Filed1> ..</Field1>
..........<Filed2> ..</Field2>
...............<DETAIL1>----
<b>u will not be able to specify this tag as a child of <Field2> using FCC.</b>......................
<Field1>..</Field1>
......................<Filed2> ..</Field2>
...........................<SUBDETAIL1>
.................................<Field1>..</Field1>
.................................<Filed2> ..</Field2>
...........................</SUBDETAIL1>
...........................<SUBDETAIL2>
.................................<Field1>..</Field1>
.................................<Filed2> ..</Field2>
...........................</SUBDETAIL2>
...............</DETAIL1>
...............<DETAIL2>
....................<Field1>..</Field1>
....................<Filed2> ..</Field2>
.........................<SUBDETAIL1>
..............................<Field1>..</Field1>
..............................<Filed2> ..</Field2>
.........................</SUBDETAIL1>
.........................<SUBDETAIL2>
..............................<Field1>..</Field1>
..............................<Filed2> ..</Field2>
.........................</SUBDETAIL2>
..............</DETAIL2>
<HEADER1>
you will have to do it using either adapter module or you can convert the text file to a single level hierarchy structure using FCC and then later use java mapping.
Hi,
<Detial1> is a child of <HEADER1> not child of <field1> , field1 and DETAIL are at same level under HEADER .Its like my purchase order has one header item and multiple line items and each line item has some subdetail items.And one file can contain multiple PO so the header will also repeat.
The structure is some thing like this . I have a HEADER and it contains multiple DETAILS and each details have multiple SUBDETAILS.
. <Header>
. <Detail>
. <Subdetail>
. <Subdetail>
. <Detail>
. <Header>
Please tell me if we can convert flat file using FCC to the required XML format.
hey
i was having the same issue and what i observed is that its not possible to handle complex structures in FCC.
so as far as it might not be possible to generate the structure you want from FCC.
please correct me if i m wrong,also have a look at the following
http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/frameset.htm
Thanx
Aamir
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.