Multiple line selection and then capturing the selected values

Dear all
  in my alv program ,i need to capture multiple line selections  using checkboxes.
I have appended check boxes by adding it in the internal table  & filling in field catalog.
but problem is i'm not able to capture multiple selected check boxes dynamically,
i could capture only the last selected check box,
option i found was to use class method get-selected-rows,but i'm unable to use it properly, could anyone explain in detail
i have already gone through the various examples in sdn but i am not able to work out.
like using parameters etc....
CAN ANY ONE HELP ME WITH THE CODE
help reqired  immediately,
Thanks in advance.

Hi Ankur,
In the PAI, just after the selection of your user event, button or menu,
add this code before getting the selected records.
<b>CALL METHOD grid1->check_changed_data
             IMPORTING
               e_valid = ws_x.</b>
where    grid1  TYPE REF TO cl_gui_alv_grid,
Now fetch the selected records.
Check this code for reference
            C O M P A N Y   C O N F I D E N T I A L                **
       Care should be taken to prevent its unauthorized use.       **
REPORT zfipost MESSAGE-ID f4 NO STANDARD PAGE HEADING .
AUTHOR   : Susmitha Susan Thomas
DATE     : August 18, 2005
*Abridged Version : This report generates a list in Abap List Viewer of
                  all the selected records in VBKPF/VBSEG. * *
                  (TRANSACTION ZPPD:Modified from transaction FBV0)
-- Class definition--
CLASS lcl_event_receiver DEFINITION DEFERRED.
--Tables--
TABLES:  vbkpf. " Belegkopf
TABLES: tsp1d, pri_params, spopli.
TYPE-POOLS slis.
---- Global Variables -
DATA:    anzkr(6)     TYPE n,
         lsind        LIKE sy-lsind,
         no_output(1) TYPE c,
         records(1) TYPE c,
         xpick(1)     TYPE c,
         xpickc(1)    TYPE c,
         xbinp(1)     TYPE c,
         rc           LIKE syst-subrc,
         ok_code LIKE sy-ucomm,
         index TYPE i,
         char_x(1)    TYPE c VALUE 'X',
         post         TYPE c,
         ans          TYPE n,
         user(40) TYPE c.
DATA :BEGIN OF i_doctype OCCURS 0,
         blart LIKE vbkpf-blart,
      END OF i_doctype.
--AlV Initialization--
DATA:  gs_layout TYPE lvc_s_layo,
       gt_fieldcat TYPE lvc_t_fcat,
       gs_fieldcat TYPE lvc_s_fcat,
       gs_index_rows TYPE lvc_t_row,
       l_layout TYPE disvariant,
       g_repid LIKE sy-repid,
       g_max TYPE i VALUE 100,
       ws_row_idx TYPE lvc_t_row ,
       ws_row_no TYPE lvc_t_roid,
       i_excl_func TYPE ui_functions,
       ls_prnt TYPE lvc_s_prnt,
       refresh TYPE c,
       i_fieldcat  TYPE lvc_t_fcat,
      post(1) TYPE c,
       accr_def(1) TYPE c,
       rev_cd(3) TYPE c,
       ch(1) TYPE c.
DATA: list_index LIKE sy-lsind,
      flag TYPE n VALUE 0,
      fl TYPE n VALUE 0,
      g_container TYPE scrfname VALUE 'GRID_CONTAINER',
      grid_container TYPE REF TO cl_gui_docking_container,
      grid1  TYPE REF TO cl_gui_alv_grid,
      custom_container1 TYPE REF TO cl_gui_custom_container,
      event_receiver TYPE REF TO lcl_event_receiver,
      gt_vbkpf1 TYPE STANDARD TABLE OF vbkpf WITH HEADER LINE,
      i_vbkpf TYPE  TABLE OF vbkpf WITH HEADER LINE,
      i_ws_row_idx LIKE ws_row_idx WITH HEADER LINE.
---Internal table containing details of selected documents--
DATA : BEGIN OF gt_vbkpf OCCURS 0,
         xpick(1) TYPE c,
         belnr LIKE vbkpf-belnr,
         gjahr LIKE vbkpf-gjahr,
         bukrs LIKE vbkpf-bukrs,
         blart LIKE vbkpf-blart,
         budat LIKE vbkpf-budat,
         bldat LIKE vbkpf-bldat,
         bktxt LIKE vbkpf-bktxt,
         waers LIKE vbkpf-waers,
         usnam LIKE vbkpf-usnam,
         xblnr LIKE vbkpf-xblnr,
         rev_code(3) TYPE c,
         rev_rsn(15) TYPE c,
         rev_date(10) TYPE c,
         linecolor(4) TYPE c,
       END OF gt_vbkpf.
--Table to store long text--
DATA : BEGIN OF inline OCCURS 0,
tdformat TYPE tdformat,
tdline TYPE tdline,
END OF inline.
DATA: thead LIKE thead OCCURS 0 WITH HEADER LINE.
-- Records to be posted--
DATA:   BEGIN OF tbkpf OCCURS 5.
        INCLUDE STRUCTURE vbkpf.
DATA:   END   OF tbkpf.
---- Constants -
CONSTANTS: awtyp_bkpf TYPE awtyp VALUE 'BKPF '.
CONSTANTS: awtyp_space TYPE awtyp VALUE '     '.
Selection Screen
PARAMETER: funcl   LIKE t020-funcl NO-DISPLAY.   "P(ost),D(isplay),U(pd)
SELECTION-SCREEN SKIP 2.
SELECT-OPTIONS:
         p_bukrs     FOR  vbkpf-bukrs,
         p_belnr     FOR  vbkpf-belnr,
         p_gjahr     FOR  vbkpf-gjahr,
         p_budat     FOR  vbkpf-budat,
         p_bldat     FOR  vbkpf-bldat,
         p_blart     FOR  vbkpf-blart,
         p_xblnr     FOR  vbkpf-xblnr,
         p_bktxt     FOR  vbkpf-bktxt,
         p_usnam     FOR  vbkpf-usnam.
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN BEGIN OF BLOCK blk
            WITH FRAME TITLE text-010 NO INTERVALS.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(35) text-002.
