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

Global variable - pro and con

rosenberg_eitan
Active Contributor
0 Likes
553

Hi all,

Global variable are consider bad practice in computer programming .

In SAP the exception are those cases the global variable is the only way to transfer data.
(e.g. Dialog , Sap script and old fashion exits)

What is your opinion on the subject ?

How do you manage those global variables ?

Regards.

1 ACCEPTED SOLUTION
Read only

sai_krishna24
Active Participant
0 Likes
474

Eitan,

I'll agree with you, we should minimize the usage of global variables. In SAP scripts there is no other go to use local variables. However in other areas we can minimize as I always does in my abap programming with OO Concepts.

SAP already minimizing that with OO Concept.

Thanks

SaiKrishna

1 REPLY 1
Read only

sai_krishna24
Active Participant
0 Likes
475

Eitan,

I'll agree with you, we should minimize the usage of global variables. In SAP scripts there is no other go to use local variables. However in other areas we can minimize as I always does in my abap programming with OO Concepts.

SAP already minimizing that with OO Concept.

Thanks

SaiKrishna