Selection Screen getting refreshed after execution..

Hello All,
I have a strange problem..
My selection-screen values are getting refreshed after execution and come back to selection screen. I am using normal ALV Fm to display the values. Can some suggest a possible reason?
Many thanks,
V Nair

No .. I have checked it..Selection variables are not getting refreshed.
My Code Below
REPORT  yhr_icm_exception_report.
Type Pool declarations
TYPE-POOLS: slis,                                     "For AlV
            sdydo,                                    "Dynamic Documents
            icon.                                     "For ICON
Table declarations
TABLES : yhr_icm_exp_log,                             "ICM Exceptions Log
         yhr_icm_exp_hist.                            "ICM Exception History
Include Constants
INCLUDE   yhr_icm_constants .                         "Program to hold constants
Types declarations
*-To hold return field
TYPES: BEGIN OF ty_returntab.
        INCLUDE STRUCTURE ddshretval.                 "Interface Structure
TYPES: END OF ty_returntab.
*-To hold deletion records
TYPES : BEGIN OF ty_icm_del,
           tab_name      TYPE yhr_tabname,            "Internal table name
           objid         TYPE hrobjid,                "Object ID
           begda         TYPE begda,                  "Begin Date
           otype         TYPE otype,                  "Object Type
        END OF ty_icm_del.
*-Message details to be displayed
TYPES : BEGIN OF ty_message,
          msgnr          TYPE  msgno,                 "System message number
          text           TYPE  yhr_icm_exp_log-msgxx, "Message Text
        END OF ty_message.
*-To hold exception log
TYPES : BEGIN OF ty_icm_exp_log,
         msgno           TYPE msgnr,                  "Message number
         run_id          TYPE yhr_icm_erun_id,        "Exception Run ID
         delta_id        TYPE yhr_icm_run_id,         "Run ID
         record_type     TYPE yhr_icm_exp_type,       "Record Type
         otype           TYPE yhr_otype,              "Object Type
         objid           TYPE hrobjid,                "Object ID
         begda           TYPE begda,                  "Begin Date
         msgxx           TYPE msgxx,                  "Message
         status          TYPE yhr_icm_icon,           "Status
         delta_relevance TYPE yhr_delta_rel,          "Delta Relevance
        END OF ty_icm_exp_log.
*-To hold email attachment
TYPES: BEGIN OF ty_attach,
           text(500)     TYPE c,                      "Text
END OF ty_attach.
*To hold object type & text
TYPES :BEGIN OF ty_objid_text,
          objid          TYPE objid,                  "Object ID
          text           TYPE emnam,                  "Object Text
       END OF ty_objid_text.
*-To hold counter values - Exp , Del & historical
TYPES :BEGIN OF ty_count,
          exp(10)        TYPE c,                      "Exceptions
          del(10)        TYPE c,                      "Deletions
          hist(10)       TYPE c,                      "Historical Deletions
       END OF ty_count.
*- To hold lock details
TYPES : BEGIN OF ty_lock,
          live           TYPE c,                      "Live Callidus Program
          genr           TYPE c,                      "Generation Program
          exp            TYPE c,                      "Exception Program
        END OF ty_lock.
Range Declarations
RANGES :
       gr_objid          FOR hrp1001-objid,           "Range for Object ID
       gr_pernr          FOR pa0000-pernr.            "Range for Employee number
Internal Table Declarations
DATA : gt_records        TYPE STANDARD TABLE OF yhr_icm_exp_report,
       gt_objid_text     TYPE STANDARD TABLE OF ty_objid_text,
       gt_icm_exp_log    TYPE STANDARD TABLE OF ty_icm_exp_log,
       gt_returntab      TYPE STANDARD TABLE OF ty_returntab,
       gt_t777o          TYPE STANDARD TABLE OF t777o,
       gt_diff_tab       TYPE STANDARD TABLE OF yhr_icm_diff,
       gt_del_tab        TYPE STANDARD TABLE OF ty_icm_del, "#EC *
       gt_iattach        TYPE STANDARD TABLE OF ty_attach,
       gt_message        TYPE STANDARD TABLE OF ty_message,
       gt_fieldcat       TYPE slis_t_fieldcat_alv,
       gt_heading        TYPE slis_t_listheader,
       gt_exceptions     TYPE yhr_icm_exp_list_t,
       gt_events         TYPE slis_t_event.
Structure Declarations
DATA : gs_objid_text     TYPE ty_objid_text,
       gs_icm_exp_log    TYPE ty_icm_exp_log,
       gs_records        TYPE yhr_icm_exp_report,
       gs_exceptions     TYPE yhr_icm_exp_list,
       gs_count          TYPE ty_count,
       gs_fieldcat       TYPE slis_fieldcat_alv,            "#EC *
       gs_returntab      TYPE ty_returntab,
       gs_icm_exp_hist   TYPE yhr_icm_exp_hist,
       gs_iattach        TYPE ty_attach,
       gs_message        TYPE ty_message,                   "#EC *
       gs_layout         TYPE slis_layout_alv,
       gs_t777o          TYPE t777o,
       gs_lock           TYPE ty_lock.
