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 Error

Former Member
0 Likes
860

Hi Friends,

I want to catch errors which are not shown in ST22. But I can see errors in sm21 as;

R49 Communication error, CPIC return code 020, SAP return code 223

R5A > Conversation ID: 65932358

R64 > CPI-C function: CMSEND(SAP)

How can I catch this error?

Note : My App. Server is 4.6C

Thanks.

6 REPLIES 6
Read only

Former Member
0 Likes
786

Hi Akin,

You need to use <b>CATCH</b> statement.

For more detail do F1 on Catch in se38.

Reward points if this helps.

Manish

Read only

0 Likes
786

Sorry Manish,

But problem is not easy as pressing F1.

I have already declared statement as:


CATCH SYSTEM-EXCEPTIONS RMC_COMMUNICATION_FAILURE = 1
  RMC_SYSTEM_FAILURE = 2 RMC_INVALID_STATUS = 3.
...
...
ENDCATCH.

But, I can not cath the error.

And I want to give more info abaout problem. There is one function that is used for RFC. And this code gives error,


SUBMIT (RAPOR) EXPORTING LIST TO MEMORY AND RETURN
               WITH SELECTION-TABLE PARAMETRELER.

When error occures I can not see error from ST22. I can see error from sm21 as declared my previous message. How can I cath this error?

Thanks.

Read only

0 Likes
786

can you elaborate in what context you are getting the error ?

Read only

0 Likes
786

I am getting this error when the parameters of report is not enough. Such as the report that I want to run gets 5 obligatory parameters and if I pass 4 parameters, problem is occured. And also, when the function is run from dialog, the required fields are wanted automatically. But if this function is called from RFC problem is occured. And problem is so critic. The rfc caller is asp.net process and when this error is occured asp.net process is killed automatically. So, killing asp.net process is so critic.

Thanks.

Read only

Former Member
0 Likes
786

Hi,

with the catch statement you can only catch ABAP runtime errors (more precisely "catchable runtime errors"). Since you don't have a runtime error you'd better check the existence of the obligatory parameters before the call is made.

regards

:bus

Read only

0 Likes
786

Yes, you are right. Passing true parameters is default solution. But if this is not a catchable error, there is a problem. I think that this error must be catched. If you think that your server which your asp.net process is run is so important, any error deal with not enough obligataroy parameter will closed all of the application under asp.net process. I think that killing asp.net process is not normal. Maybe this problem will deal with Nco. But if not any satisfied answer is found, I think to open an OSS note.