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

archivobject_get_table output into pdf in application server

Former Member
0 Likes
2,457

Hi All,

I have used ARCHIVOBJECT_GET_TABLE to retrieve the data into two output tables i.e IT_ARCHIVOBJECT and IT_BINARCHIVOBJECT.

OPEN DATASET is used to write the pdf file into application server for the IT_BINARCHIVOBJECT.

The file is successfully saved in the application server.

When i try to download the pdf file manually and read, the file is not getting opened in the local machine (after downloading).

If the same internal table (IT_BINARCHIVOBJECT) is passed into gui_download and the file is successfully downloaded in the local and the file is readable if we open.

BUT, why the pdf is getting corrupted when i download it from application server?

Did i miss anything before writing the file into application server?

Please help..

Regards

Pavan

Hi All,

I have used ARCHIVOBJECT_GET_TABLE to retrieve the data into two output tables i.e IT_ARCHIVOBJECT and IT_BINARCHIVOBJECT.

OPEN DATASET is used to write the pdf file into application server for the IT_BINARCHIVOBJECT.

The file is successfully saved in the application server.

When i try to download the pdf file manually and read, the file is not getting opened in the local machine (after downloading).

If the same internal table (IT_BINARCHIVOBJECT) is passed into gui_download and the file is successfully downloaded in the local and the file is readable if we open.

BUT, why the pdf is getting corrupted when i download it from application server?

Did i miss anything before writing the file into application server?

Please help..

Regards

Pavan

4 REPLIES 4
Read only

Sandra_Rossi
Active Contributor
0 Likes
1,647

because either your "DATASET code" or the way you get the file from the application server is buggy.

Read only

Former Member
0 Likes
1,647

Hi Sandra,

I have used the statement like this in my code.

OPEN DATASET p_path FOR OUTPUT IN BINARY MODE.

The variable p_path is having application server with filename with .pdf extension.

When we see the AL11 destination folder, the pdf file will be seen with it's name.

If the same file is downloaded into local machine by transaction CG3Y, the file can not be opened with the following error.

Adobe Acrobat reader can not open file <filename>.....

Read only

DoanManhQuynh
Active Contributor
1,647

could you try to convert it to 255 raw type before transfer to application server,like this:

CL_RMPS_GENERAL_FUNCTIONS=>CONVERT_1024_TO_255( ).

you may read dataset right after transfer to application server and download by gui_dowload to check if your uploaded file really uploaded succesful or not.

Read only

QuanPham
Discoverer
0 Likes
1,239

I also have this issue and I have resolved. Thanks  Quynh