on 04-29-2008 10:35 AM
Hi,
I would like to use cl_wd_dynamic_tool=>check_mandatory_attr_on_view to check the mandatory fields in the view.
However, I cannot found this method and some msg is shown:
Method "CHECK_MANDATORY_ATTR_ON_VIEW" is unknown or PROTECTED or PRIVATE.
Anybody know why?
Regards,
Edmond
Hi Edmood,
If you want to work with UI elements at runtime you have to write code in wddomodify.
Regards,
Nikita
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
And CL_WD_DYNAMIC_TOOL is a public active class in se24?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Edmond
You will need something like this:
data: lt_messages TYPE cl_wd_dynamic_tool=>t_check_result_message_tab.
cl_wd_dynamic_tool=>check_mandatory_attr_on_view(
EXPORTING
view_controller = iv_view_controller
display_messages = abap_false
IMPORTING
messages = lt_messages ).
In this instance, iv_view_controller is an import parameter as the code resides in the component controller and the view I wish to check is passed in to the method.
Hope that helps
Ian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Some msg like :
The type "T_CHECK_RESULT_MESSAGE_TAB" is unknown.
when I use
data: lt_messages TYPE cl_wd_dynamic_tool=>t_check_result_message_tab.
cl_wd_dynamic_tool=>check_mandatory_attr_on_view(
EXPORTING
view_controller = iv_view_controller
display_messages = abap_false
IMPORTING
messages = lt_messages ).
Hi,
Try this.
data: lt_messages TYPE cl_wd_dynamic_tool=>t_check_result_message_tab.
data : io_view_controller type ref to IF_WD_VIEW_CONTROLLER.
cl_wd_dynamic_tool=>check_mandatory_attr_on_view(
EXPORTING
view_controller = io_view_controller
display_messages = abap_false
IMPORTING
messages = lt_messages ).
Thanks.
hi edmond.....
mention the coding you have used....
---regards,
alex b justin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi ed mond....
use it in the wddomodify method.
types:
begin of t_check_result_message,
t100_message type symsg,
context_element type ref to if_wd_context_element,
attribute_name type string,
end of t_check_result_message .
data:
message type standard table of t_check_result_message.
CALL METHOD CL_WD_DYNAMIC_TOOL=>CHECK_MANDATORY_ATTR_ON_VIEW
EXPORTING
VIEW_CONTROLLER = view
DISPLAY_MESSAGES = ABAP_TRUE
IMPORTING
MESSAGES = message.
.
---regards,
alex b justin
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.