2015 Mar 30 8:37 AM
Hi all,
I have the following challenge in ESS-team-calendar:
Every absence of my collegues in the team-calendar should be overwritten by "absence" so that there are no longer texts like "holiday" or "illness" to be seen.
I found the hint to install an enhancement-spot in FM PT_ARQ_REQUEST_PREPARE and insert following coding at the end:
1 ZHR_ABWESENHEIT. "active version
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$:(3) Funktionsbaustein PT_ARQ_REQUEST_PREPARE, Ende, Erweiterung ZHR_ABWESENHEIT, Anfang A
DATA: v_app_pernr type p_pernr,
v_initiator type ref to if_pt_req_a_wf.
v_app_pernr = ex_request-ins_item-pernr.
if im_modus = 'R' and v_app_pernr ne im_pernr.
ex_request-ins_item-subtype_description = 'Abwesend'.
endif.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$:(4) Funktionsbaustein PT_ARQ_REQUEST_PREPARE, Ende, Erweiterung ZHR_ABWESENHEIT, Ende A
ENDENHANCEMENT.
I have done this and the enhancement is processed (applikation stops at my breakpoint) but 2 issues
1. it is only processed for my own pernr, not for the other team-members
2. absence-text is not changed (when I remove the if-statement)
Has anybody any solutions for me ?
thanks
Stefan
2015 Mar 30 9:01 AM
Hi Stefan,
i did this in BADI PT_ABS_REQ Method TEAM_CALE_ENRICHMENT.
regards
Alex
2015 Mar 30 9:01 AM
Hi Stefan,
i did this in BADI PT_ABS_REQ Method TEAM_CALE_ENRICHMENT.
regards
Alex
2015 Mar 30 1:39 PM
Hi Alex,
thank you for that hint.
Sorry, I`m not very familiar with BADI. When I want to change the method, it is asking for registration. Is that ok ? No modification ?
And is it possible for you to forward some example-coding ?
regards
Stefan
2015 Mar 30 3:23 PM
2015 Apr 01 9:22 AM
Hi,
Raymond is right, use SE19 and create a new implementation of this badi.
some sample coding from my badi (i am not proud of it, but it had to be done quickly 😉 😞
DATA ls_row TYPE ptarq_uia_weekcale_struc.
DATA lt_row TYPE ptarq_uia_weekcale_tab.
DATA lt_requests TYPE ptreq_uia_request_id_tab.
DATA lt_requests_temp TYPE ptreq_uia_request_id_tab.
DATA ls_requests TYPE ptreq_uia_request_id_struc.
CLEAR ls_row.
CLEAR lt_row.
CLEAR lv_absent_string.
LOOP AT ch_calendar_tab INTO ls_row.
CLEAR lt_requests.
CLEAR lt_requests_temp.
CLEAR ls_requests.
lt_requests = ls_row-request.
LOOP AT lt_requests INTO ls_requests.
ls_requests-tooltip = 'abwesend'.
ENDIF.
APPEND ls_requests TO lt_requests_temp.
ENDLOOP.
ls_row-request = lt_requests_temp.
APPEND ls_row TO lt_row.
ENDLOOP.
ch_calendar_tab = lt_row.
hope that helps.
regards Alex
2015 Apr 14 2:37 PM
Hello Alex, hello Raymond,
due to some days off (easter holidays) I get around to answer late:
Thank you very much, it works !!
regards
Stefan