Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Execute in Back ground when push button clicked on alv output

Hi Friends,

I have a alv list display report with check boxes and a 'Detail' Push button in output

when i check the check boxes and click on the 'Detail' Push button detail report is

displayed using 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'. My requirement is if I click on 'Detail'

push button the code should also execute in back ground creating the spool. Request you

to help with sample code. I tried with below but not working.

WHEN 'DETAIL'.

      call function 'START_OF_BACKGROUNDTASK'

      exporting

       startdate = sy-datum

       starttime = sy-uzeit

      exceptions

      others    = 1.

      if sy-subrc = 1.

       exit.

      ELSE.

       PERFORM determine_table_from_output CHANGING rs_selfield.

       PERFORM call_alv_detail.

      endif.

     commit work.

Thanks,

Neetha.

Former Member
replied

Hi Neetha,

if your focus consists of creating a spool, you can also do it like this:


DATA: lv_printer LIKE tsp01-rq1name.


/* open a spool

NEW-PAGE PRINT ON NO DIALOG NO-HEADING NO-TITLE

                DESTINATION lv_printer

                LINE-SIZE 80

                LINE-COUNT 65

                IMMEDIATELY space

                KEEP IN SPOOL 'X'.


/* place your write-statements etc. here


/* Close the spool

NEW-PAGE PRINT OFF.


Regards,

Ulrich

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question