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

can use PERFORM in subroutine pool program

Former Member
0 Likes
853

I am working with subroutine pool program for script (becasue I must use standard driver program and script):

In my subroutine pool program, I need to change currency format for some variables more frequently according to user setttings ( need to do calculations so need to change formats before and after calculations ).

<b>Is it possible to write one perform and use this perform subroutine again and again:

I mean is it ok, if we write PERFROM statement in subroutine pool program and use again and again ?</b><b>If it is not possible... How to change currency format for calculations and again back to user format ?</b>Please help me...Thanks in advance...

I am working with subroutine pool program for script (becasue I must use standard driver program and script):

In my subroutine pool program, I need to change currency format for some variables more frequently according to user setttings ( need to do calculations so need to change formats before and after calculations ).

<b>Is it possible to write one perform and use this perform subroutine again and again:

I mean is it ok, if we write PERFROM statement in subroutine pool program and use again and again ?</b><b>If it is not possible... How to change currency format for calculations and again back to user format ?</b>Please help me...Thanks in advance...

6 REPLIES 6
Read only

Former Member
0 Likes
783

Hi,

you can not write a Perform in the Subroutine pool program but you can create a include program then it may possible in that one, try it

Regards

Sudheer

Read only

Former Member
0 Likes
783

Hi

You can create a subroutine but what does mean <b>'again and again'</b>?

If it means to isert in a cycle (like DO/ENDDO) you can't, but you can call it everytime you need.

Max

Read only

Former Member
0 Likes
783

again means each value/variable coming into program has to change

say for example from 3,456,478.99 to 345647899 add some amount like 2000...

and again convert back 3,456,498.99 ...

I have to change for each varible like above and add and again change back to original format.

Please ask me again if you don't understand . Will tell you more clearly..

Read only

0 Likes
783

Hi

A sapscript can see all variable defined in driver program as global data, so you can pass them in the routine:

/: PERFORM <FORM> IN PROGRAM <PROAGRAM>

/: USING <VARIABLE 1>

/: USING <VARIABLE 2>

/: USING ............

/: CHANGING <VARIABLE 1>

/: CHANGING ............

MAx

Read only

Former Member
0 Likes
783

This I am doing in subroutine pool program not in script editor . I need to do calculation... can I do in script editor and again change it into required format ?

Read only

0 Likes
783

I don't believe it

Max