Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Clock in/out corrections in ESS EHP5

Dear All,

The employee's clock-in clock-out records are updated from the time recording terminal to Infotype 2011 via an interface.

Issue one :-Now, when we try to use the SAP's clock-in clock-out corrections application to change or delete  the existing clock-in or clock-out time for any particular day,it will not allow to change or delete the entries which are updated from backend system.

However, when we create a new clock-in clock-out entry from ess, we are able to change the date and time for that entry but not for any entry that is transferred from the time recording terminal.

Any idea if the standard application can be used to change existing clock-in clock-out record or how can this scenario be met in ESS?

Issue two :- Example :- Employee Clock in/out is uploaded as 11:30 AM to 18:30PM , employees says his clock in should be from 09:30 AM , now employee have created a clock in at 09:30 and after approval is has been posted to IT2011. Now while i am running Time evaluation system is having two clock in at 09:30 & 11:30 pair formation is not happening due to two clock in data .

We are on EHP5

SP Level 21

Regards,

Raja Sekhar

Tags:
Former Member
replied

Hi Siddharth,

I have got it. Please, if you have any alerts about it, let me know.

I asked for Time consultant to create a reason: "Time event originated from Subsystem", code 0100. This is necessary, because when modifying or cancelling, the standard code understands that all time events that can be modifyed/cancelled are originated from employee or manager.  As we need to modify/cancel time events originated from subsystem or RH admnistrator, it´s necessary to inform a reason. Unfortunatelly I haven´t found another way to do it.

Thank you for your tips.

CANCELLING

FUGR: PT_COR_REQUEST_UIA

INCLUDE: LPT_COR_REQUEST_UIAF09

PERFORM: create_cancel_request (create an enhancement at the end of the perform)

ENHANCEMENT ZHR_PROCESS_ORIGF.    "active version

   LOOP AT ui_request-item_tab ASSIGNING <del_item>.

     "Caso a marcação tenha origem do administrador de RH ou do REP...

     if <del_item>-ORIGF = 'M' or

        <del_item>-ORIGF = 'S' or

        <del_item>-ORIGF is initial.

       if <del_item>-ORIGF = ' ' or

          <del_item>-ORIGF = 'S'.

          <del_item>-ABWGR = '0100'.

       endif.

       <del_item>-ORIGF = 'E'.

     endif.

   ENDLOOP.

* create the DEL/INS-item(s) incl. item id(s)

   PERFORM pack_request

     USING

       ui_request

     CHANGING

       packed.

   CALL METHOD request->set_all_attribs

     EXPORTING

       im_attribs_struc = packed.

* prepare for return

   CALL METHOD request->get_all_attribs

     IMPORTING

       ex_attribs_struc = packed.

   PERFORM unpack_request

     USING

       packed

     CHANGING

       ui_request.

ENDENHANCEMENT.

On HRESS_C_CORRECTIONS:

Go to "V_DETAIL" view and overwrite "ADD_ADDITIONAL_FIELDS method. The inserted code starts with "T_BRUNOA: Begin" and finishes with

"T_BRUNOA: End"

PS: This piece of code is necessary because without it, when deleting, the reason can´t be filled.

method _OVR_4TKN5Z3Q9DP08TY94NIOHJS3V . "Exit of ADD_ADDITIONAL_FIELDS (in ZHR_MARCACOES_WD )

   DATA: lo_input                   TYPE REF TO     cl_wd_input_field,

           lo_label                   TYPE REF TO     cl_wd_label,

           lo_ddbk                    TYPE REF TO     cl_wd_dropdown_by_key.

   DATA: lv_ip_str                  TYPE            string,

         lv_lbl_str                 TYPE            string,

         lv_node_name               TYPE            string,

         lv_lbl_name                TYPE            string,

         lv_required(2)             TYPE            n.

   DATA: "ls_ttypes                  TYPE            ptcor_uia_ttype_struc, "variable not in use anymore

*        lt_additional_fields       TYPE            ptcor_uia_fieldcust_tab, "variable not in use anymore

         ls_additional_fields       TYPE            ptreq_uia_fieldcust_struc.

   DATA: ls_dd04v                   TYPE            dd04v,

         lv_width                   TYPE            string.

   LOOP AT wd_comp_controller->gt_additional_fields INTO ls_additional_fields.

     lv_node_name = 'ADDITIONAL_FIELDS.'.

     IF ls_additional_fields-required EQ 'X'.

       lv_required = '01'.

     ENDIF.

*Begin SIR 1706680

     IF wd_assist->gv_corrections_command EQ 'EDIT' AND

       wd_assist->gv_date_readonly EQ abap_true AND

       wd_assist->gv_time_readonly EQ abap_true.

     ENDIF.

*End SIR 1706680

     IF wd_assist->gv_corrections_command EQ 'DELETE' OR wd_assist->gv_ok_button_visible eq abap_false.

