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

CATCH - ENDCATCH; System Exception???

Former Member
0 Likes
401

Hi Experts,

Pls. clarify couple of my simple doubt that,I got one statement from exsting Z FM, as follows,

<i><b>1) l_auart = /my_namespace/cl_l_order_type=>get_order_type( i_vbak-auart ).</b></i>

Wht is happening in the above statemnt??

2)

<i><b>method GET_ORDER_TYPE.

data: l_auart type auart,

l_exit type ref to /my_namespace/if_ex_get_auart.

l_auart = i_auart.

call method cl_exithandler=>get_instance

changing instance = l_exit.

if not l_exit is initial.

catch system-exceptions call_method_not_implemented = 1.

call method l_exit->get_auart

changing

c_auart = l_auart.

endcatch.

endif.

read table G_ORDER_TYPE_ALL into e_data

with key auart = l_auart.

endmethod.</b></i>

Can u explain, Wht is doing over here?

3) CREATE OBJECT

Wht is the fnctionality of above statenmnt?

thanq

Message was edited by:

Srikhar

1 ACCEPTED SOLUTION
Read only

naimesh_patel
Active Contributor
0 Likes
369

With the use of these statements, system will not give you the short dump if your mehtod get_auart is not implementd.

catch system-exceptions call_method_not_implemented = 1.
call method l_exit->get_auart
changing
c_auart = l_auart.
endcatch.

CATCH - ENDCATCH is used to avoid the short dumps.

See online help for more information.

Regards,

Naimesh Patel

1 REPLY 1
Read only

naimesh_patel
Active Contributor
0 Likes
370

With the use of these statements, system will not give you the short dump if your mehtod get_auart is not implementd.

catch system-exceptions call_method_not_implemented = 1.
call method l_exit->get_auart
changing
c_auart = l_auart.
endcatch.

CATCH - ENDCATCH is used to avoid the short dumps.

See online help for more information.

Regards,

Naimesh Patel