on 06-11-2014 11:44 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Suri,
thanks for the hint. So i enhanced the class CL_HRESS_PTARQ_LEAVREQ_GUIBBF IF_FPM_GUIBB_FORM~GET_DATA method. I've managed to raise message but this error message doesn't stop the process of rejecting the request (see image below).
Do you have an idea how to raise properly an error message that interrupts the process?
Hi Shankar,
i've implemented the BADI PT_ABS_REQ and tried to raise an error with the message handler but had no success. Here is my coding:
ls_message-id = 'ZHR_XSS'.
ls_message-number = '001'.
ls_message-type = 'E'.
CALL METHOD message_handler->add_message
EXPORTING
im_type = ls_message-type " Meldungstyp: S Success, E Error, W Warning, I Info, A Abort
im_number = ls_message-number
im_cl = ls_message-id
im_context = ''
im_subcontext = ''
im_classname = 'ZCL_PT_ARQ_REQ_EXIT'
im_methodname = 'SIMULATE_VIA_BLOP'.
As of your second hint. Could you please name me the WDC at application level? I've searched hours but it seems to be generated "on the fly" by FPM.
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you can implement the BADI PT_ABS_REQ
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
100 | |
11 | |
11 | |
6 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.