cancel
Showing results for 
Search instead for 
Did you mean: 

File Content Conversion - Header

Former Member
0 Kudos

Hi,

I need to produce an pipe delimited file. The only problem is that that column fields would need to be differentiated with an hypen.

A typical file format is

-


NAME

ADDRESS

AGE

-


ONE

134,DSTREET

27

TWO

222,SSTREET

28

How do i specify the two lines of hypen(-) in file content conversion, is it possible or do i need to use any unix script to achieve it.

When i posted, the pipe delimited disappeared.

Please note that there is pipe delimeted between each fields.

Regards

Krish

Edited by: Krish on Dec 21, 2011 2:20 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi Krish,

you can do it in your target Data Type, by specifying a structture which is not only based on your records, but like that:

HypenLine1

your headerLine (with field names)

HypenLine2

your Records... (so your current structure)

so something like:

DT_MyDataType

....HypenLine1 level with occurence 0..1

.............LineField with occurence 0..1

.... headerLine level with occurence 0..1

............

and in your mapping,

¤ you put constant in each field of your HeaderLine to provide the name of your field. (*)

¤ you put as many '-' character you want in your single field "LineField" of HypenLine1 and HypenLine2.

(*) of course, in your receiver CC, you should remove your option which produces the headerLine based on your fields names, as now this line is maintained directly in your mapping.

Mickael

Edited by: Mickael Huchet on Dec 21, 2011 2:38 PM

Former Member
0 Kudos

Hi Mickael,

Thanks for the idea.

The only problem that i see over here is still the pipe symbol will be present as the first character in each of the hypen header line.

say pipe followed by hypen.

Regards,

Krish

Former Member
0 Kudos

Krish,

Why a pipe in 1st character ?

As you will have in fact 4 structures of line (like NameA of [sap help|http://help.sap.com/saphelp_nwpi711/helpdata/en/44/686e687f2a6d12e10000000a1553f6/content.htm]) in your Recordset, you can define different options of each structure like to say 'NameA.fieldSeparator = '-' (hypen) for the hypeLine level.

Mickael

Answers (0)