Skip to Content
0
Oct 08, 2020 at 12:39 PM

Error message handling in badi PT_ABS_REQ?

54 Views

Hi guys,

Implementing BADI "PT_ABS_REQ" in order to validate Attachment while sending sick leave in the method "CHECK_ATTACHMENT_MANDATORY". There is no exception parameter in this method. Was trying to implement below logic to raise then exception nin ESS Portal.

Data: MESSAGE_HANDLER Type Ref To IF_PT_REQ_MESSAGE_HANDLER.

CALL METHOD message_handler->add_message
EXPORTING
im_type = 'E'
im_cl = 'HRTIM_ABS_REQ'
im_number = '927'
im_par1 = 'CHECK_ATTACHMENT_MANDATORY'
im_par2 = 'IF_EX_PT_ABS_REQ~CHECK_ATTACHMENT_MANDATORY'
im_par3 = 'ATTACHMENT'
im_par4 = 'CHECK'
im_context = 'CHECK_ATTACHMENT'
im_subcontext = 'MANDATORY'
im_classname = 'ZHCM_CL_PT_ARQ_REQ_EXIT'
im_methodname = 'CHECK_ATTACHMENT_MANDATORY'.

and gettig dump in the portal as "ERROR: Access using a ''NULL' object reference is not possible."

tryig to figure out what went wrong......any suggestions please

Thanks & Regards,

Satish