Constant declarations
CONSTANTS:
       c_yes             TYPE string        VALUE 'YES',
       c_no              TYPE string        VALUE 'NO',
       c_true            TYPE c             VALUE 'X',
       c_deletions       TYPE c             VALUE 'D',
       c_delta_no        TYPE c             VALUE 'N',
       c_delta_yes       TYPE c             VALUE 'Y',
       c_historical      TYPE c             VALUE 'H',
       c_a               TYPE c             VALUE 'A',
       c_error           TYPE c             VALUE 'E',
       c_equal(2)        TYPE c             VALUE 'EQ',
       c_participants    TYPE c             VALUE 'P',
       c_include         TYPE c             VALUE 'I',
       c_position        TYPE c             VALUE 'S',
       c_organization    TYPE c             VALUE 'O',
       c_runlock         TYPE string        VALUE 'RUN_LOCK',
       c_parameter       TYPE string        VALUE 'P',
       c_selfield        TYPE string        VALUE 'SEL_FIELD' ,
       c_type            TYPE string        VALUE 'TYPE',
       c_topofpage       TYPE string        VALUE 'TOP_OF_PAGE',
       c_rectype         TYPE string        VALUE ' S_RECTYPE',
       c_objectkey       TYPE string        VALUE 'OBJECTKEY1',
       c_icon_green      TYPE string        VALUE '@08@',
       c_icon_red        TYPE string        VALUE '@0A@',
       c_icon_amber      TYPE string        VALUE '@09@',
       c_green           TYPE string        VALUE 'GREEN',
       c_amber           TYPE string        VALUE 'AMBER',
       c_red             TYPE string        VALUE 'RED',
       c_tabname         TYPE slis_tabname  VALUE 'GT_RECORDS',
       c_structname      TYPE dd02l-tabname VALUE 'YHR_ICM_EXP_REPORT' ,     
       c_siwb_wallpaper  TYPE sdydo_key     VALUE 'SIWB_WALLPAPER',
       c_user_command    TYPE slis_formname VALUE 'F01_ALV_EVENT_USER_COMMAND',
       c_genname         TYPE trdir-name    VALUE 'YHR_ICM_GENERATE_EXCEPTIONS',
       c_expname         TYPE trdir-name    VALUE 'YHR_ICM_EXCEPTION_REPORT',
       c_pf_status       TYPE slis_formname VALUE 'SET_PF_STATUS',
       c_msg_class       TYPE string        VALUE 'YHR_ICM'.
Global Variable Declarations
DATA:  gv_email_error    TYPE c,
       gv_email_sent     TYPE c,
       gv_exit           TYPE c.
Selection Screen - Block I
SELECTION-SCREEN:   BEGIN OF BLOCK b3 WITH FRAME TITLE text-s07.
SELECT-OPTIONS:
*-  Run ID
    s_run_id             FOR yhr_icm_exp_hist-run_id,
*-  Exception Type
    s_rectyp             FOR yhr_icm_exp_log-record_type NO INTERVALS,
*-  Object Type
    s_otype              FOR yhr_icm_exp_log-otype NO INTERVALS,
*-  Object ID
    s_objid              FOR yhr_icm_exp_log-objid NO INTERVALS,
*-  Start Date
    s_begda              FOR yhr_icm_exp_log-begda,
*-  Message number
    s_msgno              FOR yhr_icm_exp_log-msgno,
*-  Message Text
    s_msgxx              FOR yhr_icm_exp_log-msgxx.
SELECT-OPTIONS:
*- Delta Relevance
   s_relv                FOR yhr_icm_exp_log-delta_relevance NO INTERVALS.
PARAMETERS:
*- Long Text
   p_ltext               AS   CHECKBOX DEFAULT ' '.
SELECTION-SCREEN:   END OF BLOCK b3.
Selection Screen - Block II
SELECTION-SCREEN:   BEGIN OF BLOCK b2 WITH FRAME TITLE text-s08.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(14) text-033.
*-Sucess
PARAMETERS:
  p_stat_s               AS CHECKBOX.                  "D11K917251
SELECTION-SCREEN COMMENT 24(14) text-034.
*-Warning
PARAMETERS:
  p_stat_w               AS CHECKBOX.                  "D11K917251
SELECTION-SCREEN COMMENT 48(15) text-035.
PARAMETERS:
*-Error
  p_stat_e               AS CHECKBOX .                 "D11K917251
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN:   END OF BLOCK b2.
Selection Screen - Block III
SELECTION-SCREEN:   BEGIN OF BLOCK b4 WITH FRAME TITLE text-s09.
*-Email Details
PARAMETERS:
  p_email(128)            TYPE c.
SELECTION-SCREEN:   END OF BLOCK b4.
             Selection Screen on value request.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_msgno-low.
  PERFORM f4_message.
             Selection Screen Output.
AT SELECTION-SCREEN OUTPUT.
  CHECK gt_returntab[] IS NOT INITIAL.
  REFRESH s_msgno.
  s_msgno-option = c_equal.
  s_msgno-sign = c_include.
  LOOP AT gt_returntab INTO gs_returntab.
    s_msgno-low = gs_returntab-fieldval.
    s_msgno-high = space.
    APPEND s_msgno.
  ENDLOOP.
At Selection Screen for Validation
AT SELECTION-SCREEN.
  CLEAR gv_email_error.
*-Validate Object Type
  PERFORM validate_objecttype.
*-Validate Exception ID
  PERFORM fetch_exp_header.
*-Validate Exception Type
  PERFORM validate_exptype.
*-Validate Message Number
  PERFORM validate_msgno.
*-Validate Message Type
  PERFORM validate_msgtype.
*-Validate Delta
  PERFORM validate_delta.
*-Validate Email ID
  PERFORM validate_email USING p_email
                         CHANGING gv_email_error.
  IF gv_email_error IS NOT INITIAL.
    MESSAGE e000(yhr_icm) WITH text-027.
  ENDIF.
Initialization
INITIALIZATION.
Initialization
  PERFORM initialization.
Start Of Selection
START-OF-SELECTION.
  CLEAR : gv_email_error,
          gv_email_sent,
          gv_exit,
          gs_lock.
Try locking the main program
  PERFORM lock_generation_program.
  CHECK gs_lock IS INITIAL.
*-Fetch the messages stored in table
  PERFORM fetch_item_records.
Read object type text.
  PERFORM read_text.
Get Object Text
  PERFORM get_object_text.
*-Fetch the current SAP messages
  PERFORM fetch_records.
*-Update Delta Flag
  PERFORM update_delta_flag.
*-Compare messages in table & in SAP
  PERFORM compare_message.
If receiver is not blank, try sending out mail
  PERFORM send_mail USING p_email.
End Of Selection
END-OF-SELECTION.
  IF gv_exit IS NOT INITIAL.
    EXIT.
  ENDIF.
*-Display ALV
  PERFORM display_alv.
*-Build the event table for ALV display
  PERFORM build_eventtab CHANGING gt_events[].
*-Fill the layout details
  PERFORM layout_build .
Release all locks
  PERFORM release_locks.
*-Finally call the grid display
  PERFORM display_data.
