Execute in Back ground when push button clicked on alv output
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.
call function 'START_OF_BACKGROUNDTASK'
startdate = sy-datum
starttime = sy-uzeit
others = 1.
if sy-subrc = 1.
PERFORM determine_table_from_output CHANGING rs_selfield.
Ulrich Rechner replied
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
KEEP IN SPOOL 'X'.
/* place your write-statements etc. here
/* Close the spool
NEW-PAGE PRINT OFF.