Skip to Content
Nov 13, 2014 at 02:32 PM

Insert a line with field names in a tab delimited file


Hello Experts,

I am struggling in one scenarios in which I have to display field names along with data in a flat file which is tab delimited.

The data should appear like this


000000000005653681 20140927 Z0016CRX 00000000

000000000005653682 20140927 Z0016CRX 00000000

000000000005653683 20140927 Z0016CRX 00000000

000000000005653684 20140927 Z0016CRX 00000000

000000000005653685 20140927 Z0016CRX 00000000

000000000005653686 20140927 Z0016CRX 00000000

The problem is, that the select query is going to be dynamic and I would not have information from beginning about the fields which are required to be fetched and downloaded.

I have written code which would fetch the required data from the tables but the problem is, I am not able to insert a line containing field names in that table. This happens because the field symbols is of type STANDARD TABLE.

But it appears like this after all my efforts of adding a line with tab delimited.

MATNR ERSDA ERNAM LA.M .ERNA EDA . . 000000000005653680 27.09.2014 Z0016CRX 00.00.0000 000000000005653681 27.09.2014 Z0016CRX 00.00.0000 000000000005653682 27.09.2014 Z0016CRX 00.00.0000 000000000005653683 27.09.2014 Z0016CRX 00.00.0000 000000000005653684 27.09.2014 Z0016CRX 00.00.0000

Is there a way out of this problem ?