Regarding HR-abap Attendence Sheet for Employee

Hello Friends,
i am working on attendence sheet for employee please help me possible send me sample coding ASAP.
Thanks
REDDY.

Check out this report we have created for the Attendence. Reward points if it is useful.
REPORT  ZHR_ATTENDANCE_RPT MESSAGE-ID ZHR.
                 T Y P E    P O O L S                                *
TYPE-POOLS : SLIS.
                      T A B L E                                     *
TABLES : TEVEN,
         PA0000,
         PA0001,
         T503K,
         T500P.
          I N T E R N A L   T A B L E   D E C L A R A T I O N        *
DATA : BEGIN OF IT_PA0001 OCCURS 0,
       PERNR TYPE PA0001-PERNR,
       ENDDA TYPE PA0001-ENDDA,
       WERKS TYPE PA0001-WERKS,
       BTRTL TYPE PA0001-BTRTL,
       ORGEH TYPE PA0001-ORGEH,
       PERSK TYPE T503T-PERSK,
       ENAME TYPE PA0001-ENAME,
       END OF IT_PA0001.
DATA : BEGIN OF IT_PA0000 OCCURS 0,
       PERNR TYPE PA0000-PERNR,
       END OF IT_PA0000.
DATA : BEGIN OF IT_TEVEN OCCURS 0,
       PERNR TYPE TEVEN-PERNR,
       LDATE TYPE TEVEN-LDATE,
       LTIME TYPE TEVEN-LTIME,
       SATZA TYPE TEVEN-SATZA,
       END OF IT_TEVEN.
DATA : IT_TEVEN1 LIKE IT_TEVEN OCCURS 0 WITH HEADER LINE.
DATA : BEGIN OF IT_T527X OCCURS 0,
       ORGEH LIKE T527X-ORGEH,
       ORGTX LIKE T527X-ORGTX,
       END OF IT_T527X.
DATA : BEGIN OF IT_T503T OCCURS 0,
       PERSK TYPE T503T-PERSK,
       PTEXT TYPE T503T-PTEXT,
       END OF IT_T503T.
DATA : BEGIN OF IT_FINAL OCCURS 0,
       PERNR LIKE PA0001-PERNR,
       ENAME LIKE PA0001-ENAME,
       LDATE LIKE TEVEN-LDATE,
       TPROG LIKE PTPSP-TPROG,
       LTIMEI LIKE TEVEN-LTIME,
       LTIMEO LIKE TEVEN-LTIME,
       ORGTX LIKE T527X-ORGTX,
       PTEXT TYPE T503T-PTEXT,
       ATEXT TYPE ABWTXT,
       END OF IT_FINAL.
DATA : IT_PTPSP LIKE PTPSP OCCURS 0 WITH HEADER LINE.
*Table to get Holiday
DATA : IT_ISCAL_DAY LIKE ISCAL_DAY OCCURS 0 WITH HEADER LINE.
DATA : IT_T554T TYPE T554T OCCURS 0 WITH HEADER LINE.
*ALV data declarations
DATA: FIELDCATALOG TYPE SLIS_T_FIELDCAT_ALV,
      X_FIELDCATALOG TYPE SLIS_FIELDCAT_ALV,
      GD_LAYOUT    TYPE SLIS_LAYOUT_ALV,
      GD_REPID     LIKE SY-REPID.
*For ALV Events
DATA : IT_EVENT1 TYPE SLIS_T_EVENT.
*For ALV Events
DATA : IT_EVENT TYPE SLIS_ALV_EVENT.
*For ALV top of page
DATA : IT_LIST_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER.
*For top of page heading
DATA : IT_LINE TYPE SLIS_LISTHEADER.
Variables declaration                                         *
DATA : V_SHIFT LIKE PTPSP-TPROG,
       V_TEMP TYPE I,
       V_DATE TYPE DATUM,
       V_LDATE TYPE SY-DATUM,
       V_MODIF TYPE HIDENT,
       V_SUBTY TYPE PA2002-SUBTY,
       V_ENDDA TYPE CHAR10.
SELECTION SCREEN                                              *
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS : S_PERNR FOR TEVEN-PERNR,
                 S_DATE  FOR TEVEN-LDATE,
                 S_ORGEH FOR PA0001-ORGEH,
                 S_WERKS FOR PA0001-WERKS,
                 S_BTRTL FOR PA0001-BTRTL,
                 S_PERSK FOR PA0001-PERSK,
                 S_STAT2 FOR PA0000-STAT2.
SELECTION-SCREEN END OF BLOCK B1.
           A T   S E L E C T I O N   S C R E E N                     *
*validatating Selection Screen
AT SELECTION-SCREEN ON S_PERNR.
*Validate the User entered year
  PERFORM VALIDATE_PERNR.
AT SELECTION-SCREEN ON S_DATE.
*Validate the User entered date
  PERFORM VALIDATE_DATE_LOW.
AT SELECTION-SCREEN ON S_ORGEH.
*Validate the User entered year
  PERFORM VALIDATE_ORGEH.
