Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

rows selection in table control without mark disappearing after inputing

$
0
0

I have a question about Table Control.


Firstly, the screen of my ABAP program contains a text field and a table control. When I input something contents into the text field as search condition to get data from database, the table control will display the corresponding data.


I have succeeded in data displaying in table control. The second step is to select rows in table control without selection mark disappearing after doing some kind of actions like pushing ‘enter’ key.

 

Followed is part of my coding.

 

Tables: sflight. ”table control field name in screen

Data g_select type c. “mark name in table control

 

In PBO:

Module select_data_from_db.

LOOP AT   it_xxx
INTO wa_xxx
WITH CONTROL TB_CL01.

   MODULE move_to_ sflight.

  1. ENDLOOP.

 

In PAI:

LOOP AT it_xxx.

  MODULE modify_internaltable.

  1. ENDLOOP.

 

Module move_to_sflight is:

g_select = wa_xxx-mark.
MOVE-CORRESPONDING wa_xxx to sflight.

 

Module modify_internaltable is:

wa_xxx-mark = g_select.
modify it_xxx from wa_xxx index tb_cl01-current_line.


The problem is “Module select_data_from_db” will refresh the it_xxx and make the mark ‘X’ clear. So marked selected rows will be unselected after inputing.


I tried to move “Module select_data_from_db” into PAI and settle this problem, but someone told me it is better to put “Module select_data_from_db” in the PBO.


I am just wondering a solution or some standard samples if existed.

Thank you guys.


Viewing all articles
Browse latest Browse all 8332

Trending Articles



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