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

RE:subrotines

Former Member
0 Likes
610

In a report I used four subroutines.IN these two having same code other two having difference in single field i.e., while transfering data to final internal table the amount should be multiplied by one .

Can we change it? how can I change it?

Regards,

sam.

In a report I used four subroutines.IN these two having same code other two having difference in single field i.e., while transfering data to final internal table the amount should be multiplied by one .

Can we change it? how can I change it?

Regards,

sam.

5 REPLIES 5
Read only

Former Member
0 Likes
591

>

> In a report I used four subroutines.IN these two having same code other two having difference in single field i.e., while transfering data to final internal table the amount should be multiplied by one .

>

> Can we change it? how can I change it?

>

> Regards,

> sam.

No idea what you are talking about. You have 1 report, inside which you are calling 4 sub-routines. Two of the routines, even w/ different name, have the same code. Then the other two has difference in 1 parameter? Can you clarify?

Read only

former_member585060
Active Contributor
0 Likes
591

Try like this

Do amount field multiplication after the procession of the SUBROUTINE for the other 2 subroutines. i.e, after the PERFORM statements of the 2 SUBROUTINES u r talking of with extra field.

Read only

Former Member
0 Likes
591

very strange question ... please spend more time also for yourself to understand your problem. And ask a proper question.

> internal table the amount should be multiplied by one

as a performance recommendation I would say, leave it away, nobody will notice that it was not multiplied by '1'.

Siegfried

Read only

matt
Active Contributor
0 Likes
591

It might be a really good idea to post your code.

Read only

Former Member
0 Likes
591

Hi,

Put all the code in a Function Module and Call it.

It works Globally.

But When Subroutine 1 is called put some condition lilke:

IF SUB_routine EQ 1.

call SUB1.

ELSEIF SUB_routine EQ 2.

call SUB2.

ELSEIF SUB_routine EQ 3.

call SUB3.

ELSEIF SUB_routine EQ 4.

call SUB4.

ENDIF.

Regards,

Rama.