‎2006 Jun 02 12:02 PM
Hi,
i have one basic doubt.
I created one FM.
In that i writen Raise statement.
Ex; Raise Not_found.
and in the exception block i given the shorttext and created longtext as partners are not found.
But when i exicute the FM it is displaying only Not_found.
not that text..
What may be the problem
Can any body give some suggession
Thanks in Advance.
‎2006 Jun 02 12:04 PM
Hi
Use MESSAGE .... RAISING stament to link a message to your excption:
MESSAGE E208(00) with 'Not found' RAISING NOT_FOUND.
Max
‎2006 Jun 02 12:10 PM
the exception which is raised has to be caught. if you are excuting the FM in SE37 then only the exception is raised. Call the function module in program in SE38, and then handle it
for example.
define a instance
lp_object type ref to cx_root.
then catch the exception into the instance.
read the instance using get text and then move the value to a variable. The value which you retrieve in the variable will have the text which you had passed while raising the exception.
hope this helps
‎2006 Jun 02 12:29 PM
‎2006 Jun 02 1:09 PM
Yes.After creating the longtext i saved and activated it and it turned to green color.
‎2006 Jun 02 1:45 PM
Hi,
Long texts are for help, what ever you maintain they will not come along with raise. you have to do it separately...like this..
when you want to raise...
<b>message e000(zz) with 'no data found' raising no_data.</b>
this will do that,not long texts.
Regards
vijay