SAP for Higher Education and Research Blogs
Discover practical tips and insights to optimize operations and enhance learning experiences with SAP. Share your own experiences in higher education and research.
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

Hello,

With the IS-PS-CA 617 release, a new codes was added inside of "UPDATE_PRE_EXC_ABSENCE" form which is called by "HRIQ_EVENT_CHANGE" function module as a part of  pre excused absences process.

Through that when a user edits event offerings (change resources assigned to an event , edit schedules of events etc...) by calling PIQACADOFFER00 t-code, this new code deletes all contents of PIQDBATATT table so all attendance tracking master data was lost.

As a solution SAP serviced 2 notes which numbers are;

0002086214

0002166136

Related Function Moduels: HRIQ_EVENT_CHANGE

Related Include:                LHRPIQ00MODULEOFFER_CREATEF05

Related Form:                   update_pre_exc_absence

*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
* (call after delete_inftys_from_e in HRIQ_EVENT_CHANGE)
FORM update_pre_exc_absence USING pv_objid TYPE hrobjid
pt_schedule
TYPE piq_bapisched_t.
DATA: lt_att TYPE TABLE OF piqdbatatt,
lt_att_new
TYPE TABLE OF PIQATEVENTOCCATTEND,
ls_att
TYPE piqdbatatt.
DATA: lt_preex TYPE TABLE OF piqdbatpreex,
ls_preex
TYPE piqdbatpreex.
DATA: ls_schedule LIKE LINE OF pt_schedule.
FIELD-SYMBOLS: <fs_att> TYPE piqdbatatt.

*  SELECT * FROM piqdbatatt INTO TABLE lt_att
*    WHERE EVENT_OBJID = pv_objid.
*  SORT lt_att BY st_objid EVENT_DATE BEG_TIME.

* in case of event creation, pre-exc absence DB table is updated
SELECT * FROM piqdbatpreex INTO TABLE lt_preex
FOR ALL ENTRIES IN pt_schedule
WHERE beg_date <= pt_schedule-evdat
AND end_date >= pt_schedule-evdat
.

LOOP AT lt_preex INTO ls_preex .
LOOP AT pt_schedule INTO ls_schedule WHERE evdat >= ls_preex-beg_date AND evdat <= ls_preex-end_date.
ls_att
-PLVAR = ls_preex-plvar.
ls_att
-ST_OBJID = ls_preex-st_objid.
ls_att
-EVENT_OBJID = pv_objid.
ls_att
-EVENT_DATE = ls_schedule-evdat.
ls_att
-BEG_TIME = ls_schedule-beguz.
ls_att
-ABSENCE_RSN = ls_preex-absence_rsn.
ls_att
-AEDTM = sy-datum.
ls_att
-UNAME = sy-uname.
APPEND ls_att TO lt_att_new.
ENDLOOP.
ENDLOOP.

"Update PIQDBATATT for pre-exc absences events
SELECT * FROM piqdbatatt INTO TABLE lt_att
FOR ALL ENTRIES IN lt_att_new
WHERE st_objid = lt_att_new-st_objid AND event_objid = lt_att_new-event_objid.
DELETE piqdbatatt FROM TABLE lt_att." WHERE st_objid = lt_att_new-st_objid AND event_objid = lt_att_new-event_objid.
MODIFY piqdbatatt FROM TABLE lt_att_new .

ENDFORM.                    " UPDATE_ATTENDANCE




Best regards.

SLcM App. Consultant Görkem

Top kudoed authors