cancel
Showing results for 
Search instead for 
Did you mean: 

constants class or include

Former Member
0 Kudos

hey folks

I'm trying to make use of constants, but I'm not sure what the preferred way is.

is it possible to utilize includes in web dynpro (couldn't find a way to define include) or is the better approach to use an assistance class with static fields?

or any other way?

cheers

stefan

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Web Dynpro or not, you really shouldn't use an include for such things anymore. You should always use a class or interface for reusable constants. In WD as you have seen, it is even more enforced since you shouldn't use any kind of include. If you constants are pretty well only used in this component, then I would use the assistanace class. If you need them to be reusable in more than this one place, you might consider an interface of their own.

Answers (1)

Answers (1)

Former Member
0 Kudos

You can store them in the assistance class and I believe this is the preferred method as it is more efficient than using a controller (component controller, custom) to reference.