Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Validation / Message 'E' in User Exit, is it safe ?

Former Member
0 Likes
590

Hi,

I'm making a validation in OKC7. I need to display 20 different messages, but don't want to make 20 different validations. I'd like to make a single User Exit preparing a certain message to be displayed. I've managed to get the result using this way:


    PERFORM build_msg.

    MESSAGE s_msg TYPE 'E' RAISING errormessage.

    b_result = b_true.

I'm trying to display my custom error message inside the User Exit and then suppress the message defined in OKC7 by setting b_result to true.

But, is it safe to do it this way ?

1 REPLY 1
Read only

Former Member
0 Likes
393

Hey guys,

I'm facing the same problem, so maybe any expert can answer this?

I have read the validation documentation and I know that there is the information about no error messages in validation user exit.

But can anyone tell me the difference between...

(1) Putting the error message in the user-exit  and

(2) set b_result to false and put the error message in the validation step?

In both cases its an error message which results that the document creation is stopped until the error is corrected, isn't it? When facing batch input, in both cases it will cause error message in SM35 which need to be corrected?

Regards
Michael