*&      Form  set_pf_status
      text
     -->RT_EXTAB   text
FORM set_pf_status USING rt_extab TYPE slis_t_extab.        "#EC *
Set PF Status
  SET PF-STATUS 'STANDARD'.
ENDFORM. "Set_pf_status
*&      Form  DISPLAY_ALV
      text
-->  p1        text
<--  p2        text
FORM display_alv .
*- Use FM to create field catalog
  CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
      i_program_name         = sy-repid
      i_internal_tabname     = c_tabname
      i_structure_name       = c_structname
    CHANGING
      ct_fieldcat            = gt_fieldcat
    EXCEPTIONS
      inconsistent_interface = 1
      program_error          = 1
      OTHERS                 = 1.
  IF sy-subrc = 1.
    MESSAGE i000(yhr_icm) WITH text-001.
    EXIT.
  ENDIF.
*- Remove SEL Field Column as it is not required
  DELETE gt_fieldcat WHERE fieldname = c_selfield.
*-If user chooses long text, activate icon
  IF p_ltext IS INITIAL.
    LOOP AT gt_fieldcat INTO gs_fieldcat WHERE fieldname = c_type.
      gs_fieldcat-icon = c_true.
    ENDLOOP.
  ENDIF.
ENDFORM.                    " DISPLAY_ALV
*&      Form  BUILD_EVENTTAB
      text
     <--P_GT_EVENTS[]  text
FORM build_eventtab CHANGING    p_events  TYPE slis_t_event.
  DATA: ls_event TYPE slis_alv_event.
*-Get the list of event for alv
  CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
    EXPORTING
      i_list_type = 0
    IMPORTING
      et_events   = p_events.
*-Add top of page event to event list
  READ TABLE p_events
        WITH KEY name = slis_ev_top_of_page
         INTO ls_event.
  IF sy-subrc = 0.
    MOVE c_topofpage TO ls_event-form.
    APPEND ls_event TO p_events.
  ENDIF.
ENDFORM.                    " BUILD_EVENTTAB
*&      Form  LAYOUT_BUILD
      text
-->  p1        text
<--  p2        text
FORM layout_build .
  gs_layout-zebra                = c_true.
  gs_layout-colwidth_optimize    = c_true.
  gs_layout-detail_popup         = c_true.
  gs_layout-detail_initial_lines = c_true.
  gs_layout-detail_titlebar      = text-044.
  gs_layout-box_fieldname        = c_selfield.
ENDFORM.                    " LAYOUT_BUILD
*&      Form  DISPLAY_DATA
      text
-->  p1        text
<--  p2        text
FORM display_data .
*-Display ALV display
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      i_callback_user_command  = c_user_command
      i_background_id          = c_siwb_wallpaper
      i_callback_program       = sy-repid
      i_callback_pf_status_set = c_pf_status
      i_default                = c_true
      i_save                   = c_a
      is_layout                = gs_layout
      it_fieldcat              = gt_fieldcat
      it_events                = gt_events
    TABLES
      t_outtab                 = gt_records.
ENDFORM.                    " DISPLAY_DATA
*&      Form  FETCH_RECORDS
      text
-->  p1        text
<--  p2        text
FORM fetch_records .
  REFRESH : gt_diff_tab,
            gt_del_tab,
            gr_pernr,
            gt_exceptions.
  CLEAR:    gs_icm_exp_log.
*-Get Employee details
  PERFORM get_person_data.
*-Get Position Details
  PERFORM get_position_data.
*-Get Organization Details
  PERFORM get_org_data.
*-Get Exception current SAP exception list.
  PERFORM get_exception_list.
*-Add deletion records
  PERFORM filter_deletions.
ENDFORM.                    " FETCH_RECORDS
*&      Form  top_of_page
      text
FORM top_of_page.                                           "#EC *
  PERFORM build_comment   USING    gt_heading.
*-Display Use FM to display Top Of Page
  CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
      it_list_commentary = gt_heading[].
  CLEAR gt_heading.
ENDFORM.                    "TOP_OF_PAGE
*&      Form  build_comment
      text
     -->P_HEADING  text
FORM build_comment USING p_heading TYPE slis_t_listheader.
  DATA: ls_hline     TYPE slis_listheader,
        lv_text(120) TYPE c.
*-Display report title
  ls_hline-typ  = c_historical.
  WRITE text-006 TO lv_text.
  ls_hline-info = lv_text.
  APPEND ls_hline TO p_heading.
  CLEAR ls_hline.
  ls_hline-typ  = c_s.
*-Remove leading & trailing spaces
  CONDENSE : gs_count-del,  gs_count-exp,  gs_count-hist.
*-If the count is space then pass 0
  IF gs_count-del = space.
    gs_count-del = 0.
  ENDIF.
  IF gs_count-exp = space.
    gs_count-exp = 0.
  ENDIF.
  IF gs_count-hist = space.
    gs_count-hist = 0.
  ENDIF.
  IF gs_lock IS INITIAL.
*-Display Deletion, Exception, Historical Count
    CONCATENATE  text-037 gs_count-del
                 text-032 gs_count-exp
                 text-039 gs_count-hist
            INTO ls_hline-info SEPARATED BY space.
  ELSEIF gs_lock-live IS NOT INITIAL.
    ls_hline-info = text-007.
  ELSEIF gs_lock-genr IS NOT INITIAL.
    ls_hline-info = text-008.
  ELSEIF gs_lock-exp IS NOT INITIAL.
    ls_hline-info = text-009.
  ENDIF.
  APPEND ls_hline TO p_heading.
  CLEAR ls_hline.
ENDFORM.                    "BUILD_COMMENT
*&      Form  INITIALIZATION
      text
-->  p1        text
<--  p2        text
FORM initialization .
Read Previous run
SELECT MAX( run_id )
   INTO s_run_id-low
   FROM yhr_icm_exp_hist.                                  "#EC *
s_run_id-option = c_equal.
s_run_id-sign = c_include.
APPEND s_run_id.
s_rectyp-option = c_equal.
s_rectyp-sign = c_include.
s_rectyp-low = c_error.
APPEND s_rectyp.
s_rectyp-low = c_deletions.
APPEND s_rectyp.
  PERFORM restrict_selections.
