‎2009 Nov 07 9:54 AM
Hi,
I have a report program with initialization and start-of-selection events.
I am calling this program from another program. Now I want the called program to be executed implcitly through my calling program without any user intervention.
Can anybody tell me whether this can be done and if so then how can it be done?
Thanks.
‎2009 Nov 07 10:00 AM
Hi
Just use SUBMIT PROGRAM statement or create a Tcode for your program and use CALL TRANSACTION statement.
Even if you have a Selection Screen then also without any user intervening you can pass the Selection Screen Values,
For more info Take F1 help on SUBMIT key word.
if you dont have a selection screen or any other screen no one need to intervene in the program execution neither program allows to the best of my knowledge. Unless one is execptional idea about program execution at system level.
Cheers
Ram
‎2009 Nov 07 10:12 AM
Dear Ram,
Thanks for your prompt reply. I would like to inform you that I am able to call another program using SUBMIT / CALL TRANSACTION statements and also know how to pass values.
The next step is to execute this called program which I am calling using SUBMIT statement from my program, i.e., I do not want the user to press 'F8' to Run the called program. I want this to be done via my progam itself.
Can you help me with this?
‎2009 Nov 07 11:12 AM
schedule it in background. (background job)
or any ways.. submit will execute the called program directly if you do not have a selection screen in it..
‎2009 Nov 08 4:40 AM
Hi,
Submit the program use return statement. Program will execute and return with out manual intervention.
Pass the selection scree values if u have a selections screen. No need to to execute in background. If u r nt able to do it give reply i can send u the code....
‎2009 Nov 11 6:58 AM
Dear Soumyaprakash / Srininas,
Thanks for the prompt reply.
When I said that I want the program to be executed, I meant to say that the PAI of the new program should be executed, as in the new programs 'F8' should be executed automatically.
With SUBMIT statement I can call the new program and pass values to it's selection screen. But how can I exectue this new program without user intervention is the question.
Hope I am not confusing you.
Thanks.
‎2009 Dec 23 10:40 AM
Hi Kumar,
From Program1 you are calling Program2, using submit syntax (inside Program1).
While using submit, if you have correctly filled up the selection screen of program2, then it will AUTOMATICALLY get executed, WITHOUT F8.
If there is any compulsary field in program 2, which does not get populated, then it will not run automatically, or unless some special code is written in program2.
If you do not want the output of Program2 on screen, then u can use
SUBMIT Program2 AND RETURN.
In that case, no selection screen (of program2) will appear and neither the output of program 2.
Regards,
Amit Mittal.
Edited by: Amit Mittal on Dec 23, 2009 4:10 PM
‎2009 Dec 23 10:23 AM