cancel
Showing results for 
Search instead for 
Did you mean: 

Creating global variables

Former Member
0 Kudos

Hello,

How do you create global variables in class, like the controller class? Whenever I create a global variable, and do a rebuild, it is being removed by netweaver. How come?

regards,

arnold

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Arnold,

Try declaring your variables in the bottom most section of the java file. It should be between

//@@begin others

and

//@@end

  /*
   * The following code section can be used for any Java code that is 
   * not to be visible to other controllers/views or that contains constructs
   * currently not supported directly by Web Dynpro (such as inner classes or
   * member variables etc.). </p>
   *
   * Note: The content of this section is in no way managed/controlled
   * by the Web Dynpro Designtime or the Web Dynpro Runtime. 
   */
  //@@begin others
  //@@end

Anjana R

Former Member
0 Kudos

Great. it worked. Thanks Anjana.