cancel
Showing results for 
Search instead for 
Did you mean: 

Error after second level approval in ESS leave request

0 Kudos

Hi Experts

I am using custom workflow for Ess Leave request process which is copied from WS21500001.

I have added custom class methods to change status from approved to sent.

Then another method i have set next appovaer.

The problem i m facing is that I am getting an error on portal after second approval approves the request.

i.e Field syomol has not been assigned yet.

from st22 i found its generating from

Include LPT_ARQ_REQUEST_UIAF06  - Form   execute_approver_update

By debugging i found that Its not getting next approval with status T as there is only first approval with status 'A'

This results in unassigned field symbol. and then error.

Please help me resolve this issue.

Please confirm why next approver is not found in method.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

See if manipulating the default next processor using BAdI PT_GEN_REQ helps. This is required while customizing multiple levels of approval.

0 Kudos

Hi Prashant

I have created a custom class and called the badi method

   *-- Get the request object instance
    call method cl_pt_req_badi=>get_request
      exporting im_req_id   = Request_ID
      importing ex_request  = lcl_request.
    call method lcl_request->set_next_processor
      exporting im_actor_type = 'P'
                im_plvar      = '01'
                im_otype      = 'P'
                im_objid      = NextApprover_PERNR.    " PERNR of Next Approver
    if sy-subrc = 0.
      commit work and wait.
    endif.

This way i m trying to update.

i dont understand how to enhance badi pt_gen_req for this purpose.

Can u explain which method needs to be updated.

siddharthrajora
Product and Topic Expert
Product and Topic Expert
0 Kudos

check here http://scn.sap.com/thread/3610550 You ll find lots of blogs thread on this one,

0 Kudos

Hi All

Thanks for your reply.

I checked why it was giving a dump.

This execute_approver_update subroutine takes approval data from table ptreq_approver .

I filled this with resp actor id after request is approved and status is changed to sent.

For every emp its unique actor id is saved in ptreq_actor table agaist his pernr.

   SELECT SINGLE actor_id FROM PTREQ_ACTOR INTO actor_id WHERE objid = nextApprover_pernr.

    wa_appr-mandt = sy-mandt.
    wa_appr-request_id = Request_ID. "Req.requestID ( from Workflow )
    wa_appr-version_no = version_no. "Req.Version ( from Workflow )
    wa_appr-seqnr = seqnr. "Same as version no but in char
    wa_appr-approver_ins = actor_id. "Employee actor id from ptreq_actor
    wa_appr-status = 'T'. "Manual
    append wa_appr to it_appr.

    INSERT PTREQ_APPROVER FROM TABLE it_appr .
    commit work and wait.

This resolved my issue.

Thanks

Answers (1)

Answers (1)

Former Member
0 Kudos

check ur workflow settings once .....

0 Kudos

Hi Jwala

Please specify which setting in workflow.