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

calling an existing program

Former Member
0 Likes
857

Hi,

I have an existing program called A to upload a text file and create batch input session which to be processed in SM35 and it is doing fine without problem.

Now I have a new program called B and 1 of the function of program B in the end of the program to create an internal table where the structure is similar to the text file structure in program A.

I would like to ask in the end of program B, can I do a call to program A and at the same time pass over my internal table and continue the steps creating batch input session in program A? The control will totally pass over to program A from B and once control over to A, program B is coming to end.

I do not sure after include the external call in program A, if I execute directly program A, will give any problem?

What I can think of is to use submit (without return) in program B and in program A no additional code needed?

Thank you.

Eliana

7 REPLIES 7
Read only

former_member156446
Active Contributor
0 Likes
826

HI eliana

if you have the process u want to call in a perform in another program, here is how you use this in prog A

perform <subroutine name> in program<prgnam> using &var1& changing &var2& &var3&

the parameters need to be the same in prog A / B. Hit an F1 on perform, there is more help on using this.

Read only

Former Member
0 Likes
826

Dear Eliana,

Why can't You try Export and Import statements! Use Submit... and Return along with Export and Import.

Read only

0 Likes
826

>

> Dear Eliana,

>

> Why can't You try Export and Import statements! Use Submit... and Return along with Export and Import.

hi export and import are session specific, once the LUW is close the export is washed out..

Read only

0 Likes
826

Hi,

If read my post properly, I need to call from program B to A.

Also there is NO MORE return back to program B.

1 May I know if I use submit in program B is ok?

2 Any additional code needed in program A? As I explained, program A is running fine and it is also can be executed by itself. I have worry if got additional code to allow calling from A, then when B is executed by user, will have problem.

Need your opinion.

Thanks

Read only

0 Likes
826

use statement

Submit A via selection-screen.

in the end of program B.

Thanks,

Indra

Read only

0 Likes
826

you have two options, you can use either of the options.. it will be ur call..

Read only

0 Likes
826

Hi eliana ,

probably it will not work if you don't just do it

did you face any problems with submit or what is the background of your question?

Regards,

Clemens