Application Development and Automation 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: 
Read only

How to receive result from BGRFC enabled function module ?

KumarVishal
Participant
0 Likes
728

SPAN { font-family: "Courier New"; font-size: 10pt; color: #000000; background: #FFFFFF; } .L0S31 { font-style: italic; color: #808080; } .L0S33 { color: #4DA619; } .L0S52 { color: #0000FF; } .L0S55 { color: #800080; } .L0S70 { color: #808080; }

DATA: my_destination TYPE REF TO if_bgrfc_destination_outbound,
my_unit TYPE REF TO if_qrfc_unit_outbound,
my_unit_2 TYPE REF TO if_qrfc_unit_outbound,
my_unit_3 TYPE REF TO if_qrfc_unit_outbound,
dest_name TYPE bgrfc_dest_name_outbound,
queue_name TYPE qrfc_queue_name,
queue_names TYPE qrfc_queue_name_tab.


TRY.
dest_name = 'VK_OUTBOUND_DEST'.

my_destination = cl_bgrfc_destination_outbound=>create( dest_name ).

CATCH cx_bgrfc_invalid_destination.

MESSAGE e102(bc).
ENDTRY.

my_unit = my_destination->create_qrfc_unit( ).

TRY.
* Processing Two Function Modules in ONE single LUW.
* There are multple queues for the LUW.

* Both the FMs will be executed sequentially in the same LUW(multiple queues)
CALL FUNCTION 'ZTEST_BGRFC' IN BACKGROUND UNIT my_unit.

my_unit->add_queue_name_outbound( 'VK_Q1' ).

* Inserting Multiple Queues to achive Parallel Processing.
queue_name = 'VK_Q2'.
INSERT queue_name INTO TABLE queue_names.

So I am calling the Function Module in background which is BGRFC enables. Can someone tell me how to receive the results back from this function module.

0 REPLIES 0