cancel
Showing results for 
Search instead for 
Did you mean: 

File Content Conversion for Multi Hierarchical Structure for Sender Adapter

Former Member
0 Kudos

Hi Gurus,

My text file is coming as

Header,filed1,field2(Occurrence=1)

Content,field3,field4(Occurrence =1-Unbounded)

Detail,field4,field5(Occurrence = 1-unbounded)

...

...

Trailer,fieldN(Occurrence=1)

My requirement is to write a file content conversion, so that, in the resultant XML Structure the Detail will come under Content.

I have defined the Record Set Structure as

Header,1,Content,*,Detail,*,Trailer,1

But after FCC, the Detailed record is coming in the same level as the Content Record. But the business requires that, the Detailed Record should come under Content Record, so that they can correlate.

Could any one advise?

Regards,

SS

Edited by: Subhendu Sahu on Jun 17, 2011 4:43 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

For multi hierarchical structures, you can try the Message Transform bean to convert from text to xml format.

Refer the following link for more help

http://tleterme.developpez.com/bw/how/HowToConveModuleJMS.pdf

Regards

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Please use the below parameters -

○ NameA.keyFieldValue

Specify the value of the key field for the structure.

This entry is mandatory if the key field name is set. Otherwise, the entry is ignored.

NameA.keyFieldInStructure

■ If the key field of the substructure is to be added to the XML document, enter add. This is the default.

■ If the key field is to be ignored, enter ignore.

http://help.sap.com/saphelp_nwpi711/helpdata/en/44/6713ec3f914ddee10000000a1553f7/frameset.htm

cheers,

Sunil

Former Member
0 Kudos

I have entered the keyfield, and the FCC is working fine, the problem is in the hierarchy of Detailed record.

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>But after FCC, the Detailed record is coming in the same level as the Content Record. But the business requires that, the Detailed Record should come under Content Record, so that they can correlate.

That means you want content is parent of detial record. This is two level hierarchy relation.

See below links might be helpful

http://sapxitutorials.blogspot.com/2011/04/file-conversion-using-nodeception.html

/people/shabarish.vijayakumar/blog/2007/08/03/file-adapter-receiver--are-we-really-sure-about-the-concepts

Former Member
0 Kudos

Hi Bhaskar,

My question is on FCC for Sender CC, but these topics cover FCC for receiver CC.

Former Member
0 Kudos

Hi Subhendu Sahu

Sender file adapter will add Content and Detail at the same level.

Are there fields in Content and in Details structures which you can use to determine which Detail record belongs to which Content record?

If so, you can use content conversion as it is and then create the nested structured in the mapping.

Otherwise you might need to develop an adapter module.

Regards,

Giuseppe

Former Member
0 Kudos

Hi Giuseppe,

I also think the same way.

But , if we cant establish relation between parent and child(No common field) , instead of Adapter Module , an alternative is there.

http://www.riyaz.net/blog/xipi-convert-flat-file-to-deeply-nested-xml-structures-using-only-graphica...

Regards,

Subhendu

Edited by: Subhendu Sahu on Jun 20, 2011 2:30 PM