Skip to Content

Trigger a custom program when a new entry is inserted in Standard SAP table - TRFCQIN

Jan 15 at 10:38 AM


avatar image


I have a requirement that ,

Whenever a new entry is inserted in TRFCQIN with a particular error message - say "XYZ".

then a custom program should be executed.

Is there any optimum way to do this ?

I had thought of scheduling a background job every 5 minutes to monitor the table TRFCQIN for that error message.

Any better way to do this?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Mike Pokraka Jan 15 at 11:08 AM

This is a core system table with a potential for overall system performance impact, entries might only exist there for a second or even less, so your job idea is a non-starter. I would also avoid any of the other means for the same reasons.

I would look at solving your issue further upstream - what problem are you trying to solve? If it's specific entries you're monitoring, then it will be specific code/functions that will create those entries. Go there for your solution.

Show 5 Share
10 |10000 characters needed characters left characters exceeded


Thanks for the reply.

I am looking for only failed queues and the error which i am referring is not cleared until some processing is done manually.

So the record for which i am looking will exist.


We want to execute a custom program when the Inbound queue fails with a particular error message.

This program will resolve the error for that queue ,otherwise this is done manually.


I'm not sure (and don't have the time to check) if you're using tRFC or qRFC, but it sounds to me like you're better off using qRFC.

Although there is a lot of overlap, tRFC is more designed for keeping transactional consistency, qRFC is better at managing dependencies and restartability. It also has a good SAP-supported API to do the sort of stuff your'e after, see online help over here.

If you want to stick with tRFC, I don't see why a regular SAP job won't work in your scenario. If it's using qRFC then implement it using the API rather than tables.


Hi Mike,


The qRFC API also uses a select query over the table TRFCQIN; so it wont make a difference.

and The job will work but i am looking for a more optimum way of doing it.


Well yes, most APIs will access the underlying tables. But there are many benefits to using APIs, not least of which are performance, SAP-supported, change management, stability.

As I suggested in my earlier answer, I would definitely recommend against using any table-level push mechanisms. RFC can be a tricky area and things can go horribly wrong very easily when you start fiddling with the innards. Trust me, I've been there.


Thanks Mike.

Will keep that in mind.