‎2009 Feb 19 12:15 PM
I'm building a screen to approve or reject multiple leave requests using function module PT_ARQ_REQUEST_EXECUTE as the SAP standard program RPTARQAPP does, and this seems to be working fine. However, I also need to include a note from the approver which is a bit of long text that ends up in table PTREQ_NOTICE. This is something that RPTARQAPP does not do.
I cannot find any way of passing this text into PT_ARQ_REQUEST_EXECUTE. The only way I can find of doing this is to call FM PT_ARQ_REQUEST_PREPARE first (command = PREPARE_APPROVE), update the CURR_NOTICE field it sends back in structure EX_REQUEST, then pass the changed EX_REQUEST structure into FM PT_ARQ_REQUEST_CHECK (command = CHECK_APPROVE) and then call PT_ARQ_REQUEST_EXECUTE (command = EXECUTE_APPROVE). This works fine for a single leave request, but when I try to use this process to approve two leave requests the CHECK FM gives me an error on the second record with a message referring to a time conflict with the first message even though the dates on each are not the same.
I've searched and there are a few posts about these FMs, but I still can't fix this problem. Has anyone ever dealt with this situation before and found a solution?
‎2009 Feb 20 5:02 PM
I've replaced the call to FM PT_ARQ_REQUEST_CHECK with the following and it seems to work pretty well. Though of course it will need a lot more testing.
STATICS:
request TYPE REF TO if_pt_req_request.
CALL METHOD ca_pt_req_header=>agent->get_request
EXPORTING
im_request_id = p_im_request_id
IMPORTING
ex_request = request
EXCEPTIONS
request_not_found = 1.
CALL METHOD request->set_notice
EXPORTING
IM_NOTICE = p_approver_text.
‎2009 Sep 08 1:38 PM
hi can u explain little more on this
Thanks and Regards,
Thirukumaran. R
‎2009 Sep 08 1:54 PM
how did u solve that issue can u share the solution me too.,.,
Thanks and regards,
Thirukumaran. R
‎2012 Jul 23 7:22 PM
HI ,
Am also facing same issue . While approving or rejecting time i have to pass message to
ptarq_notice tabble.
How ypu resolved this issue?