PARAMETER norm_doc    TYPE c
          RADIOBUTTON GROUP doc DEFAULT 'X' .
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(35) text-001.
PARAMETER ad_doc       TYPE c
           RADIOBUTTON GROUP doc .
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(35) text-003.
PARAMETER all_doc       TYPE c
            RADIOBUTTON GROUP doc .
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK blk.
      CLASS lcl_event_receiver DEFINITION
      For capturing events on the ALV                               *
CLASS lcl_event_receiver DEFINITION.
  PUBLIC SECTION.
    METHODS:
to capture all recently changed data.
      handle_data_changed      FOR EVENT data_changed OF
                                       cl_gui_alv_grid
                                       IMPORTING er_data_changed,
for hot spot
      handle_hotspot           FOR EVENT hotspot_click OF
                                       cl_gui_alv_grid
                                       IMPORTING e_column_id e_row_id.
ENDCLASS.   " lcl_event_receiver (Definition)
      CLASS lcl_event_receiver (Implementation)
      For capturing events on the ALV                               *
CLASS lcl_event_receiver IMPLEMENTATION.
  METHOD handle_data_changed.
    PERFORM f2200_handle_data_changed USING er_data_changed.
  ENDMETHOD.
  METHOD handle_hotspot.
    PERFORM f2201_handle_hotspot USING e_column_id e_row_id .
  ENDMETHOD.
ENDCLASS.  " lcl_event_receiver (Implementation)
AT SELECTION-SCREEN
AT SELECTION-SCREEN.
START-OF-SELECTION
START-OF-SELECTION.
---- Colors -
  FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
-------------------- Status und Title Bar----------------------------*
  SET PF-STATUS funcl.
  SET TITLEBAR  funcl.
-- Read Records--
  SELECT * FROM vbkpf INTO TABLE gt_vbkpf1
      WHERE bukrs IN p_bukrs
        AND ausbk IN p_bukrs
        AND belnr IN p_belnr
        AND gjahr IN p_gjahr
        AND budat IN p_budat
        AND bldat IN p_bldat
        AND blart IN p_blart
        AND bktxt IN p_bktxt
        AND xblnr IN p_xblnr
        AND usnam IN p_usnam
        AND bstat EQ 'V'
      AND ( awtyp IN (awtyp_bkpf, awtyp_space) OR
            awtyp IS null )
      ORDER BY PRIMARY KEY.
----Call the ALV Screen -
  PERFORM alv_display.
END-OF-SELECTION.
                     FORM BELEG_PICKUP                              *
      Indicate changing of the selected external record             *
FORM beleg_pickup.
  SET PARAMETER ID 'BUK' FIELD vbkpf-bukrs.
  SET PARAMETER ID 'GJR' FIELD vbkpf-gjahr.
  SET PARAMETER ID 'BLP' FIELD vbkpf-belnr.
  CASE funcl.
     WHEN 'P'.
      IF anzkr IS INITIAL.
        CALL FUNCTION 'ZPRELIMINARY_POSTING_POST_D'
             EXPORTING
                  bukrs = vbkpf-bukrs
                  belnr = vbkpf-belnr
                  gjahr = vbkpf-gjahr.
      ELSE.
        IF sy-ucomm EQ 'BUCH'.
          CALL FUNCTION 'ZPRELIMINARY_POSTING_POST_ALL'
               EXPORTING
                    synch   = char_x
                    bupbi   = xbinp
               TABLES
                    t_vbkpf = tbkpf.
        ELSE.
          CALL FUNCTION 'ZPRELIMINARY_POSTING_POST_ALL'
               EXPORTING
                    bupbi   = xbinp
               TABLES
                    t_vbkpf = tbkpf.
         wait up to 3 seconds.
         commit work.
        ENDIF.
      ENDIF.
    WHEN OTHERS.
      IF sy-tcode = 'ZPPD'.
        funcl = 'P'.
      ENDIF.
      CALL FUNCTION 'ZPRELIMINARY_POSTING_DISPLAY'
           EXPORTING
                bukrs = vbkpf-bukrs
                belnr = vbkpf-belnr
                gjahr = vbkpf-gjahr.
  ENDCASE.
ENDFORM.
                    FORM TBKPF_FUELLEN                              *
            Include  records for posting in TBKPF                   *
FORM tbkpf_fuellen.
  records = 'X'.
  LOOP AT gt_vbkpf.
    IF gt_vbkpf-xpick = 'X'.
      CLEAR anzkr.
      CLEAR records.
      IF sy-subrc = 0.
        anzkr = anzkr + 1.
        MOVE-CORRESPONDING gt_vbkpf TO tbkpf.
        APPEND tbkpf.
      ELSE.
        EXIT.
      ENDIF.
    ENDIF.
  ENDLOOP.
ENDFORM.
                          FORM MALL                                 *
                     Select All documents                           *
FORM mall.
  LOOP AT gt_vbkpf.
    gt_vbkpf-xpick = 'X'.
    MODIFY gt_vbkpf.
  ENDLOOP.
  refresh = 'X'.
  CALL METHOD grid1->refresh_table_display.
ENDFORM.
                         FORM EMAL                                  *
                   Unselect all documents                           *
FORM emal.
  LOOP AT gt_vbkpf.
    gt_vbkpf-xpick = ' '.
    MODIFY gt_vbkpf.
  ENDLOOP.
  refresh = 'X'.
  CALL METHOD grid1->refresh_table_display.
