cancel
Showing results for 
Search instead for 
Did you mean: 

Container Issue

Former Member
0 Kudos

I have created a Function SetVariable, with the code below

-


// SetVariable

// a = Date

// b = Variable Name

container.setParameter(a,b);

return a;

-


I have used this function in one of the field and when I am trying to retrieve the Value in the just next immediate field with GetVariable function, null value is returned.

-


// GetVariable

// a = Variable Name

String var=(String) container.getParameter(a);

return var;

-


Any help would be appreciated.

Regards,

Bharani

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

//SetLocalvariable

GlobalContainer globalContainer;

globalContainer = container.getGlobalContainer();

globalContainer.setParameter(a,b);

return a;

//GetLocalVaraible

GlobalContainer globalContainer;

globalContainer = container.getGlobalContainer();

String var= (String) globalContainer.getParameter(a);

return var;

GabrielSagaya
Active Contributor
0 Kudos

1)void setParameter (String parName, Object obj)-Saves the obj object under the name parName in a container for a user-specific function.

2)Object getParameter(String parName)-Returns the parameter that was saved under the parName name in this user-specific function by using the setParameter method. If no such parameters exist, getParameter returns null.

http://help.sap.com/saphelp_nw04/helpdata/en/e0/7d8e40496f6f1de10000000a1550b0/frameset.htm