cancel
Showing results for 
Search instead for 
Did you mean: 

Job Stays running : Throwing ABAP-exceptions

Former Member
0 Kudos

Hello,

Some job are running in SM37, sometimes an error RFC occurs, and then should stop the job. It appears that sometimes the job is stopped and sometimes it stays running....

To solve the problem we have to select the job and check status in order to stop it.

When we test the RFC function with SE37 transaction sometimes we have the good raise exception else it kill the session.

Thank you for your help,

Nicolas US.

The last job raise exception correctly :

I_RESERVATIONS Interr. 05.09.2005 17:09:41 41

SM 21 :

-

-


17:10:21 BTC 16 120 USERNAME AB0 Erreur d'exécution "RAISE_EXCEPTION".

17:10:22 BTC 16 120 USERNAME AB1 > Préparation du vidage d'une partie de la mémoire "050905 171021 mestral USERNAME "

17:10:22 BTC 16 120 USERNAME D01 Transaction termination &9 &9 &5 ( &a &b &c &d &e &f &g &h &i )

17:10:22 BTC 16 120 USERNAME R68 Exécuter roll-back

RFC server log :

-

-


05/09/2005 5:09:44 PM : Z_Mm_Read_Resa_Request()

05/09/2005 5:09:44 PM : Tentative n°1/5 de se connecter à : INT19

05/09/2005 5:09:44 PM : OpenConnection() : System.Data.OleDb.OleDbException: ORA-12154: TNS:could not resolve service name

05/09/2005 5:09:54 PM : Tentative n°2/5 de se connecter à : INT19

05/09/2005 5:09:54 PM : OpenConnection() : System.Data.OleDb.OleDbException: ORA-12154: TNS:could not resolve service name

05/09/2005 5:10:04 PM : Tentative n°3/5 de se connecter à : INT19

05/09/2005 5:10:04 PM : OpenConnection() : System.Data.OleDb.OleDbException: ORA-12154: TNS:could not resolve service name

05/09/2005 5:10:14 PM : Tentative n°4/5 de se connecter à : INT19

05/09/2005 5:10:14 PM : OpenConnection() : System.Data.OleDb.OleDbException: ORA-12154: TNS:could not resolve service name

05/09/2005 5:10:24 PM : Tentative n°5/5 de se connecter à : INT19

05/09/2005 5:10:24 PM : OpenConnection() : System.Data.OleDb.OleDbException: ORA-12154: TNS:could not resolve service name

05/09/2005 5:10:24 PM : System.Exception:

-

-


- Interface : MMI10_Reservation -

- Méthode : Z_Mm_Read_Resa_Request -

-

-


OpenConnection() Error INT19 : System.Data.OleDb.OleDbException: ORA-12154: TNS:could not resolve service name

The job in running state (no stopped after error):

I_RESERVATIONS actif 05.09.2005 17:10:41 1,616 sec

SM21 :

-

-


17:11:21 BTC 17 120 USERNAME AB0 Erreur d'exécution "RAISE_EXCEPTION".

17:11:21 BTC 17 120 USERNAME AB1 > Préparation du vidage d'une partie de la mémoire "050905 171121 mestral USERNAME "

????? (no Transaction termination and no rollback)

RFC server log :

-

-


05/09/2005 5:10:43 PM : Tentative n°1/5 de se connecter à : INT19

05/09/2005 5:10:43 PM : OpenConnection() : System.Data.OleDb.OleDbException: ORA-12154: TNS:could not resolve service name

05/09/2005 5:10:53 PM : Tentative n°2/5 de se connecter à : INT19

05/09/2005 5:10:53 PM : OpenConnection() : System.Data.OleDb.OleDbException: ORA-12154: TNS:could not resolve service name

05/09/2005 5:11:03 PM : Tentative n°3/5 de se connecter à : INT19

05/09/2005 5:11:03 PM : OpenConnection() : System.Data.OleDb.OleDbException: ORA-12154: TNS:could not resolve service name

05/09/2005 5:11:13 PM : Tentative n°4/5 de se connecter à : INT19

05/09/2005 5:11:13 PM : OpenConnection() : System.Data.OleDb.OleDbException: ORA-12154: TNS:could not resolve service name

05/09/2005 5:11:23 PM : Tentative n°5/5 de se connecter à : INT19

05/09/2005 5:11:23 PM : OpenConnection() : System.Data.OleDb.OleDbException: ORA-12154: TNS:could not resolve service name

05/09/2005 5:11:24 PM : System.Exception:

-

-


- Interface : MMI10_Reservation -

- Méthode : Z_Mm_Read_Resa_Request -

-

-


OpenConnection() Error INT19 : System.Data.OleDb.OleDbException: ORA-12154: TNS:could not resolve service name

Accepted Solutions (0)

Answers (1)

Answers (1)

reiner_hille-doering
Active Contributor
0 Kudos

Can you please rephrase your question?

I understood it so far that

- You have a .NET RFC server written with NCo.

- This server sometimes throws an Oracle-Exception.

- This exection is transfered over to ABAP as ABAP-Exception.

I don't understand if the behavior is wanted or not, but definitly this is how NCo is designed. If you don't want .NET-Exceptions to be transfered to ABAP, just catch them on .NET side.

Former Member
0 Kudos

Hello,

the RFC server is written with visual studio .NET and we use SAP.NET connector 2.0. We really want raise the exception to the ABAP program in order to stop the job which is calling the program. Our problem is this one : this job is not stop every time. In this case is stay in a running state.

Working :

- One SAP job scheduled every 5 minutes running an ABAP program

- this program execute a function module which use RFC connection

- Our RFC server .NET (Windows services) listen the RFC call and execute the good .NET method

- this method execute an SQL query and sometimes an error occurs

- the method raise an exception to SAP :

Try

{

....

}

catch(Exception ex)

{

RfcAbapException ns = new RfcAbapException("ERROR_Z_READ_TRANSACTION_SDG", ex.ToString());

throw ns;

}

- the ABAP program always catch the exception : (SM21) :

17:10:21 BTC 16 120 USERNAME AB0 Erreur d'exécution "RAISE_EXCEPTION".

- But the job isn't stopped every times and stay in this case in a running state.

I hope it can help you to understand better our problem.

Regards,

Nicolas

reiner_hille-doering
Active Contributor
0 Kudos

If I unsterstand you correctly the stopping of the Job in ABAP after "RAISE_EXCEPTION" does not allways work. As this entirely happens on ABAP side, isn't this more a question for the ABAP forum?

Former Member
0 Kudos

Thank you. I post in ABAP Programming.