ENDFORM.
                     Form  alv_display                               *
              To display the details on an ALV.                      *
FORM alv_display.
  CALL SCREEN 100.
ENDFORM.                    " alv_display
*&      Module  PB0_100  OUTPUT
MODULE pb0_100 OUTPUT.
  SET PF-STATUS 'MAIN100'.
  SET TITLEBAR 'POSTDOC'.
--To verify that posting is complete.--
---- Setting the layout -
  IF grid1 IS INITIAL.
    PERFORM fill_table.
-- Initializing the field catalog--
    PERFORM fieldcat_init CHANGING i_fieldcat.
-- Initializing the ALV GRID and CONTAINER--
    CLEAR gs_layout.
    gs_layout-info_fname = 'linecolor'.
    gs_layout-grid_title = 'Parked Documents'(100).
    gs_layout-zebra               = 'X'.
    gs_layout-cwidth_opt   = 'X'.
    gs_layout-sel_mode = 'A'.
    gs_layout-edit                = 'X'.
    l_layout-report = sy-repid.
------ Create a custom container control for ALV Control----
    IF cl_gui_alv_grid=>offline( ) IS INITIAL.
      CREATE OBJECT grid_container
         EXPORTING
           dynnr                     = '100'
           ratio                     = '100'
        EXCEPTIONS
         cntl_error                  = 1
         cntl_system_error           = 2
         create_error                = 3
         lifetime_error              = 4
         lifetime_dynpro_dynpro_link = 5
         others                      = 6.
      IF sy-subrc NE 0.
     MESSAGE i000 WITH text-007.  " Error in object creation
        LEAVE LIST-PROCESSING.
      ENDIF.
-- Create an instance of alv control--
      CREATE OBJECT grid1
             EXPORTING
                i_lifetime = 1
                i_parent = grid_container.
---- Disable all unwanted button in the ALV grid -
      PERFORM disable_functions TABLES i_excl_func.
---- Call the display function of ALV grid -
      CALL METHOD grid1->set_table_for_first_display
           EXPORTING
                     is_variant       = l_layout
                     i_save           = 'A'
                     is_layout        = gs_layout
                     is_print         = ls_prnt
                     it_toolbar_excluding          = i_excl_func
           CHANGING  it_outtab        = gt_vbkpf[]
                     it_fieldcatalog  = i_fieldcat.
    ENDIF.                  "  IF cl_gui_alv_grid=>offline IS INITIAL
    CALL METHOD grid1->register_edit_event
        EXPORTING
         i_event_id = cl_gui_alv_grid=>mc_evt_enter.
    CALL METHOD grid1->register_edit_event
      EXPORTING
        i_event_id = cl_gui_alv_grid=>mc_evt_modified.
---- Create a reciever object to handle events -
    CREATE OBJECT event_receiver.
    SET HANDLER event_receiver->handle_data_changed FOR grid1.
    SET HANDLER event_receiver->handle_hotspot FOR grid1.
    CALL METHOD cl_gui_control=>set_focus EXPORTING control = grid1.
  ENDIF.                   " IF grid1 IS INITIAL.
ENDMODULE.                 " PB0_100  OUTPUT
*&      Form  fill_table
     Fills the data table to be passed to the ALV grid.
FORM fill_table.
  LOOP AT gt_vbkpf1.
    MOVE-CORRESPONDING gt_vbkpf1 TO gt_vbkpf.
    IF ad_doc = 'X' OR all_doc = 'X'.
      thead-tdobject = 'BELEG'.
      CONCATENATE gt_vbkpf1-bukrs
                  gt_vbkpf1-belnr
                  gt_vbkpf1-gjahr INTO thead-tdname.
      thead-tdspras = sy-langu.
      thead-tdid = '0004'.
      PERFORM read_text.
      READ TABLE inline INDEX 1.
      gt_vbkpf-rev_code =  inline-tdline.
      REFRESH inline.
      CLEAR inline.
      thead-tdid = '0005'.
      PERFORM read_text.
      READ TABLE inline INDEX 1.
      gt_vbkpf-rev_rsn =  inline-tdline.
      REFRESH inline.
      CLEAR inline.
      thead-tdid = '0006'.
      PERFORM read_text.
      READ TABLE inline INDEX 1.
      gt_vbkpf-rev_date =  inline-tdline.
      REFRESH inline.
      CLEAR inline.
      REFRESH inline.
      CLEAR inline.
    ENDIF.
    APPEND gt_vbkpf.
    CLEAR gt_vbkpf.
ENDLOOP.
  ENDLOOP.
ENDFORM.
*&      Form  fieldcat_init
     Initialize the field catalog
FORM fieldcat_init CHANGING i_fieldcat TYPE lvc_t_fcat.
  DATA: i_fldcat TYPE lvc_t_fcat WITH HEADER LINE.
CHECKBOX
  CLEAR i_fldcat.
  i_fldcat-fieldname = 'XPICK'.
  i_fldcat-checkbox  = 'X'.
i_fldcat-key       = 'X'.
  i_fldcat-tabname   = 'GT_VBKPF'.
  i_fldcat-outputlen   =  '4'.
  i_fldcat-scrtext_l =  'ChkB'.
   APPEND i_fldcat TO i_fieldcat.
  CLEAR i_fldcat.
  i_fldcat-fieldname = 'BELNR'.
  i_fldcat-tabname   = 'GT_VBKPF'.
i_fldcat-key       = 'X'.
  i_fldcat-hotspot   = 'X'.
  i_fldcat-outputlen   =  '15'.
  i_fldcat-scrtext_l =  'Document Number'.
  APPEND i_fldcat TO i_fieldcat.
  CLEAR i_fldcat.
  i_fldcat-fieldname = 'GJAHR'.
  i_fldcat-tabname   = 'GT_VBKPF'.
