Skip to Content
0
Former Member
Mar 28, 2007 at 08:11 AM

need to print report imediately

15 Views

i need to print the report output immediately i am pasting some code which i am having problem , in job_open function module exporting parameters are gettting problem.

CALL FUNCTION 'GET_PRINT_PARAMETERS'

EXPORTING

mode = 'BATCH'

report = l_repid

IMPORTING

out_parameters = l_parms

valid = valid.

IF valid <> space.

CALL FUNCTION 'JOB_OPEN'

EXPORTING

jobname = my_job.

SUBMIT l_repid VIA JOB 'MY_JOB' NUMBER jobcount TO SAP-SPOOL WITHOUT

SPOOL DYNPRO SPOOL PARAMETERS l_parms.

CALL FUNCTION 'JOB_CLOSE'.

ENDIF.

*Sending the print parameters to this.

CALL FUNCTION 'GET_PRINT_PARAMETERS'

EXPORTING

destination = 'LP01'

IMPORTING

out_parameters = l_parms

valid = valid.

IF valid <> space.

NEW-PAGE PRINT ON PARAMETERS l_parms.

ENDIF.