‎2007 Aug 17 1:56 PM
Dear SAP friends!
Could anybody explain me how to find possible values of a parameter?
Here is an example:
CALL METHOD o_picture->set_display_mode
EXPORTING
display_mode = cl_gui_picture=>display_fit_center.
Parameter "display_mode" has 4 possible values. The parameter values could be found in Attributes Tab.
But how I can identify that these 4 values are related to "display_mode" parameter?
Let's say I want to use method "set_display_mode" of class "cl_gui_picture".
I go to SE84 and display the class. Then I find the method I want to use and click "parameters". Then I see the parameter "display_mode".
I know that possible values of the parameter could be found in Attributes Tab. But there so many of them...
How do I know which is which? Clicking on "display_mode" doesn't give any information and there is no documentation available in English...
Thanks,
Tatyana
‎2007 Aug 17 2:43 PM
Hello Tatyana
In many cases you will find the appropriate values defined as constant attribute of the class or its superclass. Class CL_GUI_PICTURE has the following constant attributes:
DISPLAY_MODE_NORMAL Constant Public
DISPLAY_MODE_STRETCH Constant Public
DISPLAY_MODE_FIT Constant Public
DISPLAY_MODE_NORMAL_CENTER Constant Public
DISPLAY_MODE_FIT_CENTER Constant PublicRegards
Uwe
‎2007 Aug 17 2:43 PM
Hello Tatyana
In many cases you will find the appropriate values defined as constant attribute of the class or its superclass. Class CL_GUI_PICTURE has the following constant attributes:
DISPLAY_MODE_NORMAL Constant Public
DISPLAY_MODE_STRETCH Constant Public
DISPLAY_MODE_FIT Constant Public
DISPLAY_MODE_NORMAL_CENTER Constant Public
DISPLAY_MODE_FIT_CENTER Constant PublicRegards
Uwe
‎2007 Aug 17 2:59 PM
Yes, this is a little bit tricky at times. But the class, method, attributes are designed to be intuitive, meaning that the wording of the methods and and attributes are described in such a way that it is easy to recoginize what contansts can be used to pass to method calls. Lets take the class CL_GUI_DOCKING_CONTAINER for example. Lets look at the CONSTRUCTOR method and its parameter SIDE. You will see that this parameter is of TYPE I and that it is actually using on of the constants as its default, DOCK_AT_LEFT. So if you go to the attributes tab and look for DOCK_AT_LEFT, you will find other contants that are available to pass to this parameter.
If you are looking for a hard list of values(or constants in attributes tabs) which can be passed to any given parameter of any given method, I do not believe that this functionality exists.
REgards,
Rich Heilman
Regards,
Rich Heilman
‎2007 Aug 17 3:01 PM
Got you.
1. Go SE84. Find class "cl_gui_picture". Click Method "set_alignment". Click Parameters. There is parameter "alignment". Go "Attributes" and search for alignment constants: Align_at_bottom, align_at_left, align_at_right, align_at_top
2. Go SE84. Find class "cl_gui_picture". Click Method "set_metric". Click Parameters. There is parameter "metric". Go "Attributes" and search for metric constants: metric_mm and metric_pixel
Thank you Uwe.
Tatyana.
.