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

TRFC Function Module

Former Member
0 Likes
1,211

can anyone tell me when we have to use "TRFC_SET_QUEUE_NAME' function module..... And what are th parameters we need to pass to the FM....Pls hel me out...

2 REPLIES 2
Read only

Former Member
0 Likes
781

Hi,

Here is a sample code.

REPORT ... .

...

DATA Q_NAME LIKE TRFCQOUT-QNAME .

 

CALL FUNCTION ' TRFC_QUEUE_INITIALISE '.

CALL FUNCTION 'RFC_FUNCTION_1'           " tRFC call -> NO QUEUE

          IN BACKGROUND TASK

          DESTINATION 'DEST'

          EXPORTING ...

          TABLES ... .

...

Q_NAME = 'BASIS_TEST_Q1'.

CALL FUNCTION ' TRFC_SET_QUEUE_NAME '

          EXPORTING

                  QNAME = Q_NAME.

CALL FUNCTION 'RFC_FUNCTION_2'           " qRFC call -> Q1

          IN BACKGROUND TASK

          DESTINATION 'DEST'

          EXPORTING ...

          TABLES ... .

...

 

CALL FUNCTION 'RFC_FUNCTION_N-1'          "tRFC call -> NO QUEUE

          IN BACKGROUND TASK

          DESTINATION 'DEST'

          EXPORTING ...

          TABLES ... .

Q_NAME = 'BASIS_TEST_QM'.

CALL FUNCTION ' TRFC_SET_QUEUE_NAME '

          EXPORTING

                  QNAME = Q_NAME.

CALL FUNCTION 'RFC_FUNCTION_N'           " qRFC call -> QM

          IN BACKGROUND TASK

          DESTINATION 'DEST'

          EXPORTING ...

          TABLES ... .

...

COMMIT WORK.

Regards

Aneesh.

Read only

0 Likes
781

Helpfull answer but i wan to know why the function module "TRFC_SET_QUEUE_NAME" is used ??