Application Development 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: 

Get the value of variable between the methods of same class.

manoj_goyal2
Participant
0 Kudos

Hi Guys,

I know that you can retrieve the value of variable between the programs without passing it as parameters, by assigning

the program/field name of calling program variable to field symbol 1

Is there any way to do the same thing among the methods of a same class?

I have a class which has 2 methods: MethodA & MethodB

MethodA calls MethodB. I want to access a value of a field in MethodB which is declared in MethodA.

Please let me know if it is doable?

Thanks,

2 REPLIES 2

Former Member
0 Kudos

Hi,

If you dont want to change your signature of method B(sending the field as export parameter).It is not possible to access the value from method A(it is Local to that method).

You can access that value from get Parameter Id concept.

Regards,

Raghava Channooru.

Former Member
0 Kudos

what are you describing is nothing els than a "DIRTY READ".

You might rather go the other two proposed ways, cause if you do dirty reads you gotta live all the consequences.