cancel
Showing results for 
Search instead for 
Did you mean: 

Sender FCC ( File adapter ) limitations

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

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

Former Member
0 Kudos

hi,

can u affrod to take the entire row into one field and use the offset length, keyfield all in the mapping to split into the correct field

Former Member
0 Kudos

HI Dreamcatcher,

You have given the record structure as below

Recordset structure - Header,1, Details,1,Subdetails,*

But my detail will also repeat more than one time .. please check my flat file structure once ..thanks for you time.

Former Member
0 Kudos

Please change it to *, for Details also.

If possible please share the output xml after this FCC.

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi,

What are the occcurences of your nodes?

Regards,

Akshay.

Former Member
0 Kudos

HEADER .. >1..ubounded

Detail -


> 1..unbounded

Subdetail -


> 0 to unbounded

DETAIL is a child of HEADER and subdetail is a child of DETAIL.

Please let me know .. How many levels can we construct using FCC.

Former Member
0 Kudos

you can create only one level using FCC header then detail. you will have to use adapter module or java mapping to get the structure you want.

Former Member
0 Kudos

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 .

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hey

>>..........<Filed2> ..</Field2>

.....................<DETAIL1>

here is detail1 a child of Field2? if yes then its not possible coz Field2 itself has some value,its possible if u declare Field2 as an attribute and not as an element.

Thanx

Aamir

Former Member
0 Kudos

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.

Former Member
0 Kudos

Sorry the structure is like this .

.. <Header>

...... <Detail>

......... <Subdetail>

......... </Subdetail>

...... </Detail>

... </Header>

Former Member
0 Kudos

you wont be able to declare the subdetails under details using FCC.

Former Member
0 Kudos

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