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

Grid Display with sorted table

$
0
0

Hi,

 

The structure of my development is as follows:

 

1. Report program which calls reuse_alv_grid_display for ALV output. The ALV has more than one custom buttons for different views of data. Each view obviously has a different structure. All of these structures are defined as STANDARD tables.

 

2. The report program gets the data for output from a class.

 

3. Instead of having different routines to display different views of the data, I just created one routine to which I pass the table and receives the table as a generic variable (TYPE TABLE). Then I pass this to a field symbol and the the field symbol is passed to the GRID display function.

 

4. One of the views has a editable functionality. When the data is changed I use the method CHECK_CHANGED_DATA and the changes reflect without any issues.

 

One of the things is that there are 2 different types for each view of the output.

1. a TYPE defined as a SORTED TABLE - I use this for all my loops and reads

2. a TYPE defined as a STANDARD TABLE - I use this for the display

 

I want to eliminate the need for 2 types and have just one SORTED TYPE.

 

So before calling the reuse FM for display, I created a data ref variable of line type of the SORTED TABLE. Then create an internal table with this line type and deference the same to a field symbol. This field symbol is passed to the reuse FM and the display works just fine. When a change is made to the contents, the changes are not propagated any more to the main table. I am assuming this is because I created a new table and copied the contents and displayed the same hence the changes are not reflecting on the main table.

 

Ho do I over come this issue?

 

 

Capture.JPG

 

Capture.JPG

 

Capture.JPG

On the above, the loop at GT_OP_MAIN, do not reflect the changed data anymore.


Viewing all articles
Browse latest Browse all 3132

Trending Articles



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