SAP HR_CREATE_QUERY_FOR_INFO_GET Function Module for
HR_CREATE_QUERY_FOR_INFO_GET is a standard hr create query for info get 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 hr create query for info get FM, simply by entering the name HR_CREATE_QUERY_FOR_INFO_GET into the relevant SAP transaction such as SE37 or SE38.
Function Group: HRBAS00INFOGET
Program Name: SAPLHRBAS00INFOGET
Main Program:
Appliation area: P
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function HR_CREATE_QUERY_FOR_INFO_GET 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 'HR_CREATE_QUERY_FOR_INFO_GET'".
EXPORTING
* WORK' ' = 'G' "
FUNCAREA = "
* SELID = "
IMPORTING
QUERY = "
TABLES
* AQ_OUTPUT_FIELDS = "
* AQ_SORT_FIELDS = "
* OUTPUT_FIELDS = "
* SORT_FIELDS = "
* TABLECONDITIONS = "
* COMBINECONDITIONS = "
EXCEPTIONS
NO_FUNCAREA = 1 ID_FIELD_MISSING_IN_FUNCAREA = 10 FUNCAREA_NOT_SUPPORTED = 11 GENERATION_CANCELLED = 12 INTERNAL_ERROR = 13 UNKNOWN_ERROR = 14 MISSING_FIELDS = 2 ILLEGAL_WORKSPACE = 3 ILLEGAL_FIELD = 4 QUERY_LOCKED = 5 DUPLICATE_OUTPUT_FIELDS_DEF = 6 DUPLICATE_SELECTION_DEF = 7 DUPLICATE_SORT_FIELDS_DEF = 8 FORBIDDEN_OUTPUT_FIELD = 9
IMPORTING Parameters details for HR_CREATE_QUERY_FOR_INFO_GET
WORKSPACE -
Data type: AQADEF-WSIDDefault: 'G'
Optional: Yes
Call by Reference: No ( called with pass by value option)
FUNCAREA -
Data type: AQADEF-SGNAMEOptional: No
Call by Reference: No ( called with pass by value option)
SELID -
Data type: HRSEL_IDS-SELIDOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for HR_CREATE_QUERY_FOR_INFO_GET
QUERY -
Data type: AQADEF-QUNAMEOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for HR_CREATE_QUERY_FOR_INFO_GET
AQ_OUTPUT_FIELDS -
Data type: RSAQFNAMEOptional: Yes
Call by Reference: No ( called with pass by value option)
AQ_SORT_FIELDS -
Data type: RSAQFSNAMEOptional: Yes
Call by Reference: Yes
OUTPUT_FIELDS -
Data type: HRFIELD_SPECIFICATIONOptional: Yes
Call by Reference: Yes
SORT_FIELDS -
Data type: HRSORTFIELD_SPECIFICATIONOptional: Yes
Call by Reference: Yes
TABLECONDITIONS -
Data type: HRTABLECONDITIONOptional: Yes
Call by Reference: Yes
COMBINECONDITIONS -
Data type: HRCOMBINECONDITIONSOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
NO_FUNCAREA -
Data type:Optional: No
Call by Reference: Yes
ID_FIELD_MISSING_IN_FUNCAREA -
Data type:Optional: No
Call by Reference: Yes
FUNCAREA_NOT_SUPPORTED -
Data type:Optional: No
Call by Reference: Yes
GENERATION_CANCELLED -
Data type:Optional: No
Call by Reference: Yes
INTERNAL_ERROR -
Data type:Optional: No
Call by Reference: Yes
UNKNOWN_ERROR -
Data type:Optional: No
Call by Reference: Yes
MISSING_FIELDS -
Data type:Optional: No
Call by Reference: Yes
ILLEGAL_WORKSPACE -
Data type:Optional: No
Call by Reference: Yes
ILLEGAL_FIELD -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
QUERY_LOCKED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
DUPLICATE_OUTPUT_FIELDS_DEF -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
DUPLICATE_SELECTION_DEF -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
DUPLICATE_SORT_FIELDS_DEF -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
FORBIDDEN_OUTPUT_FIELD -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for HR_CREATE_QUERY_FOR_INFO_GET 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_query | TYPE AQADEF-QUNAME, " | |||
| lv_workspace | TYPE AQADEF-WSID, " 'G' | |||
| lv_no_funcarea | TYPE AQADEF, " | |||
| lt_aq_output_fields | TYPE STANDARD TABLE OF RSAQFNAME, " | |||
| lv_id_field_missing_in_funcarea | TYPE RSAQFNAME, " | |||
| lv_funcarea_not_supported | TYPE RSAQFNAME, " | |||
| lv_generation_cancelled | TYPE RSAQFNAME, " | |||
| lv_internal_error | TYPE RSAQFNAME, " | |||
| lv_unknown_error | TYPE RSAQFNAME, " | |||
| lv_funcarea | TYPE AQADEF-SGNAME, " | |||
| lt_aq_sort_fields | TYPE STANDARD TABLE OF RSAQFSNAME, " | |||
| lv_missing_fields | TYPE RSAQFSNAME, " | |||
| lv_selid | TYPE HRSEL_IDS-SELID, " | |||
| lt_output_fields | TYPE STANDARD TABLE OF HRFIELD_SPECIFICATION, " | |||
| lv_illegal_workspace | TYPE HRFIELD_SPECIFICATION, " | |||
| lt_sort_fields | TYPE STANDARD TABLE OF HRSORTFIELD_SPECIFICATION, " | |||
| lv_illegal_field | TYPE HRSORTFIELD_SPECIFICATION, " | |||
| lv_query_locked | TYPE HRSORTFIELD_SPECIFICATION, " | |||
| lt_tableconditions | TYPE STANDARD TABLE OF HRTABLECONDITION, " | |||
| lt_combineconditions | TYPE STANDARD TABLE OF HRCOMBINECONDITIONS, " | |||
| lv_duplicate_output_fields_def | TYPE HRCOMBINECONDITIONS, " | |||
| lv_duplicate_selection_def | TYPE HRCOMBINECONDITIONS, " | |||
| lv_duplicate_sort_fields_def | TYPE HRCOMBINECONDITIONS, " | |||
| lv_forbidden_output_field | TYPE HRCOMBINECONDITIONS. " |
|   CALL FUNCTION 'HR_CREATE_QUERY_FOR_INFO_GET' " |
| EXPORTING | ||
| WORKSPACE | = lv_workspace | |
| FUNCAREA | = lv_funcarea | |
| SELID | = lv_selid | |
| IMPORTING | ||
| QUERY | = lv_query | |
| TABLES | ||
| AQ_OUTPUT_FIELDS | = lt_aq_output_fields | |
| AQ_SORT_FIELDS | = lt_aq_sort_fields | |
| OUTPUT_FIELDS | = lt_output_fields | |
| SORT_FIELDS | = lt_sort_fields | |
| TABLECONDITIONS | = lt_tableconditions | |
| COMBINECONDITIONS | = lt_combineconditions | |
| EXCEPTIONS | ||
| NO_FUNCAREA = 1 | ||
| ID_FIELD_MISSING_IN_FUNCAREA = 10 | ||
| FUNCAREA_NOT_SUPPORTED = 11 | ||
| GENERATION_CANCELLED = 12 | ||
| INTERNAL_ERROR = 13 | ||
| UNKNOWN_ERROR = 14 | ||
| MISSING_FIELDS = 2 | ||
| ILLEGAL_WORKSPACE = 3 | ||
| ILLEGAL_FIELD = 4 | ||
| QUERY_LOCKED = 5 | ||
| DUPLICATE_OUTPUT_FIELDS_DEF = 6 | ||
| DUPLICATE_SELECTION_DEF = 7 | ||
| DUPLICATE_SORT_FIELDS_DEF = 8 | ||
| FORBIDDEN_OUTPUT_FIELD = 9 | ||
| . " HR_CREATE_QUERY_FOR_INFO_GET | ||
ABAP code using 7.40 inline data declarations to call FM HR_CREATE_QUERY_FOR_INFO_GET
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 QUNAME FROM AQADEF INTO @DATA(ld_query). | ||||
| "SELECT single WSID FROM AQADEF INTO @DATA(ld_workspace). | ||||
| DATA(ld_workspace) | = 'G'. | |||
| "SELECT single SGNAME FROM AQADEF INTO @DATA(ld_funcarea). | ||||
| "SELECT single SELID FROM HRSEL_IDS INTO @DATA(ld_selid). | ||||
Search for further information about these or an SAP related objects