‎2007 Jul 24 8:28 AM
In the current report, when user choose records and click Add-on button "Print", it should call another print program. However, it just jumps to the selection screen of print program. When i choose serveral records, how can i call the print program????
‎2007 Jul 24 8:29 AM
Hi,
Check this:
http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db9dd035c111d1829f0000e829fbfe/content.htm
Reward if useful!
‎2007 Jul 24 8:30 AM
Hi
use the SUBMIT command and call the other program
SUBMIT <report> and Return.
<b>Reward points for useful Answers</b>
Regards
Anji
‎2007 Jul 24 8:33 AM
Hi
U need to use the statament SUBMIT:
SUBMIT <ZREPORT> WITH <PARAM1> =
<PARAM2> =
<SEL1> IN
<SEL2> IN
..................... AND RETURN.
Max
‎2007 Jul 24 8:34 AM
If you want to call Print program in background then use following statement.
DATA: SELTAB TYPE TABLE OF RSPARAMS, "Selection options
SELTAB_WA LIKE LINE OF SELTAB.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
JOBNAME = TBTCO-JOBNAME
IMPORTING
JOBCOUNT = TBTCO-JOBCOUNT.
IF SY-SUBRC NE 0.
RETURN-MESSAGE = 'Error in Job Opening'.
APPEND RETURN.
ELSE.
SUBMIT <Report Name>
USER sy-uname
VIA JOB TBTCO-JOBNAME
NUMBER TBTCO-JOBCOUNT
WITH SELECTION-TABLE SELTAB
WITH S_MAIL IN R_EMAIL
WITH S_TEXT IN R_TEXT
AND RETURN.
IF SY-SUBRC NE 0.
RETURN-MESSAGE = 'Error in Submitting Job'.
APPEND RETURN.
ELSE.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
JOBCOUNT = TBTCO-JOBCOUNT
JOBNAME = TBTCO-JOBNAME
STRTIMMED = 'X'.
IF SY-SUBRC NE 0.
RETURN-MESSAGE = 'Error in Closing Job'.
APPEND RETURN.
ENDIF.
ENDIF.
ENDIF.
‎2007 Aug 10 8:06 AM
‎2007 Aug 10 8:13 AM