i_fldcat-key       = 'X'.
  i_fldcat-scrtext_l = 'FYear'.
  i_fldcat-outputlen   = '5'.
  APPEND i_fldcat TO i_fieldcat.
  CLEAR i_fldcat.
  i_fldcat-fieldname = 'BUKRS'.
  i_fldcat-tabname   = 'GT_VBKPF'.
i_fldcat-key       = 'X'.
  i_fldcat-scrtext_l = 'CCode'.
  i_fldcat-outputlen   =  '5'.
  APPEND i_fldcat TO i_fieldcat.
  CLEAR i_fldcat.
  i_fldcat-fieldname = 'BLART'.
  i_fldcat-tabname   = 'GT_VBKPF'.
i_fldcat-key       = 'X'.
  i_fldcat-scrtext_l = 'Type'.
  i_fldcat-outputlen   =  '6'.
  APPEND i_fldcat TO i_fieldcat.
  CLEAR i_fldcat.
  i_fldcat-fieldname = 'BLDAT'.
  i_fldcat-tabname  = 'GT_VBKPF'.
i_fldcat-key      = 'X'.
  i_fldcat-scrtext_l = 'Doc Date'.
  i_fldcat-outputlen   =  '12'.
  APPEND i_fldcat TO i_fieldcat.
  CLEAR i_fldcat.
  i_fldcat-fieldname = 'BUDAT'.
  i_fldcat-tabname  = 'GT_VBKPF'.
i_fldcat-key      = 'X'.
  i_fldcat-scrtext_l = 'Park Date'.
  i_fldcat-outputlen   =  '12'.
  APPEND i_fldcat TO i_fieldcat.
  CLEAR i_fldcat.
  i_fldcat-fieldname = 'BKTXT'.
  i_fldcat-tabname  = 'GT_VBKPF'.
i_fldcat-key      = 'X'.
  i_fldcat-scrtext_l = 'Document Header Text'.
  i_fldcat-outputlen   =  '25'.
  APPEND i_fldcat TO i_fieldcat.
  CLEAR i_fldcat.
  i_fldcat-fieldname = 'WAERS'.
  i_fldcat-tabname  = 'GT_VBKPF'.
i_fldcat-key      = 'X'.
  i_fldcat-scrtext_l = 'Curr'.
  i_fldcat-outputlen   =  '7'.
  APPEND i_fldcat TO i_fieldcat.
  CLEAR i_fldcat.
  i_fldcat-fieldname = 'USNAM'.
  i_fldcat-tabname   = 'GT_VBKPF'.
i_fldcat-key       = 'X'.
  i_fldcat-scrtext_l = 'Parked By'.
  i_fldcat-outputlen   =  '13'.
  APPEND i_fldcat TO i_fieldcat.
  CLEAR i_fldcat.
  i_fldcat-fieldname = 'XBLNR'.
  i_fldcat-tabname   = 'GT_VBKPF'.
i_fldcat-key       = 'X'.
  i_fldcat-scrtext_l = 'Reference Text'.
  i_fldcat-outputlen   =  '19'.
  APPEND i_fldcat TO i_fieldcat.
  IF ad_doc = 'X' OR all_doc = 'X'.
    CLEAR i_fldcat.
    i_fldcat-fieldname = 'REV_CODE'.
    i_fldcat-tabname   = 'GT_VBKPF'.
   i_fldcat-key       = 'X'.
    i_fldcat-scrtext_l = 'RC'.
    i_fldcat-outputlen   =  '2'.
    APPEND i_fldcat TO i_fieldcat.
    CLEAR i_fldcat.
    i_fldcat-fieldname = 'REV_RSN'.
    i_fldcat-tabname   = 'GT_VBKPF'.
   i_fldcat-key       = 'X'.
    i_fldcat-scrtext_l = 'Rev Reason'.
    i_fldcat-outputlen   =  '15'.
    APPEND i_fldcat TO i_fieldcat.
    CLEAR i_fldcat.
    i_fldcat-fieldname = 'REV_DATE'.
    i_fldcat-tabname   = 'GT_VBKPF'.
   i_fldcat-key       = 'X'.
    i_fldcat-scrtext_l = 'Rev Date'.
    i_fldcat-outputlen   =  '10'.
    APPEND i_fldcat TO i_fieldcat.
  ENDIF.
