SAP OSS Notes

999676 SAP OSS Note - Weekly & Daily Schedule View Modifications (Events, Breaks)








SAP OSS Note 999676 version 0002 contains details of a know issue related to Weekly & Daily Schedule View Modifications (Events, Breaks). This includes any associated symptoms and instructions on how to fix it, see below for full details. Also check out the comments section to view/add related contributions, questions or screen shots, based on real life experience of this oss note and problem.

...For more information about the SAP support system known as OSS please check out the SAP OSS NOTES SECTION, whih includes how to download & implement them onto your SAP system using transaction code SNOTE.

Note 999676 Details:






When does this problem occur

The following issues will be solved with this note:
  • Weekly Schedule View (WSV) does not show events

  • The 'Total' shown on the right hand side of the WSV does not include event times even when the events occur outside of the working segments

  • The 'Total' shown on the right hand side of the WSV does not subtract the times for unpaid meals/breaks.

  • In the Daily schedule view for a location that has split shifts enabled you should not be able to add breaks/meals manually but only by using the automatic 'add meal/break' feature due to UI limitations.



  • Description of problem

    Interaction Center Workforce Management, IC WFM, MS WFD, Multisite
    Workforce Deployment, Workforce Management, MS WFD, Daily Schedule View, Weekly schedule View, Events, Meal/Break, Total


    Cause of the problem and Pre-requisites

    This is a functional gap.
    Please also make sure that note 993144 is applied to your system as well, otherwise your Java version and Abap version will be out of sync.


    Solution instructions

    Please preform the following manual steps before applying the attached corrections:
    Transaction 'SE11'
    Select 'Data Type' and enter 'WFMCASS_WSV_SEGMENTS' in the data type field
    'Change'
    At the end of the structure, append the componenent 'IS_EVENT' with component type 'WFM_CAS_FLAG'
    Save and activate your changes
    Apply the attached corrections

    Note 999676 Correction instructions:



    NOTE: Only source text changes are displayed here

    *$*$----------------------------------------------------------------$*$*
    *$ CORRECTION INSTRUCTIONS 0120031469 0000523522 $*
    *$ Prerequisite corr. inst. 0120031469 0000431339 Note 0000893665 $*
    *$ 0120031469 0000476346 Note 0000947635 $*
    *$--------------------------------------------------------------------$*
    *$ VALID FOR : $*
    *$ Software Component WFMCORE Workforce Management $*
    *$ Release 200 To SAPK-20007INWFMCORE $*
    *$*$----------------------------------------------------------------$*$*
    *&---------------------------------------------------------------------*
    *& Object FUNC WFM_DAILY_SCHEDULE_LOAD2
    *& Object header FUGR CRM_WFM_SHIFT
    *&---------------------------------------------------------------------*
    *& FUNCTION WFM_DAILY_SCHEDULE_LOAD2
    *&---------------------------------------------------------------------*
    ...
    DATA: cl_cfg TYPE REF TO cl_wfm_cfg.
    cl_cfg = lo_org->get_config( ).

    *>>>> START OF DELETION <<<<<
    CALL METHOD cl_cfg->get_par_ontype
    *>>>> END OF DELETION <<<<<<<
    *>>>> START OF INSERTION <<<<

    *======================================================================
    * Is this a split shift organization? If so, don't pass the breaks..
    *======================================================================
    DATA: lv_split_enabled TYPE wfm_boolean,
    ls_params TYPE wfms_id_type.

    CLEAR it_parameters[].

    CALL METHOD cl_cfg->get_par_ontype
    EXPORTING
    par_type = '109' "general settings..
    IMPORTING
    PARAMETERS = it_parameters
    EXCEPTIONS
    noparameter = 1
    OTHERS = 2.

    IF it_parameters IS NOT INITIAL.
    READ TABLE it_parameters INTO ls_params INDEX 1.
    SELECT SINGLE split_shifts INTO lv_split_enabled
    FROM wfmc_locsettn
    WHERE external_key = ls_params-profile_id.
    ENDIF.


    IF lv_split_enabled <> 'X'.
    CLEAR it_parameters[].
    CALL METHOD cl_cfg->get_par_ontype
    *>>>> END OF INSERTION <<<<<<
    ...
    FOR ALL ENTRIES IN it_parameters
    WHERE a~brktype_id = it_parameters-profile_id. "#EC CI_BUFFJOIN
    ENDIF.
    *>>>> START OF DELETION <<<<<

    *>>>> END OF DELETION <<<<<<<
    *>>>> START OF INSERTION <<<<
    ENDIF.
    *>>>> END OF INSERTION <<<<<<
    ...
    *&---------------------------------------------------------------------*
    *&---------------------------------------------------------------------*
    *& Object FUNC WFM_WEEKLY_SCHEDULE_PAGE_GET
    *& Object header FUGR CRM_WFM_WEEKLY_SCHEDULE
    *&---------------------------------------------------------------------*
    *& FUNCTION WFM_WEEKLY_SCHEDULE_PAGE_GET
    *&---------------------------------------------------------------------*
    ...
    DATA: ls_ranges TYPE ranges_struc,
    lt_ranges TYPE TABLE OF ranges_struc INITIAL SIZE 0.

    *>>>> START OF DELETION <<<<<
    DATA: lo_org TYPE REF TO cl_wfm_organization,
    *>>>> END OF DELETION <<<<<<<
    *>>>> START OF INSERTION <<<<
    * break types...
    DATA: lt_brktypes TYPE WFMCAST_BREAKTYPES.

    DATA: lo_org TYPE REF TO cl_wfm_organization,
    *>>>> END OF INSERTION <<<<<<
    ...
    DATA: lv_schedule_id TYPE wfm_cas_schedule_id.

    FIELD-SYMBOLS: TYPE wfmcass_partner,
    TYPE wfmcass_wsv_partner.
    *>>>> START OF DELETION <<<<<

    *----------------------------------------------------------------------
    *>>>> END OF DELETION <<<<<<<
    *>>>> START OF INSERTION <<<<


    *----------------------------------------------------------------------
    *>>>> END OF INSERTION <<<<<<
    ...
    MESSAGE e163(crm_wfm_cas) WITH iv_root_org_objid iv_effective_date
    INTO es_return-message.
    RETURN.
    ENDIF.
    *>>>> START OF DELETION <<<<<

    * lo_multisite_cfg = lo_org->get_config( ).
    * CALL METHOD lo_multisite_cfg->get_org_heir
    * IMPORTING
    * org_heir = lt_workarea.

    *>>>> END OF DELETION <<<<<<<
    *>>>> START OF INSERTION <<<<

    * load break types...
    PERFORM load_brktypes CHANGING lt_brktypes.
    *>>>> END OF INSERTION <<<<<<
    ...
    *----------------------------------------------------------------------
    * Get all the schedule data for the selected business partners.
    *----------------------------------------------------------------------
    *>>>> START OF DELETION <<<<<
    DATA: ls_segment TYPE wfmcass_wsv_segments.
    DATA: lt_segs2 TYPE wfmcast_shift_segment2.
    FIELD-SYMBOLS: TYPE wfmcass_shift_segment2.
    DATA: lv_secs TYPE i,
    lv_date TYPE wfm_cas_date,
    lv_time TYPE wfm_cas_time.
    *>>>> END OF DELETION <<<<<<<
    *>>>> START OF INSERTION <<<<

    DATA: lt_segs2 TYPE wfmcast_shift_segment2.
    *>>>> END OF INSERTION <<<<<<
    ...
    RECEIVING
    et_segments = lt_segs2.

    *>>>> START OF DELETION <<<<<
    * move the data into the processing table
    LOOP AT lt_segs2 ASSIGNING .
    ls_segment-partner = -partner.

    CONVERT TIME STAMP -seg_start TIME ZONE lv_timezone
    INTO DATE lv_date TIME lv_time.

    CONVERT DATE lv_date TIME lv_time
    INTO TIME STAMP ls_segment-seg_start_tst TIME ZONE 'UTC '.

    CONVERT TIME STAMP -seg_end TIME ZONE lv_timezone
    INTO DATE lv_date TIME lv_time.

    CONVERT DATE lv_date TIME lv_time
    INTO TIME STAMP ls_segment-seg_end_tst TIME ZONE 'UTC '.


    *all we want are working segments
    IF -brktype_id IS INITIAL AND
    -schdl_evt_id IS INITIAL.
    * Is this segment assigned to the filter ID?
    IF -wrkarea_id = iv_main_filter_id.
    * Yes
    ls_segment-is_assigned_filter_wrkarea = 'X'.
    ELSE.
    * No
    ls_segment-is_assigned_filter_wrkarea = '-'.
    ENDIF.

    ls_segment-is_remote = '-'.

    "get the total hours
    READ TABLE et_partner ASSIGNING
    WITH KEY partner = -partner.
    CLEAR lv_secs.
    IF ls_segment-seg_end_tst NE 0 AND
    ls_segment-seg_start_tst NE 0.

    lv_secs = cl_abap_tstmp=>subtract( tstmp1 =
    ls_segment-seg_end_tst
    tstmp2 = ls_segment-seg_start_tst ).
    ENDIF.

    -total_hrs =
    -total_hrs + ( lv_secs / 60 / 60 ).

    APPEND ls_segment TO et_segments.
    ENDIF.
    ENDLOOP.

    *Now load all shift segments that lended bps have in other location for
    *the same week.
    *>>>> END OF DELETION <<<<<<<
    *>>>> START OF INSERTION <<<<
    PERFORM add_segs_and_calculate_hours USING lt_segs2
    lt_brktypes
    iv_main_filter_id
    lv_timezone
    CHANGING et_partner
    et_segments.

    *Now load all shift segments that lended bps have in other location for
    *the same week.


    *>>>> END OF INSERTION <<<<<<
    ...

    *first check if there is shared org exists. The shared org list is
    *constructed
    *during loading shared partner, we go one step further check if the
    *shared org
    *has already scheduled for this week, if no schedule then don't bother
    *to look
    *>>>> START OF DELETION <<<<<
    CALL METHOD lo_partner_col->check_sibling_org_sched
    .

    *>>>> END OF DELETION <<<<<<<
    *>>>> START OF INSERTION <<<<
    CALL METHOD lo_partner_col->check_sibling_org_sched.
    *>>>> END OF INSERTION <<<<<<
    ...

    APPEND LINES OF tmpt_seg2 TO lt_segs2.
    ENDLOOP.
    *>>>> START OF DELETION <<<<<
    ENDIF.

    ENDIF.

    LOOP AT lt_segs2 ASSIGNING .
    ls_segment-partner = -partner.

    CONVERT TIME STAMP -seg_start TIME ZONE lv_timezone
    INTO DATE lv_date TIME lv_time.

    CONVERT DATE lv_date TIME lv_time
    INTO TIME STAMP ls_segment-seg_start_tst TIME ZONE 'UTC '.

    CONVERT TIME STAMP -seg_end TIME ZONE lv_timezone
    INTO DATE lv_date TIME lv_time.

    CONVERT DATE lv_date TIME lv_time
    INTO TIME STAMP ls_segment-seg_end_tst TIME ZONE 'UTC '.


    *all we want are working segments
    IF -brktype_id IS INITIAL AND
    -schdl_evt_id IS INITIAL.
    * Is this segment assigned to the filter ID?
    IF -wrkarea_id = iv_main_filter_id.
    * Yes
    ls_segment-is_assigned_filter_wrkarea = 'X'.
    ELSE.
    * No
    ls_segment-is_assigned_filter_wrkarea = '-'.
    ENDIF.

    ls_segment-is_remote = 'X'.

    "get the total hours
    READ TABLE et_partner ASSIGNING
    WITH KEY partner = -partner.
    CLEAR lv_secs.

    IF ls_segment-seg_end_tst NE 0 AND
    ls_segment-seg_start_tst NE 0.
    lv_secs = cl_abap_tstmp=>subtract( tstmp1 =
    ls_segment-seg_end_tst
    tstmp2 = ls_segment-seg_start_tst ).
    ENDIF.

    -total_hrs =
    -total_hrs + ( lv_secs / 60 / 60 ).

    APPEND ls_segment TO et_segments.
    ENDIF.
    ENDLOOP.
    *>>>> END OF DELETION <<<<<<<
    *>>>> START OF INSERTION <<<<
    ENDIF.

    PERFORM add_segs_and_calculate_hours USING lt_segs2
    lt_brktypes
    iv_main_filter_id
    lv_timezone
    CHANGING et_partner
    et_segments.

    ENDIF.
    *>>>> END OF INSERTION <<<<<<
    ...
    es_return-number = '021'.
    PERFORM format_return USING es_return.
    ENDFUNCTION.
    *>>>> START OF INSERTION <<<<

    *>>>> END OF INSERTION <<<<<<
    ...
    *&---------------------------------------------------------------------*
    *& FORM ADD_SEGS_AND_CALCULATE_HOURS
    *&---------------------------------------------------------------------*
    *>>>> START OF INSERTION <<<<
    ************************************************************************
    *************
    *This routine adds events and working segments to the weekly schedule
    *view
    * also determines the total hours for the week...
    *subtracting unpaid breaks and event times based on whether they are
    *part of
    * a working segment or not...
    ************************************************************************
    **************
    FORM add_segs_and_calculate_hours USING pt_segs2 TYPE
    wfmcast_shift_segment2
    pt_brktypes TYPE
    WFMCAST_BREAKTYPES
    pv_main_filter_id TYPE
    wfm_cas_id
    pv_timezone TYPE
    wfm_cas_timezone
    CHANGING pt_partner TYPE
    wfmcast_wsv_partner
    pt_segments TYPE
    wfmcast_wsv_segments.

    FIELD-SYMBOLS: TYPE wfmcass_shift_segment2,
    TYPE wfmcass_shift_segment2,
    TYPE wfmc_brktypes,
    TYPE wfmcass_wsv_partner.
    DATA: lv_secs TYPE i,
    lv_date TYPE wfm_cas_date,
    lv_time TYPE wfm_cas_time,
    lv_ev_secs TYPE i,
    lv_total TYPE i,
    lv_overlapping TYPE wfm_boolean,
    lv_contained TYPE wfm_boolean,
    lv_subtract_break TYPE wfm_boolean,
    ls_segment TYPE wfmcass_wsv_segments.

    LOOP AT pt_segs2 ASSIGNING .
    CLEAR lv_total.
    CLEAR lv_overlapping.
    CLEAR lv_contained. "event is within the work area segment...

    ls_segment-partner = -partner.

    CONVERT TIME STAMP -seg_start TIME ZONE pv_timezone
    INTO DATE lv_date TIME lv_time.

    CONVERT DATE lv_date TIME lv_time
    INTO TIME STAMP ls_segment-seg_start_tst TIME ZONE 'UTC '.

    CONVERT TIME STAMP -seg_end TIME ZONE pv_timezone
    INTO DATE lv_date TIME lv_time.

    CONVERT DATE lv_date TIME lv_time
    INTO TIME STAMP ls_segment-seg_end_tst TIME ZONE 'UTC '.

    *all we want are working and event segments...FIX for SP08
    IF -brktype_id IS INITIAL.
    * Is this segment assigned to the filter ID?
    IF -wrkarea_id = pv_main_filter_id.
    * Yes
    ls_segment-is_assigned_filter_wrkarea = 'X'.
    ELSE.
    * No
    ls_segment-is_assigned_filter_wrkarea = '-'.
    ENDIF.

    ls_segment-is_remote = '-'.

    *mark events so that the UI can distinguish between working time and
    *event time
    IF NOT -schdl_evt_id IS INITIAL.
    ls_segment-is_event = 'X'.

    *set the total for the event shift and then subtract any time that is
    *within the working segment...
    lv_total = cl_abap_tstmp=>subtract( tstmp1 = -seg_end
    tstmp2 = -seg_start ).
    * read the shift to see if the event is within the shift time....
    LOOP AT pt_segs2 ASSIGNING WHERE shift_id =
    -shift_id.
    IF NOT -brktype_id IS INITIAL.
    " break segment..just continue..
    CONTINUE.
    ELSEIF NOT -schdl_evt_id IS INITIAL.
    "Event segment...don't need it....
    CONTINUE.
    ENDIF.
    * we have a working segment...let's check event data....
    IF -seg_start BETWEEN -seg_start AND
    -seg_end.
    IF -seg_end BETWEEN -seg_start
    AND -seg_end.
    lv_contained = 'X'.
    CLEAR lv_total.
    CONTINUE.
    "we don't need to do anything with this because it lies within working s
    "egment
    ELSE.
    "Overlapping event where the end time goes beyond the shift....
    "take the end time of the shift and the start time of the event to ge
    "the amount to add
    lv_ev_secs = cl_abap_tstmp=>subtract( tstmp1 =
    -seg_end
    tstmp2 =
    -seg_start )
    .

    lv_total = lv_total - lv_ev_secs.
    lv_overlapping = 'X'.

    ENDIF.
    ELSEIF -seg_end BETWEEN -seg_start
    AND -seg_end.
    "overlapping event where the start time is before the shift.....
    lv_ev_secs = cl_abap_tstmp=>subtract( tstmp1 =
    -seg_end
    tstmp2 =
    -seg_start ).
    lv_total = lv_total - lv_ev_secs.
    lv_overlapping = 'X'.

    ELSEIF -seg_start < -seg_start
    AND -seg_end > -seg_end.
    "working segment is completely within the event.....
    lv_ev_secs = cl_abap_tstmp=>subtract( tstmp1 =
    -seg_end
    tstmp2 =
    -seg_start ).

    lv_total = lv_total - lv_ev_secs.
    lv_overlapping = 'X'.

    ENDIF.
    ENDLOOP.

    ELSE.
    CLEAR ls_segment-is_event.
    ENDIF.
    ELSE.
    READ TABLE pt_brktypes ASSIGNING
    WITH KEY BRKTYPE_ID = -brktype_id.

    IF sy-subrc = 0.
    IF -paid_flag <> 'X'.
    lv_subtract_break = 'X'.
    ELSE.
    CONTINUE.
    ENDIF.
    ENDIF.


    ENDIF.

    IF -brktype_id IS INITIAL.
    APPEND ls_segment TO pt_segments.
    ENDIF.
    IF lv_contained = 'X'.
    CONTINUE.
    "event is within the working segment..don't add hours because already co
    "unted
    ENDIF.
    "get the total hours
    READ TABLE pt_partner ASSIGNING
    WITH KEY partner = -partner.
    CLEAR lv_secs.
    IF ls_segment-seg_end_tst NE 0 AND
    ls_segment-seg_start_tst NE 0.

    lv_secs = cl_abap_tstmp=>subtract( tstmp1 =
    ls_segment-seg_end_tst
    tstmp2 = ls_segment-seg_start_tst ).
    ENDIF.


    IF lv_overlapping <> 'X'.
    IF lv_subtract_break = 'X'.
    -total_hrs =
    -total_hrs - ( lv_secs / 60 / 60 ).
    ELSE.
    -total_hrs =
    -total_hrs + ( lv_secs / 60 / 60 ).
    ENDIF.
    ELSE.
    -total_hrs =
    -total_hrs + ( lv_total / 60 / 60 ).


    ENDIF.

    CLEAR lv_subtract_break.
    CLEAR lv_overlapping.
    ENDLOOP.


    ENDFORM.




    *>>>> END OF INSERTION <<<<<<
    ...
    *&---------------------------------------------------------------------*
    *& FORM LOAD_BRKTYPES
    *&---------------------------------------------------------------------*
    *>>>> START OF INSERTION <<<<
    FORM load_brktypes
    CHANGING
    rt_brktypes TYPE WFMCAST_BREAKTYPES.

    SELECT * FROM wfmc_brktypes
    INTO CORRESPONDING FIELDS OF TABLE rt_brktypes.

    ENDFORM. "load_brktypes
    *>>>> END OF INSERTION <<<<<<
    ...
    *&---------------------------------------------------------------------*

    Effected Objects:


    (FUNC) - WFM_DAILY_SCHEDULE_LOAD2
    (FUNC) - WFM_WEEKLY_SCHEDULE_PAGE_GET

    Solution instructions


    Please import the corrections attached to this OSS note into your SAP system using SNOTE.

    You can also view the full details of this OSS note and download it to your SAP system ready for implementation using transaction code SNOTE. Once it has been downloaded you can read the full details, check out any installation instructions including manual changes and see if there are any pre-requisites.

    You can also check if a new version of note 999676 has been released as well as see if the note is valid for your current SAP system landscape.

    Check if SAP OSS note 999676 has already been downloaded and is valid


    To check if this note has already been download, what status it has and if it is valid for your system first execute t-code SNOTE and click on the SAP Note Browser icon
    Icon used to execute SAP Note Browser report within SNOTE

    From here you can just enter the note number 999676 and press execute. If the note already exists it's details will be displayed. See here for full step by step instructions on how to check if an SAP note has been downloaded and is valid for your system.



    If note 999676 does not exist on your system you will receive the message "Unable to find SAP Note that meets specified criteria"
    Icon used to execute SAP Note Browser report within SNOTE

    If this is the case you will need to download the note to you SAP system also using transaction SNOTE. For further details see Download note using SNOTE. Even if it does exist you may still want to check if you have downloaded the latest version of the note.

    Alternatively you can find full details of this note on the SAP service market place(SNumber / Service market place login will be required)