Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

call another program in first program

Former Member
0 Likes
577

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
552

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

5 REPLIES 5
Read only

Former Member
0 Likes
552

Use SUBMIT for the same. Do F1 on SUBMIT to know how to use it.

Regards,

Atish

Read only

Former Member
0 Likes
552

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

Read only

Former Member
0 Likes
553

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

Read only

Former Member
0 Likes
552

Hi bro,

u can use SUBMIT <PRG NAME>...

thank u......

Read only

Former Member
0 Likes
552

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