Fila Com QRFC
Fila Com QRFC
Hello Visitors,The blog contents are now available in my new site: https://sapcodes.com/ .
October (32)
September (12)
August (1)
July (18)
June (21)
April (2)
March (7)
February (13)
January (9)
2013 (46)
1 of 18 22/08/2024, 18:49
2012 (14)
Total Pageviews
Step6. Target System: Source code which updates an existing flight code.
Step7. Target System: Create the last FM for the test purpose.
TECHSAP : qRFC with outbound Queue ( no Inbound Queue) in ABAP!!! http://freesapabap.blogspot.com/2014/11/qrfc-with-outbound-queue-n...
Step9. Target System: Sourced code which deletes one flight code.
3 of 18 22/08/2024, 18:49
TECHSAP : qRFC with outbound Queue ( no Inbound Queue) in ABAP!!! http://freesapabap.blogspot.com/2014/11/qrfc-with-outbound-queue-n...
Step11. Calling System: We will use this RFC destination created in Tcode- SM59 for our test
purpose. OD a connection test.
4 of 18 22/08/2024, 18:49
TECHSAP : qRFC with outbound Queue ( no Inbound Queue) in ABAP!!! http://freesapabap.blogspot.com/2014/11/qrfc-with-outbound-queue-n...
Step13. Calling System: Here is the program which prepares a Queue with a particular
name and calls each RFC function modules.
Here for the demo purpose. We will call two RFC FMs in sequential order. One which
creates a flight code and then one more RFC FM which updates the flight code. As we want
to use qRFC technique, then before calling each CREATE & UPDATE RFC FM , we have to
call the FM 'TRFC_SET_QUEUE_NAME' before calling create or update FM.
---------------------------------------------------------------------------------------------------------------------
------------------------
REPORT zqrfc_flight_test.
TYPES: BEGIN OF ty_res,
dest TYPE rfcdest,
tid TYPE arfctid,
xcall TYPE i,
END OF ty_res.
ls-carrid = carr.
IF cr = 'X'.
CALL FUNCTION 'TRFC_SET_QUEUE_NAME' " sett the queue name by calling FM
EXPORTING
qname = 'DEV_TED_QUEUE_FLIGHT' " queue name
EXCEPTIONS
invalid_queue_name = 1
OTHERS = 2.
IF sy-subrc <> 0.
EXIT.
ENDIF.
5 of 18 22/08/2024, 18:49
TECHSAP : qRFC with outbound Queue ( no Inbound Queue) in ABAP!!! http://freesapabap.blogspot.com/2014/11/qrfc-with-outbound-queue-n...
IF up = 'X'.
CALL FUNCTION 'TRFC_SET_QUEUE_NAME' " sett the queue name by calling FM
EXPORTING
qname = 'DEV_TED_QUEUE_FLIGHT'
EXCEPTIONS
invalid_queue_name = 1
OTHERS = 2.
IF sy-subrc <> 0.
EXIT.
ENDIF.
LS-CARRNAME = 'NEW CARRNAME'. " SENDING CARRNAME FIELD AS UPDATE
CALL FUNCTION 'ZRFC_UPDATE_AIRLINE_CODE'
IN BACKGROUND TASK AS SEPARATE UNIT " qRFC counter 2
DESTINATION 'QRFC_DEST_TEST'
EXPORTING
ls = ls.
ENDIF.
IF dl = 'X'.
CALL FUNCTION 'TRFC_SET_QUEUE_NAME' " sett the queue name by calling FM
EXPORTING
qname = 'DEV_TED_QUEUE_FLIGHT'
EXCEPTIONS
invalid_queue_name = 1
OTHERS = 2.
IF sy-subrc <> 0.
EXIT.
ENDIF.
---------------------------------------------------------------------------------------------------------------------
-----------------------
Step14. Calling System: Go to tcode- SMQ1 which shows the outbound queues.
6 of 18 22/08/2024, 18:49
TECHSAP : qRFC with outbound Queue ( no Inbound Queue) in ABAP!!! http://freesapabap.blogspot.com/2014/11/qrfc-with-outbound-queue-n...
Step18. Calling System: Let's register our RFC destination here which is used in our
program. Click on the registration button.
Step19. Calling System: Form the pop up, with F4 option select our RFC destination.
Step21. Calling System: So here our rfc destination is added to the outbound scheduler.
Check that type is R. Which means the RFC destination is registered. When any call
happens from the program with this RFC destination, if its type - R then the system
automatically start processing it.
7 of 18 22/08/2024, 18:49
TECHSAP : qRFC with outbound Queue ( no Inbound Queue) in ABAP!!! http://freesapabap.blogspot.com/2014/11/qrfc-with-outbound-queue-n...
Step22. Calling System: Select our rfc destination by checking the check box from the left
side and click on deregistration button.
8 of 18 22/08/2024, 18:49
TECHSAP : qRFC with outbound Queue ( no Inbound Queue) in ABAP!!! http://freesapabap.blogspot.com/2014/11/qrfc-with-outbound-queue-n...
Step24. Calling System: So the type - U now, which means any call made by using this RFC
destination, the system/the scheduler will not process those automatically unless until the
type is R.
Actually we don't need to register any RFC destination in SMQS transaction. When ever any
call is made from program by using qRFC concept with a rfc destination and when the
subsequent commit work statement is executed in the program, then automatically the
RFC destination is added to this transaction with type R and the scheduler starts processing
it. For our demo process we need to understand how exactly it works, for that reason we
registered the RFC destination and make as type U from R. later we will make it as R to
execute our queue fMs.
Step25. Calling System: Execute the above report. Provide a flight code- ( carr field ) and
choose CR ( create) and UP( update) check box and execute it. Make sure that the debug
point is set in the report program also to under stand the process. Step 13 tells where to
set debug point. Also set debug point in RFC FMs in the target system.
Step26. Calling System: The debugger is triggered here. we are at line 45. when qRFC FM is
called, in the background it creates a transaction ID number which is temporarily stored in
the table. This can be retrieved by using the FM ID_OF_BACKGROUNDTASK and passing the
rfc destination name to it. Here we just need to display it.
Step27. Calling System: Continue the execution in the debugger with F5 or F6 button. as
we have selected the update check box also, it exeucutes this option.
9 of 18 22/08/2024, 18:49
TECHSAP : qRFC with outbound Queue ( no Inbound Queue) in ABAP!!! http://freesapabap.blogspot.com/2014/11/qrfc-with-outbound-queue-n...
Step28. Calling System: we are the point where the two qRFC are called ( create and
update). but the commit work statement has not been triggered yet. double click on
LT_RES internal table in the debugger to see its contents.
Step29. Calling System: Here we have two entries with the transaction id for both the qRFC
calls. Go back (F3).
10 of 18 22/08/2024, 18:49
TECHSAP : qRFC with outbound Queue ( no Inbound Queue) in ABAP!!! http://freesapabap.blogspot.com/2014/11/qrfc-with-outbound-queue-n...
Step31. Calling System: So here we are. Now we have to check what has happened in the
system by the execution of commit work statement.
Step32. Calling System: go to tcode- SMQ1 . previously in our check there was no records
now we have one record. it displays the queue name and rfc destination name. in the
QUEUE Information section, no of queue is 1 and inside that queue there are two FM calls
one for create and one for update.
Step33. Calling System: Double click on the queue name and it will show the two RFC FM
names which will be called in sequence.
11 of 18 22/08/2024, 18:49
TECHSAP : qRFC with outbound Queue ( no Inbound Queue) in ABAP!!! http://freesapabap.blogspot.com/2014/11/qrfc-with-outbound-queue-n...
Step35. Calling System: Go to tcode- SMQS the outbound scheduler. From here also we can
move to the Tcode- SMQ1 as well. Select our destination by selecting the check box from
the left side and click on the QRFC Monitor button.
Step36. Calling System: So here we are again what we observed in SMQ1 tcode. Go back.
Step37. Calling System: Now we have to make ourRFC destination mode as R so that the
scheduler starts executing the queue. Select the check box from left side for the RFC
destination and click on registration button. Here mark some thing , the scheduler status is
inactive as nothing is there to process and also our RFC destination line status is inactive.
Select our destination by selecting the check from from the left side and click on
registration button.
12 of 18 22/08/2024, 18:49
TECHSAP : qRFC with outbound Queue ( no Inbound Queue) in ABAP!!! http://freesapabap.blogspot.com/2014/11/qrfc-with-outbound-queue-n...
Step39. Calling System: So the type is R now and notice the scheduler status is starting
from Inactive. Now the scheduler starts executing the FMs that line in this queue. If the
debug point has been set in the target RFC FMs that would have been triggered.
Step40. Target System: So here the debugger is. Hold here the debugger don't press F8.
13 of 18 22/08/2024, 18:49
TECHSAP : qRFC with outbound Queue ( no Inbound Queue) in ABAP!!! http://freesapabap.blogspot.com/2014/11/qrfc-with-outbound-queue-n...
Step41. Calling System: check the tcode- SMQ1 and here the status is running and also
there are 2 entries out of which first is executing.
Step42. Calling System: Go to tcode- SMQS and scheduler status is waiting and also our
destination status is waiting with action conn 1.
Step43. Target System: Go to the debugger and press F8. So the first create FM finished its
execution.
14 of 18 22/08/2024, 18:49
TECHSAP : qRFC with outbound Queue ( no Inbound Queue) in ABAP!!! http://freesapabap.blogspot.com/2014/11/qrfc-with-outbound-queue-n...
Step44. Target System: So again the scheduler starts executing the second FM in the
queue. Hold the debugger here don't press f8.
Step45. Target System: Check the table entries. So one record has been creates with id ZZ.
Step46. Calling System: Go to Tcode- SMQ1 and check the status and entries. Out of 1
entries first entry has already been executed and the second is running.
15 of 18 22/08/2024, 18:49
TECHSAP : qRFC with outbound Queue ( no Inbound Queue) in ABAP!!! http://freesapabap.blogspot.com/2014/11/qrfc-with-outbound-queue-n...
Step47. Calling System: Go to Tcode- SMQS and check the status as well.
Step48. Target System: Go to the debugger and press F8 to finish the execution.
16 of 18 22/08/2024, 18:49
TECHSAP : qRFC with outbound Queue ( no Inbound Queue) in ABAP!!! http://freesapabap.blogspot.com/2014/11/qrfc-with-outbound-queue-n...
Step49. Target System: check in the table. OS it has been properly updated with carrname
field.
Step51. Calling System: there would be no more queues with our destination.
Step52. Calling System: check tcode- SMQS and the scheduler status is inactive and our rfc
destination line status is also inactive.
---------------------------------------------------------------------------------------------------------------------
--------------------------
17 of 18 22/08/2024, 18:49
TECHSAP : qRFC with outbound Queue ( no Inbound Queue) in ABAP!!! http://freesapabap.blogspot.com/2014/11/qrfc-with-outbound-queue-n...
at 06:28:00
No comments:
Post a Comment
Comments system
Disqus Shortname
18 of 18 22/08/2024, 18:49