cancel
Showing results for 
Search instead for 
Did you mean: 

Refreshing the alv list with new data after importing from excel

former_member210857
Participant
0 Kudos

Hi Friends,

I am displaying the data using the reuse_alv_grid display .

In application tool bar there  are are two buttons 'EXPORT' and 'IMPORT' . I will export this data into an excel sheet .

After data manipulation from the user the data is imported in the same screen .The problem now is I want to show the changed data  as the new list

instead of the old list .

I have tried calling reuse_alv_grid_display  again , but I am getting some error and the program is exiting

Is there any way to accomplish this

Accepted Solutions (1)

Accepted Solutions (1)

former_member210621
Participant
0 Kudos

Hi,

FORM user_command USING r_ucomm LIKE sy-ucomm

                   rs_selfield TYPE slis_selfield.

In case of import:

Import all your data into internal table.

Set the below parameters to refresh the existing ALV List.

     rs_selfield-refresh = 'X'.

     rs_selfield-exit = 'X'.

Execute FM 'Reuse_alv_grid_display'.

Endform.

-Regards

Ketan

Former Member
0 Kudos

Hi,

if you want to show both the lists,

just use


Just pass all the data from excel to new internal table and display the same using reuse_alv_grid_display.


on only new,


then on import,

Fill all the data in internal table.

Prepare Fieldcat.


     rs_selfield-refresh = 'X'.

     rs_selfield-exit = 'X'.


And call the alv using 'REUSE_ALV_GRID_DISPLAY'.


Parameter marked in bold only display the latest report with updated data.


-Regards

Rohit


Answers (1)

Answers (1)

Former Member
0 Kudos

Hi, On import button,

Just pass all the data from excel to new internal table and display the same using reuse_alv_grid_display.

-Regards

Rohit