SAP HRIQ_PROGRAM_CAPACITY_GET Function Module for CM: Read Capacity for Program of Study
HRIQ_PROGRAM_CAPACITY_GET is a standard hriq program capacity 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 CM: Read Capacity for 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 capacity get FM, simply by entering the name HRIQ_PROGRAM_CAPACITY_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_CAPACITY_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_CAPACITY_GET'"CM: Read Capacity for Program of Study.
EXPORTING
IMP_PLVAR = "Plan Version
IMP_OBJID = "Object ID
* IMP_KEYDA = SY-DATUM "Start Date
* IMP_ISTAT = '1' "Planning Status
IMPORTING
EXP_BEGDA = "Start Date
EXP_ENDDA = "End Date
EXP_KAPZ1 = "Minimum Capacity
EXP_KAPZ2 = "Optimum Capacity
EXP_KAPZ3 = "Maximum Capacity
EXCEPTIONS
INFTY_NOT_FOUND = 1
IMPORTING Parameters details for HRIQ_PROGRAM_CAPACITY_GET
IMP_PLVAR - Plan Version
Data type: HRP1001-PLVAROptional: No
Call by Reference: No ( called with pass by value option)
IMP_OBJID - Object ID
Data type: HRP1001-OBJIDOptional: No
Call by Reference: No ( called with pass by value option)
IMP_KEYDA - Start Date
Data type: HRP1001-BEGDADefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
IMP_ISTAT - Planning Status
Data type: HRP1001-ISTATDefault: '1'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for HRIQ_PROGRAM_CAPACITY_GET
EXP_BEGDA - Start Date
Data type: HRP1001-BEGDAOptional: No
Call by Reference: No ( called with pass by value option)
EXP_ENDDA - End Date
Data type: HRP1001-ENDDAOptional: No
Call by Reference: No ( called with pass by value option)
EXP_KAPZ1 - Minimum Capacity
Data type: P1024-KAPZ1Optional: No
Call by Reference: No ( called with pass by value option)
EXP_KAPZ2 - Optimum Capacity
Data type: P1024-KAPZ2Optional: No
Call by Reference: No ( called with pass by value option)
EXP_KAPZ3 - Maximum Capacity
Data type: P1024-KAPZ3Optional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
INFTY_NOT_FOUND -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for HRIQ_PROGRAM_CAPACITY_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_exp_begda | TYPE HRP1001-BEGDA, " | |||
| lv_imp_plvar | TYPE HRP1001-PLVAR, " | |||
| lv_infty_not_found | TYPE HRP1001, " | |||
| lv_exp_endda | TYPE HRP1001-ENDDA, " | |||
| lv_imp_objid | TYPE HRP1001-OBJID, " | |||
| lv_exp_kapz1 | TYPE P1024-KAPZ1, " | |||
| lv_imp_keyda | TYPE HRP1001-BEGDA, " SY-DATUM | |||
| lv_exp_kapz2 | TYPE P1024-KAPZ2, " | |||
| lv_imp_istat | TYPE HRP1001-ISTAT, " '1' | |||
| lv_exp_kapz3 | TYPE P1024-KAPZ3. " |
|   CALL FUNCTION 'HRIQ_PROGRAM_CAPACITY_GET' "CM: Read Capacity for Program of Study |
| EXPORTING | ||
| IMP_PLVAR | = lv_imp_plvar | |
| IMP_OBJID | = lv_imp_objid | |
| IMP_KEYDA | = lv_imp_keyda | |
| IMP_ISTAT | = lv_imp_istat | |
| IMPORTING | ||
| EXP_BEGDA | = lv_exp_begda | |
| EXP_ENDDA | = lv_exp_endda | |
| EXP_KAPZ1 | = lv_exp_kapz1 | |
| EXP_KAPZ2 | = lv_exp_kapz2 | |
| EXP_KAPZ3 | = lv_exp_kapz3 | |
| EXCEPTIONS | ||
| INFTY_NOT_FOUND = 1 | ||
| . " HRIQ_PROGRAM_CAPACITY_GET | ||
ABAP code using 7.40 inline data declarations to call FM HRIQ_PROGRAM_CAPACITY_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 BEGDA FROM HRP1001 INTO @DATA(ld_exp_begda). | ||||
| "SELECT single PLVAR FROM HRP1001 INTO @DATA(ld_imp_plvar). | ||||
| "SELECT single ENDDA FROM HRP1001 INTO @DATA(ld_exp_endda). | ||||
| "SELECT single OBJID FROM HRP1001 INTO @DATA(ld_imp_objid). | ||||
| "SELECT single KAPZ1 FROM P1024 INTO @DATA(ld_exp_kapz1). | ||||
| "SELECT single BEGDA FROM HRP1001 INTO @DATA(ld_imp_keyda). | ||||
| DATA(ld_imp_keyda) | = SY-DATUM. | |||
| "SELECT single KAPZ2 FROM P1024 INTO @DATA(ld_exp_kapz2). | ||||
| "SELECT single ISTAT FROM HRP1001 INTO @DATA(ld_imp_istat). | ||||
| DATA(ld_imp_istat) | = '1'. | |||
| "SELECT single KAPZ3 FROM P1024 INTO @DATA(ld_exp_kapz3). | ||||
Search for further information about these or an SAP related objects