AT SELECTION-SCREEN ON S_PERSK.
*Validate the User entered year
  PERFORM VALIDATE_PERSK.
AT SELECTION-SCREEN ON S_WERKS.
*Validate the User entered Personnel area
  PERFORM VALIDATE_WERKS.
START OF SELECTION                                             *
START-OF-SELECTION.
*Get data
  PERFORM GET_DATA.
*Process data
  PERFORM PROCESS_DATA.
              E N D    O F     S E L E C T I O N                    *
END-OF-SELECTION.
  PERFORM BUILD_FIELDCATALOG.
  PERFORM BUILD_LAYOUT.
*For ALV Events
  PERFORM ALV_EVENTS.
  PERFORM DISPLAY_ALV_REPORT.
*&      Form  VALIDATE_YEAR
      Validating the year
FORM VALIDATE_PERNR .
  IF NOT S_PERNR IS INITIAL.
    SELECT SINGLE * FROM PA0001 WHERE PERNR IN S_PERNR.     "#EC *
    IF SY-SUBRC <> 0.
      MESSAGE E000 WITH 'Enter valid Employee Number'(002).
    ENDIF.
  ENDIF.
ENDFORM.                    " VALIDATE_pernr
*&      Form  VALIDATE_YEAR
      Validating the year
FORM VALIDATE_ORGEH .
  DATA: V_ORGEH LIKE T527X-ORGEH.
  IF NOT S_ORGEH IS INITIAL.
    SELECT SINGLE ORGEH FROM T527X INTO V_ORGEH WHERE ORGEH IN S_ORGEH.
    IF SY-SUBRC <> 0.
      MESSAGE E000 WITH 'Enter Valid Organization Unit'(003).
    ENDIF.
  ENDIF.
ENDFORM.                    " VALIDATE_orgeh
*&      Form  GET_DATA
      Get data
FORM GET_DATA.
  SELECT PERNR
         FROM PA0000
         INTO TABLE IT_PA0000
         WHERE PERNR IN S_PERNR
         AND   ENDDA GE S_DATE-LOW
         AND   BEGDA LE S_DATE-HIGH
         AND   STAT2 IN S_STAT2.
  IF SY-SUBRC = 0.
    DELETE ADJACENT DUPLICATES FROM IT_PA0000 COMPARING PERNR.
    SORT IT_PA0000.
  ENDIF.
  IF NOT IT_PA0000[] IS INITIAL.
    SELECT PERNR
           ENDDA
           WERKS
           BTRTL
           ORGEH
           PERSK
           ENAME
           FROM PA0001
           INTO TABLE IT_PA0001
           FOR ALL ENTRIES IN IT_PA0000
           WHERE PERNR = IT_PA0000-PERNR
           AND   ENDDA GE S_DATE-LOW
           AND   BEGDA LE S_DATE-HIGH
           AND   ORGEH IN S_ORGEH
           AND   WERKS IN S_WERKS
           AND   PERSK IN S_PERSK
           AND   BTRTL IN S_BTRTL.
    IF SY-SUBRC = 0.
      SORT IT_PA0001 BY PERNR ENDDA DESCENDING.
      DELETE ADJACENT DUPLICATES FROM IT_PA0001 COMPARING PERNR.
      SORT IT_PA0001 BY PERNR.
    ENDIF.
  ENDIF.
  IF NOT IT_PA0001[] IS INITIAL.
    SELECT PERNR
           LDATE
           LTIME
           SATZA
           FROM TEVEN
           INTO TABLE IT_TEVEN
           FOR ALL ENTRIES IN IT_PA0001
           WHERE PERNR = IT_PA0001-PERNR
           AND   SATZA = 'P10'
           AND   LDATE IN S_DATE
           AND   STOKZ NE 'X'.
    IF SY-SUBRC = 0.
      SORT IT_TEVEN BY PERNR LDATE.
    ENDIF.
  ENDIF.
  IF NOT IT_PA0001[] IS INITIAL.
    SELECT PERNR
           LDATE
           LTIME
           SATZA
           FROM TEVEN
           INTO TABLE IT_TEVEN1
           FOR ALL ENTRIES IN IT_PA0001
           WHERE PERNR = IT_PA0001-PERNR
           AND   SATZA = 'P20'
           AND   LDATE IN S_DATE
           AND   STOKZ NE 'X'.
    IF SY-SUBRC = 0.
      SORT IT_TEVEN1 BY PERNR LDATE.
    ENDIF.
  ENDIF.
  IF NOT IT_PA0001[] IS INITIAL.
    SELECT ORGEH
           ORGTX
           FROM T527X
           INTO TABLE IT_T527X
           FOR ALL ENTRIES IN IT_PA0001
           WHERE ORGEH = IT_PA0001-ORGEH.
    IF SY-SUBRC = 0.
      SORT IT_T527X BY ORGEH.
    ENDIF.
  ENDIF.
  IF NOT IT_PA0001[] IS INITIAL.
    SELECT PERSK
           PTEXT
           FROM T503T
           INTO TABLE IT_T503T
           FOR ALL ENTRIES IN IT_PA0001
           WHERE PERSK = IT_PA0001-PERSK
           AND   SPRSL = 'E'.
    IF SY-SUBRC = 0.
      SORT IT_T503T BY PERSK.
    ENDIF.
  ENDIF.
  SELECT *
         FROM T554T
         INTO TABLE IT_T554T
         WHERE SPRSL = 'EN'
         AND   MOABW = '40'.
