Skip to Content
author's profile photo Former Member
Former Member

Question about CL_WD_DYNAMIC_TOOL=>CHECK_MANDATORY_ATTR_ON_VIEW

Hi,

I want to do a mandatory check for all the required elements on the current view. I'm now using the following code. There is a problem, the WebDynpro does report an error message when the required fields are empty, but it doesn't stop when there is an error and the code in action "UPLOAD" are still excuted. Anyone knows how to solve such problems?

thanks.

======================================================

...

if lo_action is bound.

case lo_action->name.

when 'UPLOAD'.

CALL METHOD CL_WD_DYNAMIC_TOOL=>CHECK_MANDATORY_ATTR_ON_VIEW

EXPORTING

VIEW_CONTROLLER = lo_api_controller

DISPLAY_MESSAGES = ABAP_TRUE

IMPORTING

MESSAGES = lt_messages

.

endcase.

endif.

...

======================================================

Edited by: Jaddy Zhang on Jan 31, 2008 2:28 PM

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 31, 2008 at 06:37 AM

    Hi Jaddy Zhang,

    Futher code usually wont excecute when an error message is displayed. If iys still moving forward means, then put the code inside a condition that checks lt_messages.

    Regards

    Sarath.

    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.