Hi Shiv,
Are you using Job_submit or Submit statement to achieve the functionality.
If your are using Submit use the statement use the following code snippet..
SUBMIT ZXY_report TO SAP-SPOOL
SPOOL PARAMETERS g_print_parameters
WITHOUT SPOOL DYNPRO
USER g_user
VIA JOB g_jobname NUMBER g_jobcount
WITH s_matnr = s_matnr.
AND RETURN.
Check out this..
https://help.sap.com/abapdocu_70/en/ABAPSUBMIT_VIA_JOB.htm
Hope this helps.
Regards,
Kannan