ENDFORM.                    " fieldcat_init
*&      Module  PAI_100  INPUT
MODULE pai_100 INPUT.
  CASE ok_code.
    WHEN 'BACK'.
      IF sy-dynnr = '1000'.
        PERFORM exit_program.
      ELSEIF sy-dynnr = '0100'.
        LEAVE TO TRANSACTION 'ZPPD'.
      ENDIF.
    WHEN 'EXIT'.
      IF sy-dynnr = '1000'.
        PERFORM exit_program.
      ELSEIF sy-dynnr = '0100'.
        LEAVE TO TRANSACTION 'ZPPD'.
      ENDIF.
    WHEN '%EX'.
      IF sy-dynnr = '1000'.
        PERFORM exit_program.
      ELSEIF sy-dynnr = '0100'.
        LEAVE TO TRANSACTION 'ZPPD'.
      ENDIF.
    WHEN 'BINP'.
      DATA : ws_x TYPE c VALUE 'X'.
      CALL FUNCTION 'POPUP_TO_CONFIRM'
          EXPORTING
               titlebar      = 'Posting Documents Via Batch Input'
               text_question =
           'Are you sure you want to post all the selected documents?'
               text_button_1 = 'Yes'
               text_button_2 = 'No'
               start_column  = 25
               start_row     = 6
          IMPORTING
               answer        = ans.
      IF ans = '1'.
        CALL METHOD grid1->check_changed_data
             IMPORTING
               e_valid = ws_x.
        xbinp = 'X'.
        PERFORM tbkpf_fuellen.
        IF records = 'X'.
          MESSAGE s999(zv) WITH text-007.
        ELSE.
          PERFORM beleg_pickup.
        ENDIF.
      ENDIF.
    WHEN 'MALL'.
      PERFORM mall.
    WHEN 'EMAL'.
      PERFORM emal.
    WHEN 'RW'.
      IF sy-dynnr = '1000'.
        PERFORM exit_program.
      ELSEIF sy-dynnr = '0100'.
        LEAVE TO TRANSACTION 'ZPPD'.
      ENDIF.
    WHEN 'BUCH'.
      CALL FUNCTION 'POPUP_TO_CONFIRM'
           EXPORTING
                titlebar      = 'Posting Document'
                text_question =
            'Are you sure you want to post all documents selected?'
                text_button_1 = 'Yes'
                text_button_2 = 'No'
                start_column  = 25
                start_row     = 6
           IMPORTING
                answer        = ans.
      IF ans = '1'.
        CALL METHOD grid1->check_changed_data
          IMPORTING
            e_valid = ws_x.
            perform tbkpf_fuellen.
        IF records = 'X'.
          MESSAGE s999(zv) WITH text-007.
        ELSE.
          PERFORM beleg_pickup.
        ENDIF.
      ENDIF.
    WHEN 'PICK'.
      DATA : check TYPE n,
             no_rec TYPE c.
      check = 0.
      no_rec = 'X'.
      CALL METHOD grid1->check_changed_data
        IMPORTING
          e_valid = ws_x.
      index = 0.
      LOOP AT gt_vbkpf.
        funcl = 'D'.
        index = index + 1.
        IF gt_vbkpf-xpick = 'X'.
          check = 1.
          CLEAR no_rec.
          READ TABLE gt_vbkpf1 INDEX index INTO vbkpf.
          PERFORM beleg_pickup.
        ENDIF.
      ENDLOOP.
      IF check = 0.
        CALL METHOD grid1->get_selected_rows
          IMPORTING
            et_index_rows = ws_row_idx.
        IF NOT ws_row_idx IS INITIAL.
          CLEAR no_rec.
        ENDIF.
        LOOP AT ws_row_idx INTO i_ws_row_idx.
          READ TABLE gt_vbkpf1 INDEX i_ws_row_idx-index INTO vbkpf.
          PERFORM beleg_pickup.
        ENDLOOP.
        IF no_rec = 'X'.
          MESSAGE s999(zv) WITH text-007.
        ENDIF.
      ENDIF.
    WHEN '&RNT_PREV'.
      CALL METHOD grid1->set_function_code
      CHANGING c_ucomm = ok_code.
    WHEN '&RNT'.
      CALL METHOD grid1->set_function_code
      CHANGING c_ucomm = ok_code.
    WHEN '%SC'.
      CALL METHOD grid1->set_function_code
      CHANGING c_ucomm = ok_code.
    WHEN '&OL0'.
      CALL METHOD grid1->set_function_code
     CHANGING c_ucomm = ok_code.
    WHEN '&OAD'.
      CALL METHOD grid1->set_function_code
      CHANGING c_ucomm = ok_code.
    WHEN '&AVE'.
      CALL METHOD grid1->set_function_code
     CHANGING c_ucomm = ok_code.
    WHEN '&AQW'.
      CALL METHOD grid1->set_function_code
     CHANGING c_ucomm = ok_code.
    WHEN '&XXL'.
      CALL METHOD grid1->set_function_code
     CHANGING c_ucomm = ok_code.
    WHEN '%PC'.
      CALL METHOD grid1->set_function_code
     CHANGING c_ucomm = ok_code.
    WHEN '&CRTEMPL'.
      CALL METHOD grid1->set_function_code
     CHANGING c_ucomm = ok_code.
    WHEN OTHERS.
     do nothing.
  ENDCASE.
  CLEAR ok_code.
ENDMODULE.                 " PAI_100  INPUT
*&      Form  exit_program
     Exits from the program after freeing the grid and container     *
FORM exit_program.
  IF NOT grid_container IS INITIAL.
    CALL METHOD grid_container->free.
  ENDIF.
  IF NOT grid1 IS INITIAL.
    CALL METHOD grid1->free
       EXCEPTIONS
         cntl_error        = 1
         cntl_system_error = 2
         OTHERS            = 3.
  ENDIF.
  LEAVE PROGRAM.
ENDFORM.                    " exit_program
*&      Form  f2200_handle_data_changed
      To handle event of change in data in ALV.
     -->P_ER_DATA_CHANGED  text
FORM f2200_handle_data_changed USING    ir_data_changed
                                         TYPE REF TO
                                         cl_alv_changed_data_protocol.
  DATA : ls_mod_cell TYPE lvc_s_modi ,
         lv_value TYPE lvc_value,
         lflg_check TYPE i.
  DATA : wa_vbkpf LIKE LINE OF gt_vbkpf.
  SORT ir_data_changed->mt_mod_cells BY row_id .
  LOOP AT ir_data_changed->mt_mod_cells
                     INTO ls_mod_cell
                     WHERE fieldname = 'I_PICK'.
    IF NOT ls_mod_cell-value IS INITIAL .
      CALL METHOD ir_data_changed->modify_cell
        EXPORTING
          i_row_id    = ls_mod_cell-row_id
          i_fieldname = ls_mod_cell-fieldname
          i_value     = ls_mod_cell-value.
      READ TABLE gt_vbkpf INTO wa_vbkpf
                 INDEX ls_mod_cell-row_id.
      IF ls_mod_cell-fieldname = 'I_PICK'.
        wa_vbkpf-xpick = ls_mod_cell-value.
      ENDIF.
      MODIFY gt_vbkpf  FROM wa_vbkpf
                          INDEX ls_mod_cell-row_id.
    ENDIF .
  ENDLOOP .
