Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

Printing Archived invoice on SAP printers.

$
0
0

Hi experts,

 

I want to print SAP sales invoice from archived server.

 

I have used  ARCHIVOBJECT_GET_TABLE to get the binary contents

 

then we have concatenated the binary data  to buffer in byte mode and have coverted the buffer to binary mode through

 

SCMS_XSTRING_TO_BINARY.

 

Now i need to wrtie this binary data to spool request.and print on sap perter selected by user.

 

Can anyone please help in achiving this requirement.

 

Please find below code.

 

 

 

'ARCHIVOBJECT_GET_TABLE'
EXPORTING
archiv_id
= ls_connection-archiv_id
document_type
= 'PDF'
archiv_doc_id
= ls_connection-arc_doc_id
* ALL_COMPONENTS =
SIGNATURE
= 'X'
* COMPID = 'data'
IMPORTING
LENGTH
= length
BINLENGTH
= binlength
TABLES
ARCHIVOBJECT
= archivobject
BINARCHIVOBJECT
= binary_content1
EXCEPTIONS
ERROR_ARCHIV
= 1
ERROR_COMMUNICATIONTABLE
= 2
ERROR_KERNEL
= 3
OTHERS = 4 .

if binary_content1 is not INITIAL.

LOOP AT binary_content1 INTO
lw_binarchivobject
.
CONCATENATE v_buffer lw_binarchivobject-line INTO v_buffer IN BYTE MODE .
ENDLOOP.
**lv_file = lv_desc.
*lt_zipper->add( name = lv_file content = v_buffer ). CLEAR lv_zipfilehex. lv_zipfilehex = lt_zipper->save( ). CLEAR lt_binary_content
*.
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = v_buffer
TABLES
binary_tab
= lt_binary_content.

 

 

how can i write lt_binary_content to spool.

 

 

regards,

Prathamesh Naik.


Viewing all articles
Browse latest Browse all 8332

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>