The objective of this blog post is to:
- Provide a brief idea about ‘Queue Processing’ in SAP, SAP Tables consisting of Queue status details and various jobs to be scheduled to clear these entries and re-indexing, re-organizing and updating of the statistics of these tables in order to have smooth processing of the messages in the Queues without causing any delays in processing to the Critical Business.
- This Blog will help all those who face issues in the Queues processing in SAP and the way to overcome it. I have searched through many SCN blogs but haven’t come across any consolidated blogs, hence i decided to come up with the one 🙂
This paper is intended for professionals interested in understanding and learning the way Queue processing takes place in both R/3 and PI system and the jobs to be scheduled for smooth processing of these queues without any queue being stuck in the system for more time, which will cause the delay in receiving the critical messages for the various 3rd party systems And for which the message throughput must be very high so that it does not cause any problem in running the business smoothly.
There are two types of LUWs namely qRFC and tRFC. qRFC’s can be monitored through the transaction code SMQ1/SMQ2 and tRFC’s through SM58.
Outbound Message Processing
The outbound message flow if it is through qRFC then it can be monitored through SMQ1 of R/3 system and through SM58 if it is a tRFC of R/3 system. After this step, the message reaches PI system and this can be monitored through the transaction SMQ2 in PI System, once the message has been processed from SMQ2 then it follows the pipeline steps and gets processed by PI system to 3rd Party system.
Inbound Message Processing
The inbound message flow if it is through qRFC then it can be monitored through SMQ of PI system and through SM58 if it is a tRFC of PI system. After this step, the message reaches R/3 system and this can be monitored through the transaction SMQ2 in R/3 System, once the message has been processed from SMQ2 then the IDoc will be posted to SAP.
SAP Tables consisting of Queue Status
ARFCRSTATE and ARFCSSTATE Tables
ARFCRSTATE consists of the statuses of Asynchronous RFC (ARFC) calls on the Receiver side, while that of ARFCSSTATE consists of ARF Calls on Sender side. There are different statuses updated based on the queue processing namely –
The related LUW is completely executed in the target system. The system waits for an internal tRFC/qRFC confirmation from the sending system before this entry is deleted.
The corresponding application has processed this LUW in parts and wants this LUW to not be repeated in the case of subsequent network or communication errors
During a LUW execution the application has prompted the tRFC/qRFC Manager to set status HOLD. If the LUW execution has already been completed but this application has not yet signaled the logical LUW end and if the tRFC/qRFC-internal confirmation from the sending system has been received, then this LUW receives status WCONFIRM.If the respective application informs the tRFC/qRFC Manager about the logical LUW end, then this entry is deleted
And both the above mentioned tables consists of the table entries for qRFCs
tRFCQOUT and tRFCQIN Tables
tRFCQOUT consists of the details of the tRFC queue description and it consists of queue description of data related to BW and it stores the data about the outbound queue.
tRFCQIN consists of the details of the tRFC queue description and it consists of queue description of data related to BW and it stores the data about the inbound queue.
Jobs to be scheduled in both R/3 and PI System
a. Image showing entries processing very slowly in the SM58 tRFC queue of R/3 System
b. Queue stuck in SMQ2 of PI System
In order to avoid the above mentioned problems we need to schedule the jobs mentioned below to have smooth processing in the Queues –
- Batch Job Scheduling for the report RSTRFCEU – This report deletes the confirmed entries from the table ARFCRSTATE. This is being done by selecting those entries where the value of the field arfcstate is either ‘CONFIRMD’ or ‘WCONFIRM’. This table has huge effect on the messages coming in to the R/3 system; hence this batch job needs to be scheduled in R/3 system. And this job needs to be scheduled to run every half an hour. The time-frame has been given just as half an hour because this table fills up very fast which has huge impact on queue processing
ARFCRSTATE Table Entries before scheduling the batch job
ARFCRSTATE Table Entries after scheduling the batch job
- Batch Job Scheduling for the report RSTRFCQD – This report deletes the entries present in the tables ARFCSSTATE, ARFCSDATA and tRFCQOUT using the values in the field qtid.
ARFCSSTATE Table Entries before scheduling the batch job
ARFCSDATA Table Entries before scheduling the batch job
tRFCQOUT Table Entries before scheduling the batch job
ARFCSSTATE Table Entries after scheduling the batch job
ARFCSDATA Table Entries after scheduling the batch job
tRFCQOUT Table Entries after scheduling the batch job
- Re-organizing and updating of statistics for the table IDXRCVPOR Table in PI System – IDXRCVPOR Table stores the details of relation between IDoc number and PI message ID which will be displayed in the transaction of IDX5 of PI system.
Queue processing in SAP systems can be made to run without any delays by Re-indexing and updating the statistics of the tables like ARFCRSTATE, ARFCSSTATE, TRFCQOUT, ARFCSDATA in R/3 system and IDXRCVPOR table in PI system and scheduling batch job for the reports like RSTRFCEU and RSTRFCES to delete the entries from the tables ARFCRSTATE, ARFCSSTATE, TRFCQOUT and ARFCSDATA.