Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

email value are printing wrongly

Former Member
0 Likes
563

hi

when i am executing the programe and checking in the SAP outbox then the values are not printing in correct format, values are correct but the structure SOLISTI1 over here it has 255 Char so in the sap outbox its printing the first header line then spaces will be up to 255 char and then prints 1st item level and then takes some pace and print in next line after 255 char, but here i need to print the entire values in correct display format.

4 REPLIES 4
Read only

former_member156446
Active Contributor
0 Likes
538

Hi Rocky looks like its a linefeed / carriage return problem... in debug mode have a look at the last character and find a way to replace it.. before emailing the list...

Read only

0 Likes
538

can u give me the logic for line feed or carrage return

Read only

0 Likes
538

#

Marks an entire line as a comment at the beginning of the line The line is not sent to the output device.

\n

Line feed (hexadecimal 0A)

\r

Carriage return (hexadecimal 0D)

\f

Form feed (hexadecimal 0C)

http://sap.ittoolbox.com/groups/technical-functional/sap-dev/prevent-carriage-return-at-eof-for-gui_...

Read only

0 Likes
538

hi check this...

Used the following steps.

1. Basically the following settings were needed to stop all line feed/carriage returns in the file creation and remove new unwanted spacing .

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

filename = g_file

filetype = 'ASC'

trunc_trailing_blanks = 'X' "PREVENT EXTRA SPACES

write_lf = ' ' "PREVENT LINE FEED

trunc_trailing_blanks_eol doesn't work for me because it does not pertain to version 4.6C and CODEPAGE and a filetype of 'BIN' I discovered were irrelevent.

2. Then it required me to set up my own carriage returns via hexadecimal symbols like below:

*holds hexadecimal carriage return character

DATA: BEGIN OF xt,

xx(1) TYPE x,

END OF xt.

INITIALIZATION.

*set carriage return value

xt-xx = '0D'. "carriage return '0D', line feed '0A'

3. Finally I needed to insert the carriage return before saving it to the data table to be output to file.

CONCATENATE w_dtl xt INTO w_dat-data.

This was done to every record except the last one which I essentially had to track the number of records twice and compare for the last record count

regards,

venkat ..