Skip to Content
avatar image
Former Member

Time Elapsed for Workitem Completion

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Oct 20, 2008 at 04:55 AM

    do you mean time elapsed 'after' completion or time remaining to completion?

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 20, 2008 at 08:34 AM

    i think you will get this data in the SWWWIHEAD table.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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.

  • Oct 20, 2008 at 05:18 PM

    USe this FM SWL_WI_GET_HISTORY and build your logic.

    Regards, IA

    Add comment
    10|10000 characters needed characters exceeded