cancel
Showing results for 
Search instead for 
Did you mean: 

File content conversion

Former Member
0 Kudos

Hi,

I am doing a jdbc to file interface, the header should come once and only the details need to come and repeat for multiple headers.How should I design my input and output structures and need help in design part, the output file is given below

Input structure

ordern

customerno

customername

id

quantity

itemnumber

price

description

output

Header: orderno!customerno!customername!

Details: id!quantity!itemnumber!price!description

Output file

abc123!008976!jason

cda555!200!14567!234.00!bolt

tyd666!100!54657!250.00!nut

dhl777!350!56666!600.00!blade

xyz456!009875!chris

fgt456!345!09876!390.00!strings

hji211!400!065459!120.00!nut

rtz678!09764!pam

hji299!200!05342!400.00!bolt

oldl177!350!07856!200.00!blade

Thanks in advance

Edited by: guest xi on Jan 17, 2011 5:51 PM

Accepted Solutions (0)

Answers (1)

Answers (1)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Since input source is jdbc , you might have to follow jdbc sender structure.

<row> (1 to many)

<orderno>

<customerno>

<customername>

<id>

<quantity>

<itemnumber>

<price>

<description>

</row>

output structure

<Header> (1 to 1)

<orderno>

<customerno>

<customername>

</Header>

<Details> ( 1 to unbounded)

<id>

<quantity>

<itemnumber>

<price>

<description>

<Details>

To get flat file structure in output, please do the following in the file reciever adapter. Choose fcc as transport protocol and then

Recordset Structure Header,1,Details, *

Header.fieldSeparator !

Header.endSeparator 'nl'

Details.fieldSeparator !

Details.endSeparator 'nl'

For FCC, this link might be helpful

http://www.riyaz.net/blog/xipi-file-content-conversion-for-simple-structure/technology/sap/75/

http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm

Hope above information would be useful. If you want more information, you can contact us .

Former Member
0 Kudos

Thanks for the reply, since the header also repeats multiple times in the output does it have to be as below?

output structure

<Header> (1 to unbounded)

<orderno>

<customerno>

<customername>

</Header>

<Details> ( 1 to unbounded)

<id>

<quantity>

<itemnumber>

<price>

<description>

<Details>

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>>>> Thanks for the reply, since the header also repeats multiple times in the output does it have to be as below?

yes, if the header repeats multiple times then

Header (1 to unbounded)

Recordset structure Header, * , Details, *

Remaining things will be same. Hope I answered your question.

former_member191435
Contributor
0 Kudos

Hi,

If You have Header also be in Multiple times then Create One record in the Output with 0..Unbounded under that U have to create fields.

<Record> (1 to unbounded)

<orderno>

<customerno>

<customername>

<id>

<quantity>

<itemnumber>

<price>

<description>

<Details>

</Record>

Thanks,

Enivass