SAP Function Modules

HRIQ_PROGRAMS_SEGM_OPEN_GET SAP Function module - Get Student/Study Objects with Open Study Segments







HRIQ_PROGRAMS_SEGM_OPEN_GET is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name HRIQ_PROGRAMS_SEGM_OPEN_GET into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: HRPIQ00STUDENT_REGIST_GET
Released Date: 28.07.2003
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM HRIQ_PROGRAMS_SEGM_OPEN_GET - HRIQ PROGRAMS SEGM OPEN GET





CALL FUNCTION 'HRIQ_PROGRAMS_SEGM_OPEN_GET' "Get Student/Study Objects with Open Study Segments
* EXPORTING
*   iv_plvar =                  " plvar         Plan Version
*   it_program =                " hrobject_t    Table Type PLVAR, OTYPE; OBJID
*   iv_begda = SY-DATUM         " begdatum      Start Date
*   iv_xread_st = 'X'           " flag          General Indicator
*   iv_base_auth = 'DISP'       " t77fc-fcode   Function Code
*   iv_with_stru_auth = 'X'     " flag          General Indicator
  IMPORTING
    et_segments =               " piqstudysegment_t  Table Type for Study Segments
    et_studies =                " piqstudies_t  Table Type PIQSTUDIES_T (Student, Study, Program)
  EXCEPTIONS
    NO_BASE_AUTHORITY = 1       "               No authority
    INVALID_PLVAR = 2           "               Invalid Plan Version
    INVALID_PARAMETERS = 3      "
    TECHNICAL_ERROR = 4         "
    .  "  HRIQ_PROGRAMS_SEGM_OPEN_GET

ABAP code example for Function Module HRIQ_PROGRAMS_SEGM_OPEN_GET





The ABAP code below is a full code listing to execute function module HRIQ_PROGRAMS_SEGM_OPEN_GET including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
ld_et_segments  TYPE PIQSTUDYSEGMENT_T ,
ld_et_studies  TYPE PIQSTUDIES_T .

DATA(ld_iv_plvar) = 'Check type of data required'.
DATA(ld_it_program) = 'Check type of data required'.
DATA(ld_iv_begda) = 'Check type of data required'.
DATA(ld_iv_xread_st) = 'Check type of data required'.

SELECT single FCODE
FROM T77FC
INTO @DATA(ld_iv_base_auth).

DATA(ld_iv_with_stru_auth) = 'Check type of data required'. . CALL FUNCTION 'HRIQ_PROGRAMS_SEGM_OPEN_GET' * EXPORTING * iv_plvar = ld_iv_plvar * it_program = ld_it_program * iv_begda = ld_iv_begda * iv_xread_st = ld_iv_xread_st * iv_base_auth = ld_iv_base_auth * iv_with_stru_auth = ld_iv_with_stru_auth IMPORTING et_segments = ld_et_segments et_studies = ld_et_studies EXCEPTIONS NO_BASE_AUTHORITY = 1 INVALID_PLVAR = 2 INVALID_PARAMETERS = 3 TECHNICAL_ERROR = 4 . " HRIQ_PROGRAMS_SEGM_OPEN_GET
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_et_segments  TYPE PIQSTUDYSEGMENT_T ,
ld_iv_plvar  TYPE PLVAR ,
ld_et_studies  TYPE PIQSTUDIES_T ,
ld_it_program  TYPE HROBJECT_T ,
ld_iv_begda  TYPE BEGDATUM ,
ld_iv_xread_st  TYPE FLAG ,
ld_iv_base_auth  TYPE T77FC-FCODE ,
ld_iv_with_stru_auth  TYPE FLAG .

ld_iv_plvar = 'Check type of data required'.
ld_it_program = 'Check type of data required'.
ld_iv_begda = 'Check type of data required'.
ld_iv_xread_st = 'Check type of data required'.

SELECT single FCODE
FROM T77FC
INTO ld_iv_base_auth.

ld_iv_with_stru_auth = 'Check type of data required'.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name HRIQ_PROGRAMS_SEGM_OPEN_GET or its description.