Application Development 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: 

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

Jay_Kamdar
Participant
0 Kudos

Hi,

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?

1 ACCEPTED SOLUTION

pokrakam
Active Contributor

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.

10 REPLIES 10

pokrakam
Active Contributor

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.

0 Kudos

Hello,

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.

Requirement:

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.

pokrakam
Active Contributor
0 Kudos

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.

0 Kudos

Hi Mike,

Thanks.

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.

pokrakam
Active Contributor
0 Kudos

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.

0 Kudos

Thanks Mike.

Will keep that in mind.

Vaishak
Explorer
0 Kudos

Hi Jay,

I have the same requirement... So could you please tell me what solution you implemented and did it impact any performance.

Thank you

Om

Hi Om,

As far as i remember we dropped the idea and created a custom program which would fetch the queues in error from tables TRFCQIN and TRFCQOUT from both ECC and EWM systems and display all the required fields in an editable report in ECC (By fetching the data from EWM via a RFC).

Vaishak
Explorer
0 Kudos

Hi Jay..

Thank you for your response..

I have requirement to trigger a mail if any queue is stuck... Which should be in real-time... Could you please just how this can be done..

Thanks in advance

Om

Hi Om,

The only way I think is possible via a program querying the tables executed via a scheduled job .

But its not the optimum way.

Please read my conversation with Mike in this thread.