‎2018 Jun 14 4:08 PM
Hello all,
my requirement is to throw an error in smartforms(i.e in flow logic->program lines),
for this i have written a code like below,
if lv_tbft is INITIAL.
CALL FUNCTION 'SSF_MESSAGE'
EXPORTING
I_MSGID = '00'
I_MSGTY = 'E'
I_MSGNO = '5'
I_MSGV1 = 'No data Exists'
* I_MSGV2 =
* I_MSGV3 =
* I_MSGV4 =
.
endif.


i have declared a custom exception MY_ERROR in driver program as well as exception tab in smartform.(as suggested in some threads),
how ever the error message is not getting displayed(only the smartform is not getting printed),
please can any one suggest where i am going wrong(my intention is to display the error 'No data exists' for the end user)..
thanks.
‎2018 Jun 14 6:19 PM
You will have to raise this exception in the function module that is getting called
‎2018 Jun 14 10:33 PM
please can any one suggest where i am going wrong
The whole thing is wrong, sorry. There should be no error messages in the forms.
If there is any kind of exception then this must be handled in the program that calls the form before the form is called. Depending on what it is exactly, there are different ways to implement this. But overall that's the proper design.
If there is no data for the form to output, why are you even calling the form? Think about it.
‎2018 Jun 18 7:02 AM
Instead of showing error message in smartforms , i have tried to throw error message through driver program,
as suggested by experts..
thank you all for your valuable suggestions..
thread closed..