cancel
Showing results for 
Search instead for 
Did you mean: 

Question about CL_WD_DYNAMIC_TOOL=>CHECK_MANDATORY_ATTR_ON_VIEW

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi, Sarath

I know "lt_message" will contain some data if there are any errors found. But, how to make the program stop then? Would you please give me some code examples?

Thanks

Former Member
0 Kudos

Hi Jaddy Zhang ,

you have to call method inside the if condition

if it_messsages is initial.

wd_this->upload.

endif.

*i think my understanding about ur problem is correct.

if no , do paste your full code in the case upload.

Regards

Sarath

Former Member
0 Kudos

Thanks a lot. I'm clear now.

Answers (0)