cancel
Showing results for 
Search instead for 
Did you mean: 

TOP-Include

Former Member
0 Kudos

Hi Experts,

I'm looking for an pleace in the WEB dynpro, where I can pleace all constants definition used leater in the methods. It would be good if it could be shared between more WD's.

Just something like a TOP-Include.

Greetings

Wojtek

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Create a single Assistance class, source it from the WD components that you want and declare the attributes there.

Regards,

Gaurav.

Former Member

Answers (1)

Answers (1)

alejandro_bindi
Active Contributor
0 Kudos

The INCLUDE concept is not applicable inside Web Dynpro. What you can do is to use an interface for defining constants. Just create it in SE24 and then use it at will from any WD component or even any normal ABAP object (report, function module, etc).

From SE24, create an interface ZIF_EX_CONST.

Under "Attributes", create an attribute such as VALUE1 using Constant in the "Level" column. Asign the value under the "Initial Value" column as well.

Afterwards you can use this constant with: zif_ex_const=>value1.

Of course, you can also use the Assistant class for this as it was pointed out, but if it's just general constants you want to share, maybe you want to separate the coding from the constants.

Regards

Edited by: Alejandro Bindi on Aug 5, 2009 12:55 PM