cancel
Showing results for 
Search instead for 
Did you mean: 

File Content Conversion

Former Member
0 Kudos

How can we specify the End of file in a CSV file ?

If I have included EOF at the end then how can i remove that field?

Any other option might also work.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi..

You can use below parameters, if youdont want the last field in your payload,

Record.fieldFixedLengths -- 0,0

Record.fixedLengthTooShortHandling --Cut

Regards,

Leela

Former Member
0 Kudos

Thnx

But this is not working.

Actually I am having a csv file whose end is specified by EOF.None of the columns are of fixed lengths . I have used only fieldseperatot and end seperator.

If in this case it works then plz. tell me how to use the content conversions given above and also where can I get the list of content convrsions?

Former Member
0 Kudos

If the end line is empty and I dont want to read that line then how can I remove that line?

Former Member
0 Kudos

Hi,

Try this :

Record.lastFieldsOptional : NO

Pls refer: http://help.sap.com/saphelp_nw04/helpdata/EN/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm

Abid

Former Member
0 Kudos

No,it didnt solve the purpose.

Former Member
0 Kudos

Singh,

Create one more structure in the end of your target message type with 1..1 occurence and keep one field. Map it with constant EOF. Let the mapping so far you have done write the file and in the end it will put EOF.

If you want output as:

1234567890

EOF

Where 1234567890 are written by your mapping and EOF is with your new structure, add this parameters of the new structure in the content conversino receiver adapter.

If you want output as:

1234567890EOF

If you want EOF after your original data then for the new structure you create put .beginSeparator as backspace. Its value is '0x08' so that control will go up to the line and then print EOF.

Regards,

---Satish

Answers (1)

Answers (1)

Former Member
0 Kudos

hi Try with this.NameA.enclosureSignEnd

Former Member
0 Kudos

I dont have to include EOF in my file. I want that as soon as EOF is encountered in the file ,the file should not be read beyond that, and the EOF is not included in the xml.....

Former Member
0 Kudos

Hi,

It is just an idea. i guess u can handle tht into mapping.

example:

<root>

<details>

<name>fc</name>

<id>34</id>

</details>

</root>

this structure u need to generate out of ur csv file. then u at the end in name column u can put EOF.

and in mapping check for EOF value. if it exist then don't generate target node.

Regards,

Manisha

Former Member
0 Kudos

Will I have to use createIf function for non-generation of node depending on the condition.........is there any other method by which the node cannot be generated or be generated depending on the condition?

Former Member
0 Kudos

Hi,

ur mapping will be like this

node--


if
boolean NOT

createIf
--


target

const(EOF)----

Regards,

Manisha