Skip to Content

Error message

Hi genius,

I developed one application which has the list of employee's ID each row has some drop down values. My requirement is suppose the user fill the drop down value dynamically then press the submit it will ask fill the drop down value for remaining employees id this was done by me .

But i want ping the cursor for the particular field sequentially, which is not filled by user.How can i do this?

Kindly share your Valuable knowledge.

Thank You.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Jan 16, 2013 at 10:35 AM

    Hi,

    which method are you using to display error message? User report_attribute_error_message method of message manager so that it will display error message as well highlight the error field.

    CALL METHOD lo_message_manager->report_attribute_error_message

    EXPORTING

    message_text = 'Your message'

    element = lo_el_ele " context element

    attribute_name = 'ATTR'. " attribute name

    Regards,

    Kiran

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi John,

      You can set the focus at any time by reading a reference to the current view controller and calling method IF_WD_VIEW_CONTROLLER->REQUEST_FOCUS, however if you're setting focus as a component of issuing an error message then the approach Kiran mentions is more standard and does work for any editable field:

      * -- Get a message manager objectDATA lo_message_manager TYPE REF TO if_wd_message_manager.lo_api_controller ?= wd_this->wd_get_api( ).CALL METHOD lo_api_controller->get_message_manager    RECEIVING        message_manager = lo_message_manager.* -- Get the context element corresponding to the row of the tableDATA lo_nd_flight_tab TYPE REF TO if_wd_context_node.DATA lo_el_flight_tab TYPE REF TO if_wd_context_element.lo_nd_flight_tab = wd_context->get_child_node( name = wd_this->wdctx_flight_tab ).lo_el_flight_tab = lo_nd_flight_tab->get_element( index = 3 ). " just an example* -- Issue an error message for an attribute of this context elementCALL METHOD lo_message_manager->report_attribute_error_message    EXPORTING        message_text   = 'This field has an error'        element            = lo_el_flight_tab        attribute_name = 'CARRID'.

      Cheers,

      Amy

  • Posted on Jan 18, 2013 at 09:47 AM

    Hi,

    You can make the field that the user need to enter the value as 'Required'.

    please the sample example:

    Implement the below logic/code in "WDDOBEFOREACTION"

    DATA lo_api_controller TYPE REF TO if_wd_view_controller.
    DATA lo_action TYPE REF TO if_wd_action.
    DATA l_view_controller TYPE REF TO if_wd_view_controller .
    lo_api_controller = wd_this->wd_get_api( ).
    lo_action = lo_api_controller->get_current_action( ).

    IF lo_action IS BOUND.
    CASE lo_action->name.
    WHEN 'SUBMIT'. "(Provide your action name"

    l_view_controller = wd_this->wd_get_api( ) .
    cl_wd_dynamic_tool=>check_mandatory_attr_on_view(

    EXPORTING view_controller = l_view_controller
    display_messages = abap_true
    ) .
    ENDCASE.
    ENDIF

    .


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

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.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.