ENDFORM.                    " GET_DATA
*&      Form  PROCESS_DATA
      Process data
FORM PROCESS_DATA .
  V_TEMP = S_DATE-HIGH - S_DATE-LOW.
  V_TEMP = V_TEMP + 1.
  LOOP AT IT_PA0001.
    V_DATE = S_DATE-LOW.
    DO V_TEMP TIMES.
*Get employee work schedule
      IF IT_PTPSP[] IS INITIAL.
        PERFORM GET_SCHEDULE.
      ENDIF.
*Get holiday calendar
      IF IT_ISCAL_DAY[] IS INITIAL.
        PERFORM GET_HOLIDAY.
      ENDIF.
      CLEAR : V_SUBTY.
      SELECT SINGLE SUBTY
                    FROM PA2001
                    INTO V_SUBTY
                    WHERE PERNR = IT_PA0001-PERNR
                    AND   ENDDA GE V_DATE
                    AND   BEGDA LE V_DATE.
      IF SY-SUBRC = 0.
        READ TABLE IT_T554T WITH KEY AWART = V_SUBTY.
        IT_FINAL-ATEXT = IT_T554T-ATEXT.
      ENDIF.
      IF V_SUBTY IS INITIAL.
        SELECT SINGLE SUBTY
                      FROM PA2002
                      INTO V_SUBTY
                      WHERE PERNR = IT_PA0001-PERNR
                      AND   ENDDA GE V_DATE
                      AND   BEGDA LE V_DATE.
        IF SY-SUBRC = 0.
          IF V_SUBTY = '1000' OR V_SUBTY = '2000'.
            IT_FINAL-ATEXT = 'Training'.
          ELSEIF V_SUBTY = '3000'.
            IT_FINAL-ATEXT = 'Tour'.
          ENDIF.
        ENDIF.
      ENDIF.
*Get the employee shift schedule for that date
      CLEAR : V_SHIFT.
      READ TABLE IT_PTPSP WITH KEY DATUM = V_DATE.
      IF SY-SUBRC = 0.
        V_SHIFT = IT_PTPSP-TPROG.
        IF IT_PTPSP-TAGTY = '1'.
          V_SHIFT = 'NOFF'.
        ENDIF.
      ENDIF.
      IF V_SHIFT = ''.
        CLEAR IT_FINAL.
        CONTINUE.
      ENDIF.
*Check for holiday
      IT_FINAL-TPROG = V_SHIFT.
      READ TABLE IT_ISCAL_DAY WITH KEY DATE = V_DATE.
      IF SY-SUBRC = 0.
        IT_FINAL-TPROG = 'H'.
      ENDIF.
      IT_FINAL-PERNR = IT_PA0001-PERNR.
      IT_FINAL-ENAME = IT_PA0001-ENAME.
      IT_FINAL-LDATE = V_DATE.
*To get the organization unit
      READ TABLE IT_T527X WITH KEY ORGEH = IT_PA0001-ORGEH
                                   BINARY SEARCH.
      IF SY-SUBRC = 0.
        IT_FINAL-ORGTX = IT_T527X-ORGTX.
      ENDIF.
      CLEAR IT_T503T.
      READ TABLE IT_T503T WITH KEY PERSK = IT_PA0001-PERSK
                                   BINARY SEARCH.
      IF SY-SUBRC = 0.
        IT_FINAL-PTEXT = IT_T503T-PTEXT.
      ENDIF.
*To get Punch-in.
      READ TABLE IT_TEVEN WITH KEY PERNR = IT_PA0001-PERNR
                                   LDATE = V_DATE
                                   BINARY SEARCH.
      IF SY-SUBRC = 0.
        IT_FINAL-LTIMEI = IT_TEVEN-LTIME.
*To get Punch-out
        READ TABLE IT_TEVEN1 WITH KEY PERNR = IT_TEVEN-PERNR
                                      LDATE = IT_TEVEN-LDATE
                                      BINARY SEARCH.
        IF SY-SUBRC = 0.
          IF IT_TEVEN1-LTIME > IT_FINAL-LTIMEI.
            IT_FINAL-LTIMEO = IT_TEVEN1-LTIME.
          ELSE.
            SELECT SINGLE LTIME
                          FROM TEVEN
                          INTO IT_FINAL-LTIMEO
                          WHERE PERNR = IT_TEVEN-PERNR
                          AND   LDATE = IT_TEVEN-LDATE
                          AND   LTIME > IT_TEVEN1-LTIME
                          AND   SATZA = 'P20'
                          AND   STOKZ NE 'X'.
          ENDIF.
        ENDIF.
        IF IT_FINAL-LTIMEO IS INITIAL.
          IF V_SHIFT = 'NNIG' OR V_SHIFT = 'NAFT'..
            V_LDATE = IT_TEVEN-LDATE + 1.
            READ TABLE IT_TEVEN1 WITH KEY PERNR = IT_TEVEN-PERNR
                                          LDATE =  V_LDATE
                                          BINARY SEARCH.
            IF SY-SUBRC = 0.
              IT_FINAL-LTIMEO = IT_TEVEN1-LTIME.
            ENDIF.
          ENDIF.
        ENDIF.
        APPEND IT_FINAL.
      ELSE.
