SAP HRIQ_PROGRAM_STRUCTURE_GET Function Module for Determine Components (CG and SM) of Program of Study
HRIQ_PROGRAM_STRUCTURE_GET is a standard hriq program structure get SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Determine Components (CG and SM) of Program of Study 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 program structure get FM, simply by entering the name HRIQ_PROGRAM_STRUCTURE_GET into the relevant SAP transaction such as SE37 or SE38.
Function Group: HRPIQ00ACPROG
Program Name: SAPLHRPIQ00ACPROG
Main Program: SAPLHRPIQ00ACPROG
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function HRIQ_PROGRAM_STRUCTURE_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 'HRIQ_PROGRAM_STRUCTURE_GET'"Determine Components (CG and SM) of Program of Study.
EXPORTING
* IV_PLVAR = "Plan Version
* IV_DISCIPLINE = ' ' "Discipline
IV_SCID = "Object ID
* IV_STAGE_MIN = "First Possible Stage of a Program (Relative)
* IV_STAGE_MAX = "Stage
* IF_MANDATORY_ONLY = ' ' "General Indicator
* IV_YEAR = "Academic Year
* IV_PERIOD = "Academic Session
* IV_KEYDA = "DATS Field Type
* IV_SEVERITY = '0000' "Academic Level of Module
IMPORTING
ET_OBJECTS = "Table for PIQ_OBJSTAGE
EXCEPTIONS
PLVAR_NOT_FOUND = 1 EVALUATION_PATH_NOT_BUILT = 2 WRONG_IMPORT_PARAMETERS = 3 NO_CALENDAR_ENTRY_FOUND = 4
IMPORTING Parameters details for HRIQ_PROGRAM_STRUCTURE_GET
IV_PLVAR - Plan Version
Data type: HROBJECT-PLVAROptional: Yes
Call by Reference: No ( called with pass by value option)
IV_DISCIPLINE - Discipline
Data type: PIQSMDISZIPDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_SCID - Object ID
Data type: HROBJECT-OBJIDOptional: No
Call by Reference: No ( called with pass by value option)
IV_STAGE_MIN - First Possible Stage of a Program (Relative)
Data type: PIQSTGBEGOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_STAGE_MAX - Stage
Data type: PIQSTGFINOptional: Yes
Call by Reference: No ( called with pass by value option)
IF_MANDATORY_ONLY - General Indicator
Data type: FLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_YEAR - Academic Year
Data type: PIQPERYROptional: Yes
Call by Reference: No ( called with pass by value option)
IV_PERIOD - Academic Session
Data type: PIQPERIDOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_KEYDA - DATS Field Type
Data type: DATSOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_SEVERITY - Academic Level of Module
Data type: PIQSMSEVRITYDefault: '0000'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for HRIQ_PROGRAM_STRUCTURE_GET
ET_OBJECTS - Table for PIQ_OBJSTAGE
Data type: PIQ_OBJSTAGE_TOptional: No
Call by Reference: Yes
EXCEPTIONS details
PLVAR_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
EVALUATION_PATH_NOT_BUILT -
Data type:Optional: No
Call by Reference: Yes
WRONG_IMPORT_PARAMETERS -
Data type:Optional: No
Call by Reference: Yes
NO_CALENDAR_ENTRY_FOUND -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for HRIQ_PROGRAM_STRUCTURE_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_iv_plvar | TYPE HROBJECT-PLVAR, " | |||
| lv_et_objects | TYPE PIQ_OBJSTAGE_T, " | |||
| lv_plvar_not_found | TYPE PIQ_OBJSTAGE_T, " | |||
| lv_iv_discipline | TYPE PIQSMDISZIP, " SPACE | |||
| lv_iv_scid | TYPE HROBJECT-OBJID, " | |||
| lv_evaluation_path_not_built | TYPE HROBJECT, " | |||
| lv_iv_stage_min | TYPE PIQSTGBEG, " | |||
| lv_wrong_import_parameters | TYPE PIQSTGBEG, " | |||
| lv_iv_stage_max | TYPE PIQSTGFIN, " | |||
| lv_no_calendar_entry_found | TYPE PIQSTGFIN, " | |||
| lv_if_mandatory_only | TYPE FLAG, " SPACE | |||
| lv_iv_year | TYPE PIQPERYR, " | |||
| lv_iv_period | TYPE PIQPERID, " | |||
| lv_iv_keyda | TYPE DATS, " | |||
| lv_iv_severity | TYPE PIQSMSEVRITY. " '0000' |
|   CALL FUNCTION 'HRIQ_PROGRAM_STRUCTURE_GET' "Determine Components (CG and SM) of Program of Study |
| EXPORTING | ||
| IV_PLVAR | = lv_iv_plvar | |
| IV_DISCIPLINE | = lv_iv_discipline | |
| IV_SCID | = lv_iv_scid | |
| IV_STAGE_MIN | = lv_iv_stage_min | |
| IV_STAGE_MAX | = lv_iv_stage_max | |
| IF_MANDATORY_ONLY | = lv_if_mandatory_only | |
| IV_YEAR | = lv_iv_year | |
| IV_PERIOD | = lv_iv_period | |
| IV_KEYDA | = lv_iv_keyda | |
| IV_SEVERITY | = lv_iv_severity | |
| IMPORTING | ||
| ET_OBJECTS | = lv_et_objects | |
| EXCEPTIONS | ||
| PLVAR_NOT_FOUND = 1 | ||
| EVALUATION_PATH_NOT_BUILT = 2 | ||
| WRONG_IMPORT_PARAMETERS = 3 | ||
| NO_CALENDAR_ENTRY_FOUND = 4 | ||
| . " HRIQ_PROGRAM_STRUCTURE_GET | ||
ABAP code using 7.40 inline data declarations to call FM HRIQ_PROGRAM_STRUCTURE_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 PLVAR FROM HROBJECT INTO @DATA(ld_iv_plvar). | ||||
| DATA(ld_iv_discipline) | = ' '. | |||
| "SELECT single OBJID FROM HROBJECT INTO @DATA(ld_iv_scid). | ||||
| DATA(ld_if_mandatory_only) | = ' '. | |||
| DATA(ld_iv_severity) | = '0000'. | |||
Search for further information about these or an SAP related objects