cancel
Showing results for 
Search instead for 
Did you mean: 

How to declare constant to be used trhough WebDynpro??

Former Member
0 Kudos

Hi,

I'm new to WEbDynpro

How to set a string constant to be used through my WebDynpro project like in other programming language ??

Thanks in advance...

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

If u want to declare anything as a global variable then u have to declare it inside the :

//@@begin others

String name = "Sample";

//@@end

If u give this code inside the view controller then its scope will be available till that view.If u declare this inside the comp.ctrl then it will be available till the comp.ctrl resides.

If u want more reference tell me i will provide u with the available links.

Hope this helps u,

Regards,

Rathna.

Former Member
0 Kudos

refer the help.sap.com/nw04

Answers (1)

Answers (1)

Former Member
0 Kudos

You can add a new interface containing the constant definitions in the folder src/packages/<your package>, e.g.

public interface <YourProject>Constants
{
  static final int FORTY_TWO = 42;
}

Armin