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

Leave Request Approval Function Module runtime error

sreenivas_pachva
Participant
0 Likes
510

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




2 REPLIES 2
Read only

muneshpatwari
Active Participant
0 Likes
389

Hi,

Pls check if the USER ID used has a PERNR attached to it in info-type 0105.

Regards,

Munesh.

Read only

0 Likes
389

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....