<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic problem with GET_SELECTED_ROW in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-get-selected-row/m-p/3067823#M727054</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi ,&lt;/P&gt;&lt;P&gt;i am working on alv grid,in which when i insert the valuse i need to selct then  row and by using GET_SELECTED_ROW i need to update the selected row with DB table. i have 3 fields in table. when i selct the inserted row and leave the corsior on last field  ,it will take last field as 0 (zero) but i will get all valuse when corsuor is other than last row.. plz help me why its happning like this since i m using get-selecet_row it shuld take the full row???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Nov 2007 10:43:39 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-11-19T10:43:39Z</dc:date>
    <item>
      <title>problem with GET_SELECTED_ROW</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-get-selected-row/m-p/3067823#M727054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi ,&lt;/P&gt;&lt;P&gt;i am working on alv grid,in which when i insert the valuse i need to selct then  row and by using GET_SELECTED_ROW i need to update the selected row with DB table. i have 3 fields in table. when i selct the inserted row and leave the corsior on last field  ,it will take last field as 0 (zero) but i will get all valuse when corsuor is other than last row.. plz help me why its happning like this since i m using get-selecet_row it shuld take the full row???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Nov 2007 10:43:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-get-selected-row/m-p/3067823#M727054</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-19T10:43:39Z</dc:date>
    </item>
    <item>
      <title>Re: problem with GET_SELECTED_ROW</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-get-selected-row/m-p/3067824#M727055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this might help:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ybc_test05.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Example: ALV-List of T000 with the possibility to select various&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;lines and to precess them.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Additional to this source a GUI-Status has to be created&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;( copy from SALV_TABLE_STANDARD in FM SALV_METADATA_STATUS )&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;and there an individual function must be defined. &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA it_outtab TYPE TABLE OF t000.&lt;/P&gt;&lt;P&gt;DATA gr_table TYPE REF TO cl_salv_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS lcl_handle_events DEFINITION DEFERRED.&lt;/P&gt;&lt;P&gt;DATA: gr_handle_events TYPE REF TO lcl_handle_events.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS lcl_handle_events DEFINITION.&lt;/P&gt;&lt;P&gt;PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;METHODS:&lt;/P&gt;&lt;P&gt;on_user_command&lt;/P&gt;&lt;P&gt;FOR EVENT added_function&lt;/P&gt;&lt;P&gt;OF cl_salv_events&lt;/P&gt;&lt;P&gt;IMPORTING e_salv_function.&lt;/P&gt;&lt;P&gt;ENDCLASS. "lcl_handle_events DEFINITION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS lcl_handle_events IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;METHOD on_user_command.&lt;/P&gt;&lt;P&gt;PERFORM user_command_objects USING e_salv_function.&lt;/P&gt;&lt;P&gt;ENDMETHOD. "on_user_command&lt;/P&gt;&lt;P&gt;ENDCLASS. "lcl_handle_events IMPLEMENTATION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;SELECT * FROM t000&lt;/P&gt;&lt;P&gt;INTO TABLE it_outtab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cl_salv_table=&amp;gt;factory(&lt;/P&gt;&lt;P&gt;IMPORTING r_salv_table = gr_table&lt;/P&gt;&lt;P&gt;CHANGING t_table = it_outtab ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*.................. Allow to mark more than one line ................. *&lt;/P&gt;&lt;P&gt;DATA: lr_sel TYPE REF TO cl_salv_selections.&lt;/P&gt;&lt;P&gt;lr_sel = gr_table-&amp;gt;get_selections( ).&lt;/P&gt;&lt;P&gt;lr_sel-&amp;gt;set_selection_mode( if_salv_c_selection_mode=&amp;gt;multiple ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*.................. Set_screen_status ................................ *&lt;/P&gt;&lt;P&gt;DATA: x_repid TYPE syrepid.&lt;/P&gt;&lt;P&gt;x_repid = sy-repid.&lt;/P&gt;&lt;P&gt;gr_table-&amp;gt;set_screen_status(&lt;/P&gt;&lt;P&gt;pfstatus = 'SALV_TABLE_TEST05' "GUI-Status&lt;/P&gt;&lt;P&gt;report = x_repid ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*... Enable Generic ALV functions&lt;/P&gt;&lt;P&gt;DATA: gr_functions TYPE REF TO cl_salv_functions_list.&lt;/P&gt;&lt;P&gt;gr_functions = gr_table-&amp;gt;get_functions( ).&lt;/P&gt;&lt;P&gt;gr_functions-&amp;gt;set_all( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*.................. Handle Event ..................................... *&lt;/P&gt;&lt;P&gt;DATA: lr_events TYPE REF TO cl_salv_events_table.&lt;/P&gt;&lt;P&gt;lr_events = gr_table-&amp;gt;get_event( ).&lt;/P&gt;&lt;P&gt;CREATE OBJECT gr_handle_events.&lt;/P&gt;&lt;P&gt;SET HANDLER gr_handle_events-&amp;gt;on_user_command FOR lr_events.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*.................. Display ALV ...................................... *&lt;/P&gt;&lt;P&gt;gr_table-&amp;gt;display( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM user_command_objects USING u_comm TYPE salv_de_function.&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;lv_row TYPE i .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASE u_comm.&lt;/P&gt;&lt;P&gt;WHEN 'DO'. "individual function in GUI-Status &lt;/P&gt;&lt;P&gt;PERFORM get_selected_row USING gr_table&lt;/P&gt;&lt;P&gt;CHANGING lv_row.&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;ENDFORM. "user_command_objects&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM get_selected_row USING ir_table TYPE REF TO cl_salv_table&lt;/P&gt;&lt;P&gt;CHANGING e_row TYPE i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*.. get selected line.&lt;/P&gt;&lt;P&gt;DATA: lr_selection TYPE REF TO cl_salv_selections,&lt;/P&gt;&lt;P&gt;lt_selected_row TYPE salv_t_row,&lt;/P&gt;&lt;P&gt;ls_selected_row LIKE LINE OF lt_selected_row,&lt;/P&gt;&lt;P&gt;l_cell TYPE salv_s_cell.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ir_table-&amp;gt;get_metadata( ).&lt;/P&gt;&lt;P&gt;lr_selection = ir_table-&amp;gt;get_selections( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lt_selected_row = lr_selection-&amp;gt;get_selected_rows( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: wa_outtab TYPE t000.&lt;/P&gt;&lt;P&gt;LOOP AT lt_selected_row INTO ls_selected_row.&lt;/P&gt;&lt;P&gt;READ TABLE it_outtab INDEX ls_selected_row INTO wa_outtab.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'POPUP_TO_CONFIRM'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;text_question = wa_outtab-mtext.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. "get_selected_row&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Nov 2007 10:49:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-get-selected-row/m-p/3067824#M727055</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-19T10:49:07Z</dc:date>
    </item>
  </channel>
</rss>

