Sunday 28 December 2014

qRFC with Outbound Queue & Inbound Queue between two different SAP systems - One LUW for Multiple QUEUE Calls

----------------------------------------------------------------------------------------------------------------------------------------
The below post shows how to club multiple QUEUE ( one queue having multiple FM calls) into a single LUW. After calling the TWO queues with their respective FMs , at the end Commit work happens so every thing is put into a single LUW. Execute the program.
------------------------------------------------------------------------------------------------------------------------------------
REPORT  zoutqueue_inqueue.
DATA ls TYPE scarr.
*** first queue *****
CALL FUNCTION 'TRFC_SET_QIN_PROPERTIES'
  EXPORTING
    qout_name = 'OUT_QUEUE1'
    qin_name  = 'INN_QUEUE1'.
clear ls.
ls-carrid = 'XX'.
CALL FUNCTION 'ZCREATE_FLIGHT_REC'
 IN BACKGROUND TASK
 "AS SEPARATE UNIT " creates a separate luw
 DESTINATION 'SRC_TO_TGT'
EXPORTING
  is = ls.

CALL FUNCTION 'TRFC_SET_QIN_PROPERTIES'
  EXPORTING
    qout_name = 'OUT_QUEUE1'
    qin_name  = 'INN_QUEUE1'.

CLEAR ls.
ls-carrid = 'XX'.
ls-carrname = 'XX AIRLINE'.
CALL FUNCTION 'ZUPDATE_FLIGHT_REC'
 IN BACKGROUND TASK
 "AS SEPARATE UNIT " creates a separate luw
 DESTINATION 'SRC_TO_TGT'
EXPORTING
  is = ls.

*** Second queue ***
CALL FUNCTION 'TRFC_SET_QIN_PROPERTIES'
  EXPORTING
    qout_name = 'OUT_QUEUE2'
    qin_name  = 'INN_QUEUE2'.
clear ls.
ls-carrid = 'YY'.
CALL FUNCTION 'ZCREATE_FLIGHT_REC'
 IN BACKGROUND TASK
 "AS SEPARATE UNIT " creates a separate luw
 DESTINATION 'SRC_TO_TGT'
EXPORTING
  is = ls.

CALL FUNCTION 'TRFC_SET_QIN_PROPERTIES'
  EXPORTING
    qout_name = 'OUT_QUEUE2'
    qin_name  = 'INN_QUEUE2'.

CLEAR ls.
ls-carrid = 'YY'.
ls-carrname = 'YY AIRLINE'.
CALL FUNCTION 'ZUPDATE_FLIGHT_REC'
 IN BACKGROUND TASK
 "AS SEPARATE UNIT " creates a separate luw
 DESTINATION 'SRC_TO_TGT'
EXPORTING
  is = ls.

COMMIT WORK.
WRITE :/ 'Check outbound queue in source system in Tx- SMQS'.
WRITE :/ 'Check Inbound queue in target system in Tx- SMQR'.

-----------------------------------------------------------------------------------------------------------------------------
Step1. Source System: Tx- SMQR( out bound scheduler). Select the line and click on the qRFC Monitor button.

Step2. Source System: Select both the out bound queues and double click on it.

Step3. Source System: Double click on it.

Step4. Source System: So here we have a single TID for all the FM calls that  belongs to two different Queues.  process the out bound queue.

Step5. Target System: Tx- SMQS( Inbound Scheduler): Select the line and click on the qRFC monitor button.


Step6. Target System: Select both the inbound queues. Double click on it.

Step7. Target System: Double click on the queue name.

Step8. Target System:: So here we have a single technical ID for all the FM calls that belongs to two different queues.


 See the next post how each queue FM calls are assigned to separated LUWs
----------------------------------------------------------------------------------------------------------------------------------------


No comments:

Comments system

Disqus Shortname