Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9193

GET_SELECTED_ROWS didn't get the selected row in second time.

$
0
0

Dear friends,

      I had trapped in this problem in many days, I have search many discussion in SCN, but didn't find any solution yet. Hope someone can help me with this:

 

      I display an ALV report by OO container, which divide into three pieces. Such as when I select two row then I click one button, then I want to get the row I selected. but now it can only get the row first time, after that, it wouldn't succeed again unless I run the report again.

QQ截图20150106190007.png

 

     In addition, after I select another ALV row, then back into the above screen, it can not get the row no matter first time or other:

QQ截图20150106185935.png

 

My code in PBO(post some key code ):

 

DATA: Grid4            TYPE REF TO cl_gui_alv_grid.

WA_LAYOUT1-SEL_MODE = 'A'.

CALL METHOD grid4->set_table_for_first_display

     EXPORTING

        IS_LAYOUT       = WA_LAYOUT1

        IS_VARIANT      = WA_VARIANT1

        I_SAVE          = 'A'

     CHANGING

       IT_FIELDCATALOG = GT_FIELDLOG

       it_outtab       = <DYN_TAB2>.


after I select some row, I click the button, then it run this code in PAI :


IF GRID4 IS NOT INITIAL.

            CLEAR GT_ROW_TAB2.

            CLEAR GT_NO_TAB2.

            call method grid4->check_changed_data

               importing

                  e_valid = l_valid.

 

             CALL METHOD grid4->GET_SELECTED_ROWS

               IMPORTING

                ET_INDEX_ROWS = GT_ROW_TAB2[]

                ET_ROW_NO     = GT_NO_TAB2[].

ENDIF.

     

     Thanks for your sincerely answer!


Viewing all articles
Browse latest Browse all 9193

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>