*Get the message from Message Class YHR_ICM
  SELECT msgnr
         text
    FROM t100
    INTO TABLE gt_message
   WHERE arbgb = c_msg_class  AND
         msgnr GT '000'.                                    "#EC *
ENDFORM.                    " INITIALIZATION
*&      Form  F4_MESSAGE
      text
     <--P_P_MSGNO  text
FORM f4_message.
F4 Help - Display all messages
  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield        = 'MSGNR'
      dynpprog        = sy-cprog
      dynpnr          = sy-dynnr
      dynprofield     = 'S_MSGNR'
      window_title    = text-045
      value_org       = c_s
      multiple_choice = c_true
    TABLES
      value_tab       = gt_message
      return_tab      = gt_returntab
    EXCEPTIONS
      parameter_error = 1
      no_values_found = 2
      OTHERS          = 1.
  IF sy-subrc = 1.
    MESSAGE i000(yhr_icm) WITH text-002.
    EXIT.
  ELSEIF sy-subrc = 2.
    MESSAGE i000(yhr_icm) WITH text-003.
    EXIT.
  ENDIF.
ENDFORM.                    " F4_MESSAGE
*&      Form  VALIDATE_OBJECTTYPE
      text
-->  p1        text
<--  p2        text
FORM validate_objecttype .
  CHECK s_otype-low IS NOT INITIAL.
  CONDENSE s_otype-low.
Validate object type to check whether user has entered only S, P or O
  IF  s_otype-low NE c_organization AND
        s_otype-low NE c_position AND
          s_otype-low NE c_participants  .
    MESSAGE e000(yhr_icm) WITH 'Enter either S(Position), P(Person) or O(Org Unit)'(021).
  ENDIF.
ENDFORM.                    " VALIDATE_OBJECTTYPE
*&      Form  VALIDATE_OBJECTTYPE
FORM f01_alv_event_user_command USING r_ucomm LIKE sy-ucomm
                                      rs_selfield TYPE slis_selfield."#EC *
  DATA : lv_answer TYPE c,
         lt_fields TYPE STANDARD TABLE OF sval,
         ls_fields TYPE sval.
*-Get the row user has selected in ALV list
  READ TABLE gt_records INTO gs_records INDEX rs_selfield-tabindex.
  CASE r_ucomm.
    WHEN 'DISP'.
      CASE gs_records-otype.
        WHEN 'S'.
          SET PARAMETER ID 'POT' FIELD gs_records-otype.
          SET PARAMETER ID 'PON' FIELD gs_records-objid.
          CALL TRANSACTION 'PP01_DISP' AND SKIP FIRST SCREEN.
        WHEN 'P'.
          SET PARAMETER ID 'PER' FIELD gs_records-objid.
          CALL TRANSACTION 'PA20' AND SKIP FIRST SCREEN.
        WHEN 'O'.
          SET PARAMETER ID 'POT' FIELD gs_records-otype.
          SET PARAMETER ID 'PON' FIELD gs_records-objid.
          CALL TRANSACTION 'PP01_DISP' AND SKIP FIRST SCREEN.
      ENDCASE.
    WHEN 'CHNG'.
      CASE gs_records-otype.
        WHEN 'S'.
          SET PARAMETER ID 'POT' FIELD gs_records-otype.
          SET PARAMETER ID 'PON' FIELD gs_records-objid.
          CALL TRANSACTION 'PP01' AND SKIP FIRST SCREEN.
        WHEN 'P'.
          SET PARAMETER ID 'PER' FIELD gs_records-objid.
          CALL TRANSACTION 'PA30' AND SKIP FIRST SCREEN.
        WHEN 'O'.
          SET PARAMETER ID 'POT' FIELD gs_records-otype.
          SET PARAMETER ID 'PON' FIELD gs_records-objid.
          CALL TRANSACTION 'PP01' AND SKIP FIRST SCREEN.
      ENDCASE.
    WHEN 'EMAIL'.
*-    Check whether email has already been sent
      IF  gv_email_sent = c_true.
*-      If yes, then display pop up to confirm for mailing again
        CALL FUNCTION 'POPUP_TO_CONFIRM'
          EXPORTING
            text_question  = text-041
            text_button_1  = text-042
            text_button_2  = text-043
          IMPORTING
            answer         = lv_answer
          EXCEPTIONS
            text_not_found = 1
            OTHERS         = 1.
        IF sy-subrc = 1.
          MESSAGE i000(yhr_icm) WITH text-004.
          EXIT.
        ENDIF.
*-     Continue only if user has selected Yes
        CHECK lv_answer = '1'.
      ENDIF.
*-      Add Email Field & Table
      ls_fields-tabname = 'SZA5_D0700'.
      ls_fields-fieldname =  'SMTP_ADDR'.
      APPEND ls_fields TO lt_fields.
*-      Use FM to get new Email ID
      CALL FUNCTION 'POPUP_GET_VALUES'
        EXPORTING
          popup_title     = text-s09
          start_column    = '5'
          start_row       = '5'
        TABLES
          fields          = lt_fields
        EXCEPTIONS
          error_in_fields = 1
          OTHERS          = 1.
      IF sy-subrc = 1.
        MESSAGE i000(yhr_icm) WITH text-004.
        EXIT.
      ENDIF.
*-    Get the Email user has entered
      READ TABLE lt_fields INTO ls_fields INDEX 1.
*-      Validate Email ID
      PERFORM validate_email USING ls_fields-value
                     CHANGING gv_email_error.
*-    If the flag is not initial, indicates possible error
      IF  gv_email_error IS NOT INITIAL.
        MESSAGE i000(yhr_icm) WITH text-027.
        EXIT.
      ELSE.
      If no error, then try ending email
        PERFORM send_mail USING ls_fields-value.
      ENDIF.
    WHEN 'REFRESH'.
*-    Fetch the current SAP messages
      PERFORM fetch_records.
*-    Update Delta Flag
      PERFORM update_delta_flag.
*-    Compare messages in table & in SAP
      PERFORM compare_message.
