cancel
Showing results for 
Search instead for 
Did you mean: 

error handling in web dynpro

Former Member
0 Kudos

hi everybody,

i want to know how to validate the field in web dynpro by

1) by ussing assistance class

2) allready present classes in abap and how .

Actually i have prepare a assistance class in se24 and put a message on '001'.now i want to check that this field which is a date field is less than the sy-datum.if the condition does not match then error message should be display on same page and the page should not be posted.

in my case the page is posting and the message is not displaying on the page.

thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi vaibhav nirmal ,

now on the button click to post the page or on the event that firing the plug to move to next page or on the event thats posting the page, before firing the plug u have to read the input date and check the condition u want, once the condition fails get the text from the assistance class and show the text by displaying an error message using the method from if_wd_message_manager. Once the error message is displayed, processing wont go further

Regards

Sarath

Former Member
0 Kudos

i have written that code in wddobeforeaction.

if BEGDA_0002_INPUTFIELD < sy-datum.

wd_assist->if_wd_component_assistance~get_text( '001' ).

endif.

how should i check before posting the page.

Former Member
0 Kudos

hi,

you have to display the message inside the if condition

BEGDA_0002_INPUTFIELD < sy-datum.

wd_assist->if_wd_component_assistance~get_text( '001' ).

call method of if_wd_message_manager and pass this text

endif.

regards

Sarath

Former Member
0 Kudos

i have done it ,

CALL METHOD l_message_manager->REPORT_ERROR_MESSAGE

EXPORTING

MESSAGE_TEXT = '001'

but as there are two views here , after clicking the button the error message is coming on the next page and message is not displaying the number 001 is displaying.

. the problem is still there .

Answers (0)