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

To Load data to internal Table from the spoolrequest

Former Member
0 Likes
415

HI All,

I'm trying to load a data to the internal table with the reference of spoolrequest generated by the programme during background process. Can anyone help me.

Regards,

S.JANANI

HI All,

I'm trying to load a data to the internal table with the reference of spoolrequest generated by the programme during background process. Can anyone help me.

Regards,

S.JANANI

2 REPLIES 2
Read only

Former Member
0 Likes
399

http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm

CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
       EXPORTING
            src_spoolid              = gd_spool_nr
            no_dialog                = c_no
            dst_device               = c_device
       IMPORTING
            pdf_bytecount            = gd_bytecount
       TABLES
            pdf                      = it_pdf_output
       EXCEPTIONS
            err_no_abap_spooljob     = 1
            err_no_spooljob          = 2
            err_no_permission        = 3
            err_conv_not_possible    = 4
            err_bad_destdevice       = 5
            user_cancelled           = 6
            err_spoolerror           = 7
            err_temseerror           = 8
            err_btcjob_open_failed   = 9
            err_btcjob_submit_failed = 10
            err_btcjob_close_failed  = 11
            OTHERS                   = 12.

  CHECK sy-subrc = 0.

* Transfer the 132-long strings to 255-long strings
  LOOP AT it_pdf_output.
    TRANSLATE it_pdf_output USING ' ~'.
    CONCATENATE gd_buffer it_pdf_output INTO gd_buffer.
  ENDLOOP.

  TRANSLATE gd_buffer USING '~ '.

  DO.
    it_mess_att = gd_buffer.
    APPEND it_mess_att.
    SHIFT gd_buffer LEFT BY 255 PLACES.
    IF gd_buffer IS INITIAL.
      EXIT.
    ENDIF.
  ENDDO.

Read only

former_member188827
Active Contributor
0 Likes
399

select * from tsp01 into corresponding fields of table itab where RQIDENT = sy-spono.

da table tsp01 contains details about spool requst..

plz reward points if dis helps