With you: Where do.i.get my archived pdf download
PRIMUS THEY CANT ALL BE ZINGERS ALBUM DOWNLOAD | Python download file from google drive |
DRAGON BALL SUPER SEASON 4 ENGLISH DUB TORRENT DOWNLOAD | Things fall apart download free pdf |
MULTIPLE ERROR DOWNLOADING WINDOWS 10 UPDATE | Microsoft picture viewer download windows 10 |
Retrieve Archived PDF and print
Hi All
I know this is an old post but this is how I achieved it.
I use fm ARCHIVOBJECT_GET_TABLE to get the document I then use fm 'SCMS_BINARY_TO_XSTRING' to convert to xstring and finally ADS_WRITE_TO_FILE to write the file to the spool, code below
<p>
DATA:
l_handle TYPE sy-tabix,
l_spoolid TYPE tsprqident, "#EC NEEDED
l_partname TYPE adspart, "#EC NEEDED
l_new_partname TYPE adspart, "#EC NEEDED
l_filename() TYPE c.
l_v_partname = 'darrenTest1'.
* Create a new spool order for the PDF'S
CALL FUNCTION 'ADS_SR_OPEN'
EXPORTING
dest = l_v_prdest
immediate_print = abap_true
* append = ' ' "append
doctype = 'ADSP'
titleline = 'DarrenTest'
IMPORTING
handle = l_v_handle
spoolid = l_v_spoolid
partname = l_v_partname
EXCEPTIONS
device_missing = 1
no_such_device = 2
operation_failed = 3
wrong_doctype = 4
wrong_devicetype = 5
OTHERS = 6.
CALL FUNCTION 'ADS_GET_PATH'
IMPORTING
ads_path = l_v_globaldir.
PERFORM get_statements.
READ TABLE gt_return INTO ls_doc INDEX 1.
CLEAR l_filename.
*l_v_partname = 'darrenTest1'.
l_filename = |{ l_v_partname }.pdf|.
CALL FUNCTION 'ADS_WRITE_TO_FILE'
EXPORTING
filename = l_filename
buffer = ls_doc-bindoc " this is the xstring
* APPEND = ' '
* USEGLOBALDIR = 'X'
EXCEPTIONS
cannot_open_file = 1
open_dataset_no_authority = 2
open_dataset_internal_error = 3
open_dataset_too_many_files = 4
dataset_cant_close = 5
close_dataset_internal_error = 6
cannot_close_file = 7
cannot_transfer_data = 8
transfer_internal_error = 9
dataset_write_error = 10
OTHERS =
CALL FUNCTION 'ADS_SR_CONFIRM'
EXPORTING
handle = l_v_handle
partname = l_v_partname
size = 0
pages = 0
* NO_PDF = ' '
IMPORTING
new_partname = l_new_partname
EXCEPTIONS
handle_not_valid = 1
operation_failed = 2
OTHERS = 3.
CALL FUNCTION 'ADS_SR_CLOSE'
EXPORTING
handle = l_v_handle
final = abap_true
EXCEPTIONS
handle_not_valid = 1
operation_failed = 2
OTHERS = 3.
RETURN.
- Add a Comment
- Alert Moderator
- Share
You already have an active moderator alert for this content.
0 thoughts to “Where do.i.get my archived pdf download”