*-    Refresh alv which is already displayed
      rs_selfield-refresh = c_true.
  ENDCASE.
ENDFORM.                    "F01_ALV_EVENT_USER_COMMAND
*&      Form  RESTRICT_SELECTIONS
      text
-->  p1        text
<--  p2        text
FORM restrict_selections .
  TYPE-POOLS sscr.
  STATICS: lt_restrict TYPE sscr_restrict,
           lt_opt_list TYPE sscr_opt_list,
           ls_***      TYPE sscr_***.
Restrict the wage type selection so the user can only enter
values with the 'EQ' clause.
  CLEAR lt_opt_list.
  MOVE c_objectkey TO lt_opt_list.
  MOVE c_true TO: lt_opt_list-options-eq,
                  lt_opt_list-options-bt,
                  lt_opt_list-options-cp,
                  lt_opt_list-options-eq,
                  lt_opt_list-options-ge,
                  lt_opt_list-options-gt,
                  lt_opt_list-options-le,
                  lt_opt_list-options-lt.
  APPEND lt_opt_list TO lt_restrict-opt_list_tab.
  MOVE: c_s         TO ls_***-kind,
        c_rectype   TO ls_***-name,
        c_include         TO ls_***-sg_main,
        space       TO ls_***-sg_addy,
        c_objectkey TO ls_***-op_main.
  APPEND ls_***     TO lt_restrict-***_tab.
*-Restrict the values OTYPE
  MOVE  'S_OTYPE'    TO ls_***-name.
  APPEND ls_***      TO lt_restrict-***_tab.
*-Restrict the values OBJID
  MOVE    'S_OBJID'  TO ls_***-name.
  APPEND ls_***      TO lt_restrict-***_tab.
*-Use FM to restrict the values
  CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
    EXPORTING
      restriction = lt_restrict.
ENDFORM.                    " RESTRICT_SELECTIONS
*&      Form  GET_PERSON_DATA
      text
-->  p1        text
<--  p2        text
FORM get_person_data .
  DATA : lt_del_tab TYPE STANDARD TABLE OF yhr_icm_diff.
  SORT gt_icm_exp_log BY msgno .
  gr_pernr-sign = c_include.
  gr_pernr-option = c_equal.
  LOOP AT gt_icm_exp_log INTO gs_icm_exp_log WHERE otype = c_participants AND
                                                   record_type = c_error.
*-  Sort the table based on msgno and collect pernr
    gr_pernr-sign = c_include.
    gr_pernr-option = c_equal.
    gr_pernr-low = gs_icm_exp_log-objid.
    APPEND gr_pernr.
    CLEAR gr_pernr-low.
    AT END OF msgno.                                        "#EC *
*-    For the list of Pernr having same PERNR get the current exp details
      IF  gs_icm_exp_log-msgno = c_msg_100.
*-      Export the pernr list to memory id & import in the below FM
*-      Selection of records should be based on values exported from here
        EXPORT gr_pernr TO MEMORY ID 'PERNR_0001'.
      Get Org Assignment 0001 Data
        CALL FUNCTION 'Y_HR_DIFF_PERNR_0001_DATA'
          EXPORTING
            period_begda = gs_icm_exp_hist-begda
            period_endda = gs_icm_exp_hist-endda
            refresh      = space
            UPDATE       = space
          TABLES
            diff_tab     = gt_diff_tab
            del_tab      = lt_del_tab.
    ELSEIF  gs_icm_exp_log-msgno = c_msg_101. "Y_HR_DIFF_PERNR_0001_ORG_DATA
      ELSEIF  gs_icm_exp_log-msgno = c_msg_102 .
        EXPORT gr_pernr TO MEMORY ID 'PERNR_0000'.
      Get Actions 0000 Data
        CALL FUNCTION 'Y_HR_DIFF_PERNR_0000_DATA'
          EXPORTING
            period_begda = gs_icm_exp_hist-begda
            period_endda = gs_icm_exp_hist-endda
            refresh      = space
            UPDATE       = space
          TABLES
            diff_tab     = gt_diff_tab
            del_tab      = lt_del_tab.
      ELSEIF  gs_icm_exp_log-msgno = c_msg_103.
        EXPORT gr_pernr TO MEMORY ID 'PERNR_0002'.
      Get Personal Details 0002 Data
        CALL FUNCTION 'Y_HR_DIFF_PERNR_0002_DATA'
          EXPORTING
            period_begda = gs_icm_exp_hist-begda
            period_endda = gs_icm_exp_hist-endda
            refresh      = space
            UPDATE       = space
          TABLES
            diff_tab     = gt_diff_tab
            del_tab      = lt_del_tab.
      ELSEIF  gs_icm_exp_log-msgno = c_msg_104.
        EXPORT gr_pernr TO MEMORY ID 'PERNR_0004'.
      Get Disability 0004 Data
        CALL FUNCTION 'Y_HR_DIFF_PERNR_0004_DATA'
          EXPORTING
            period_begda = gs_icm_exp_hist-begda
            period_endda = gs_icm_exp_hist-endda
            refresh      = space
            UPDATE       = space
          TABLES
            diff_tab     = gt_diff_tab
            del_tab      = lt_del_tab.
      ELSEIF  gs_icm_exp_log-msgno = c_msg_105.
        EXPORT gr_pernr TO MEMORY ID 'PERNR_0006'.
      Get Addresses 0006 Data
        CALL FUNCTION 'Y_HR_DIFF_PERNR_0006_DATA'
          EXPORTING
            period_begda = gs_icm_exp_hist-begda
            period_endda = gs_icm_exp_hist-endda
            refresh      = space
            UPDATE       = space
          TABLES
            diff_tab     = gt_diff_tab
            del_tab      = lt_del_tab.
      ELSEIF  gs_icm_exp_log-msgno = c_msg_106.
        EXPORT gr_pernr TO MEMORY ID 'PERNR_0007'.
      Get Planned Time 0007 Data
        CALL FUNCTION 'Y_HR_DIFF_PERNR_0007_DATA'
          EXPORTING
            period_begda = gs_icm_exp_hist-begda
            period_endda = gs_icm_exp_hist-endda
            refresh      = space
            UPDATE       = space
          TABLES
            diff_tab     = gt_diff_tab
            del_tab      = lt_del_tab.
      ELSEIF  gs_icm_exp_log-msgno = c_msg_107.
        EXPORT gr_pernr TO MEMORY ID 'PERNR_0016'.
      Get Contract Element 0016 Data
        CALL FUNCTION 'Y_HR_DIFF_PERNR_0016_DATA'
          EXPORTING
            period_begda = gs_icm_exp_hist-begda
            period_endda = gs_icm_exp_hist-endda
            refresh      = space
            UPDATE       = space
          TABLES
            diff_tab     = gt_diff_tab
            del_tab      = lt_del_tab.
      ELSEIF  gs_icm_exp_log-msgno = c_msg_108.
        EXPORT gr_pernr TO MEMORY ID 'PERNR_0077'.
      Get Additional Personal 0077 Data
        CALL FUNCTION 'Y_HR_DIFF_PERNR_0077_DATA'
          EXPORTING
            period_begda = gs_icm_exp_hist-begda
            period_endda = gs_icm_exp_hist-endda
            refresh      = space
            UPDATE       = space
          TABLES
            diff_tab     = gt_diff_tab
            del_tab      = lt_del_tab.
      ELSEIF  gs_icm_exp_log-msgno = c_msg_109 .
        EXPORT gr_pernr TO MEMORY ID 'PERNR_0105'.
      Get Communications 0105 Data
        CALL FUNCTION 'Y_HR_DIFF_PERNR_0105_DATA'
          EXPORTING
            period_begda = gs_icm_exp_hist-begda
            period_endda = gs_icm_exp_hist-endda
            refresh      = space
            UPDATE       = space
          TABLES
            diff_tab     = gt_diff_tab
            del_tab      = lt_del_tab.
      ELSEIF  gs_icm_exp_log-msgno = c_msg_110.
        EXPORT gr_pernr TO MEMORY ID 'PERNR_2001'.
      Get Absences 2001 Data
        CALL FUNCTION 'Y_HR_DIFF_PERNR_2001_DATA'
          EXPORTING
            period_begda = gs_icm_exp_hist-begda
            period_endda = gs_icm_exp_hist-endda

