‎2008 May 14 2:56 AM
hi,
i need to perform to call another report in my current report. so how am i going to do so?
how report work:
the report are going to run as background job. once the report run, it will send out the report in text file to user. and then i want it to trigger report 2. report 2 work the same, it will send another text file to user.
and the parameter for both the report is on current date only.
so how am i going to code in my first report program, to call the second report program, and to execute it?
thanks
Edited by: ben leen lee on May 14, 2008 3:57 AM
‎2008 May 14 4:54 AM
Hi,
clear: d_JOB_COUNT.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
JOBNAME = d_JOBNAME
IMPORTING
JOBCOUNT = d_JOB_COUNT.
submit ZFI_AGEWISE_PERFORMANCE
VIA JOB d_JOBNAME
NUMBER d_JOB_COUNT
with IKUNNR IN r_id
with s_vertn in S_VERTN
with s_hkont IN S_HKONT
with IBUDAT eq IBUDAT
with P_BUKRS eq P_BUKRS
with s_umskz in s_umskz
*with R1 = R1
WITH R2 = R2
*with r3 = R3
WITH P_SESS = P_SESS
AND RETURN.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
JOBNAME = d_JOBNAME
JOBCOUNT = d_JOB_COUNT
STRTIMMED = 'X'.
Reward Points
‎2008 May 14 3:07 AM
Use SUBMIT for the same. Do F1 on SUBMIT to know how to use it.
Regards,
Atish
‎2008 May 14 4:49 AM
Hi,
submit ZFI_AGEWISE_PERFORMANCE
VIA JOB d_JOBNAME
NUMBER d_JOB_COUNT
with IKUNNR IN r_id
with s_vertn in S_VERTN
with s_hkont IN S_HKONT
with IBUDAT eq IBUDAT
with P_BUKRS eq P_BUKRS
with s_umskz in s_umskz
Reward points
‎2008 May 14 4:54 AM
Hi,
clear: d_JOB_COUNT.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
JOBNAME = d_JOBNAME
IMPORTING
JOBCOUNT = d_JOB_COUNT.
submit ZFI_AGEWISE_PERFORMANCE
VIA JOB d_JOBNAME
NUMBER d_JOB_COUNT
with IKUNNR IN r_id
with s_vertn in S_VERTN
with s_hkont IN S_HKONT
with IBUDAT eq IBUDAT
with P_BUKRS eq P_BUKRS
with s_umskz in s_umskz
*with R1 = R1
WITH R2 = R2
*with r3 = R3
WITH P_SESS = P_SESS
AND RETURN.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
JOBNAME = d_JOBNAME
JOBCOUNT = d_JOB_COUNT
STRTIMMED = 'X'.
Reward Points
‎2008 May 14 5:05 AM
‎2008 May 14 6:16 AM
Hi
There are two ways of scheduling Background job...
One is through SM36 and the other is using JOB_OPEN & JOB_CLOSE...
If in SM36 , you can give the start condition for the JOB2 if JOB1 is success , Select the Check box Under the Start Condition -> After Job
Secondly, you can do it using JOB_OPEN and if the JOB1 is success , you can call the JOB2 , even after you check the status of the JOB1 from its rexpective table.
Reward points if useful