SAP HRIQ_TESTRESULTS_CREATE Function Module for RFC: Create External Test Results









HRIQ_TESTRESULTS_CREATE is a standard hriq testresults create SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for RFC: Create External Test Results processing and below is the pattern details for this FM, 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 hriq testresults create FM, simply by entering the name HRIQ_TESTRESULTS_CREATE into the relevant SAP transaction such as SE37 or SE38.

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



Function HRIQ_TESTRESULTS_CREATE 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 'HRIQ_TESTRESULTS_CREATE'"RFC: Create External Test Results
EXPORTING
STUDENT = "Student Object
TESTRESULTS_HEADER = "External Test Results (Header Data)
* HEADER_ONLY = ' ' "
* TESTRUN = ' ' "Switch to Simulation Mode for Write BAPIs

IMPORTING
TEST_GUID = "
RETURN_CODE = "

TABLES
* TESTRESULTS_SUBSCORES = "Subtests (External Test Results)
* RETURN = "Return Parameter(s)
.



IMPORTING Parameters details for HRIQ_TESTRESULTS_CREATE

STUDENT - Student Object

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

TESTRESULTS_HEADER - External Test Results (Header Data)

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

HEADER_ONLY -

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

TESTRUN - Switch to Simulation Mode for Write BAPIs

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

EXPORTING Parameters details for HRIQ_TESTRESULTS_CREATE

TEST_GUID -

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

RETURN_CODE -

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

TABLES Parameters details for HRIQ_TESTRESULTS_CREATE

TESTRESULTS_SUBSCORES - Subtests (External Test Results)

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

RETURN - Return Parameter(s)

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

Copy and paste ABAP code example for HRIQ_TESTRESULTS_CREATE 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_student  TYPE HROBJECT, "   
lv_test_guid  TYPE PIQTRTEST_GUID, "   
lt_testresults_subscores  TYPE STANDARD TABLE OF PIQTRSUBTEST_EXT, "   
lt_return  TYPE STANDARD TABLE OF BAPIRET2, "   
lv_return_code  TYPE SY-SUBRC, "   
lv_testresults_header  TYPE PIQTRTESTRESULTS_EXT, "   
lv_header_only  TYPE PIQFLAG, "   ' '
lv_testrun  TYPE TESTRUN. "   ' '

  CALL FUNCTION 'HRIQ_TESTRESULTS_CREATE'  "RFC: Create External Test Results
    EXPORTING
         STUDENT = lv_student
         TESTRESULTS_HEADER = lv_testresults_header
         HEADER_ONLY = lv_header_only
         TESTRUN = lv_testrun
    IMPORTING
         TEST_GUID = lv_test_guid
         RETURN_CODE = lv_return_code
    TABLES
         TESTRESULTS_SUBSCORES = lt_testresults_subscores
         RETURN = lt_return
. " HRIQ_TESTRESULTS_CREATE




ABAP code using 7.40 inline data declarations to call FM HRIQ_TESTRESULTS_CREATE

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 SUBRC FROM SY INTO @DATA(ld_return_code).
 
 
DATA(ld_header_only) = ' '.
 
DATA(ld_testrun) = ' '.
 


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!