‎2014 Feb 08 10:33 AM
Hi ABAP Experts,
I am getting run time error for the bapi: PT_ARQ_REQUEST_EXECUTE for Leave request approval process
I was passing input values: RequesterID : ID get the table from PTREQ_HEADER
Command -- EXECUTE_APPROVE
PERNR : Leave Requester PERNR
IM_MODUS : A
But I am getting below error : Object null reference.
I have debug that function module ...lcl_initiator is still initial..Here object is not created.
IF im_pernr IS INITIAL.
CALL METHOD application->get_initiator
IMPORTING
ex_initiator = lcl_initiator.
lcl_pernr = lcl_initiator->pernr.
IF lcl_pernr IS INITIAL.
*---ERROR: PERNR not available --> f.e. Admin --> ok
RAISE pernr_missing.
ENDIF.
ELSE.
lcl_pernr = im_pernr.
ENDIF.
Can you please suggest ..what I made mistake..
Thanks in advance..great help for me if will get solution from you ..
Or else can you please suggest another function module do the leave request approval process
Best Regards:
Sreenivas
‎2014 Feb 08 2:06 PM
Hi,
Pls check if the USER ID used has a PERNR attached to it in info-type 0105.
Regards,
Munesh.
‎2014 Feb 10 5:38 AM
Hi Musnesh,
Thanks for your response...
I have cheked PERNR attached to UserID,that is working fine and also passing direct PERNR in the bapi....