I am trying to download a file from the application server to my presentation server. I have a small program and...
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
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.
Dig Deeper on SAP security administration
Related Q&A from Matthew Billingham
An SAP user is trying to run a report in an SAP ALV Grid online and wants to know how to get the data in the report to appear along with the header.continue reading
An SAP user needs information on how to change the password on several SAP user accounts from a central location.continue reading
An SAP user needs to transfer customer purchase order spreadsheet data to SAP VA01 to create a new sales order.continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.