cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Download PDF locally (SAP R3, 4.0B)

konstantinos_vassiliadis
Active Participant
0 Kudos
632

Hello experts,
The client I am working on has SAP R3 version 4.0B! The requirement is to download a PDF file locally. The file is stored in the application server. Function module GUI_DOWNLOAD is not available in ABAP thus I am using WS_DOWNLOAD. I use open dataset for output in binary mode but then I don't know how to use 

READ DATASET since there is no xstring-equivalent to read into. Has anyone got any idea how to approach this?

Thank you in advance,

Konstantinos

Accepted Solutions (1)

Accepted Solutions (1)

Sandra_Rossi
Active Contributor

If the X type exists, use it (READ DATASET repeatedly). These old systems are not Unicode, one character is one byte, so you may use C instead of X too.

konstantinos_vassiliadis
Active Participant
0 Kudos
Hi, how can I reply to you with some attachments to see ?
konstantinos_vassiliadis
Active Participant
0 Kudos
There is type X and it is hexadecimal. When I open the resulting file with notepad it is completely different with the original file in Appserver, the latter starts with '%PDF' which is necessary to open it with a Reader app
konstantinos_vassiliadis
Active Participant
0 Kudos
should I open the file in BINARY or is TEXT mode?
konstantinos_vassiliadis
Active Participant
0 Kudos
It worked! used type C, thanx!
Sandra_Rossi
Active Contributor
0 Kudos
You may paste directly your screenshots (ctrl+V). The rule to open a non-text file is to use BINARY (but anyway, it's flexible because one character = one byte). In debug if you read in binary to X type, you'll get something that starts with 25504446 (equals %PDF in ASCII). You save WS_DOWNLOAD with the BIN mode. Your code may contain errors at many places, so please attach it if you want a clear answer.

Answers (0)