*If holiday or OFF or Tour or Absent
        IF V_SHIFT = 'NOFF' OR IT_FINAL-TPROG = 'H' .
          APPEND IT_FINAL.
        ELSEIF IT_FINAL-ATEXT IS NOT INITIAL.
          APPEND IT_FINAL.
        ELSE.
          IT_FINAL-ATEXT = 'Absent'.
          APPEND IT_FINAL.
        ENDIF.
      ENDIF.
      CLEAR : IT_FINAL.
      V_DATE = V_DATE + 1.
    ENDDO.
    CLEAR : IT_PTPSP[],
            IT_ISCAL_DAY[].
  ENDLOOP.
  SORT IT_FINAL BY PERNR LDATE.
  LOOP AT IT_FINAL.
    TRANSLATE IT_FINAL-ATEXT TO UPPER CASE.
    MODIFY IT_FINAL INDEX SY-TABIX.
  ENDLOOP.
ENDFORM.                    " PROCESS_DATA
*&      Form  GET_SCHEDULE
      Get employee work schedule
FORM GET_SCHEDULE.
  CALL FUNCTION 'HR_PERSONAL_WORK_SCHEDULE'
    EXPORTING
      PERNR         = IT_PA0001-PERNR
      BEGDA         = S_DATE-LOW
      ENDDA         = S_DATE-HIGH
    TABLES
      PERWS         = IT_PTPSP
    EXCEPTIONS
      ERROR_OCCURED = 1
      ABORT_OCCURED = 2
      OTHERS        = 3.
  IF SY-SUBRC <> 0.
   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
           WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
ENDFORM.                    " GET_SCHEDULE
*&      Form  build_fieldcatalog
FORM BUILD_FIELDCATALOG .
  X_FIELDCATALOG-COL_POS     = 1.
  X_FIELDCATALOG-FIELDNAME   = 'PERNR'.
  X_FIELDCATALOG-SELTEXT_L   = 'Personnel No'(006).
  X_FIELDCATALOG-DDICTXT = 'L'.
  APPEND X_FIELDCATALOG TO FIELDCATALOG.
  CLEAR  X_FIELDCATALOG.
  X_FIELDCATALOG-COL_POS     = 2.
  X_FIELDCATALOG-FIELDNAME   = 'ENAME'.
  X_FIELDCATALOG-SELTEXT_L   = 'Employee Name'(007).
  X_FIELDCATALOG-DDICTXT = 'L'.
  APPEND X_FIELDCATALOG TO FIELDCATALOG.
  CLEAR  X_FIELDCATALOG.
  X_FIELDCATALOG-COL_POS     = 5.
  X_FIELDCATALOG-FIELDNAME   = 'LDATE'.
  X_FIELDCATALOG-SELTEXT_L   = 'Date'(008).
  X_FIELDCATALOG-DDICTXT = 'L'.
  APPEND X_FIELDCATALOG TO FIELDCATALOG.
  CLEAR  X_FIELDCATALOG.
  X_FIELDCATALOG-COL_POS     = 6.
  X_FIELDCATALOG-FIELDNAME   = 'TPROG'.
  X_FIELDCATALOG-SELTEXT_L   = 'Planned Shift'(009).
  X_FIELDCATALOG-DDICTXT = 'L'.
  APPEND X_FIELDCATALOG TO FIELDCATALOG.
  CLEAR  X_FIELDCATALOG.
  X_FIELDCATALOG-COL_POS     = 7.
  X_FIELDCATALOG-FIELDNAME   = 'LTIMEI'.
  X_FIELDCATALOG-SELTEXT_L   = 'Attended Time-In'(010).
  X_FIELDCATALOG-DDICTXT = 'L'.
  APPEND X_FIELDCATALOG TO FIELDCATALOG.
  CLEAR  X_FIELDCATALOG.
  X_FIELDCATALOG-COL_POS     = 8.
  X_FIELDCATALOG-FIELDNAME   = 'LTIMEO'.
  X_FIELDCATALOG-SELTEXT_L   = 'Attended Time-Out'(011).
  X_FIELDCATALOG-DDICTXT = 'L'.
  APPEND X_FIELDCATALOG TO FIELDCATALOG.
  CLEAR  X_FIELDCATALOG.
  X_FIELDCATALOG-COL_POS     = 3.
  X_FIELDCATALOG-FIELDNAME   = 'ORGTX'.
  X_FIELDCATALOG-SELTEXT_L   = 'Organization Unit'(005).
  X_FIELDCATALOG-DDICTXT = 'L'.
  APPEND X_FIELDCATALOG TO FIELDCATALOG.
  CLEAR  X_FIELDCATALOG.
  X_FIELDCATALOG-COL_POS     = 4.
  X_FIELDCATALOG-FIELDNAME   = 'PTEXT'.
  X_FIELDCATALOG-SELTEXT_L   = 'Emp Subgroup'(016).
  X_FIELDCATALOG-DDICTXT = 'L'.
  APPEND X_FIELDCATALOG TO FIELDCATALOG.
  CLEAR  X_FIELDCATALOG.
  X_FIELDCATALOG-COL_POS     = 9.
  X_FIELDCATALOG-FIELDNAME   = 'ATEXT'.
  X_FIELDCATALOG-SELTEXT_L   = 'Leaves/Tours'(015).
  X_FIELDCATALOG-DDICTXT = 'L'.
  X_FIELDCATALOG-OUTPUTLEN = '25'.
  APPEND X_FIELDCATALOG TO FIELDCATALOG.
  CLEAR  X_FIELDCATALOG.
