SAP TH_TEST_RFC Function Module for









TH_TEST_RFC is a standard th test rfc SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for th test rfc FM, simply by entering the name TH_TEST_RFC into the relevant SAP transaction such as SE37 or SE38.

Function Group: THF2
Program Name: SAPLTHF2
Main Program: SAPLTHF2
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function TH_TEST_RFC pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'TH_TEST_RFC'"
EXPORTING
* DUMP = ' ' "
* SEC_LOOPS = '2000' "
* ENQ_BASE = 0 "
* ENDLESS = 0 "Loops, Current Loop Pass
* SYNC_VB = ' ' "
* LOCK = ' ' "
* KEEP_LUW = ' ' "
* DUR1 = 0 "
* DUR2 = 0 "
* I_DEPTH = 0 "
* NO_FB = '1' "
* NO_LOOPS = '1' "
* OPCODE = 'U' "Op. Code
* STOP = ' ' "
* TEXT_IN = 'Standardtext' "
* ERR_MSG = ' ' "
* SEC_DEST = 'NONE' "
* SEC_OPCODE = 'U' "

IMPORTING
TEXT_OUT = "

TABLES
* TABLE = "
* BIG_TABLE = "

EXCEPTIONS
DUBLICATE_KEY = 1 ENQUEUE_ERROR = 2 NOT_IN_SAME_SYSTEM = 3
.



IMPORTING Parameters details for TH_TEST_RFC

DUMP -

Data type: VBMOD-VBMODE
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

SEC_LOOPS -

Data type: VBERROR-VARMSGVAL
Default: '2000'
Optional: Yes
Call by Reference: No ( called with pass by value option)

ENQ_BASE -

Data type: SY-INDEX
Optional: Yes
Call by Reference: No ( called with pass by value option)

ENDLESS - Loops, Current Loop Pass

Data type: SY-INDEX
Optional: Yes
Call by Reference: No ( called with pass by value option)

SYNC_VB -

Data type: CHAR1
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

LOCK -

Data type: CHAR1
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

KEEP_LUW -

Data type: CHAR1
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

DUR1 -

Data type: I
Optional: Yes
Call by Reference: No ( called with pass by value option)

DUR2 -

Data type: I
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_DEPTH -

Data type: I
Optional: Yes
Call by Reference: No ( called with pass by value option)

NO_FB -

Data type: VBERROR-VARMSGVAL
Default: '1'
Optional: Yes
Call by Reference: No ( called with pass by value option)

NO_LOOPS -

Data type: VBERROR-VARMSGVAL
Default: '1'
Optional: Yes
Call by Reference: No ( called with pass by value option)

OPCODE - Op. Code

Data type: VBMOD-VBMODE
Default: 'U'
Optional: Yes
Call by Reference: No ( called with pass by value option)

STOP -

Data type: VBMOD-VBMODE
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

TEXT_IN -

Data type: VBERROR-VARMSGVAL
Default: 'Standardtext'
Optional: Yes
Call by Reference: No ( called with pass by value option)

ERR_MSG -

Data type: VBMOD-VBMODE
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

SEC_DEST -

Data type: MSXXLIST-NAME
Default: 'NONE'
Optional: Yes
Call by Reference: No ( called with pass by value option)

SEC_OPCODE -

Data type: VBMOD-VBMODE
Default: 'U'
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for TH_TEST_RFC

TEXT_OUT -

Data type: VBERROR-VARMSGVAL
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for TH_TEST_RFC

TABLE -

Data type: SM04DIC
Optional: Yes
Call by Reference: No ( called with pass by value option)

BIG_TABLE -

Data type: GWY_LINES
Optional: Yes
Call by Reference: Yes

EXCEPTIONS details

DUBLICATE_KEY -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

ENQUEUE_ERROR -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NOT_IN_SAME_SYSTEM -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for TH_TEST_RFC Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.