ENDFORM.                    " f2200_handle_data_changed
*&      Form  f2201_handle_hotspot
            To handle event of clicking on hyperlink
     -->P_E_COLUMN_ID  text
FORM f2201_handle_hotspot USING    p_e_column_id  p_e_row_id.
  READ TABLE gt_vbkpf1 INDEX p_e_row_id INTO vbkpf.
  funcl = 'D'.
  PERFORM beleg_pickup.
  PERFORM exit_program.
ENDFORM.                    " f2201_handle_hotspot
Regards,
Susmitha
Dont forget to reward points for useful answers

Similar Messages

  • Select a small area and then use the selected area to paint other areas of the image

    Hello
    My problem is a little hard to explain but I try.
    What I want is to select a small area and then use the selected area to paint other areas of the image. Do not know how to do it and if it's stamp tools or pen tools to be used?

    Howdy.
    Sounds like you're looking for the Clone Stamp Tool. Set to Aligned, the sampling point resets when you release the mouse after painting. Untic Aligned and the sampling point stays in the original spot for the next stroke. It's a good idea to clone onto a separate layer with Sample All Layers selected. Then you don't lose original pixels. Allows you a do over later.
    FWIW.
    Peace,
    Lee

  • How do I count and display events every few seconds and then convert the counted values into events per minute? (for a heart rate monitor)

    Hi everyone,
    I'm building a heart rate monitor as a final year project with my lab partner using the NI USB-6009 and Labview 2009. We have managed to obtain a signal using a photo transciever, smooth it out and count the events, however the count is incremental.
    We wish to count the number of pulses we obtain for a few seconds (5-10 for example) and then use this value to obtain a pulse rate in beats per minute (e.g. 10 pulses in the first 10 seconds would give an estimated BPM of 60 etc etc).
    Does anybody have ides on how we could implement this? We have tried timed loops, elapsed time VI's and other things but nothing gives us what we need.
    Thanks in advance for any help that is offered.
    Jeshua Graham.

    We are very new to Labview. We are taking a raw signal from our DAQ and then using VIs to filter and then trigger counts on rising edges. I have attached our vi file to this post for you to look at (I hope that is what you mean by code).
    Attachments:
    TCRT-1010DAQ_jeshua1.vi ‏367 KB

  • How do I select and email a whole lot of photos on my iPad from my iPad emails? It seems I have to go into Email and then insert one photo at a time? Isn't there a way to select all in the photos and then email the batch.?

    How do I select and email a whole lot of photos on my iPad from my iPad emails? It seems I have to go into Email and then insert one photo at a time? Isn't there a way to select all in the photos and then email the batch.?

    Actually, you can email up to 5 at a time from the Photos app. Select any more and the email share option will not appear.
    If you explain why you need to email large numbers of photos, we might be able to offer an alternative.

  • My iPod touch 4G 8GB, lets me download apps on iTunes, but when I go to my iPod, and then apps, the entire selection is grey and won't let me click my new apps to add to my iPod. What can I do?

    My iPod touch 4G 8GB, lets me download apps on iTunes, but when I go to my iPod, and then apps, the entire selection is grey and won't let me click my new apps to add to my iPod. Usually I just restore my ipod and re-download everything, but thats time consuming, and after I unplug my ipod from the cord connected to my computer, I can replug it right after and this will pop up again. I'm getting tired of doing this.
    Like I said, it will let me download the apps off iTune, just when I come to my apps page on my ipod, it won't let me add it to my iPod. I can't download it straight from my ipod either, but iTunes doesn't work on my ipod, and when I update my apps, when they're in waiting they never move. What can I do?

    I would say that you are not connected to the iTunes library you last synced with. You can only sync with one iTunes library. If you connect the iPod to another computer/another iTunes library then you get what you see.
    You can only manually manage music and videos among different libraries, not apps.

  • I want to get rid of a book in the iBooks "Purchased" collection, but when I touch the Edit button and select the book and then touch the Delete button, then the "Delete this copy" seletion, nothing happens.  How do I delete the book from the collection?

    I want to get rid of a book in the iBooks "Purchased" collection, but when I touch the Edit button and select the book and then touch the Delete button, then the "Delete this copy" seletion, nothing happens.  How do I delete the book from the collection?

    The Cloud by the song indicates that is is an iTunes purchase but it is not downloaded on the iPod. If you only want download iTunes purchases to show in the Music app go to Settings>itunes and pp Store and turn off Show aLL.

  • I connected my iphone 4 to the itunes and then i just select Backup. now i lost all songs and photos in my iphone. how can i do?

    i connected my iphone 4 to the itunes and then i just select Backup. now i lost all songs and photos in my iphone. how can i do?

    See: How to Restore from a backup here >  iOS: How to back up

  • Using ios 7.0.4 can a group email be sent either from icloud or iPhone by a means other than selecting the individual Contact, ie; can the group be selected and then an email composed that will send the message to all group members.

    Using ios 7.0.4 can a group email be sent either from icloud or iPhone by a means other than selecting the individual Contact, ie; can the group be selected and then an email composed that will send the message to all group members.

    Hi Richard, 
    Thanks for the reply - I think I've sorted it though and there isn't actually an issue.
    The whole group wasn't receiving the NDR, only the group manager which I setup a few weeks prior. This is a new feature so it complies with certain RFC's, basically the group manager will recieive the NDR to let them know there is a problem.
    Something to do with mass mailing and unsolicited mail.
    Ta
    Ian

  • Easy Question! How Do I Play ONLY the Selection, and then playback stops?

    How Do I Play ONLY the Selection, and then playback stops? (Same as subject..)
    Thanks! I'm loving STP so far. I came from Sony Sound Forge so it's been difficult finding something that can compare, but I think I have it now! Lot's of advantages for STP too.

    I think you're confusing the audio loops with MIDI loops. The blue loops are audio loops which will play only on audio tracks. You can't 'play' those with a keyboard because they are actual audio files. The green loops contain MIDI data that corresponds with a software instrument, and if you drop them onto a Software Instrument track, they will open that instrument which you CAN play with an external keyboard or the caps lock keyboard.
    I might be missing some loops, but when I searched for Bell Tower I found only one, and it is a blue loop. So it can only be played as an audio loop on an audio track. However, if it were a green loop, you would NOT drop it on an external MIDI track (I think that's what you're trying to do if you're dragging it onto the 'Grand Piano MIDI instrument'), but you would create a SOFTWARE INSTRUMENT track, and drag it on that. Any internal sounds you want to play from Logic's instrument you'll do from Software Instrument tracks, and not MIDI tracks.
    What you should do to find a good chime sound that you can play with the caps lock keyboard is to create a Software Instrument Track, open the Library tab, and search there for a good chime. This will search all of the instruments and presets that Logic has for all of its internal instruments. Try 'Tubular Bells' and see if that works for you.
    If you need to use the bells from that loop, do what SC suggested, and take the hits from the audio file and load them into a sampler. Then you can play them the way you want to. If you don't know how to make a sampler, it's a bit complicated. Look up EXS24 in the manual, or check out
    http://www.youtube.com/user/SFLogicNinja
    I think he has a video or two on EXS24

  • Capture the Selected Checkboxes on the Outoput(Resolved)

    Hi
    I have a Requirement to display some order numbers on the basic list( out put).First column of  each record is a check box .( create using as check box in write statement). and  i have a button on the application tool bar. <b>Now if the user selects some of those records</b> ( any number and at any place ) and press the process button  then  <b>i need to capture those records in the program for further processing.</b> Can anybody help me  how to capture the selected check box records on the output to program..??Thanks a lot.
    Message was edited by: Deadlock1

    Hi,
      Check this below program for your reference.
    This is SAP example.
    REPORT demo_list_read_line NO STANDARD PAGE HEADING.
    TABLES: sflight.
    DATA: box(1) TYPE c, lines TYPE i, free TYPE i.
    START-OF-SELECTION.
      SET PF-STATUS 'CHECK'.
    GET sflight.
      WRITE: box AS CHECKBOX, sflight-fldate.
      HIDE: sflight-fldate, sflight-carrid, sflight-connid,
            sflight-seatsmax, sflight-seatsocc.
    END-OF-SELECTION.
      lines = sy-linno - 1.
    TOP-OF-PAGE.
      WRITE: 'List of flight dates'.
      ULINE.
    TOP-OF-PAGE DURING LINE-SELECTION.
      WRITE:  'Date:', sflight-fldate.
      ULINE.
    AT USER-COMMAND.
      CASE sy-ucomm.
        WHEN 'READ'.
          box = space.
          SET PF-STATUS 'CHECK' EXCLUDING 'READ'.
          DO lines TIMES.
            READ LINE sy-index FIELD VALUE box.
            IF box = 'X'.
              free = sflight-seatsmax - sflight-seatsocc.
              IF free > 0.
                NEW-PAGE.
                WRITE: 'Company:', sflight-carrid,
                       'Connection: ',sflight-connid,
                     / 'Number of free seats:', free.
              ENDIF.
            ENDIF.
          ENDDO.
      ENDCASE.
    Hope it serves your purpose.
    Regards,
    Vara

  • Just bought a new iphone4 and was loading os6 and now it won't turn on. the apple glows like it is starting up, then the screen goes black and then repeats the same process over and over. i have tried to reboot multiple times now

    just bought a new iphone4 and was loading os6 and now it won't turn on. the apple glows like it is starting up, then the screen goes black and then repeats the same process over and over. i have tried to reboot multiple times now

    I am assuming the phone was working prior to you installing IOS 6? Did you use itunes to install IOS 6 or just run from the phone?
    When I tried to do the Over The Air update to IOS6 on my iPhone 4, it errored out and I had to connect it to iTunes and select "Restore" from the summary screen after iTunes finds the phone is connected. If this works for you, it will go through a couple of reboots that take a few minutes to complete. It should then give you the option to start with a fresh new phone or to use one of your previous backups to load your contacts and other information, provided you have backed up the phone previously.
    I hope this helps you my friend!

  • TS3742 MacBook starts to boot and then has the "no" symbol, (circle with line through it).  Tried to reboot in safe mode and got the same thing.  Ideas?

    MacBook starts to boot and then has the  "no" symbol (circle with a line through it)
    Tried to reboot but now get the ?
    Any ideas?

    Something is messed up with the Disk.
    "Try Disk Utility
    1. Insert the Mac OS X Install disc, then restart the computer while holding the C key.
    2. When your computer finishes starting up from the disc, choose Disk Utility from the Installer menu at the top of the screen. (In Mac OS X 10.4 or later, you must select your language first.)
    Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from the disc again to access Disk Utility.
    3. Click the First Aid tab.
    4. Select your Mac OS X volume.
    5. Click Repair. Disk Utility checks and repairs the disk."
    http://docs.info.apple.com/article.html?artnum=106214

  • How to capture the selected values from module pool dialog list box !

    Hi experts,
    Can anyone help me out in capturing the values from the list box.
    i am able to set the values in the list box.But i am not able to capture the selected value from the list box. Always the list box name is getting as "space"
    I also tried in using the FM "VRM_GET_VALUES" but it is retireving all the values. Is there is any flag for filttering out the selected value.
    Your inputs are appreciated.
    Thanks,
    Vijay.

    Along with the PBO and PAI event, add a POV event in the flow logic of the screen
    DEMO_DROPDOWN_LIST_BOX -is a good demo example.
    PROCESS ON VALUE-REQUEST.
    FIELD structure_name-field_name MODULE create_dropdown_box.
    In the report :
    MODULE create_dropdown_box INPUT.
      SELECT carrid carrname
                    FROM scarr
                    INTO CORRESPONDING FIELDS OF TABLE itab_carrid.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                retfield        = 'CARRID'
                value_org       = 'S'
           TABLES
                value_tab       = itab_carrid
           EXCEPTIONS
                parameter_error = 1
                no_values_found = 2
                OTHERS          = 3.
      IF sy-subrc <> 0.
      ENDIF.
    ENDMODULE.
    In the layout, assign a Function Code , for eg : 'SELECTED' to the listbox and lets say name of the field is SDYN_CONN-CARRID. So in the PAI module,
    MODULE user_command_0100 INPUT.
      CASE ok_code.
        WHEN 'SELECTED'.
          MESSAGE i888(sabapdocu) WITH sdyn_conn-carrid.
      ENDCASE.
    ENDMODULE.
    sdyb_conn-carrid will contain your selected field

  • Error "No schedule line due for delivery upto the selected date"

    Hi Experts,
    I am getting an error while creating outbound delivery for sales order.All items have same item cat and schedule line category,same customer.
    The sales order have three items with delivery date of 18.09.2008.the material stock is available for all three material and there is no planned issue for these material.
    In sales order schedule lines for all three items is confirmed on 18.09.2008. When I create a delivery on 04.09.2008(before the chedule line),it allows to create delivery for the two items but when I create delivery for material 3 on 04.09.2008(before the chedule line),it is giving error "No schedule line due for delivery upto the selected date" .on going to help it gives information that check whether the order item to be delivered contains confirmed schedule line.I checked the confirmed schedule line is on 18.09.2008 (though we have availbe stock on 04.09.2008).
    Kindly guide me how to resolve the issue,here I want to create delivery prior to the delivery/Schedule line date in Sles order.for 2 items it works but for third it is giving error.
    Is it something to do with Material group 5 in material master sales view for the 1 and 2nd mtrl it is 14 days for for the third it is 7 days?
    Sarvesh
    Edited by: Sarvesh Vashist on Sep 5, 2008 5:31 AM

    Hi Experts,
    I am getting an error while creating outbound delivery for sales order.All items have same item cat and schedule line category,same customer.
    The sales order have three items with delivery date of 18.09.2008.the material stock is available for all three material and there is no planned issue for these material.
    In sales order schedule lines for all three items is confirmed on 18.09.2008. When I create a delivery on 04.09.2008(before the chedule line),it allows to create delivery for the two items but when I create delivery for material 3 on 04.09.2008(before the chedule line),it is giving error "No schedule line due for delivery upto the selected date" .on going to help it gives information that check whether the order item to be delivered contains confirmed schedule line.I checked the confirmed schedule line is on 18.09.2008 (though we have availbe stock on 04.09.2008).It allows to create a OBD either I change the delivery date in sales order to 04.09.2008 or create a delivery with delivery date 18.09.208.
    Kindly guide me how to resolve the issue,here I want to create delivery prior to the delivery/Schedule line date in Sles order.for 2 items it works but for third it is giving error.
    Is it something to do with Material group 5 in material master sales view for the 1 and 2nd mtrl it is 14 days for for the third it is 7 days?
    Sarvesh
    Edited by: Sarvesh Vashist on Sep 5, 2008 5:31 AM

  • Query: how to use structure and selection and what's the difference between

    Query: how to use structure and selection and what's the difference between these two?
    Would be appreciated if some experts here give examples to demenstrate on how to use structure and selection in query and what's the difference between these two?
    Thanks in advance!

    Hi Kevin,
    1. Well by default all the KF that you include in your query go into a Key Figure Structure. You can additionally have another structure for defining how your chars are laid out. A common example is a Calmonth structure where you have selections for 12 months, quarers and YTD values. This would be a char structure with different selections (for each month, qtr etc)
    2. Yes, a selection with a KF is the same as restricting a KF. You can use am RKF is you have one on the left hand side, or if you need to do this locally in the query, right click the structure and choose New Selection, then proceed to choose your KF and reqd char values.
    Hope this helps...

Maybe you are looking for

  • Error in FBZP step

    Hi I am into OBVCU (5th step in FBZP). There is giving one error for payment method W: "Clearing acct only allowed for outgoing bills of exchange" Its not allowing me to delete or remove clearing account GL account. Let me know what to do. Edited by:

  • Notification report

    Dears From change notification(QM02) From menu NOTIFICATION>PRINT>NOTIFICATION>5999 REJECTION REPORT Company logo is IDES HOLDING AG at the header level and in bottom level address is also different how it is possible to bring our own logo and addres

  • Chrome extension claims does not have latest ver of Acrobat despite CC

    Trying to use the Adobe Acrobat - Create PDF Chrome extension on up-to-date Yosemite with CreativeCloud - extension gives "Unknown Error" and claims computer doesn't have the 'right' version of Acrobat: "A supported version of Acrobat could not be fo

  • Vertical lines on 5s screen

    I noticed these appear the other day, I haven't done anything to my knowledge like drop or get it wet, but i just noticed these pop up.  They are only on the left hand side of the screen, and if i zoom/move they stay there, so its definitely a screen

  • Panasonic .RW2 files

    Is there a way to read Panasonic .RW2 files in Photoshop CS4?  I've tried all of the Camera raw plug-ins to no avail!