SAP RH_READ_SHIFT Function Module for









RH_READ_SHIFT is a standard rh read shift 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 rh read shift FM, simply by entering the name RH_READ_SHIFT into the relevant SAP transaction such as SE37 or SE38.

Function Group: RHEI
Program Name: SAPLRHEI
Main Program: SAPLRHEI
Appliation area: H
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function RH_READ_SHIFT 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 'RH_READ_SHIFT'"
EXPORTING
SHIFT_GROUP = "
SHIFT_ABBRIV = "
SHIFT_DATE = "

IMPORTING
SHIFT_TXT = "
PERS_SUBGRP_ABS = "
ABS_ATT_TYPE = "
ABS_ATT_INDICATOR = "
PERS_SUBGRP_SUB = "
AVAILABILITY = "
PERS_SUBGRP_DWS = "
DAY_WORK_SCHED = "
DAY_WORK_SCHED_VAR = "
START_SHIFT = "
START_SHIFT_TEXT = "
END_SHIFT = "
END_SHIFT_TEXT = "
ACCUM_BREAK_TEXT = "

EXCEPTIONS
NO_ENTRY = 1 NO_SHIFT_TXT = 2 NO_SCHEDULE = 3
.



IMPORTING Parameters details for RH_READ_SHIFT

SHIFT_GROUP -

Data type: T77ED-DIENSTGR
Optional: No
Call by Reference: No ( called with pass by value option)

SHIFT_ABBRIV -

Data type: T77ED-DIENSTE
Optional: No
Call by Reference: No ( called with pass by value option)

SHIFT_DATE -

Data type: SY-DATUM
Optional: No
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for RH_READ_SHIFT

SHIFT_TXT -

Data type: T77ET-DIENST_TXT
Optional: No
Call by Reference: No ( called with pass by value option)

PERS_SUBGRP_ABS -

Data type: T77ED-MOABW
Optional: No
Call by Reference: No ( called with pass by value option)

ABS_ATT_TYPE -

Data type: T77ED-AWART
Optional: No
Call by Reference: No ( called with pass by value option)

ABS_ATT_INDICATOR -

Data type: T77ED-AWTYP
Optional: No
Call by Reference: No ( called with pass by value option)

PERS_SUBGRP_SUB -

Data type: T77ED-MOVER
Optional: No
Call by Reference: No ( called with pass by value option)

AVAILABILITY -

Data type: T77ED-STNBY
Optional: No
Call by Reference: No ( called with pass by value option)

PERS_SUBGRP_DWS -

Data type: T77ED-MOTPR
Optional: No
Call by Reference: No ( called with pass by value option)

DAY_WORK_SCHED -

Data type: T77ED-TPROG
Optional: No
Call by Reference: No ( called with pass by value option)

DAY_WORK_SCHED_VAR -

Data type: T77ED-VARIA
Optional: No
Call by Reference: No ( called with pass by value option)

START_SHIFT -

Data type: T77ED-DIENST_VON
Optional: No
Call by Reference: No ( called with pass by value option)

START_SHIFT_TEXT -

Data type: T77ED-VON_TEXT
Optional: No
Call by Reference: No ( called with pass by value option)

END_SHIFT -

Data type: T77ED-DIENST_BIS
Optional: No
Call by Reference: No ( called with pass by value option)

END_SHIFT_TEXT -

Data type: T77ED-BIS_TEXT
Optional: No
Call by Reference: No ( called with pass by value option)

ACCUM_BREAK_TEXT -

Data type: T77ED-PAUSE_TEXT
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

