i want to know if is it possible to create a file with constants which can be used for all pages of a bsp application (globals constants) ? Or is there another way to do this ?
One way is as constants of the application class. However, constants can be defined on <b>any</b> class. So just create a small class, call it CL_MY_CONSTANTS, and define all the constants on that class. You can also define constants on interfaces. For an example, see IF_BSP_WRITER.
Alternatively, just define the constants inside a page fragment.
<%
constants CO_RED type C value 'R'.
constants CO_GREEN type C value 'G'.
constants CO_BLUE type C value 'B'.
%>
Now you can include this page fragment in all pages (effectively expanded inline) and just refer to the constants.
You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
Add a comment