‎2016 Apr 19 2:16 AM
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?
On the above, the loop at GT_OP_MAIN, do not reflect the changed data anymore.
‎2016 Apr 19 3:20 AM
I go this to work
I added the call to check_changed_data inside the program instead of calling the same within the class. This way I check if the data is changed if yes, overwrite the public attribute of the class and then call the class to perform the required changes based on the changes made at the ALV level.
Although this method works, can anyone share any insights on why the changed data method does not show the changes when called from the class instead of the program?
Thanks,
Vikram.M
‎2016 Apr 19 3:20 AM
I go this to work
I added the call to check_changed_data inside the program instead of calling the same within the class. This way I check if the data is changed if yes, overwrite the public attribute of the class and then call the class to perform the required changes based on the changes made at the ALV level.
Although this method works, can anyone share any insights on why the changed data method does not show the changes when called from the class instead of the program?
Thanks,
Vikram.M