Problem solve Get help with specific problems with your technologies, process and projects.

Downloading a file from the application server to the presentation server

I am trying to download a file from the application server to my presentation server. I have a small program and...

to do this it uses the read dataset and then calls the function module GUI_DOWNLOAD. The problem is the trailing blanks on a line are truncated and I want to keep the file exactly intact as it was on the application server. Is there a good way to prevent this?

You could download it as a BIN file, but this means putting in the hexadecimal characters for LF and CR at the end of each record, which isn't ideal. A second possibility is as follows: If you have: DATA ITAB(80) OCCURS 0 WITH HEADER LINE. APPEND 'ABCDE' TO ITAB. Do a GUI_DOWNLOAD with ITAB, and you get the truncation of spaces problem. If you define it like this: DATA: BEGIN OF ITAB OCCURS 0, DATA(80), JUNK(1), END OF ITAB. ITAB-DATA = 'ABCDE'. APPEND ITAB. Do a GUI_DOWNLOAD with this ITAB, with the DATA field populated and the JUNK field always empty, and you'll get a file of record width 80.

This was last published in April 2004

Dig Deeper on SAP security administration

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.