End of Record/CR

Development (ABAP Development WorkBench, ABAP/4 programming)

Moderators: Snowy, thx4allthefish, YuriT, Gothmog

Post Reply
Cute_sandy

End of Record/CR

Post by Cute_sandy » Thu Dec 05, 2002 11:10 am

Hi you all,

I am creating a flat file from ABAP. I am getting CR after every line. What I wanted to do is that instead of CR put End of Record.

Thanks for the help.

Rich
Posts: 7116
Joined: Thu Oct 31, 2002 4:47 pm
Location: Liverpool
Contact:

Post by Rich » Thu Dec 05, 2002 12:03 pm

Hi Sandy,

Firstly, there is not a character called 'End Of Record' in the Ascii control set. There is however a record separator character (RS), this is decimal 30, hex 1E.

Primarily what you need to do is to create a hex field as the last field in your itab of length 1, create a hex constant (perhaps called c_rs) with a length of 1 and a value of '1E'....

As you build your output itab, move the c_rs constant to the relevant field.

You do not say how you are creating the file.

If you are downloading the file using WS_DOWNLOAD, or GUI_DOWNLOAD, then you need to set the file type to something other than 'ASC' or 'DAT' (try 'BIN').

If you are using OPEN DATASET then you should not use the 'IN TEXT MODE' clause, but rather the 'IN BINARY MODE' as text mode appends the end of line characters used by your OS (ie cr/lf for dos based systems and cr only for Unix based)

Rich

Cute_sandy

Rich

Post by Cute_sandy » Thu Dec 05, 2002 12:41 pm

Thank you for your help. I will try this I am using "ws_download".


Sandy

Post Reply