ENDFORM.                    " build_fieldcatalog
*&      Form  build_layout
FORM BUILD_LAYOUT.
  GD_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
  GD_LAYOUT-ZEBRA = 'X'.
ENDFORM.                    " build_layout
*&      Form  ALV_EVENTS
      For ALV Events
FORM ALV_EVENTS .
  IT_EVENT-NAME = 'TOP_OF_PAGE'.
  IT_EVENT-FORM = 'TOP_OF_PAGE'.
  APPEND IT_EVENT TO IT_EVENT1.
ENDFORM.                    " ALV_EVENTS
*&      Form TOP_OF_PAGE
      ALV TOP-OF-PAGE
FORM TOP_OF_PAGE.                                           "#EC CALLED
  REFRESH : IT_LIST_TOP_OF_PAGE.
  CLEAR : IT_LINE.
  IT_LINE-TYP  = 'H'.
  IT_LINE-INFO = 'Attendance Report for the Period'(013).
  APPEND IT_LINE TO IT_LIST_TOP_OF_PAGE.
  CONCATENATE S_DATE-LOW6(2) '.' S_DATE-LOW4(2) '.' S_DATE-LOW+0(4)
       INTO IT_LINE-INFO.
  CONCATENATE S_DATE-HIGH6(2) '.'  S_DATE-HIGH4(2) '.' S_DATE-HIGH+0(4) INTO V_ENDDA.
  CONCATENATE IT_LINE-INFO '-' V_ENDDA INTO IT_LINE-INFO SEPARATED BY SPACE.
  APPEND IT_LINE TO IT_LIST_TOP_OF_PAGE.
  CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
      IT_LIST_COMMENTARY = IT_LIST_TOP_OF_PAGE.
ENDFORM.                               "TOP_OF_PAGE
*&      Form  display_alv_report
FORM DISPLAY_ALV_REPORT.
  GD_REPID = SY-REPID.
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_CALLBACK_PROGRAM = GD_REPID
      IT_EVENTS          = IT_EVENT1
      IS_LAYOUT          = GD_LAYOUT
      IT_FIELDCAT        = FIELDCATALOG
    TABLES
      T_OUTTAB           = IT_FINAL
    EXCEPTIONS
      PROGRAM_ERROR      = 1
      OTHERS             = 2.
  IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
ENDFORM.                    "display_alv_report
*&      Form  VALIDATE_PERSK
      text
-->  p1        text
<--  p2        text
FORM VALIDATE_PERSK .
  IF NOT S_PERSK IS INITIAL.
    SELECT SINGLE * FROM T503K WHERE PERSK IN S_PERSK.      "#EC *
    IF SY-SUBRC <> 0.
      MESSAGE E000 WITH 'Enter valid Employee subgroup'(012).
    ENDIF.
  ENDIF.
ENDFORM.                    " VALIDATE_PERSK
*&      Form  VALIDATE_WERKS
      Validate user Entered Personnel area
FORM VALIDATE_WERKS .
  IF S_WERKS[] IS NOT INITIAL.
    SELECT SINGLE * FROM T500P WHERE PERSA IN S_WERKS.
    IF SY-SUBRC <> 0.
      MESSAGE E000 WITH 'Enter valid Personnel Area'(014).
    ENDIF.
  ENDIF.
ENDFORM.                    " VALIDATE_WERKS
*&      Form  VALIDATE_DATE_LOW
      Validate user Entered Date
FORM VALIDATE_DATE_LOW .
  IF S_DATE-LOW IS INITIAL.
    MESSAGE E000 WITH 'Enter Date'(004).
  ENDIF.
  IF S_DATE-HIGH IS INITIAL.
    MESSAGE E000 WITH 'Enter Date'(004).
  ENDIF.
ENDFORM.                    " VALIDATE_DATE_LOW
*&      Form  GET_HOLIDAY
        Get Holiday
