SAP Function Modules

HRIQ_STUDY_PROGRAM_GET SAP Function module - Read Program (SC) for Study Object (CS)







HRIQ_STUDY_PROGRAM_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_STUDY_PROGRAM_GET into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM HRIQ_STUDY_PROGRAM_GET - HRIQ STUDY PROGRAM GET





CALL FUNCTION 'HRIQ_STUDY_PROGRAM_GET' "Read Program (SC) for Study Object (CS)
  EXPORTING
    iv_plvar =                  " plog-plvar    Plan Version
    iv_study_objid =            " plog-objid    Study Object ID
*   iv_begda = SY-DATUM         " plog-begda    Date for Texts
*   iv_endda =                  " plog-endda    No Longer Used
  IMPORTING
    es_program =                " piq_period_hrobject  Start Date, End Date, HROBJECT
    ev_program_stext =          " objec-stext   Object Description
    ev_program_short =          " objec-short   Object Abbreviation
    ev_program_objid =          " piqscobjid    Program ID
  EXCEPTIONS
    NO_PROGRAM_FOUND = 1        "               No Program Found
    .  "  HRIQ_STUDY_PROGRAM_GET

ABAP code example for Function Module HRIQ_STUDY_PROGRAM_GET





The ABAP code below is a full code listing to execute function module HRIQ_STUDY_PROGRAM_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_es_program  TYPE PIQ_PERIOD_HROBJECT ,
ld_ev_program_stext  TYPE OBJEC-STEXT ,
ld_ev_program_short  TYPE OBJEC-SHORT ,
ld_ev_program_objid  TYPE PIQSCOBJID .


SELECT single PLVAR
FROM PLOG
INTO @DATA(ld_iv_plvar).


SELECT single OBJID
FROM PLOG
INTO @DATA(ld_iv_study_objid).


SELECT single BEGDA
FROM PLOG
INTO @DATA(ld_iv_begda).


SELECT single ENDDA
FROM PLOG
INTO @DATA(ld_iv_endda).
. CALL FUNCTION 'HRIQ_STUDY_PROGRAM_GET' EXPORTING iv_plvar = ld_iv_plvar iv_study_objid = ld_iv_study_objid * iv_begda = ld_iv_begda * iv_endda = ld_iv_endda IMPORTING es_program = ld_es_program ev_program_stext = ld_ev_program_stext ev_program_short = ld_ev_program_short ev_program_objid = ld_ev_program_objid EXCEPTIONS NO_PROGRAM_FOUND = 1 . " HRIQ_STUDY_PROGRAM_GET
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "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_es_program  TYPE PIQ_PERIOD_HROBJECT ,
ld_iv_plvar  TYPE PLOG-PLVAR ,
ld_ev_program_stext  TYPE OBJEC-STEXT ,
ld_iv_study_objid  TYPE PLOG-OBJID ,
ld_ev_program_short  TYPE OBJEC-SHORT ,
ld_iv_begda  TYPE PLOG-BEGDA ,
ld_ev_program_objid  TYPE PIQSCOBJID ,
ld_iv_endda  TYPE PLOG-ENDDA .


SELECT single PLVAR
FROM PLOG
INTO ld_iv_plvar.


SELECT single OBJID
FROM PLOG
INTO ld_iv_study_objid.


SELECT single BEGDA
FROM PLOG
INTO ld_iv_begda.


SELECT single ENDDA
FROM PLOG
INTO ld_iv_endda.

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_STUDY_PROGRAM_GET or its description.