Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

PT_ARQ_REQUEST_PREPARE

stefan_hntemann
Explorer
0 Kudos
851


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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Kudos
687

Hi Stefan,

i did this in BADI PT_ABS_REQ Method TEAM_CALE_ENRICHMENT.

regards

Alex

5 REPLIES 5
Read only

Former Member
0 Kudos
688

Hi Stefan,

i did this in BADI PT_ABS_REQ Method TEAM_CALE_ENRICHMENT.

regards

Alex

Read only

0 Kudos
687

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

Read only

0 Kudos
687

Start with SE19 and not SE18 (create an implementation of BAdI and don't change the BAdI)

Regards,

Raymond

Read only

0 Kudos
687

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

Read only

stefan_hntemann
Explorer
0 Kudos
687

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