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

Exception - Behaviour

Former Member
0 Likes
443

Hi,

I have user exit fm EXIT_SAPLCVALE_001 which has i_msg_txt as a changing variable (Pass by value).

If I assign i_msg_txt within the user exit, the value is reflected back in the calling program in normal cases.

But if i assign the i_msg_txt and then throw an exception, the assignment does not happen.

Is this normal behaviour ? why ?

What all happens once an exception is raised ?

Prashanth.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
367

Hi Prashanth,

if you raise an exception no output-data will

be filled. This is the way it works.

Better way is to define a additiaonal parameter

like RET_CODE or something else and fill it, in case of

an error.

In your case (Userexit) it will not work, becouse you cannot change the parameter-structure.

Well try to give the user a message instead.

BR

Michael

2 REPLIES 2
Read only

Former Member
0 Likes
368

Hi Prashanth,

if you raise an exception no output-data will

be filled. This is the way it works.

Better way is to define a additiaonal parameter

like RET_CODE or something else and fill it, in case of

an error.

In your case (Userexit) it will not work, becouse you cannot change the parameter-structure.

Well try to give the user a message instead.

BR

Michael

Read only

Former Member
0 Likes
367

Hi Prabhu,

If an exception is raised in a function mdoule or method of a class, the interface parameters which are passed by reference keep their values at the point of time when the exception is raised. The parameters passed by value lose their content in case of an exception.

Regards,

Sükrü