‎2008 Feb 29 9:20 AM
The Zreport is fetching all the datas which is
displayed in the alv grid and a user defined button
( in the alv grid screen ) is pressed all the datas are send thru XI interface and it stored in the system.
This has been handled using the following code. I want to catch this exception since i was getting a warning. Plz suggest me hw to handle this exception
This has been used in the user command form
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
if r_ucomm = sy-ucomm.
.....
.......
...
CREATE OBJECT prxy.
TRY.
CALL METHOD prxy ->executre_asynchronous
EXPORTING
output = it_grtinfo.
COMMIT WORK.
CATCH cx_system_fault into fault.
CREATE OBJECT fault.
lv_msg_text = fault->get_text( ).
Write : / fault-> errortext.
ENDTRY.
endform.
After checking the syntax, i got the following warning.
Plz tell me how to handle this exception in the program
Warning message is : The exception CX_AI_SYSTEM_FAULT is neither caught nor declared in the RAISING clause of "USER_COMMAND"
Please revert back as soon as possible.
Thanks in advance
‎2008 Feb 29 9:28 AM
Hi,
Use this link
http://help.sap.com/saphelp_nw04/helpdata/en/3e/a35c3cff8ca92be10000000a114084/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/75/a55c3cff8ca92be10000000a114084/content.htm
Cheers
Mohinder Singh Chauhan
‎2008 Feb 29 6:28 PM
CREATE OBJECT prxy.
TRY.
CALL METHOD prxy ->execute_asynchronous EXPORTING output = it_grtinfo.
COMMIT WORK.
CATCH cx_system_fault into fault.
* CREATE OBJECT fault. " You don't need the this - the CATCH "creates" the object
lv_msg_text = fault->get_text( ).
Write : / fault-> errortext.
CATCH cx_ai_system_fault INTO ai_fault.
lv_msg_text = ai_fault->get_text( ).
Write : / ai_fault-> errortext.
ENDTRY.matt