FORM GET_HOLIDAY .
  CLEAR V_MODIF.
  SELECT SINGLE MOFID
                FROM T001P
                INTO V_MODIF
                WHERE WERKS = IT_PA0001-WERKS
                AND   BTRTL = IT_PA0001-BTRTL.
  CALL FUNCTION 'HOLIDAY_GET'
    EXPORTING
      HOLIDAY_CALENDAR           = V_MODIF
      DATE_FROM                  = S_DATE-LOW
      DATE_TO                    = S_DATE-HIGH
    TABLES
      HOLIDAYS                   = IT_ISCAL_DAY
    EXCEPTIONS
      FACTORY_CALENDAR_NOT_FOUND = 1
      HOLIDAY_CALENDAR_NOT_FOUND = 2
      DATE_HAS_INVALID_FORMAT    = 3
      DATE_INCONSISTENCY         = 4
      OTHERS                     = 5.
  IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
ENDFORM.                    " GET_HOLIDAY
Reward points if useful.

Similar Messages

  • F4 for employee select options in WD for abap application

    Hi,
    I have defined a select option for employee selection in my WD for abap application. The only problem is that I cannot get a f4 help button to be displayed. I have defined the select option using the following code :
    wd_this->m_wd_select_options = wd_this->wd_cpifc_select_options( ).
    init the select screen
    wd_this->m_handler = wd_this->m_wd_select_options->init_selection_screen( ).
    create a range table that consists of this new data element
    lt_range_table = wd_this->m_handler->create_range_table(
    i_typename = 'PERNR_D' ).
    add a new field to the selection
    wd_this->m_handler->add_selection_field(
    i_id = 'PERNR_D'
    it_result = lt_range_table
    i_read_only = read_only ).
    I have tried adding entries for the parameter help_id but still cannot get a f4 button.
    Thank you in advance for any assistance provided.

    Hi,
    Try this.
    DATA lo_interfacecontroller TYPE REF TO iwci_wdr_select_options .
    lo_interfacecontroller = wd_this->wd_cpifc_select_options( ).
    DATA lo_r_helper_class TYPE REF TO if_wd_select_options.
    lo_r_helper_class = lo_interfacecontroller->init_selection_screen( ).
    Creating range table
    DATA lt_range TYPE REF TO data.
    CALL METHOD lo_r_helper_class->create_range_table
    EXPORTING
    i_typename = ''PERNR_D'
    RECEIVING
    rt_range_table = lt_range.
    Disabling the global options
    CALL METHOD lo_r_helper_class->set_global_options
    EXPORTING
    i_display_btn_cancel = abap_false
    i_display_btn_check = abap_false
    i_display_btn_reset = abap_false
    i_display_btn_execute = abap_false.
    Adding the selection field
    CALL METHOD lo_r_helper_class->add_selection_field
    EXPORTING
    i_id = 'PERNR_D'
    I_OBLIGATORY = ABAP_TRUE
    i_value_help_type = if_wd_value_help_handler=>CO_PREFIX_SEARCHHELP
    I_VALUE_HELP_ID = 'PREM'
    it_result = lt_range.
    Check this artcle for more details which uses VBELN as select option with search help.
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/103e43d5-fdb8-2d10-90ab-b5e8532cbc04

  • Entering time sheet for external service employee

    Hi all,
    My scenario is,
    I created a external service for my network in the project. PR has been created. I've converted the PR into PO(Service) and then i maintained a HR master and assign the PO details. But when i try to enter the time sheet for that employee i couldn't.Anyone can explain the process flow for this scenario please.
    Thanks

    Once you create external service PO, the same should have been assigned to HR master. Try to create as group so that time entry can be done conveniently.
    Check the below links. I guess, you are using CAT time entry transaction to create Service entry sheet. Use CATM transaction to create time entry.
    http://forums.sdn.sap.com/thread.jspa?threadID=1485422
    http://help.sap.com/saphelp_dbm600/helpdata/en/64/40048a470211d189720000e8322d00/content.htm

  • Cache issue coming in Start Process for Employee iView under MSS

    Hi,
    Navigate to MSS -> Team -> HCM Process and Forms -> Start Process for Employee
    In Start Process for Employee iView, when I clicks on Refresh link at the bottom right of the table the Direct Reports got removed from the table (which is correct) but when I navigates to some other screen and comes back then again the previous data comes back. It seems to be cache level issue. Even I logs off and login the same data comes back which should not happen.
    I have checked the forum [Team=>Personnel Developent=>Employee Search; and found it that Refesh property will work if I set the parameter of iview Cache Lifetime = -1 then it will disable the caching at all.
    And I wants the same behaviour for Start Process for Employee iView. But I am not able to find the similar property in Start Process for Employee iView.
    Anyone have an idea of What is the resolution for this issue?
    Regards,
    Deep

    Hi Deep,
    now I understand your problem )
    To me it sounds like an OADP cache issue rather than one in Portal. The iview uses OADP which again uses the cache which does not reflect on the actual current org-structure.
    One possibility would be enhancing the WD4A and call FMs
    HRWPC_OADP_DELETE_TGTOBJCACHE
    HRWPC_OADP_DELETE_SRCHOBJCACHE
    HRWPC_OADP_DELETE_NAVOBJCACHE
    HRWPC_OADP_DELETE_DATAVWCACHE
    dependent on what you want to delete to refresh.
    I would probably try to enhance HookMethod WDDOINIT in Component Controller and call them there, but that's just a guess; could be complete nonesense.
    Another possibility would be trying to add the application parameter "sap.xss.req.crt.cachelifetime=0" to the iView.
    Links for reference:
    http://help.sap.com/saphelp_ppm50/helpdata/en/21/1ac5ca5cad46528d4f970cc03b8e8f/content.htm
    Web dynpro abap and OADP cache
    http://help.sap.com/saphelp_dimp50/helpdata/DE/97/7f754067025537e10000000a1550b0/content.htm
    hope this helps a bit now
    regards, Lukas

  • Work docket for employee performance

    Hi, is it possible to trace the machine used and hrs used by individual employee for particular time period? Is there any std report available for employee performnace in sap? pls help.

    Hi,
    Not sure about Employee performance report,but you can find it in COOIS with Operations & layout 000000000002 combination.
    Here you can change the layout as per your requirement.
    If it is not helpful to you then go for develop new report with ABAP person.
    Reply,
    Regards,
    Mukesh

  • Upload  in Excel Sheet for Mid Year Go Live

    Hi Friends,
    How to upload T558 B & C tables in Excel Sheet for  Mid Year Go Live.
    Awaiting for your reply
    Regards
    Praveen P

    Hi,
    t558c template here between postingdate and amount two blank tab is there
    client     pernr     period     country     wagetype     postingdate               amount
    t558b template here between period and posting date two blank tab is there
    client     pernr     period               postingdate     periodparameter     year     period     monthstartrdate     enddate month
    and the date format is YYYYMMDD
    Edited by: BALAPANI on Oct 13, 2009 12:19 PM

  • SharePoint Foundation 2013 - report / chart / Graph for Employee vacation.

    In SharePoint Foundation 2013 I want to create a report / chart / Graph for Employee (Employee Id,Employee Name & Department) which will show month wise from which date to which date Employee are on vacation in particular department.
    I'm thinking to create one List where where user will enter there vacation details and from that list report I will create chart / Graph Department wise to check the Employees availability.
    Please provide some good example or idea in detail for this.

    Hi,
    Chart Web Parts are useful for visually representing data in line charts, bar charts, and other views. Charts enable you and other users to view performance information at a glance.
    In SharePoint 2013, chart web part is one of the discontinued features. We usually use Excel Service to replace it, however, Excel Service is only available in Enterprise edition, so we need to figure out coding methods or third party tool if you are using
    Foundation edition.
    Here are some links for workaround in your situation, please check if they can be help:
    http://sivarajan.me/post/SharePoint-2013-Chart-WebPart-Using-HTML-5-RGraph-with-WCF-REST-Services
    http://charts4sharepoint.codeplex.com/
    Regards,
    Rebecca Tu
    TechNet Community Support

  • In R12, can payroll user enter expense report for employees via web-based?

    Hi,
    In R12, can payroll user enter expense report for employees via web-based screen? Previously in 11i, it can be done via the Expense Report forms.
    Appreciate advise on this.
    Thanks in advance.
    Regards,
    Shiau Chin

    Hi Anne,
    Please see page 42 of the [url http://download.oracle.com/docs/cd/B34956_01/current/acrobat/120oieig.pdf]iExpenses Implementation and Admin Guide for R12 . If you are unable to enter the ID as per the guide, I would suggest raising an Service Request with Oracle Support.
    Cheers, Pete

  • Business partner in Fact Sheet for Individual object

    Hi Folks,
    I am unable to see the assigned business partners on the Fact Sheet for an Individual object.  I have created the iObject in the portal.  Here, I could not assign any BP's during the creation as the system does not have this option.  I then went ahead and created an Installed Base and assigned this iobject to it in the CRM system in transaction [IB51] "Create Installed Base".  I then went ahead and assigned the Business Partners to this iObject. 
    The situation is that I can see the assigned Business Partners in the Portal for this iObject/Component for the Installed Base in the "Installed Bases/Components" tab but when i go to the "Fact Sheet for Installed Bases" tab I am unable to see the assigned BP's.
    I haven't been able to find any documentation on it either.  Can someone please help.
    Thanks.

    Hi,
    Did you ever solve this issue? 
    I too am having the same problem and cannot display the factsheet or summary using the 'Go To' button in EP.
    Any help would be much appreciated.
    Regards
    Jo

  • Error while download the data to an Excel sheet for ECC report from EP

    Hi experts,
    I had created a report program which will download the data to an Excel sheet using SAP OLE object
    For this report i had created a tcode too. The report which i developed is perfectly working fine in SAPGUI. But if i download the data to an Excel sheet for the same report throught SAP EP.I am getting the  error that "Error in excel downlaod"
    I analyed by putting dubigg point and it throws exception while calling Function module.
    The excpetion is " OLE object id not found".
    Can any body gives a light on this why i'm not able download the excel in ep?
    Thanks,
    JB

    Hello,
    (by the way I came here to ask my question and is my first time visit but...)
    The problem is obvious: How do you expect OLE handler can "touch" the local PC Excel through a web browser? I believe that is not possible. That means (at least for me) that I have to create the whole documents before I return them to the user. That is why I use XML Office documents generation or you can try to hack some Export to excel features of ERP reports.
    Regards Otto

  • Error in create a new absence for employee

    Hi experts
    I have been already config all steps on IMG but i can not create a new absences for employee by IT2001, the error message below "no qouta available for att/abs (absence type) for (Emp No.) between (start_date) and (end_date)". I haven't see any record on Absences Quotas(IT2006).

    Hi,
    Check in Table V_554S_Q if the absences type is checked for Quota deduction or not. If yes then check to which Absence quota it is linked & then create that Absence Quota in IT-2006.
    Regards,
    Prasad Lad

  • Problem with creating Edit page for employees , based on otn tutorial

    Hi
    Thank you for reading my post
    I used one of oracle tutorial and create a jsf page which contain a for for departments
    and a table for employeed ( I used visual and declarative development with oracle jdeveloper)
    Now i want to add an edit page to my jsf project which allow me to edit an employee
    to do this : I add a jsf page , I add editing form (the edit form work well , I mean which i change the data and press submit it change the data in database)
    now the problem is that i want to link this two page
    in a manner that when user select an employee from table and pressed edit button ,
    it shows edit page with that employee as "under edit" employee
    here is the link that i used to learn this stuff.
    http://www.oracle.com/technology/products/jdev/viewlets/1013/jdev_overview_xp_viewlet_swf.html
    Thanks

    Basically you create a JSF Page Navigation diagram and drag on you customerList page and your Edit Customer page. Add an "arrow" to link the two pages and name this arrow EDIT.
    Then drop a button onto the CustomerList page and the ACTION property will not have a drop down list and you select EDIT (which is the name of the arrow you created).
    Simple steps available using the workshop on the right hand side of the page
    otn.oracle.com/formsdesignerj2ee
    Regards
    Grant Ronald

  • To make service entry sheet for multiple line items of the service PO.

    Hello MM Gurus,
    Please help me for the following
    I create a service PO with say 10 line items. Then while doing the service entry sheet the system automatically picks the line item 10 by default. When I try to enter the other items it throws an error" unplanned services cannot be entered"
    So how to make a service entry sheet which shall include all the line items of the service PO at the same time.
    So if I have 100 items in the PO do we make the service entry sheet 100 times against each item? Is there any seeting/solution on this?
    Please help.
    Regards,
    Prasanna.

    Dear,
    I have two solution for u.
    1) Create different service entry sheet -ML81N for each line item and create single invoice verification for all service entry sheet - MIRO
    2) Create service purchase order - ME21N for only one line item.
    And include all services in service tab available at item detail level of service purchase order. Enter it's quantity and rate.
    Than create one service entry sheet for purchase order.
    So you can create one service entry sheet for all line item of services.
    Note: - Use option 2 for easy process.
    Regards,
    Mahesh Wagh.

  • How to maintain Service Arrangements for employees in CRM 5.0

    Hello,
    in the CRM documentation on help.sap.com (http://help.sap.com/saphelp_crm50/helpdata/en/da/7d808043d244cf806dcf0d6e69381e/frameset.htm) it is mentioned that one can maintain service arrangements for employees. These service arrangements contain - for example - service areas and qualifications of the employee (ressource).
    I know where to maintain the customizing values, however, I didn't find out where to maintain the service arrangements for the employees.
    Any idea?
    Thanks & regards
    Wolfgang

    Hi ,
    for this you need to go to trnasaction PPOMA_CRM - Maintain Organizational Model
    and in this you need to open your organization model and there you need to assign employees.
    for this you need to select the post and right click on that and there is assign filed is there. after selecting that there is two position holder and owner.
    so you select holder for the position. then you can assign the employee to that service area.
    thanks
    hemant

  • Savings Plan with Monthly contribution to be used for employees weekly paid

    Hi,
    We have a Savings Plan with Monthly contribution. This plan has to be used for employees for weekly paid employees.
    How to configure this for weekly paid employees and for which payroll will the contribution gets deducted.
    Please help on this issue.
    Regards,
    Ilyas

    Ilyas ,
    In SPRO - Personnel management-Benefits-Plans-Savings plans- Define employee contribution rules
    In the contribution limits for regular payroll - If your savings plans contribution types is by percentage then give the maximum pre-tax has 100.00 , if it is not by percentage -then give the contribution units to its maximum .
    To recheck -go to Pa30 and benefits tab -saving plans and regular contribution tab and check your reference period for contributions.
    Let me know if it doesn't work
    Shalini

Maybe you are looking for