Skip to Content
avatar image
Former Member

Container Issue

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Sep 03, 2008 at 02:29 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 03, 2008 at 02:49 PM

    //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;

    Add comment
    10|10000 characters needed characters exceeded