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

SAP Scripts : Multiple Performs in same program

Former Member
0 Likes
610

dear All,

I am working on SAP Script. I had user a perform statement and written a Code in Sub-routine. that works well, Now I have to use other perform to a carry other operation, Can I use same program, and Add new code to it or Create other program.

I will try to explain more clearly ..

PERFORM <b>GET_TEXT</b> IN <b>PROGRAM ZGET_STEXT</b>

Using var1

using Var2

Changing Var3.

Now if I tooo Add other perform to my Script.

Can I use

PERFORM <b>GET_STtext</b> IN PROGRAM <b>ZGET_STEXT</b>

Using var4

using Var5

Changing Var6.

and Add extra code to do extra operation for same ZGET_Stext program,

Please advice me.

Thanking you.

With kind regards

Venkat

4 REPLIES 4
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
569

You can have as many subroutines(FORMs) in your program as you like. No problem doing that.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
569

Yes, you can use as many subroutines in that subroutine-pool as you like.

Read only

0 Likes
569

Thanks Rich & Sandip,

I will get back if I have some problems,

As I am worried about Int_cond Value.

In first form I have assigned

text = Sgtext.

So I guess I have to clear int_cond and assign new value for second form .

Am I right ??

Thanks & Regards

Venkat

Read only

0 Likes
569

What's the exact question? I didn't get it properly. It's simple ABAP, so if you have the same variable going into 2 different subroutines, and you want that variable to initialize each time they get into the subroutines, then clear the value at the 1st place in the subroutines.