Skip to Content

MSS leave request rejection reason mandatory

Hi to all,

we are using NWBC on our EhP6 System for ESS/MSS. I managed to configure leave request with custom workflow (just copy of the standard one with 2 extra mail steps). Now i'm trying to implement the following functionality:

The manager should not be able to reject selected leave request without typing a reason (see image below).

Which classes and BaDIs should be enhanced to implement this functionality?

Thanks in advance for the help.

Regards,

Yanko

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 11, 2014 at 12:15 PM

    Hi,

    check pt_abs_req badi if this is not suitable proceed in the following way

    you can enhance the class CL_HRESS_PTARQ_LEAVREQ_GUIBBF IF_FPM_GUIBB_FORM~GET_DATA method . In that approve or rejcet event you can handle, if notes(CURR_NOTICE) is empty you can raiser error message.

    If require more details let me know.

    Regards

    suri

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Yanko Stoychev

      Hi,

      For that you need to do following way.

      Now what you need to do is dont enhance get_data method.

      Approve and Reject events handling in process event.

      In process event.

      fpm event : cl_hress_ptarq_communicator=>gc_lrf_appr_reject

      in this event it is calling reject method.

      in reject method of class CL_HRESS_PTARQ_LEAVREQ_GUIBBF you need to enhace for

      curr_notice field .

      if that field is initial fill ct_messages table as error message type 'E'.

      Even though it will not stop flow of execution unit unless you have to set this attribute mv_lrf_error_detected eq abap_true.

      Regards

      suri

  • Posted on Jun 11, 2014 at 11:44 AM

    you can implement the BADI PT_ABS_REQ

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 12, 2016 at 02:05 PM

    Hi,

    I used below method to achieve this requirement.

    Go to Class: CL_HRESS_PTARQ_LEAVREQ_GUIBBF

    Method: REJECT

    Create an Implicit Enhancement at the Top of the Standard Code, and use below Code in It.

    Please Note: I have used my Message class: ZHR

    and Maintained the error message in it with ID: 033.

    data: mt_messages_fpm1 type FPMGB_S_T100_MESSAGE.

    if ms_request-curr_notice is initial.

    mv_lrf_error_detected = abap_true.

    clear: mt_messages_fpm1.

    CLEAR: Ct_message[].

    MT_MESSAGES_FPM1-MSGID = 'ZHR'.

    MT_MESSAGES_FPM1-msgno = '033'.

    MT_MESSAGES_FPM1-severity = 'E'.

    APPEND MT_MESSAGES_FPM1 TO CT_MESSAGE.

    CLEAR mt_messages_fpm1.

    return.

    ENDIF.

    Regards.

    😊

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.