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

catching the error from the function module

Former Member
0 Likes
330

hi,

call function 'ZV_SALES_ORDER_CANCEL_TSPPRA'

exporting

salesdocument = l_order

customer = l_kunnr

importing

return = return

.

the return contains the error message.

how to display this error message in our program

2 REPLIES 2
Read only

Former Member
0 Likes
313

Hi,

After FM

if return-MSGTYP <> 'S'.

write return-MSGNO......

endif.

Reward if useful!

Read only

Former Member
0 Likes
313

Hi Sudarshan,

What is the type of return. Is it a BAPIRET.

Then just check for the MSGTYP and if it is E then show the error.

Regards,

Atish