09-18-2008 1:21 PM
Hi all,
i m using ECC6.0.
1/i m testing first the ptarq ( code transaction for ess employee self-service), but i have these problems, i do not understand how to create a leave request correctly , i have succeed in create in for the same employee that works with (ex 70046 = pernr ), i need to understand the logic of the creation first.
2/ before two days , i was able to create a leave request in ( ptarq ( code transaction -> test application ) but when i create it , it s allready having the status approved.
3/ so i decide to create leave request of course with different enddate end begdate of absence for the same employee wich is ( 70046 = pernr, infotype= 2001 , subtype =240 ), and i was able ti change the status of the leave request from being 'sent' to 'approved' via MF pt_arq_request_execute.
4/ but now i just can't approve neither via test application (ptarq) or via mf .
N.B:
i didn't to become the manager of the concerned employee cz when i enter to approve via ptarq , it displays for me the reequest concerning my profil but even thoug when i chose one document to be approved it take a long time and it's not responding anymore or it's gives me a message said that the doc is locked ,
and even throug the mf 'pt_arq_request_PREPARE it's given me 'ex_data_only_read = X' and error which said that doc is bloqued and with mf 'pt_arq_request_EXECUTE it's just telling me to precise the CLASS NAME .
there is the content of es_messages output of excute mf.
T = E
ID = WF_CONT
NUM = 065
MESSAGE = Indicate the name of the class
Thank u in advance.
09-18-2008 2:03 PM
this is the mf that i m triying to develop based on the mf execute.
it's giving me in execution this error and pointing to the mf execute .
Err. exécution CALL_FUNCTION_PARM_UNKNOWN
Except. CX_SY_DYN_CALL_PARAM_NOT_FOUND
FUNCTION Z_APPROVE_EMPLOYEELEAVEREQUEST.
*"----
-
""Interface locale :
*" IMPORTING
*" VALUE(REQ_ID) TYPE TIM_REQ_ID
*" VALUE(VERS_NO) TYPE TIM_REQ_VERSION OPTIONAL
*" VALUE(NOTE_TEXT) TYPE TIM_REQ_NOTICE OPTIONAL
*" EXPORTING
*" VALUE(EMPLOYEELEAVEREQUEST) TYPE ZEMPLOYEELEAVEREQUEST
*" TABLES
*" EX_MESSAGES TYPE ZMESSAGE_ERR_TAB
*"----
-
CONSTANTS:
command TYPE PTREQ_COMMAND VALUE 'EXECUTE_APPROVE',
modus TYPE PT_ARQ_MODE VALUE 'A',
code_status_approved VALUE '4'.
.
*///work area perso
DATA: wa_employeeleaverequest TYPE ZEMPLOYEELEAVEREQUEST,
wa_ex_messages TYPE ZMESSAGE_ERR,
wa_messages TYPE BAPIRET2
.
DATA:
messages TYPE PTARQ_UIA_MESSAGES_TAB,
exec_req TYPE PTARQ_UIA_REQUEST,
pernr TYPE P_PERNR,
initiator TYPE OS_GUID,
no_vers TYPE TIM_REQ_VERSION
.
select single INITIATOR_INS from ptreq_header into initiator
where request_id = req_id and version_no = vers_no.
select single objid from ptreq_actor into pernr where actor_id = initiator.
CALL FUNCTION 'PT_ARQ_REQUEST_EXECUTE'
EXPORTING
im_request_id = req_id
im_command = command
im_pernr = pernr
im_modus = modus
im_debug = im_debug
IMPORTING
ex_request = exec_req
ex_has_errors = ex_has_errors
ex_show_change = ex_show_change
TABLES
ex_messages = messages
ex_commands = ex_commands
.
SELECT SINGLE version_no FROM ptreq_header INTO no_vers WHERE request_id = exec_req-request_id.
wa_employeeleaverequest-request_id = exec_req-request_id.
wa_employeeleaverequest-version_no = no_vers.
wa_employeeleaverequest-code_status = code_status_approved.
wa_employeeleaverequest-in_status = exec_req-status.
MOVE wa_EMPLOYEELEAVEREQUEST to EMPLOYEELEAVEREQUEST.
LOOP AT messages INTO wa_messages.
CLEAR wa_ex_messages.
*MOVE-CORRESPONDING wa_messages to wa_ex_messages.
wa_ex_messages-ID = wa_messages-ID .
wa_ex_messages-TYPE = wa_messages-TYPE.
wa_ex_messages-MESSAGE = wa_messages-MESSAGE.
APPEND wa_ex_messages TO EX_MESSAGES.
ENDLOOP.
ENDFUNCTION.
09-19-2008 6:35 AM
Hi Merry,
As far as i know , to ceate a leave request u have to run a cycle of executing 3 bapis
a) PT_ARQ_REQUEST_PREPARE to prepare a leave request.
b) PT_ARQ_REQUEST_CHECK - This checks wether the leave requested is possible according to the
Leave HR configurations (input to this bapi should be the output you get from the 1st bapi).
c) PT_ARQ_REQUEST_EXECUTE- This finally creates a leave request.
(input to this bapi should be the output you get from the 2nd bapi).
(Execute all the bapis using mode "R".)
I have used this approach in webdynpro java to create a leave request. Hope this approach works for you also.
Regards
Asha
09-19-2008 11:37 AM
thank u asha for ur answer,
but i have here a question , why there is no command for the MF check concerning 'check_reject' , ??
and mon problem here is that these MF dosen't executed and i have error that tell me that 'doc is locked' and that 'update of doc (leave request) was interrupted .
moreover , iwhen i try with the transaction 'PTARQ' , i can't no more create a leave request neither approve it from test application 'ptarq' ?? and it's related to some parameter 'lock_indicator' which if it's equal to X it doesn't change the status of my leave request from 'SENT' to 'APPROVED' .?? could u send me ur code that make update of the status of the leave request ?
N.B: Also if u see the program test ' RPTARQUIATEST ' u ganna find that they call the MFs in that order :
1/ pt_arq_request_prepare
2/ pt_arq_request_execute
3/ pt_arq_request_check
???
Edited by: MERRY NAFNAF on Sep 19, 2008 2:12 PM
10-07-2008 10:48 AM
Hi Merry..
Sorry for the late reply..
I have implemented this module in webdynpro java using the STD SAP code.
All the three Bapis are executed in "R" mode while requesting and in "A" mode while approving a request.
I dint get what exactly ur question is..
Did you get the solution for ur question??
If yes pls do let me know..
Thanks and regards
Asha
10-07-2008 11:40 AM
hi asha , thank u pr ur answer, but we do find a solution via custom, and some lock and enqueue Mf, i need some help now , i m using SAP ECC 6.0 i need to invoke some specific web service of sap via J2ME , so or J2EE , do u know how can i do , should i activate the UDDI registery ?? or i don't need to...?? because the site of standard web services can't be available until 10 october as u know , so please if u have any idea help me.
thnx in advance
11-09-2009 3:11 PM
Your Replyl >...
As far as i know , to ceate a leave request u have to run a cycle of executing 3 bapis
a) PT_ARQ_REQUEST_PREPARE to prepare a leave request.
b) PT_ARQ_REQUEST_CHECK - This checks wether the leave requested is possible according to the
Leave HR configurations (input to this bapi should be the output you get from the 1st bapi).
c) PT_ARQ_REQUEST_EXECUTE- This finally creates a leave request.
(input to this bapi should be the output you get from the 2nd bapi).
(Execute all the bapis using mode "R".)
I have used this approach in webdynpro java to create a leave request. Hope this approach works for you also.
My Question :
1.How do you pass the structure EX_REQUEST structure into FM PT_ARQ_REQUEST_CHECK ?
Pls pls help.
Regards
Pravesh