Application Development 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: 

TRFC Function Module

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

0 Kudos

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