cancel
Showing results for 
Search instead for 
Did you mean: 

Sending a Flat File with field names

Former Member
0 Kudos

hello friends,

i have try to implement flat_file>xi>Idoc Szenario with this parameters succesfully.

create,122,a,svz01,eur

But i would like to send :

<b>"create_update"</b>create,<b>"ID"</b>122,<b>"TYPE"</b>a,<b>"version"</b>svz01,<b>"currency"</b>eur,

How can i ignore the technical names (create_update,ID,TYPE) and configure in content conversion parameters?

CAN ANY ONE HELP ME ??

Cheers,

Fatih<b></b><b></b><u></u>

Accepted Solutions (1)

Accepted Solutions (1)

moorthy
Active Contributor
0 Kudos

Hi,

Do you mean, your input fil is like this-

"create_update"create,"ID"122,"TYPE"a,"version"svz01,"currency"eur

And you need only create,122...

You can try with field separator as a ,(comma) and <NameA>.enclosureSign with these combinations..

For more on this-

http://help.sap.com/saphelp_nw2004s/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/frameset.htm

I am not sure here..

Regards,

Moorthy

Former Member
0 Kudos

Do you mean, your input fil is like this-

"create_update"create,"ID"122,"TYPE"a,"version"svz01,"currency"eur

And you need only create,122...

You can try with field separator as a ,(comma) and

Error: Conversion of complete file content to XML format failed around position 0: Exception: ERROR converting document line no. 1 according to structure 'Row':java.lang.Exception: ERROR in configuration: more elements in file csv structure than field names specified!

Regards,

Fatih

Message was edited by: Fatih Kökce

Former Member
0 Kudos

Hi,

<i>>>>more elements in file csv structure than field names specified!</i>

u have four fields in your flat file(comma separated) and u have specified only 2 fields in your fieldname parameter in content conversion.

either u flat file has to be in the format

"Nummer"1212,"Version"400_010.

or if u have four fields in ur flat file then mention four field names.

i think this might work out.

cheers

jithesh

Former Member
0 Kudos

thank you for the answer balakrishnan, but before to map my flat file I need only <b>1212,400_010</b> and not four fields in my flat file.

Former Member
0 Kudos

Hey,

then have ur flat file as

"Nummer"1212,"Version"400_010(which has only 2 fields).

in the content conversion as

Row.fieldNames = Nummer,Version.

So the values within quotes (nummer and version)will be discarded by this field

Row.enclosureSignEscape = ""

and u will get the values 1212 for nummer and 400_010 for version.

So u get only 1212,400_010 as the out put to mapping

cheers

jithesh

moorthy
Active Contributor
0 Kudos

Hi,

Also make sure that your data type is having only 2 fields.. If you have defined data type with 4 fields, then you need to write all the four fields in the content conversion.

Regards,

Moorthy

Former Member
0 Kudos

<b>"Nummer"1212,"Version"400_010</b>

I send this file... is having only 2 fields . But nummer and version is not deleted .

<b>SXMB_MONI ;</b>

<?xml version="1.0" encoding="utf-8" ?>

- <ns:MT_FING xmlns:ns="http://FinancialDatabase">

- <Record>

- <Row>

<ExterneNummer><b>Nummer1212</b></ExterneNummer>

<Vorlage><b>Version400_010</b></Vorlage>

</Row>

</Record>

</ns:MT_FING>

<b>Row.enclosureSign ="

Row.enclosureSignEscape =""</b>

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Fatih,

Look at these blogs on Content Conversion. They should be able to give you some idea!

/people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns

/people/sap.user72/blog/2005/01/06/how-to-process-csv-data-with-xi-file-adapter

/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion

/people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem

/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file

Hope these help you!

cheers,

Prashanth Azharuddin