NO_ENTRY -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NO_SHIFT_TXT -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NO_SCHEDULE -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for RH_READ_SHIFT 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_no_entry  TYPE STRING, "   
lv_shift_txt  TYPE T77ET-DIENST_TXT, "   
lv_shift_group  TYPE T77ED-DIENSTGR, "   
lv_pers_subgrp_abs  TYPE T77ED-MOABW, "   
lv_abs_att_type  TYPE T77ED-AWART, "   
lv_abs_att_indicator  TYPE T77ED-AWTYP, "   
lv_pers_subgrp_sub  TYPE T77ED-MOVER, "   
lv_availability  TYPE T77ED-STNBY, "   
lv_no_shift_txt  TYPE T77ED, "   
lv_shift_abbriv  TYPE T77ED-DIENSTE, "   
lv_pers_subgrp_dws  TYPE T77ED-MOTPR, "   
lv_shift_date  TYPE SY-DATUM, "   
lv_no_schedule  TYPE SY, "   
lv_day_work_sched  TYPE T77ED-TPROG, "   
lv_day_work_sched_var  TYPE T77ED-VARIA, "   
lv_start_shift  TYPE T77ED-DIENST_VON, "   
lv_start_shift_text  TYPE T77ED-VON_TEXT, "   
lv_end_shift  TYPE T77ED-DIENST_BIS, "   
lv_end_shift_text  TYPE T77ED-BIS_TEXT, "   
lv_accum_break_text  TYPE T77ED-PAUSE_TEXT. "   

  CALL FUNCTION 'RH_READ_SHIFT'  "
    EXPORTING
         SHIFT_GROUP = lv_shift_group
         SHIFT_ABBRIV = lv_shift_abbriv
         SHIFT_DATE = lv_shift_date
    IMPORTING
         SHIFT_TXT = lv_shift_txt
         PERS_SUBGRP_ABS = lv_pers_subgrp_abs
         ABS_ATT_TYPE = lv_abs_att_type
         ABS_ATT_INDICATOR = lv_abs_att_indicator
         PERS_SUBGRP_SUB = lv_pers_subgrp_sub
         AVAILABILITY = lv_availability
         PERS_SUBGRP_DWS = lv_pers_subgrp_dws
         DAY_WORK_SCHED = lv_day_work_sched
         DAY_WORK_SCHED_VAR = lv_day_work_sched_var
         START_SHIFT = lv_start_shift
         START_SHIFT_TEXT = lv_start_shift_text
         END_SHIFT = lv_end_shift
         END_SHIFT_TEXT = lv_end_shift_text
         ACCUM_BREAK_TEXT = lv_accum_break_text
    EXCEPTIONS
        NO_ENTRY = 1
        NO_SHIFT_TXT = 2
        NO_SCHEDULE = 3
. " RH_READ_SHIFT




ABAP code using 7.40 inline data declarations to call FM RH_READ_SHIFT

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 DIENST_TXT FROM T77ET INTO @DATA(ld_shift_txt).
 
"SELECT single DIENSTGR FROM T77ED INTO @DATA(ld_shift_group).
 
"SELECT single MOABW FROM T77ED INTO @DATA(ld_pers_subgrp_abs).
 
"SELECT single AWART FROM T77ED INTO @DATA(ld_abs_att_type).
 
"SELECT single AWTYP FROM T77ED INTO @DATA(ld_abs_att_indicator).
 
"SELECT single MOVER FROM T77ED INTO @DATA(ld_pers_subgrp_sub).
 
"SELECT single STNBY FROM T77ED INTO @DATA(ld_availability).
 
 
"SELECT single DIENSTE FROM T77ED INTO @DATA(ld_shift_abbriv).
 
"SELECT single MOTPR FROM T77ED INTO @DATA(ld_pers_subgrp_dws).
 
"SELECT single DATUM FROM SY INTO @DATA(ld_shift_date).
 
 
"SELECT single TPROG FROM T77ED INTO @DATA(ld_day_work_sched).
 
"SELECT single VARIA FROM T77ED INTO @DATA(ld_day_work_sched_var).
 
"SELECT single DIENST_VON FROM T77ED INTO @DATA(ld_start_shift).
 
"SELECT single VON_TEXT FROM T77ED INTO @DATA(ld_start_shift_text).
 
"SELECT single DIENST_BIS FROM T77ED INTO @DATA(ld_end_shift).
 
"SELECT single BIS_TEXT FROM T77ED INTO @DATA(ld_end_shift_text).
 
"SELECT single PAUSE_TEXT FROM T77ED INTO @DATA(ld_accum_break_text).
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!