DATA:
lv_dump  TYPE VBMOD-VBMODE, "   ' '
lt_table  TYPE STANDARD TABLE OF SM04DIC, "   
lv_text_out  TYPE VBERROR-VARMSGVAL, "   
lv_dublicate_key  TYPE VBERROR, "   
lv_sec_loops  TYPE VBERROR-VARMSGVAL, "   '2000'
lv_enq_base  TYPE SY-INDEX, "   0
lv_endless  TYPE SY-INDEX, "   0
lv_sync_vb  TYPE CHAR1, "   ' '
lv_lock  TYPE CHAR1, "   ' '
lv_keep_luw  TYPE CHAR1, "   ' '
lv_dur1  TYPE I, "   0
lv_dur2  TYPE I, "   0
lv_i_depth  TYPE I, "   0
lv_no_fb  TYPE VBERROR-VARMSGVAL, "   '1'
lt_big_table  TYPE STANDARD TABLE OF GWY_LINES, "   
lv_enqueue_error  TYPE GWY_LINES, "   
lv_no_loops  TYPE VBERROR-VARMSGVAL, "   '1'
lv_not_in_same_system  TYPE VBERROR, "   
lv_opcode  TYPE VBMOD-VBMODE, "   'U'
lv_stop  TYPE VBMOD-VBMODE, "   ' '
lv_text_in  TYPE VBERROR-VARMSGVAL, "   'Standardtext'
lv_err_msg  TYPE VBMOD-VBMODE, "   ' '
lv_sec_dest  TYPE MSXXLIST-NAME, "   'NONE'
lv_sec_opcode  TYPE VBMOD-VBMODE. "   'U'

  CALL FUNCTION 'TH_TEST_RFC'  "
    EXPORTING
         DUMP = lv_dump
         SEC_LOOPS = lv_sec_loops
         ENQ_BASE = lv_enq_base
         ENDLESS = lv_endless
         SYNC_VB = lv_sync_vb
         LOCK = lv_lock
         KEEP_LUW = lv_keep_luw
         DUR1 = lv_dur1
         DUR2 = lv_dur2
         I_DEPTH = lv_i_depth
         NO_FB = lv_no_fb
         NO_LOOPS = lv_no_loops
         OPCODE = lv_opcode
         STOP = lv_stop
         TEXT_IN = lv_text_in
         ERR_MSG = lv_err_msg
         SEC_DEST = lv_sec_dest
         SEC_OPCODE = lv_sec_opcode
    IMPORTING
         TEXT_OUT = lv_text_out
    TABLES
         TABLE = lt_table
         BIG_TABLE = lt_big_table
    EXCEPTIONS
        DUBLICATE_KEY = 1
        ENQUEUE_ERROR = 2
        NOT_IN_SAME_SYSTEM = 3
. " TH_TEST_RFC




ABAP code using 7.40 inline data declarations to call FM TH_TEST_RFC

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

"SELECT single VBMODE FROM VBMOD INTO @DATA(ld_dump).
DATA(ld_dump) = ' '.
 
 
"SELECT single VARMSGVAL FROM VBERROR INTO @DATA(ld_text_out).
 
 
"SELECT single VARMSGVAL FROM VBERROR INTO @DATA(ld_sec_loops).
DATA(ld_sec_loops) = '2000'.
 
"SELECT single INDEX FROM SY INTO @DATA(ld_enq_base).
 
"SELECT single INDEX FROM SY INTO @DATA(ld_endless).
 
DATA(ld_sync_vb) = ' '.
 
DATA(ld_lock) = ' '.
 
DATA(ld_keep_luw) = ' '.
 
 
 
 
"SELECT single VARMSGVAL FROM VBERROR INTO @DATA(ld_no_fb).
DATA(ld_no_fb) = '1'.
 
 
 
"SELECT single VARMSGVAL FROM VBERROR INTO @DATA(ld_no_loops).
DATA(ld_no_loops) = '1'.
 
 
"SELECT single VBMODE FROM VBMOD INTO @DATA(ld_opcode).
DATA(ld_opcode) = 'U'.
 
"SELECT single VBMODE FROM VBMOD INTO @DATA(ld_stop).
DATA(ld_stop) = ' '.
 
"SELECT single VARMSGVAL FROM VBERROR INTO @DATA(ld_text_in).
DATA(ld_text_in) = 'Standardtext'.
 
"SELECT single VBMODE FROM VBMOD INTO @DATA(ld_err_msg).
DATA(ld_err_msg) = ' '.
 
"SELECT single NAME FROM MSXXLIST INTO @DATA(ld_sec_dest).
DATA(ld_sec_dest) = 'NONE'.
 
"SELECT single VBMODE FROM VBMOD INTO @DATA(ld_sec_opcode).
DATA(ld_sec_opcode) = 'U'.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!