* T_BRUNOA: Begin

       if ls_additional_fields-fieldname       eq 'ABWGR' and

          WD_ASSIST->GS_REQUEST-ITEM_DEL-ABWGR eq '0100'.

         ls_additional_fields-readonly = abap_false.

       else.

         ls_additional_fields-readonly = abap_true.

       endif.

* T_BRUNOA: End

     ENDIF.

*********************LAK 1824964********************

     IF wd_assist->gv_corrections_command = 'DISPLAY' OR wd_assist->gv_ok_button_visible eq abap_false.

       ls_additional_fields-readonly = abap_true.

     ENDIF.

*********************LAK 1824964********************

     CONCATENATE lv_ip_str 'I' INTO lv_ip_str.

     CONCATENATE lv_node_name ls_additional_fields-fieldname INTO lv_node_name.

     lv_lbl_name = ls_additional_fields-field_label.

     CONCATENATE lv_lbl_str 'L' INTO lv_lbl_str.

     lo_label = cl_wd_label=>new_label(

                    view      = detail_view

                    id        = lv_lbl_str

                    text      = lv_lbl_name

                    width     = '10em'

                    label_for = lv_ip_str

                    wrapping  = abap_true

                     ).

     CALL METHOD cl_wd_grid_data=>new_grid_data

       EXPORTING

         h_align = 07

         element = lo_label.

*&--- add text view and lable to the container ---&*

     container->add_child( the_child = lo_label ).

* checking for DATUM fields & Search help fields

     CALL FUNCTION 'DDIF_DTEL_GET'

       EXPORTING

         name          = ls_additional_fields-fieldname

       IMPORTING

         dd04v_wa      = ls_dd04v

       EXCEPTIONS                                            "#EC FB_RC

         illegal_input = 1

         OTHERS        = 2.

*    IF sy-subrc <> 0.

** Implement suitable error handling here  "Do Nothing

*    ENDIF.

** Begin Note 1655072 : Clock In/Out Alignment issues.

*    IF ls_dd04v-domname EQ 'DATUM'

*       OR ls_dd04v-valexi EQ abap_true

*       OR ls_dd04v-shlpname IS NOT INITIAL

*       OR ls_additional_fields-fieldname EQ 'ABWGR'.

*      lv_width = '18em'.

*    ELSE.

*      lv_width = '19.5em'.

*    ENDIF.

     lv_width = '100%'.

** End Note 1655072 : Clock In/Out Alignment issues.

     IF wd_assist->gv_corrections_command = 'EDIT' AND wd_assist->mt_change_enabled = abap_false.

       ls_additional_fields-readonly = abap_true.

     ENDIF.

     IF ls_additional_fields-fieldname EQ 'ABWGR'.

*       OR ls_additional_fields-fieldname EQ 'DALLF'.

       CALL METHOD cl_wd_dropdown_by_key=>new_dropdown_by_key

         EXPORTING

           bind_selected_key = lv_node_name

           id                = lv_ip_str

           state             = lv_required

*         on_select         =

           read_only         = ls_additional_fields-readonly

           width             = lv_width

         RECEIVING

           control           = lo_ddbk.

       CALL METHOD cl_wd_grid_data=>new_grid_data

         EXPORTING

           element = lo_ddbk.

       container->add_child( the_child = lo_ddbk ).

     ELSE.

       lo_input = cl_wd_input_field=>new_input_field(

                       view       = detail_view

                       id         = lv_ip_str

                       bind_value = lv_node_name

                       read_only  = ls_additional_fields-readonly

                       width      = lv_width

                       state      = lv_required  ).

       CALL METHOD cl_wd_grid_data=>new_grid_data

         EXPORTING

           element = lo_input.

       container->add_child( the_child = lo_input ).

     ENDIF.

     CLEAR lo_label.

     CLEAR lo_input.

     CLEAR lv_required.

   ENDLOOP.

endmethod.

MODIFYING:

FUGR: PT_COR_REQUEST_UIA

INCLUDE: LPT_COR_REQUEST_UIAF10

PERFORM: create_modify_request (create an enhancement at the end of the perform)

ENHANCEMENT ZHR_PROCESS_ORIGF.    "active version

   LOOP AT ui_request-item_tab ASSIGNING <ins_item>.

     if <ins_item>-ORIGF = 'M' or

        <ins_item>-ORIGF = 'S' or

        <ins_item>-ORIGF is initial.

       if <ins_item>-ORIGF = ' ' or

          <ins_item>-ORIGF = 'S'.

          <ins_item>-ABWGR = '0100'.

       endif.

       <ins_item>-ORIGF = 'E'.

     endif.

   ENDLOOP.

* create the DEL/INS-item(s) incl. item id(s)

   PERFORM pack_request

     USING

       ui_request

     CHANGING

       packed.

   CALL METHOD request->set_all_attribs

     EXPORTING

       im_attribs_struc = packed.

* prepare for return

   CALL METHOD request->get_all_attribs

     IMPORTING

       ex_attribs_struc = packed.

   PERFORM unpack_request

     USING

       packed

     CHANGING

       ui_request.

ENDENHANCEMENT.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question