Similar Messages

  • Toplink Cache not getting refreshed after executing UpdateAllQuery

    After executing UpdateAllQuery, the records in the database are getting updated, however the Toplink cache is not getting refreshed with the new data, it still has stale data which is causing issues.
    We're also setting
    updateQuery.setCacheUsage(UpdateAllQuery.INVALIDATE_CACHE);
    Thanks.

    Toplink version is 10.1.3.0.0
    Here is the code
    UpdateAllQuery updateQuery = new UpdateAllQuery(RegisterImpl.class);
    updateQuery.setCacheUsage(UpdateAllQuery.INVALIDATE_CACHE);
    ExpressionBuilder registerBuilder = updateQuery.getExpressionBuilder();
    updateQuery.addArgument("userIdArg");
    updateQuery.addArgument("channelArg");
    updateQuery.addArgument("tokenArg");
    updateQuery.addArgument("dateArg");
    updateQuery.addArgument("businessFuncIdArg");
    Expression reservedDetailRegExp = registerBuilder.get("reservedDetail");
    // build expressions
    Expression userIdExp = reservedDetailRegExp.get("userId").equal(
    registerBuilder.getParameter("userIdArg"));
    Expression channelExp = reservedDetailRegExp.get("channel").equal(
    registerBuilder.getParameter("channelArg"));
    Expression tokenExp = reservedDetailRegExp.get("token").equal(
    registerBuilder.getParameter("tokenArg"));
    Expression dateExp = reservedDetailRegExp.get("date").equal(
    registerBuilder.getParameter("dateArg"));
    Expression busFuncExp = registerBuilder.get("businessFuncId").equal(
    registerBuilder.getParameter("businessFuncIdArg"));
    // set selection criteria
    updateQuery.setSelectionCriteria(userIdExp.and(channelExp.and(tokenExp.and(dateExp
    .and(busFuncExp)))));
    // substitute the values
    updateQuery.addUpdate(reservedDetailRegExp.get("userId"), "");
    updateQuery.addUpdate(reservedDetailRegExp.get("channel"), "");
    updateQuery.addUpdate(reservedDetailRegExp.get("token"), "");
    updateQuery.addUpdate(reservedDetailRegExp.get("date"), "");
    updateQuery.addUpdate(registerBuilder.get("businessFuncId"), "");
    In the object model for the query, the RegisterImpl has an aggregate mapping (ReservedDetail), which in turn has a number of direct-to-field mappings and an one-to-one mapping to businessFunction (for our query we use a direct query key "businessFuncId")

  • Screen not refreshing after sleep mode

    Hello All,
         I have had a problem since 10.7.XX where my screen does not refresh after the computer goes into screen saver mode and then into sleep mode. When I move my mouse to resume i get a line drawn where I move my mouse and it reveals the login screen slowly. I can click on a login account and a small section of the screen refreshes where the login password is. Once I login it goes away. Was hoping Mountail Lion would address, but the problem continues from Snow Leopard. I am on a Imac 24" 2009 3.06Ghz dual core with 4 Gig of Ram, Nvidia GeForce 8800 GS 512mb. Thanks in advance for any advice.
    Chad

    Hello,
    See if it's related to this...
    It also seems to be related to later OSX versions, like 10.8.x & 10.9.x
    The 2012 macs (and later apparently) (also later OSX versions on earlier Macs can do it also), not waking normally from sleep after hours being in sleep. (noted here ...
    http://www.xlr8yourmac.com/archives/feb13/022813.html#2012macswontwake
    "Why 2012 iMac/2012 Mac Mini won't Wake After Hours of Sleep (Hibernates/Powers Off)")
    The sleepimage file still reappears even if never slept. Delete it (hibernate off, etc) - within minutes its back.
    A note on that here - http://www.xlr8yourmac.com/feedback/Chameleon_SSD_Optimizer.html
    About iMac sleep...
    http://forums.macrumors.com/showthread.php?t=1529750
    Try this: "sudo pmset autopoweroff 0" and "sudo pmset standby 0"
    http://xlr8yourmac.com/archives/sep13/091313.html#10.8.5SleepEjectTip

  • Report is not getting refreshed after changing prompts once again?

    HI,
    I am running some webi and deski reports using webi sdk also i'm handling the prompts of
    report.
    Problem is that if i ran the parametrized webi or deski report then my application shows the prompt page
    then i fill all the prompt for the report it shows the data for selected prompt values.
    But if i once again changed prompt values it shows data of previously selected prompt values not for
    the currently changed prompt values. means reports not getting refreshed.
    sometimes its work correctly.
    What will be problem?
    How can i resolve this issues?
    Please help me
    Thanks in advance
    Harshad

    The workflow is:
    1. Refresh
    2. Set Prompts
    3. Get View.
    then repeat.
    Are you refreshing before setting prompts?
    Sincerely,
    Ted Ueda

  • Some items of selection-screen not showing after migration to QA

    Hi Folks,
    I'm trying to help a colleague with something rather weird:
    After migrating code-changes from our DEV- to our QA-environment (SAP_BASIS 620, SAP_APPL 470), a newly added block of the selection-screen doesn't show up. We already spent quite some time debugging and tracing in both DEV and QA but cannot really spot a difference. The new block (B2) and field (S_DATE) show up in the selection-screen internal table SCREEN and the content looks to be identical. In addition to the complete block B2 missing, the frame-title for B3 has also gone AWOL.
    This is happening for a rather straighforward selection-screen definition:
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t01.
    PARAMETERS : p_eaddr LIKE somlreci1-receiver OBLIGATORY .
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-t27.
    SELECT-OPTIONS :
    s_date FOR hrp1001-endda NO-EXTENSION.
    SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-t23.
    PARAMETERS : p_tstrun AS CHECKBOX.
    SELECTION-SCREEN END OF BLOCK b3.
    During debugging I already single stepped through programs like RSDBRUNT, SAPLSVAR and RSDBSPBL but nothing jumped out at me which could explain the difference between development and QA.
    Do you have an idea where (else) we could look?
    Thanks much and Cheers
    Baerbel

    Hi Vikranth!
    Thanks for your quick reply and suggestion which I immediately followed and - guess what? - it worked! The selection-screen now looks like it should.
    As we never before had this type of issue it never occurred to us to just regenerate the program in QA - next time we'll know and first try this simple fix.
    Thanks again!
    Cheers
    Baerbel

  • Approver gets refreshed after the contract is released

    Hi All,
    I am facing a problem while creating GOA i have activated the one step approval workflow WS 14000088 and have the agent assignment based on standard roles. I can see the approver picked up correctly in approval preview but when i release the contract or keep it in held status the approval preview gets refreshed and displays document approved and the approval workflow doesn't start. Also i tried with the N step approval for contract and the workflow behaviour is same in this case. Also in workflow diagnosis i could see error in task  WS14500051 and TS14507950 error message 'Recipient not found'.
    Please do let me know possible solution so as to get rid of this problem.
    Thanks in Advance.
    Anirban

    Hi,
    The problem  may be due to the roles which you have assigned to the Contract Creator and Contract Approver.
    Check whether you have assigned the role purchase manager to both the users i.e.
    1.  Contract Creator
    2.  Contract Approver
    Try to Assign the role Strategic Purchaser to Contract Creator and Assign the Role Purchase Manager to Contract Approver .
    System may be  identifying a role which was assigned to two or more persons and as the Creator is already having this role so it is neglecting the Approver.
    BR,
    Disha.
    Do reward points  for  useful answers.

  • Why page is getting refresh after submitting the order

    when i am clicking on submit order button in newScale request center tool.The form is getting refresh again and again.it is not procedding furhter.This is happening for a particular service.Please help me in this case.if someone had faced the same problem.                  

    You may want to open a case with the TAC on this one.  This sounds like it might be a browser compatability issue.  What browser are you using?  Did you try a different one?
    Also, this is forum is for discussion administartive issues for specific bugs or the bug tools.  Specific experts on each products will be in other forums. 
    newScale issues are better discussed in one of the forums here:
    https://supportforums.cisco.com/community/netpro/data-center

  • Selected item getting changed after paging in paged datagrid

    I have a paged datagrid. It contains two drop downs. Once i clicked for pageing, the previously selected item getting changed. Please give me solution to solve this problem.
    Thanks & Regards
    kvpdy

    I put the dropdown in item renderer and the selected item is based on the database value. How can we store that and reapply in paging ?
    Pls give me solution....

  • ADF Region not getting refreshed after Commit

    Hi everyone!
    I'm having some trouble with a region that is disturbing me for more than 2 weeks, its true guys, I tried everything!!
    My parent page is a normal ADF .jspx page that contains inside it a task-flow call. The first task-flow activity is a router, after sending a String
    to router it chooses the region activity that fits the page (in this example I always pass the same value, same String).
    After the router is called then it delegates to "ExecuteWithParams" method call before calling my final region that have its query executed with
    parameter set inside task-flow.
    The region is refreshed (refresh="ifNeeded") when I change row inside a table in ParentPage, all fine here.
    The problem is:
    - After any Commit (with navigation case or executable binding) is issued inside Region the region save its state and does not refresh anymore, even if task-flow parameters change.
    Already tried CacheResults="false" on iterator too.
    I'm using Jdeveloper 11.1.2.1.
    Thanks in advance!!

    Hi,
    so I think the shirt summary of your problem is that an ADF region doesn't refresh after it issued a commit. Sounds like a bug to me if this reproduces in a test case. Do you have a testcase based on the Oracle HR schema ? If so, send it my way in a zip file you rename to ".unzip". My mail address is in my OTN profile. Note that bugs I file are not visible to customers. So if you need to keep track of any state of the issue, you need to file a service request with support yourself.
    Frank

  • Cube does not get refreshed after maitainence

    Hi
    I have a cube in a schema that was existing.
    I have added new data to the fact table that is mapped to the cube.
    I maintained the cube by using the complete refresh option in the analytical workspace manager.
    After maintaining the cube and selecting from the cube view I do not see the new data that I have added.
    I have even tried dropping and recreating the cube but still it does not work.
    I have also tried adding the clean step for all measures and yet it does not work.
    Creating the cube with a different view name is a solution but that is not what I want. I want to be able to refresh the same view.
    Please advise / suggest
    Edited by: CelestialCitizen on Sep 4, 2011 9:53 PM

    Hi All
    The above is a false alarm.
    Basically it turned out that one of the keys in the fact table was not a leaf node in the dimension.
    After rectifying that all works fine now.

  • Scrren gets refreshed after using onClientClick

    Hello All,
    Once again a very strange behaviour that I've noticed in an application that we are developing....
    First of all, we have a set of DDLB, which generates a table....and we have set some initial conditions on the DDLB selections....
    In the tableView, after the user selects a row, there is a button to open related data....But we required a pop-up only, and not navigation to next page...
    So what i m doing is i write a few javascript variables equal to a few abap variables...and then use <b>window.open</b> using <b>onClientClick</b>.....
    This is working fine....
    But the problem is that whenever i do that, then if i try and deselect a row or do any other event, then it resets all the variables to the initial including the DDLB's and then the user needs to select everything....again...also since the itab is getting cleared....no tableView is appearing....
    What i have also found is that whenever i do onClientClick, then on any event, it goes to the onCreate event, which ideally should not happen.....
    Is there a way that I can set it not to do so...???Please advise....
    Thanks in advance..
    Tatvagna.

    Hi Max,
    Thanks a lot for your reply, but i did solved this one eventually....the problem is that the called page was stateless and the calling page was statefull.....
    Now when i was using window.open by onClientClick, i don't know why, but the calling page was also losing its state....
    Now both the pages are statefull and the issue is resolved...
    Thanks,
    Tatvagna.

  • Screen Gets Blue After Switching To Another Account

    Is it me or has anyone else experienced this when you switch to another account the screen sometimes goes blue
    It happens frequently
    First of all why does it happen
    And second is there a way to resolve it
    Thank you

    I'm getting this issue occasionally as well.
    I'm logged in, my Mrs selects her account from the Fast User Switch menu, the screen goes blue and there's no further response. The mouse still operates, but it looks like the keyboard loses the connection, as the caps lock key no longer lights when pressed.
    I've left the machine sitting for a while, but it doesn't come back and the only way to resolve it, is to power down and restart.
    From memory, I was running:
    Parallels (with a Windows XP session active)
    Aperture 3 Demo
    Mail
    Safari
    Tweetie
    iChat
    EyeTV
    I'll try to go through each app individually and see if I can reproduce. My money is on Parallels, but will let you know.

  • Return to selected row with refresh after update in edit  form

    Hi,
    I created a database view.When selected a single row and click on button i can edit the row in a form for update.What i want, when doing some update and click on the commit button i return back on the initial row with a refresh to see the update done on this row.I succeeded to modify the form and commit.But when i return on the selected row my update is not visible.How can i return to the same selected row with a refresh.In oracle form i can do a go record with execute_query, but how to do this in ADF.Please someone can help so that i do not spend many days on it.
    Thanks
    Soodesh

    [click for the tutorial|http://www.google.co.in/url?sa=t&rct=j&q=&esrc=s&source=web&cd=6&ved=0CFQQFjAF&url=http%3A%2F%2Fandrejusb.blogspot.com%2F2013%2F03%2Fadf-rollback-and-keep-current-row.html&ei=Tnl3Ucn3BoXIrQeemICQAw&usg=AFQjCNHdYcJL8kJKymqbWBT9XDGTWmeUvQ&bvm=bv.45580626,d.bmk&cad=rja]
    here you go :)

  • Process Chain gets unschedule after execution

    I've created 1 event based process chain
    i'm triggering this event from an abap program.
    but after executing the process chain, the process chain gets unschedule automatically. I've used BP_RAISE_EVENT FM to trigger the event.
    Thanks in advance.

    Hi AG,
    Can you please check the value of profile parameter:
    rdisp/rfc_min_wait_dia_wp in you remote BW system. Is it 1?
    If that is the case please increase the value to a more suitable value. This will determine the number of waiting dialog work processes in your system.
    It is dynamically switichable. Please try this out and check the results.
    Please award points if issue got solved.
    Regards.
    Ruchit.

  • F4 help for a selection screen parameter with filename created dynamically

    Hi All,
              I have a requirement where in an F4 help should be present for a selection screen parameter. After selecting the filepath and clicking OK button on the Dialog, the filename should be dynamically get created in the selection screen parameter field. For example:
    if the path is D:\DOCS then at the end of DOCS the filename should automatically get populated.
    Like below string:
    D:\DOCS\new.txt
    Is there any function module or method which does this kind of activity.
    Thanks in advance,
    Deepak

    this code will help:
    FORM get_filename  CHANGING p_filename.
      DATA      : lv_filename  TYPE string,
                  lv_rc TYPE i,
                  li_filetable TYPE filetable.
      CONSTANTS : lc_fname TYPE string VALUE 'ZRPP4000.XLS',
                  lc_fpath TYPE string VALUE 'C:\',
                  lc_extn TYPE string VALUE 'XLS'.
      CALL METHOD cl_gui_frontend_services=>file_open_dialog
        EXPORTING
          default_filename        = lc_fname
          initial_directory       = lc_fpath
          default_extension       = lc_extn
        CHANGING
          file_table              = li_filetable
          rc                      = lv_rc
        EXCEPTIONS
          file_open_dialog_failed = 1
          cntl_error              = 2
          error_no_gui            = 3
          not_supported_by_gui    = 4
          OTHERS                  = 5.
    IF  sy-subrc = 0 .
        READ TABLE li_filetable INTO lv_filename INDEX 1.
        IF sy-subrc = 0.
          p_filename = lv_filename.
        ENDIF.
      ENDIF.
      REFRESH li_filetable.
      CLEAR:lv_filename.
    ENDFORM.                    "get_filename
    " p_filename is selection screen parameter

Maybe you are looking for