List down connected oracle session for more than 24 hrs

Hi Experts,
Please provide the query to get the active and inactive session that held in oracle database and consuming the physical resource.
Thanks in Advance.

Hint: please refer to v$session and last_call_et
Sybrand Bakker
Senior Oracle DBA

Similar Messages

  • CAT!!! I kept my player for more than 7 hrs for the initial cha

    Hi Cat,
    I have kept my zen v plus for more than 7 hrs for the initial charge, still the Play icon not appeared on the display, its showing still the battery charging flash icon.
    TELL ME WHAT TO DO?
    Thanks & Regds,
    2CREATIVE

    Depends on how strong your wifi connection is.
    you can try a reset hold down the home/sleep button together until you see the apple logo and then release.

  • SAPup phase is idle for more than 12 hrs

    Hi all,
    I am BW 3.1 upgrade to BI 7.0
    We have a J2EE engine 6.20 running on BW 3.1 so i installed as on Note: 934615
    then started the ABAP upgrade.
    Now upgrade is in SAPup phase giving info like
    "The parallel running java upgrade wil take some more time"
    I tried to stop and restart again its coming to the same phase.
    And its is idle for more than 12 hrs.
    Pls guide me solve this issue..
    Thanks & Regards
    Karthikeyan

    Got stucked because of Java, uninstall java instance. Issue got resolved

  • After downloading updates for the first time, i was asked to restart my mac. it starting writing configuring installation. the staus bar just showed a little and remained like that for more than 3 hrs. i tried several times wit no success.

    after downloading updates for the first time, i was asked to restart my mac. it started writing configuring installation. the staus bar just showed a little and remained like that for more than 3 hrs. i tried several times wit no success. it has not updated my mac OS X 10.5.

    My clean install worked out alright, although I don't think it really fixed anything, rather gave me a couple more days of use 'till I have to send it in. Someone please help my get it running properly again...

  • If you have no electricity for more than 8 hrs you have no phone with Fios

    No one told me that when I gave up my copper line for FIOs that when the electricity goes off for more than eight hours I would have no phone service.  Usually, if the electricity went off I would just plug in one of the old phones with a cord and still have access to telephone service.  Not so with FIOs.  Cell phone service in this area isn't reliable either, especially if there are too many people trying to call out at the same time.  It is not a good product for someone who may need EMS service in a secluded area.  If I had known this, I would have kept my DSL, FIOs is not any faster when others are on line using it.

    Maybe you were not around for the installation of your FIOS when the installer put the battery backup in your garage. Note there is an emergency button on the battery backup that you can push to get an additional 5 hours of phone calls. In my case the welcome kit that I was given also provided directions on how to enable the extra 5 hours of phone support.
    Also I've DSL speeds are typically in the 1-7 Mbit speed while my with a 384/768 upload. My Fios gives me consistent 20 megs down and 5 up which is way faster then DSL.
    Good luck!

  • Mail send to  employee even worked for more than 45 hrs

    Hi All,
    We have developed functionality in which if employee works less than 45 hrs then mail is triggered to that employee.
    But the issue is sometimes mail is triggered to some employees even if he worked more than 45 hrs.
    We tried to create a same scenario in quality and development but mail is not triggered in that case.
    Please find the below code.
    Please let me is it because of not clearing wa_time variable???
    GET peras.
      rp_provide_from_last p0000 space sy-datum sy-datum. "latest p0000 record
      IF p0000-stat2 EQ '3'.
        rp_provide_from_last p0001 space sy-datum sy-datum."latest p0001 record
        IF p0001-bukrs EQ '***'.
          rp_read_infotype peras-pernr 2001 p2001 gv_beg  gv_end.
          rp_read_infotype peras-pernr 2002 p2002 gv_beg  gv_end.
          rp_read_infotype peras-pernr 2006 p2006 '18000101' sy-datum.
          IF rb1 EQ 'X'.
            n = 1.
          ELSEIF rb2 EQ 'X'.
            n = 5.
          ENDIF.
          CLEAR : gv_cntr,gv_dat,gv_week.
          gv_dat = gv_beg.
          DO n TIMES.
            IF gv_dat  GT gv_end.
              gv_week = n - 1.
              EXIT.
            ENDIF.
            gv_cntr = gv_cntr + 1.
            IF  gv_cntr GT 1 .
    *          gv_beg = gv_beg + 2.
              gv_dat =  gv_dat + 2.
            ENDIF.
            DO 5 TIMES .
    *          if rb2 eq 'X'.
              IF gv_dat  LE gv_end.
    *            endif.
                READ TABLE it_time INTO wa_time WITH KEY pernr = p0001-pernr
                                                         ldate = gv_dat
                                                         satza = 'P10'.
                IF sy-subrc EQ '0'.
                  gv_in = wa_time-ltime.
                  READ TABLE it_time INTO wa_time WITH KEY pernr = p0001-pernr
                                                        ldate = gv_dat
                                                        satza = 'P20'.
                  IF sy-subrc EQ '0'.
                    gv_out = wa_time-ltime.
                    gv_time =  gv_time + ( gv_out - gv_in )  .
    *                CALL FUNCTION 'MONI_TIME_CONVERT'
    *                  EXPORTING
    *                    ld_duration        = gv_time
    *                  IMPORTING
    *                    lt_output_duration = gv_tot.
    *gv_tote = gv_tot.
    *   gv_total = gv_total  +  gv_tote.
    *    clear : gv_tot,gv_tote.
    **CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
    **  EXPORTING
    **    input                      =  gv_time
    ***   NO_TYPE_CHECK              = 'X'
    ***   ROUND_SIGN                 = ' '
    **   UNIT_IN                    = 'S'
    **   UNIT_OUT                   = 'H'
    ** IMPORTING
    ***   ADD_CONST                  =
    ***   DECIMALS                   =
    ***   DENOMINATOR                =
    ***   NUMERATOR                  =
    **   OUTPUT                     =  gv_total
    ** EXCEPTIONS
    **   CONVERSION_NOT_FOUND       = 1
    **   DIVISION_BY_ZERO           = 2
    **   INPUT_INVALID              = 3
    **   OUTPUT_INVALID             = 4
    **   OVERFLOW                   = 5
    **   TYPE_INVALID               = 6
    **   UNITS_MISSING              = 7
    **   UNIT_IN_NOT_FOUND          = 8
    **   UNIT_OUT_NOT_FOUND         = 9
    **   OTHERS                     = 10
    **IF sy-subrc <> 0.
    *** MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    ***         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    **ENDIF.
    *                CALL FUNCTION 'POINT_IN_TIME_CONVERT'
    *                  EXPORTING
    **   KZ_ENDTERMIN        = ' '
    *                    point_in_time       = gv_time
    *                 IMPORTING
    **   DATE                =
    *                   time                = gv_hours."actual working hours
    *                gv_total = gv_total + gv_hours.
                    gv_punch = 'X'.
                    CLEAR wa_final.
                    CLEAR :gv_out,gv_in,gv_hours.
                  ENDIF.
                ENDIF.
                IF gv_punch IS  INITIAL .
                  LOOP AT p2001 WHERE pernr EQ peras-pernr AND begda LE gv_dat AND endda GE gv_dat.
    *              gv_total = gv_total + 090000.
                    gv_time = gv_time + 32400.
                    gv_abs = 'X'.
                  ENDLOOP.
                ENDIF.
                IF gv_punch IS INITIAL AND   gv_abs IS INITIAL.
                  LOOP AT p2002  WHERE pernr EQ peras-pernr AND begda LE gv_dat AND endda GE gv_dat.
                    gv_time = gv_time + 32400.
                    gv_prs = 'X'.
    *              gv_total = gv_total + 090000.
                  ENDLOOP.
                ENDIF.
    *            PERFORM holiday_check USING gv_dat.
                IF gv_punch IS INITIAL AND gv_abs IS INITIAL AND gv_prs IS INITIAL.
                  CALL FUNCTION 'HOLIDAY_CHECK_AND_GET_INFO'
                    EXPORTING
                      date                = gv_dat
                      holiday_calendar_id = 'HM'
                    IMPORTING
                      holiday_found       = gv_ind.
                  IF gv_ind  EQ 'X'.
                    gv_time = gv_time + 32400.
                  ENDIF.
                  CLEAR gv_ind.
                ENDIF.
                CLEAR :gv_punch, gv_abs ,gv_prs.
                gv_dat = gv_dat + 1.
                IF gv_dat GT gv_end.
                  EXIT.
                ENDIF.
              ENDIF.
            ENDDO.
            CLEAR : gv_tot,gv_tim.
            CALL FUNCTION 'MONI_TIME_CONVERT'
              EXPORTING
                ld_duration        = gv_time
              IMPORTING
                lt_output_duration = gv_tot.
    *        IF gv_beg LE gv_end.
            CONCATENATE gv_tot+2(2) gv_tot+5(2) gv_tot+8(2) INTO gv_tim.
            v_dat = ( gv_dat - 1 ).
            wa-awh = wa-awh + gv_time.
            IF  v_dat EQ gv_end.
              wa-pernr = p0001-pernr.
              APPEND wa TO it.
              CLEAR wa.
            ENDIF.
            IF  gv_tim LT c_hrs .
              wa_final-pernr = p0001-pernr.
    *          WA_FINAL-BEGDA = SY-DATUM.
              wa_final-ename = p0001-ename.
    *          wa_final-actual  = gv_time.
              wa_final-diff = gv_45hrs - gv_time.
              wa_final-plans = p0001-plans.
              CLEAR : wa_t001p.
              READ TABLE it_t001p INTO wa_t001p WITH KEY werks = p0001-werks
                                                         btrtl = p0001-btrtl.
              IF sy-subrc EQ 0.
                wa_final-dept = wa_t001p-btext.
              ENDIF.
              CLEAR gv_org.
              PERFORM org_text.
              wa_final-divsn = gv_org.
              wa_final-werks = p0001-werks.
              wa_final-sacha =  p0001-sachp.
              IF wa_final-diff GT 0.
                APPEND wa_final TO it_final.
              ENDIF.
              CLEAR wa_final.
            ENDIF.
    *        ENDIF.
            CLEAR : gv_time ,gv_hours.
            CLEAR gv_tot.
            CLEAR : gv_total.
          ENDDO.
          CLEAR gv_cntr.
    *    ENDIF.
        ENDIF.
      ENDIF.
    *  CLEAR gv_beg.
    END-OF-SELECTION.

    Hi Ketul,
    Still i'm facing the same issue even after clearing wa_time variable.Sometime it's triggering and sometimes it not.
    I'm attaching the whole code for your reference. Pls let me know.
    Waiting for your reply.
    Thanks!!!!!!!!
    CODE:
    REPORT  zhr_vwgsipl_pt_wrknghrs.
    INCLUDE zhr_vwgsipl_wrkng_hrs_top. "data declaration
    INCLUDE zhr_vwgsipl_wrkng_hrs_init.
    INCLUDE zhr_vwgsipl_wrkng_hrs_process. " PROCESSING.
    INCLUDE zhr_vwgsipl_wrkng_hrs_display ."DISPLAY
    *&      Form  ORG_TEXT
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM org_text .
      CALL FUNCTION 'HR_READ_FOREIGN_OBJECT_TEXT'
        EXPORTING
          otype                         = 'O'
          objid                         = p0001-orgeh
          costcenter                    = p0001-kostl
    *   CONTROLLINGAREA               =
         status                        = '1'
         begda                         = '18000101'
         endda                         = '99991231'
         reference_date                = sy-datum
         langu                         = sy-langu
       IMPORTING
    *   SHORT_TEXT                    =
         object_text                   = gv_org
    *     costcenter_name               = gv_cst
    *   INTEGRATION_ACTIVE            =
    *   RETURN                        =
       EXCEPTIONS
         nothing_found                 = 1
         wrong_objecttype              = 2
         missing_costcenter_data       = 3
         missing_object_id             = 4
         OTHERS                        = 5
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " ORG_TEXT
    & Include           ZHR_VWGSIPL_WRKNG_HRS_INIT
    IF rb1 EQ 'X'.
    *   IF pn-begda IS  INITIAL.
       IF sy-batch EQ 'X'.
         gv_beg = sy-datum - 4."sy-datum  - 5.
         gv_end = sy-datum.
       ELSE.
         gv_beg = pn-begda.
         gv_end = pn-endda.
       ENDIF.
    ELSEIF rb2 EQ 'X'.
       IF sy-batch NE 'X'." IS NOT  INITIAL.
         gv_beg = pn-begda.
         gv_end = pn-endda.
         CALL FUNCTION 'DATE_COMPUTE_DAY'
           EXPORTING
             date = gv_beg
           IMPORTING
             day  = gv_day.
         IF gv_day LT 5.
           gv_beg = gv_beg - gv_day + 1 .
         ELSEIF gv_day EQ 5 .
           gv_beg =  gv_beg + 3.
         ELSEIF gv_day EQ  6.
           gv_beg =  gv_beg + 2.
         ELSEIF gv_day EQ  7.
           gv_beg =  gv_beg + 1.
         ENDIF.
         CLEAR gv_day.
         CALL FUNCTION 'DATE_COMPUTE_DAY'
           EXPORTING
             date = gv_end
           IMPORTING
             day  = gv_day.
         IF gv_day LT 5.
           gv_end =  gv_end - gv_day - 2.
         ELSEIF gv_day EQ 5.
           gv_end =  gv_end.
         ELSEIF gv_day EQ 6.
           gv_end =  gv_end - 1.
         ELSEIF gv_day EQ 7.
           gv_end =  gv_end - 2.
         ENDIF.
    *   ENDIF.
    * ENDIF.
       ELSE.
         IF sy-datum+4(2) NE '01'.
           gv_mnth = sy-datum+4(2) - 01."c_date+4(2) - 1."sy-datum+4(2) - 1.
         ELSE.
           gv_mnth = 12.
         ENDIF.
         CONCATENATE sy-datum+0(4) gv_mnth  sy-datum+6(2) INTO gv_beg.
         CALL FUNCTION 'DATE_COMPUTE_DAY'
           EXPORTING
             date = gv_beg
           IMPORTING
             day  = gv_day.
         IF gv_day LT 5.
           gv_beg = gv_beg - gv_day + 1 .
         ELSEIF gv_day EQ 5 .
           gv_beg =  gv_beg + 3.
         ELSEIF gv_day EQ  6.
           gv_beg =  gv_beg + 2.
         ELSEIF gv_day EQ  7.
           gv_beg =  gv_beg + 1.
         ENDIF.
         CLEAR gv_day.
         CALL FUNCTION 'DATE_COMPUTE_DAY'
           EXPORTING
             date = sy-datum
           IMPORTING
             day  = gv_day.
         IF gv_day LT 5.
           gv_end =  sy-datum - gv_day - 2.
         ELSEIF gv_day EQ 5.
           gv_end =  sy-datum.
         ELSEIF gv_day EQ 6.
           gv_end =  sy-datum - 1.
         ELSEIF gv_day EQ 7.
           gv_end =  sy-datum - 2.
         ENDIF.
       ENDIF.
    ENDIF.
    CLEAR : it_time,it_receiver,it_usrid,it_t001p.
    SELECT pernr ldate ltime satza
           FROM teven INTO TABLE it_time
           WHERE pernr IN pnppernr AND
          ldate BETWEEN  gv_beg AND gv_end
               AND stokz NE 'X'.
    SELECT pernr subty usrid  usrid_long
       FROM pa0105 INTO TABLE it_receiver
             WHERE "pernr IN pnppernr
              " AND subty = '0010'
                endda >= gv_end
               AND begda <= gv_end.
    SORT it_receiver BY pernr.
    *clear wa_admin.
    *      select single werks sachz
    *        from pa0001
    *        into  wa_admin
    *        where pernr in wa_final-pernr
    *         and endda >= sy-datum
    *                and begda <= sy-datum.
    SELECT  werks sachx usrid
       FROM t526 INTO TABLE it_usrid.
    * SELECT pernr usrid  usrid_long
    * FROM pa0105 INTO TABLE it_ccreceiver
    *   FOR ALL ENTRIES IN it_usrid
    *       WHERE usrid EQ it_usrid-usrid
    *         AND subty = '0010'
    *         AND endda >= gv_end
    *         AND begda <= gv_end.
    SELECT werks btrtl btext  FROM t001p
        INTO TABLE it_t001p
        WHERE werks IN pnpwerks
        AND btrtl IN pnpbtrtl.
    *&  Include   ZHR_VWGSIPL_WRKNG_HRS_PROCESS
    GET peras.
      rp_provide_from_last p0000 space sy-datum sy-datum. "latest p0000 record
      IF p0000-stat2 EQ '3'.
        rp_provide_from_last p0001 space sy-datum sy-datum."latest p0001 record
        IF p0001-bukrs EQ '2680'.
          rp_read_infotype peras-pernr 2001 p2001 gv_beg  gv_end.
          rp_read_infotype peras-pernr 2002 p2002 gv_beg  gv_end.
          rp_read_infotype peras-pernr 2006 p2006 '18000101' sy-datum.
          IF rb1 EQ 'X'.
            n = 1.
          ELSEIF rb2 EQ 'X'.
            n = 5.
          ENDIF.
          CLEAR : gv_cntr,gv_dat,gv_week.
          gv_dat = gv_beg.
          DO n TIMES.
            IF gv_dat  GT gv_end.
              gv_week = n - 1.
              EXIT.
            ENDIF.
            gv_cntr = gv_cntr + 1.
            IF  gv_cntr GT 1 .
    *          gv_beg = gv_beg + 2.
              gv_dat =  gv_dat + 2.
            ENDIF.
            DO 5 TIMES .
    *          if rb2 eq 'X'.
              IF gv_dat  LE gv_end.
    *            endif.
                READ TABLE it_time INTO wa_time WITH KEY pernr = p0001-pernr
                                                         ldate = gv_dat
                                                         satza = 'P10'.
                IF sy-subrc EQ '0'.
                  gv_in = wa_time-ltime.
                  CLEAR : wa_time.
                  READ TABLE it_time INTO wa_time WITH KEY pernr = p0001-pernr
                                                        ldate = gv_dat
                                                        satza = 'P20'.
                  IF sy-subrc EQ '0'.
                    gv_out = wa_time-ltime.
                    gv_time =  gv_time + ( gv_out - gv_in )  .
                     CLEAR : wa_time.
    *                CALL FUNCTION 'MONI_TIME_CONVERT'
    *                  EXPORTING
    *                    ld_duration        = gv_time
    *                  IMPORTING
    *                    lt_output_duration = gv_tot.
    *gv_tote = gv_tot.
    *   gv_total = gv_total  +  gv_tote.
    *    clear : gv_tot,gv_tote.
    **CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
    **  EXPORTING
    **    input                      =  gv_time
    ***   NO_TYPE_CHECK              = 'X'
    ***   ROUND_SIGN                 = ' '
    **   UNIT_IN                    = 'S'
    **   UNIT_OUT                   = 'H'
    ** IMPORTING
    ***   ADD_CONST                  =
    ***   DECIMALS                   =
    ***   DENOMINATOR                =
    ***   NUMERATOR                  =
    **   OUTPUT                     =  gv_total
    ** EXCEPTIONS
    **   CONVERSION_NOT_FOUND       = 1
    **   DIVISION_BY_ZERO           = 2
    **   INPUT_INVALID              = 3
    **   OUTPUT_INVALID             = 4
    **   OVERFLOW                   = 5
    **   TYPE_INVALID               = 6
    **   UNITS_MISSING              = 7
    **   UNIT_IN_NOT_FOUND          = 8
    **   UNIT_OUT_NOT_FOUND         = 9
    **   OTHERS                     = 10
    **IF sy-subrc <> 0.
    *** MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    ***         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    **ENDIF.
    *                CALL FUNCTION 'POINT_IN_TIME_CONVERT'
    *                  EXPORTING
    **   KZ_ENDTERMIN        = ' '
    *                    point_in_time       = gv_time
    *                 IMPORTING
    **   DATE                =
    *                   time                = gv_hours."actual working hours
    *                gv_total = gv_total + gv_hours.
                    gv_punch = 'X'.
                    CLEAR wa_final.
                    CLEAR :gv_out,gv_in,gv_hours.
                  ENDIF.
                ENDIF.
                IF gv_punch IS  INITIAL .
                  LOOP AT p2001 WHERE pernr EQ peras-pernr AND begda LE gv_dat AND endda GE gv_dat.
    *              gv_total = gv_total + 090000.
                    gv_time = gv_time + 32400.
                    gv_abs = 'X'.
                  ENDLOOP.
                ENDIF.
                IF gv_punch IS INITIAL AND   gv_abs IS INITIAL.
                  LOOP AT p2002  WHERE pernr EQ peras-pernr AND begda LE gv_dat AND endda GE gv_dat.
                    gv_time = gv_time + 32400.
                    gv_prs = 'X'.
    *              gv_total = gv_total + 090000.
                  ENDLOOP.
                ENDIF.
    *            PERFORM holiday_check USING gv_dat.
                IF gv_punch IS INITIAL AND gv_abs IS INITIAL AND gv_prs IS INITIAL.
                  CALL FUNCTION 'HOLIDAY_CHECK_AND_GET_INFO'
                    EXPORTING
                      date                = gv_dat
                      holiday_calendar_id = 'HM'
                    IMPORTING
                      holiday_found       = gv_ind.
                  IF gv_ind  EQ 'X'.
                    gv_time = gv_time + 32400.
                  ENDIF.
                  CLEAR gv_ind.
                ENDIF.
                CLEAR :gv_punch, gv_abs ,gv_prs.
                gv_dat = gv_dat + 1.
                IF gv_dat GT gv_end.
                  EXIT.
                ENDIF.
              ENDIF.
            ENDDO.
            CLEAR : gv_tot,gv_tim.
            CALL FUNCTION 'MONI_TIME_CONVERT'
              EXPORTING
                ld_duration        = gv_time
              IMPORTING
                lt_output_duration = gv_tot.
    *        IF gv_beg LE gv_end.
            CONCATENATE gv_tot+2(2) gv_tot+5(2) gv_tot+8(2) INTO gv_tim.
            v_dat = ( gv_dat - 1 ).
            wa-awh = wa-awh + gv_time.
            IF  v_dat EQ gv_end.
              wa-pernr = p0001-pernr.
              APPEND wa TO it.
              CLEAR wa.
            ENDIF.
            IF  gv_tim LT c_hrs .
              wa_final-pernr = p0001-pernr.
    *          WA_FINAL-BEGDA = SY-DATUM.
              wa_final-ename = p0001-ename.
    *          wa_final-actual  = gv_time.
              wa_final-diff = gv_45hrs - gv_time.
              wa_final-plans = p0001-plans.
              CLEAR : wa_t001p.
              READ TABLE it_t001p INTO wa_t001p WITH KEY werks = p0001-werks
                                                         btrtl = p0001-btrtl.
              IF sy-subrc EQ 0.
                wa_final-dept = wa_t001p-btext.
              ENDIF.
              CLEAR gv_org.
              PERFORM org_text.
              wa_final-divsn = gv_org.
              wa_final-werks = p0001-werks.
              wa_final-sacha =  p0001-sachp.
              IF wa_final-diff GT 0.
                APPEND wa_final TO it_final.
              ENDIF.
              CLEAR wa_final.
            ENDIF.
    *        ENDIF.
            CLEAR : gv_time ,gv_hours.
            CLEAR: gv_tot,gv_tim.
            CLEAR : gv_total.
          ENDDO.
          CLEAR gv_cntr.
    *    ENDIF.
        ENDIF.
      ENDIF.
    *  CLEAR gv_beg.
    END-OF-SELECTION.
    *&  Include    ZHR_VWGSIPL_WRKNG_HRS_DISPLAY
    CALL FUNCTION 'HR_99S_INTERVAL_BETWEEN_DATES'
      EXPORTING
       begda           = gv_beg
        endda           = gv_end
    *   TAB_MODE        = ' '
    IMPORTING
    *   DAYS            =
       c_weeks         = gv_week
    *   C_MONTHS        =
    *   C_YEARS         =
    *   WEEKS           =
    *   MONTHS          =
    *   YEARS           =
    *   D_MONTHS        =
    *   MONTH_TAB       =
    gv_week = gv_week + 1.
    * CALL FUNCTION 'DATE_COMPUTE_DAY'
    *     EXPORTING
    *       date = gv_end
    *     IMPORTING
    *       day  = gv_day1.
    * if gv_day1 eq '5' or gv_day1 eq
    LOOP AT it_final INTO wa_final."looping at list of employee hvng shrtg.
      CLEAR : gv_diff ,gv_cntr1 , gv_cntr2,gv_upl,gv_upl1.
      IF rb2 EQ 'X'.
        CLEAR : gv_cntr1.
        LOOP AT it_final INTO wa_final WHERE pernr EQ wa_final-pernr .
          gv_diff = gv_diff +  wa_final-diff.   " total shrtg
    *      gv_cntr1 = gv_cntr1 + 1.
        ENDLOOP.
    *    calc no od dyas to be deducted.
        gv_cntr1 = FLOOR( gv_diff / 32400 ) .
        gv_cntr2 = ( gv_diff MOD  32400 ) .
        IF gv_cntr2 IS NOT INITIAL.
          gv_cntr2 = '0.50' .
        ENDIF.
        CLEAR gv_quota.
    *total el quota available.
        LOOP AT p2006 WHERE subty EQ '20' and DESTA le sy-datum  and DEEND ge sy-datum  .
          gv_quota = gv_quota +  p2006-anzhl - p2006-kverb.
          gv_quota = FLOOR( gv_quota ).
        ENDLOOP.
    *leaves to be deducted
        IF gv_cntr1 LE gv_quota.
    *deduction from EL.
          quota-pernr = wa_final-pernr .
          quota-infty = c_infty.
          quota-subty =  c_sub.
          PERFORM holidy_check.
          quota-endda = sy-datum +  gv_cntr1 + gv_no - 1.
          CLEAR gv_no.
          quota-begda = sy-datum.
          quota-awart = c_sub.
          CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
            EXPORTING
              number = wa_final-pernr.
          CALL FUNCTION 'HR_INFOTYPE_OPERATION'
            EXPORTING
              infty         = '2001'
              number        = wa_final-pernr
              subtype       = c_sub
              validityend   = quota-endda
              validitybegin = quota-begda
              record        = quota
              operation     = 'INS'
              tclas         = 'A'
              nocommit      = no_commit
            IMPORTING
              return        = bapireturn
              key           = bapipakey.
          gv_start2 = quota-endda.
    *preparing the list whose leave has been deducted.
          wa_mail-pernr =  wa_final-pernr.
          wa_mail-ename = wa_final-ename.
          wa_mail-divsn = wa_final-divsn.
          wa_mail-dept = wa_final-dept.
          wa_mail-lvdays = gv_cntr1.
          CONCATENATE sy-datum+6(2) '.' sy-datum+4(2) '.' sy-datum+0(4) '-' quota-endda+6(2) '.'  quota-endda+4(2) '.' quota-endda+0(4) INTO wa_mail-lvdat.
    *      wa_mail-lvdat = sy-datum.
          wa_mail-lvtyp = 'Earned Leave'.
          IF bapireturn-message IS NOT INITIAL.
            wa_mail-status = bapireturn-message.
          ELSE.
            wa_mail-status = 'Created'.
          ENDIF.
          wa_mail-werks = wa_final-werks.
          wa_mail-sacha = wa_final-sacha.
          gv_plnd = gv_week * 45 * 60 * 60. "total planned working hrs
          CALL FUNCTION 'MONI_TIME_CONVERT'
            EXPORTING
              ld_duration        = gv_plnd
            IMPORTING
              lt_output_duration = wa_mail-plnd.
          CLEAR wa.
          READ TABLE it INTO wa WITH KEY pernr = wa_final-pernr..
          IF wa IS NOT INITIAL.
            gv_actl =  wa-awh . "actual wrkng hrs "gv_plnd - gv_diff. "actual wrkng hrs
            CALL FUNCTION 'MONI_TIME_CONVERT'
              EXPORTING
                ld_duration        = gv_actl
              IMPORTING
                lt_output_duration = wa_mail-actl.
          ENDIF.
          APPEND wa_mail TO it_mail.
          CLEAR :wa_mail,gv_plnd,gv_actl.
          CLEAR quota .
    *    REFRESH quota.
        ELSE.
          gv_upl = gv_cntr1 - gv_quota.
    *unpaid leave deduction
          IF gv_quota IS NOT INITIAL.
            quota-pernr = wa_final-pernr .
            quota-infty = c_infty.
            quota-subty =  c_sub.
            PERFORM holiday_check1.
            quota-endda = sy-datum + gv_quota + gv_no - 1.
            CLEAR gv_no.
            quota-begda = sy-datum.
            quota-awart = c_sub.
            CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
              EXPORTING
                number = wa_final-pernr.
            CALL FUNCTION 'HR_INFOTYPE_OPERATION'
              EXPORTING
                infty                  = '2001'
                number                 = wa_final-pernr
                subtype                = c_sub
    *   OBJECTID               =
    *   LOCKINDICATOR          =
               validityend            = quota-endda
               validitybegin          =  quota-begda
    *   RECORDNUMBER           =
                record                 = quota
                operation              = 'INS'
               tclas                  = 'A'
    *   DIALOG_MODE            = '0'
               nocommit               = no_commit
    *   VIEW_IDENTIFIER        =
    *   SECONDARY_RECORD       =
             IMPORTING
               return                 = bapireturn
               key                    = bapipakey
            gv_start1 = quota-endda.
            wa_mail-pernr =  wa_final-pernr.
            wa_mail-ename = wa_final-ename.
            wa_mail-divsn = wa_final-divsn.
            wa_mail-dept = wa_final-dept.
            gv_quota1 = gv_quota.
            wa_mail-lvdays = gv_quota1.
            CONCATENATE sy-datum+6(2) '.' sy-datum+4(2) '.' sy-datum+0(4) '-' quota-endda+6(2) '.'  quota-endda+4(2) '.' quota-endda+0(4) INTO wa_mail-lvdat.
    *        wa_mail-lvdat = sy-datum.
            wa_mail-lvtyp = 'Earned Leave'.
    *        CONCATENATE bapireturn-id
    *               bapireturn-number INTO  wa_mail-status.
            IF bapireturn-message IS NOT INITIAL.
              wa_mail-status = bapireturn-message.
            ELSE.
              wa_mail-status = 'Created'.
            ENDIF.
            wa_mail-werks = wa_final-werks.
            wa_mail-sacha = wa_final-sacha.
            gv_plnd = gv_week * 45 * 60 * 60.
            CALL FUNCTION 'MONI_TIME_CONVERT'
              EXPORTING
                ld_duration        = gv_plnd
              IMPORTING
                lt_output_duration = wa_mail-plnd.
            CLEAR wa.
            READ TABLE it INTO wa WITH KEY pernr = wa_final-pernr..
            IF wa IS NOT INITIAL.
              gv_actl =  wa-awh . "actual wrkng hrs "gv_plnd - gv_diff. "actual wrkng hrs
              CALL FUNCTION 'MONI_TIME_CONVERT'
                EXPORTING
                  ld_duration        = gv_actl
                IMPORTING
                  lt_output_duration = wa_mail-actl.
            ENDIF.
            APPEND wa_mail TO it_mail.
            CLEAR :gv_plnd,gv_actl,wa_mail.
            CLEAR quota .
    *    REFRESH quota.
            CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
              EXPORTING
                number = wa_final-pernr.
          ENDIF.
    *      gv_upl1 =  CEIL( gv_upl  + gv_cntr2 ).
          IF gv_upl IS NOT INITIAL.
    *Unpaid leave deduction
            quota-pernr = wa_final-pernr .
            quota-infty = c_infty.
            quota-subty =  c_sub1.
    *        quota-stdaz = gv_upl + gv_cntr2 .
            IF gv_start1 IS INITIAL.
              PERFORM holiday_check2.
              quota-endda = sy-datum +  gv_upl + gv_no - 1.
              quota-begda = sy-datum.
              CLEAR gv_no.
            ELSE.
              PERFORM holiday_check3.
              quota-endda = gv_start1 +  gv_upl + gv_no.
              quota-begda = gv_start1 + 1.
              CLEAR gv_no.
            ENDIF.
            quota-awart = c_sub1.
            CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
              EXPORTING
                number = wa_final-pernr.
            CALL FUNCTION 'HR_INFOTYPE_OPERATION'
              EXPORTING
                infty         = '2001'
                number        = wa_final-pernr
                subtype       = c_sub1
                validityend   = quota-endda
                validitybegin = quota-begda
                record        = quota
                operation     = 'INS'
                tclas         = 'A'
                nocommit      = no_commit
              IMPORTING
                return        = bapireturn
                key           = bapipakey.
            CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
              EXPORTING
                number = wa_final-pernr.
            gv_start2 = quota-endda.
            wa_mail-pernr =  wa_final-pernr.
            wa_mail-ename = wa_final-ename.
            wa_mail-divsn = wa_final-divsn.
            wa_mail-dept = wa_final-dept.
            wa_mail-lvdays = gv_upl.
            CONCATENATE quota-begda+6(2) '.' quota-begda+4(2) '.' quota-begda+0(4) '-' quota-endda+6(2) '.'  quota-endda+4(2) '.' quota-endda+0(4) INTO wa_mail-lvdat.
    *        wa_mail-lvdat = quota-begda.
            wa_mail-lvtyp = 'Unpaid Leave'.
    *        CONCATENATE bapireturn-id
    *        bapireturn-number INTO  wa_mail-status.
            IF bapireturn-message IS NOT INITIAL.
              wa_mail-status = bapireturn-message.
            ELSE.
              wa_mail-status = 'Created'.
            ENDIF.
            wa_mail-werks = wa_final-werks.
            wa_mail-sacha = wa_final-sacha.
            gv_plnd = gv_week * 45 * 60 * 60.
            CALL FUNCTION 'MONI_TIME_CONVERT'
              EXPORTING
                ld_duration        = gv_plnd
              IMPORTING
                lt_output_duration = wa_mail-plnd.
            CLEAR wa.
            READ TABLE it INTO wa WITH KEY pernr = wa_final-pernr..
            IF wa IS NOT INITIAL.
              gv_actl =  wa-awh . "actual wrkng hrs "gv_plnd - gv_diff. "actual wrkng hrs
              CALL FUNCTION 'MONI_TIME_CONVERT'
                EXPORTING
                  ld_duration        = gv_actl
                IMPORTING
                  lt_output_duration = wa_mail-actl.
            ENDIF.
            APPEND wa_mail TO it_mail.
            CLEAR :gv_actl,gv_plnd,wa_mail.
            CLEAR quota.
          ENDIF.
        ENDIF.
    *  half day unpaid leave
        IF gv_cntr2 IS NOT INITIAL.
          quota-pernr = wa_final-pernr .
          quota-infty = c_infty.
          quota-subty =  c_sub1.
          quota-beguz = '090000'.
          quota-enduz = '133000'.
    *      quota-stdaz =  gv_cntr2 .
          IF gv_start2 IS INITIAL.
            PERFORM holiday_check4.
            quota-endda = sy-datum  + gv_no.
            quota-begda = sy-datum + gv_no .
            CLEAR gv_no.
          ELSE.
            PERFORM holiday_check5.
            quota-endda = gv_start2 +  gv_no + 1.
            quota-begda = gv_start2 +  gv_no + 1."gv_start2 + 1.
            CLEAR gv_no.
          ENDIF.
          quota-awart = c_sub1.
          CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
            EXPORTING
              number = wa_final-pernr.
          CALL FUNCTION 'HR_INFOTYPE_OPERATION'
            EXPORTING
              infty         = '2001'
              number        = wa_final-pernr
              subtype       = c_sub1
              validityend   = quota-endda
              validitybegin = quota-begda
              record        = quota
              operation     = 'INS'
              tclas         = 'A'
              nocommit      = no_commit
            IMPORTING
              return        = bapireturn
              key           = bapipakey.
          CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
            EXPORTING
              number = wa_final-pernr.
          wa_mail-pernr =  wa_final-pernr.
          wa_mail-ename = wa_final-ename.
          wa_mail-divsn = wa_final-divsn.
          wa_mail-dept = wa_final-dept.
          wa_mail-lvdays = '0.5'.
          CONCATENATE quota-begda+6(2) '.' quota-begda+4(2) '.' quota-begda+0(4) '-' quota-endda+6(2) '.'  quota-endda+4(2) '.' quota-endda+0(4) INTO wa_mail-lvdat.
    *        wa_mail-lvdat = quota-begda.
          wa_mail-lvtyp = 'Unpaid Leave'.
    *        CONCATENATE bapireturn-id
    *        bapireturn-number INTO  wa_mail-status.
          IF bapireturn-message IS NOT INITIAL.
            wa_mail-status = bapireturn-message.
          ELSE.
            wa_mail-status = 'Created'.
          ENDIF.
          wa_mail-werks = wa_final-werks.
          wa_mail-sacha = wa_final-sacha.
          gv_plnd = gv_week * 45 * 60 * 60.
          CALL FUNCTION 'MONI_TIME_CONVERT'
            EXPORTING
              ld_duration        = gv_plnd
            IMPORTING
              lt_output_duration = wa_mail-plnd.
          CLEAR wa.
          READ TABLE it INTO wa WITH KEY pernr = wa_final-pernr..
          IF wa IS NOT INITIAL.
            gv_actl =  wa-awh . "actual wrkng hrs "gv_plnd - gv_diff. "actual wrkng hrs
            CALL FUNCTION 'MONI_TIME_CONVERT'
              EXPORTING
                ld_duration        = gv_actl
              IMPORTING
                lt_output_duration = wa_mail-actl.
          ENDIF.
          APPEND wa_mail TO it_mail.
          CLEAR : gv_plnd,gv_actl,wa_mail.
          CLEAR quota.
        ENDIF.
      ENDIF.
      DELETE it_final WHERE pernr EQ wa_final-pernr.
      IF bapireturn IS  INITIAL.
        READ TABLE it_receiver INTO wa_receiver WITH KEY pernr = wa_final-pernr
                                                          subty = '0010'.
        IF sy-subrc EQ '0'.
          receiver = wa_receiver-usrid_long.
          CLEAR wa_receiver.
        ENDIF.
    *Commented for cc mail to HR.
    *    READ TABLE it_usrid INTO wa_usrid WITH KEY werks = p0001-werks
    *                                               sachx = p0001-sachp.
    *    IF sy-subrc EQ '0'.
    *      READ TABLE it_receiver INTO wa_receiver WITH KEY usrid = wa_usrid-usrid.
    *      IF sy-subrc EQ '0'.
    *        READ TABLE it_receiver INTO wa_receiver WITH KEY pernr = wa_receiver-pernr
    *                                                         subty = '0010'.
    *        IF rb2 EQ 'X'.
    *          cc_reciv = wa_receiver-usrid_long.
    *        ENDIF.
    *      ENDIF.
    *    ENDIF.
        CONCATENATE wa_final-begda+6(2)'.' wa_final-begda+4(2) '.' wa_final-begda+0(4) INTO gv_begda.
        CONCATENATE wa_final-ltime+0(2)'.' wa_final-ltime+2(2)  INTO gv_ltime.
    *  if empid is not initial and employee is not initial and reciever is not initial.
    **------------Create Content--------------------*
        CONCATENATE 'Dear' wa_final-ename INTO hello_emp SEPARATED BY space.
        CONCATENATE hello_emp ',' INTO hello_emp.
        APPEND hello_emp TO content.
        CLEAR: hello_emp.
        APPEND space TO content.
        IF rb1 EQ 'X'.
          APPEND 'This is to inform you that there is a shortfall in your working hours this week. As you are aware,our working hour policy states that an employee needs to work 45 hours a week - that is,'
            TO content.
          APPEND  'an average of nine hours a day including the half-hour lunch break.'  TO content.
        ELSE.
          APPEND 'You have not worked 45 hours in a week and the same is also not regularized till 15th of the current month.' TO content.
        ENDIF.
        APPEND space TO content.
        IF rb1 EQ 'X'.
          APPEND 'It is recommended that you get this done at the earliest, as it could impact your Earned Leaves, and perhaps, even your salary. ' TO content.
          APPEND space TO content.
          APPEND 'All it requires is regularising your attendance which takes just a few minutes via our ESS portal. Here is the link: http:************.' TO content.
          APPEND space TO content.
          APPEND 'If you have any queries, do refer to our Leave Policy or contact HR Team.' TO content.
          APPEND space TO content.
          APPEND space TO content.
          APPEND 'Best Regards,' TO content.
          APPEND space TO content.
          APPEND 'Your HR Team' TO content.
          APPEND space TO content.
          APPEND '**This is an automatically generated mail. Please do not reply to this mail.**' TO content.
    *      APPEND ' You are therefore, advised to regularize your attendance to ensure 45 hours. Failure to do so will lead to deduction of Earned Leave for the shortfall of the absence period.'
    *      TO content.
        ELSE.
          APPEND 'Hence, the short fall of the working hours has been adjusted against your “Earned Leave”.' TO content.
    *    ENDIF.
    *    CONCATENATE hello_emp '.' INTO hello_emp.
          APPEND space TO content.
          APPEND'If, you do not have sufficient quota of Earned Leave, this will be treated as “Unpaid Leave” and salary will be deducted accordingly.' TO content.
          APPEND space TO content.
          APPEND 'For details, please refer the Leave Policy.' TO content.
          APPEND space TO content.
          APPEND 'Kindly use the following link to access the ESS portal to check your “Leaves and Quotas”.' TO content.
          APPEND space TO content.
          APPEND 'http:**************' TO content.
          APPEND space TO content.
          APPEND space TO content.
          APPEND '**This is an automatically generated mail. Please do not reply to this mail.**' TO content.
          APPEND space TO content.
        ENDIF.
    *APPEND'Best Regards,' TO content.
    *APPEND employee TO content.
    **------------Mail trigger----------------------*
        TRY.
            send_request = cl_bcs=>create_persistent( ).
          CATCH cx_send_req_bcs.
        ENDTRY.
        WRITE 'Shortfall of working time' TO subject.
        TRY.
            CALL METHOD cl_document_bcs=>create_document
              EXPORTING
                i_type        = 'RAW'
                i_subject     = subject
    *    i_length      =
    *    i_language    = SPACE
    *    i_importance  =
    *    i_sensitivity =
                i_text        = content
    *    i_hex         =
    *    i_header      =
    *    i_sender      =
              RECEIVING
                result        = mail_doc
          CATCH cx_document_bcs.
        ENDTRY.
        TRY.
            CALL METHOD send_request->set_document
              EXPORTING
                i_document = mail_doc.
          CATCH cx_send_req_bcs .
        ENDTRY.
        TRY.
            CALL METHOD cl_sapuser_bcs=>create
              EXPORTING
                i_user = sy-uname
              RECEIVING
                result = sender.
          CATCH cx_address_bcs .
        ENDTRY.
        TRY.
            CALL METHOD send_request->set_sender
              EXPORTING
                i_sender = sender.
          CATCH cx_send_req_bcs .
        ENDTRY.
        TRY.
            CALL METHOD cl_cam_address_bcs=>create_internet_address
              EXPORTING
                i_address_string = receiver
    *    i_address_name   =
    *    i_incl_sapuser   =
              RECEIVING
                result           = recipient
          CATCH cx_address_bcs .
        ENDTRY.
        CLEAR :receiver.
    *    *Commented for cc mail to HR.
    *    TRY.
    *        CALL METHOD cl_cam_address_bcs=>create_internet_address
    *          EXPORTING
    *            i_address_string = cc_reciv
    **    i_address_name   =
    **    i_incl_sapuser   =
    *          RECEIVING
    *            result           = recipient_cc
    *      CATCH cx_address_bcs .
    *    ENDTRY.
        TRY.
            CALL METHOD send_request->add_recipient
              EXPORTING
                i_recipient  = recipient
                i_express    = 'U'
    *    i_copy       =
    *    i_blind_copy =
    *    i_no_forward =
          CATCH cx_send_req_bcs .
        ENDTRY.
    *    TRY.
    *        CALL METHOD send_request->add_recipient
    *          EXPORTING
    *            i_recipient  = recipient_cc
    *            i_express    = 'U'
    *            i_copy       = 'X'
    **    i_blind_copy =
    **    i_no_forward =
    *      CATCH cx_send_req_bcs .
    *    ENDTRY.
        TRY.
            CALL METHOD send_request->set_send_immediately
              EXPORTING
                i_send_immediately = 'X'.
          CATCH cx_send_req_bcs .
        ENDTRY.
        TRY.
            CALL METHOD send_request->send
    *  EXPORTING
    *    i_with_error_screen = SPACE
    *  receiving
    *    RESULT              =
          CATCH cx_send_req_bcs .
        ENDTRY.
        COMMIT WORK.
      ELSE.
        READ TABLE it_usrid INTO wa_usrid WITH KEY werks = p0001-werks
                                                   sachx = p0001-sachp.
        IF sy-subrc EQ '0'.
          READ TABLE it_receiver INTO wa_receiver WITH KEY usrid = wa_usrid-usrid.
          IF sy-subrc EQ '0'.
            READ TABLE it_receiver INTO wa_receiver WITH KEY pernr = wa_receiver-pernr
                                                             subty = '0010'.
            receiver = wa_receiver-usrid_long.
            cc_reciv = '*'.
          ENDIF.
        ENDIF.
        CONCATENATE wa_final-begda+6(2)'.' wa_final-begda+4(2) '.' wa_final-begda+0(4) INTO gv_begda.
        CONCATENATE wa_final-ltime+0(2)'.' wa_final-ltime+2(2)  INTO gv_ltime.
    *  if empid is not initial and employee is not initial and reciever is not initial.
    **------------Create Content--------------------*
        CONCATENATE  'Hello' ',' INTO hello_emp.
    *      CONCATENATE hello_emp ',' INTO hello_emp.
        APPEND hello_emp TO content.
        CLEAR: hello_emp.
        APPEND space TO content.
        CONCATENATE 'Employee' wa_final-ename  bapireturn-type
      bapireturn-id
      bapireturn-number
      bapireturn-message
      bapireturn-log_no
      bapireturn-log_msg_no
      bapireturn-message_v1
      bapireturn-message_v2
      bapireturn-message_v3
      bapireturn-message_v4 INTO hello_emp SEPARATED BY space.
        APPEND hello_emp TO content.
        CLEAR: hello_emp.
        APPEND space TO content.
    *    CONCATENATE hello_emp '.' INTO hello_emp.
    *    APPEND hello_emp TO content.
    *    CLEAR: hello_emp.
    *    APPEND space TO content.
    *    APPEND 'For details, please refer Leave Policy.' TO content.
    *    APPEND space TO content.
        APPEND 'Please check Infotype 2001 and 2006 .' TO content.
        APPEND space TO content.
    *    APPEND '***********************l' TO content.
    *    APPEND space TO content.
    *    APPEND space TO content.
        APPEND '**This is an automatically generated mail. Please do not reply to this mail.**' TO content.
        APPEND space TO content.
    *APPEND'Best Regards,' TO content.
    *APPEND employee TO content.
    **------------Mail trigger----------------------*
        TRY.
            send_request = cl_bcs=>create_persistent( ).
          CATCH cx_send_req_bcs.
        ENDTRY.
        WRITE 'Shortfall of working time' TO subject.
        TRY.
            CALL METHOD cl_document_bcs=>create_document
              EXPORTING
                i_type        = 'RAW'
                i_subject     = subject
    *    i_length      =
    *    i_language    = SPACE
    *    i_importance  =
    *    i_sensitivity =
                i_text        = content
    *    i_hex         =
    *    i_header      =
    *    i_sender      =
              RECEIVING
                result        = mail_doc
          CATCH cx_document_bcs.
        ENDTRY.
        TRY.
            CALL METHOD send_request->set_document
              EXPORTING
                i_document = mail_doc.
          CATCH cx_send_req_bcs .
        ENDTRY.
        TRY.
            CALL METHOD cl_sapuser_bcs=>create
              EXPORTING
                i_user = sy-uname
              RECEIVING
                result = sender.
          CATCH cx_address_bcs .
        ENDTRY.
        TRY.
            CALL METHOD send_request->set_sender
              EXPORTING
                i_sender = sender.
          CATCH cx_send_req_bcs .
        ENDTRY.
        TRY.
            CALL METHOD cl_cam_address_bcs=>create_internet_address
              EXPORTING
                i_address_string = receiver
    *    i_address_name   =
    *    i_incl_sapuser   =
              RECEIVING
                result           = recipient
          CATCH cx_address_bcs .
        ENDTRY.
        TRY.
            CALL METHOD cl_cam_address_bcs=>create_internet_address
              EXPORTING
                i_ad

  • LSMW not creating session for more than 1000 records

    Hi all
    I am doing LSMW for equipment creation (IE01) using recording
    all are correct if i upload I have 2400 records to be uploaded,in the last step
    it showing "BDC_Insert,Transcation is invalid"
    If i upload for less then 1000 records like 950, its succefully creating
    sessions.
    PLease its very urgent, let me know
    Thanks in advance

    Hi Chandra,
    In filed mapping step END_OF_RECORD change the value of field g_cnt_transactions_group to value more than 5000. I think this value is less than 1000 for your case.
    at_first_transfer_record.           
    if g_cnt_transactions_group = 5000. 
      g_cnt_transactions_group = 0.     
      transfer_record.                  
    endif.                              
    If you are not able to see the END_OF_RECORD  in field mapping do the following steps:
    Extras menu-> Layout check all check boxes it will appear.
    Regards,
    Rajesh Sanapala.

  • My ipod touch kept crashing and not loading apps, syncing did not solve prblem so i did the 'restore' option. now it has been stuck 'verifying restore' for more than 8 hrs!! help

    i pod touch is stuck 'verifying restore' for the last 8 hrs... help??

    Try putting the iPod into DFU mode and restoring again:
    http://www.iclarified.com/entry/index.php?enid=1034
    If that still doesn't work, then the jailbreak may have cause a corruption which is now fatal; that's not uncommon with jailbroken devices. If that is indeed the case, your iPod may be irrecoverable and you'll be shopping for a new one.
    Good luck.

  • After rebooting my Windows Vista 64 bit system, could not access iTunes; after uninstalling I tried reinstalling, but it has been running for more than 24 hrs. Should I cancel installation?

    I had been updating my Windows Vista 64 bit system and as a result of a problem, had to reboot my system. Afterwards, I was no longer able to access iTunes.  I got a message stating that there was a problem with some of the files associated with the application.  A phone rep at Apple's Customer Service provided me with emails linking instructions on completely uninstalling and reinstalling iTunes. I did the uninstall, then checked for lingering iTunes files and couldn't completely remove some, but tried intalling the latest version of iTunes. It has been running for roughly 24 hours.  The status bar is green all the way across, and when I try to cancel, I get the following message: "Are you sure you want to cancel iTunes installation?"  I keep hitting "no," but am staring to wonder if there is a problem with the install.  Should it take this long if I have roughly 134 gigs of music?  I can still see the music in my computer's C drive, so I am worried that there is an error, perhpas because I didn't clear out all the lingering C:\Program Files\Common Files\Apple\ and all the lingering C:\Program Files\iTunes\.  Any thoughts?

    It is not just the HP. I have 3 HP computes and 2 Dell computers. 2 of the HP and 1 Dell suffer the iTunes internet block. Took me a while to figure it out also. But, the one thing that is different on the Dell, is that I can leave iTunes installed and not open it and everything works. As soon as I open it, internet access goes down. BUT secure sites (https:) works fine.

  • My Iphone gets hot and wont hold a charge for more than 8 hrs

    My Iphone 5c gets hot even when i dont have a protective case on it but it is worse when it is charging. The battery will only hold a charge for at most 8hrs, i have taken it into the store and they always say nothing is wrong with it. I find that hard to believe since my old iphone that was 2 years old lasted longer. I have already turned my backlight down and turned off notifications. Any ideas?

    Charging has always been recommended without an iOS device in a case...many of those do not allow heat to dissipate.
    Turn down screen brightness, turn off things you don't need, like Bluetooth if not being used, change the Mail push timing so it is less frequent...all things that use energy should be stretched out to save battery time.

  • Detect when a button is pressed for more than a certain period of time

    How do I detect if a button is pressed for more than a certain amount of time? E.g. if you press on the delete button on the dialer and hold it there, it continues to delete. Or if you hold down the .com button for more than a sec, it changes to .net and so forth.
    Thanks

    Start a timer when the button is pressed. Reset the timer when the button is released. If the timer expires before being reset then you know the button has been held down at least as long as the timer was set for.

  • Sessions hold more than 10 to 12 hrs

    Hi,
    1.How to findout a sessions hold more than 10 hrs.
    Regards
    Mirza

    T.PD wrote:
    select * from v$session vds where  sysdate-VDS.LOGON_TIME > 1/10;
    Think you mean > 10/24.
    Wonder if that was what OP meant by "hold".
    initial value was only 24 minutes.More like 144 minutes ;)

  • Wireless connection lost after macbook pro sleeps for more than 15 minutes

    It's annoying. I have a brand new macbookpro 3.06Ghz 17" hi-res screen running OS-X 10.6.3 and the wireless connection keeps dropping after the computer is either turned off or sleeping for more than 15 minutes.
    My router is a linksys wireless G, has dd-wrt software in it which is very powerful. When I release or renew the DHCP at the router, the mackbook connects to the wireless network, no problem.
    What configuration can be done at the macbook as to not have it time-out airport wireless connections unless I renew/release DHCP at the router? This is an annoyance beyond the limits of anyone's patience.... Thanks in advance for any help!

    Well, since nobody answered this post I decided to try a bunch of things and I believe I came to a solution:
    1 - Make airport the first connection under System Preferences->Network
    2 - In the advanced window:
    - Under AirPort: Keep only one network name on the list (the one you use all the time)
    - Select 'remember networks this computer has joined' and deselect all other boxes
    - Take note of the Airport ID (xx:xx:xx:xx:xx) and put it in your router's MAC address list. I do this because I only allow connections to my router from mac IDs that are on the list I create. In my case, I have my macbook pro and my PS3 system. If you don't know how to edit the MAC list in your router, do some research. It's pretty easy.
    - Under TCP/IP: Select "Using DHCP" on the IPv4 drop box
    - Select "Off" for IPV6 drop box
    - Under DNS, after you connect at least once, you should see (grayed out) your router's IP address on the left box and the domain on the right side box.
    Finally, under "Ethernet" you should see your Mac address there, the configure option should be set to Automatically and MTU as standard (1500).
    Press OK and then press "Apply" and lock that screen by clicking on the padlock at the bottom left. BTW on the top of this screen Location should be "Automatic" - if not, select it and apply.
    Done! Your wireless should connect quickly after the computer is turned on or waken up from sleep state. This assumes you configured your router correctly (mac addresses, frequencies, etc).
    Good Luck to all who try this - at least I have not have any more dropped wireless connections.
    Message was edited by: KEForex
    Message was edited by: KEForex

  • My iPhone 4 with iOS 6 is making me start to hate Apple. Any App and at any time I open and I can not view it or move for more than 2 minutes, they close themselves. During connections, it also gives this problem and the signal disappears after a few seco

    My iPhone 4 with iOS 6 is making me start to hate Apple. Any App and at any time I open and I can not view it or move for more than 2 minutes, they close themselves. During connections, it also gives this problem and the signal disappears after a few seconds back but often the person on the other end has hung up ... I can not stand it anymore, someone suggests something?
    Besides these problems, there is the battery, which was bad got worse, she is not lasting more than 10 hours, even without using the phone.
    Sometimes it even seems that the problem was solved, but my joy did not last long after I celebrate all the problems return, is incredible ...
    thanks.
    Sorry my bad Inglês.

    Try a reset hold home/sleep buttons until Apple logo appears
    If that does not improve try a restore
    http://support.apple.com/kb/HT4137
    For your information
    We are NOT Apple here we are all users helping other users
    so emotion is ignored

  • HP LaserJet 1300 not connected for more than 1 day

    Since Apple came out with the Yosemite printing system, I cannot print wirelessly for more than one day. I have reset my modem, changed the location of my network, unplugged and repowered Airport Extreme, started in Safe Mode, and more.
    No matter what I do: I either get:  a printer name with a number in parenthese or a long Bonjour number when deleting and adding a printer on my laptop.
    Whatever I do, it only works from about 24 to 36 hours. Then when i go to print it says Printer is Not Connected. I can delete and add again, usually it will find the printer, add it, print, and then a day or two later, the printer is not connected again.
    But I have to keep redoing this both to my laptop and my wife's, and we have not had reliable printing since Yosemite cane out about October 18, 2014.
    Equipment
    iMac:
    Operating Sysem: 10.10.1
    Printer: HP LaserJet 1300
    Network: Comcast
    Router: Airport Extreme
    The only thing I have not done I can think of is reset Airport Extreme.  I can do that, but don't know if I will then have additional problems.
    This all started with the YIosemite update but at this point I don't know if it is an HP-related problem or a general Yosemite-related problem.
    I appreciate any help I can get. Have wasted probably 40 hours over two-plus months trying to get this fixed. When Apple could not fix it back in October, the person referred me to HP. The person at HP Business did not know my printer was supported for Yosemite although his own web site said it was. So that was not much help And after resetting printers, deleting and adding printers, etc., I don't know what else to do.
    Thanks for listening.

    Did it start not syncing after the iOS 4.2 update?

Maybe you are looking for

  • Audit ACL on Large File Share

    I have to audit the permissions of all folders on a large drive, and I was wondering if the following code is really practical with this many possible folders. $ntfsreport = @() $folders = Get-ChildItem \\serverA\F$ -recurse | where {$_.psIsContainer

  • Can't drag an image to an album?

    I am probably doing something boneheaded here (which I usually end up doing at least a few times per day)... but, I have a project, within that project are two albums. I have each album open (via option click). Is there a reason I can't drag an image

  • Internet Connection thru USB /N95 8GB

    I have just got the N95 8GB and loaded the software etc. It will not connect to the internet, error msg says no modem detected. I had a similar problem with the previous N95 in the months leading up to my upgrade. After using it to connect to the net

  • Payment block in FB60

    Hi, I am having trouble posting AP transactions and blocking them for payment when posting them at FB60.  I blocked the transaction (at the header level) before the system generates a document number but when I look in vendor line open items the bloc

  • Test Restore Of Backup On Seperate Host

    I want to test my backup by restoring the full backup of my production database on a seperate test host.All my RMAN backup's are at primary side on a disk.My doubt here is when i issue restore backup command at test host how rman recoginzes the backu