on 10-20-2008 2:49 AM
I want to find the time elapsed for the Workitem completion
excluding holidays/saturday/sunday based on Factory Calender.
I have to include the Holidays/saturday/sunday
only if the workitem start or enddate is a Holiday/saturday/sunday.
Time elapsed is needed in the format of 0000d 00h 00m 00s .
Please suggest how should i proceed.
SAP Version: ECC 5.0
USe this FM SWL_WI_GET_HISTORY and build your logic.
Regards, IA
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i think you will get this data in the SWWWIHEAD table.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As i need to remove the Holidays/saturday/sunday so i can't use the SWWWIHEAD data directly.
I want, if the workitem is completed then the time elapsed should be the time between the start and completion of workitem excluding holidays/saturday/sunday.
If the workitem is 'In Process' state then the time should be the time between the Start of workitem and current date excluding holidays/saturday/sunday.
Thanks,
Vaibhav
Example of code to get the factor working days, which i have used for multiple approvals
and depends on the day, i pass.
DATA:
REQNUMBER TYPE EBAN-EBELN,
DAYS TYPE i,
WORKINGDAY TYPE SYST-DATUM,
CREATEDATE TYPE SYST-DATUM,
LV_FABKL TYPE T001W-FABKL.
SWC_GET_ELEMENT CONTAINER 'ReqNumber' REQNUMBER.
SWC_GET_ELEMENT CONTAINER 'Days' DAYS.
SWC_GET_ELEMENT CONTAINER 'CreateDate' CREATEDATE.
SELECT SINGLE t~fabkl
INTO lv_fabkl
FROM ( t001w AS t
INNER JOIN eban AS e ON ewerks = twerks )
WHERE banfn = reqnumber.
CALL FUNCTION 'FKK_ADD_WORKINGDAY'
EXPORTING
i_date = createdate
i_days = days
I_CALENDAR1 = lv_fabkl
I_CALENDAR2 =
IMPORTING
E_DATE = workingday.
E_RETURN =
SWC_SET_ELEMENT CONTAINER 'WorkingDay' WORKINGDAY.
Hope this helps.
Thanks,
Sudhir.
do you mean time elapsed 'after' completion or time remaining to completion?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.