Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

refresh list-output

Former Member
0 Likes
1,720

Hi

I have a WRITE-list with the opportunity to choose a line over 'AT LINE-SELECTION'. In the 'AT LINE-SELECTION' a Dynpro is called to make database-changes. After changing the dataset, you get back to the list-output. But after changing the dataset, the list-output should be refreshed. So I have to rewrite the list and therefore I have to rerun the hole procedure to create the list-output.

How can I realize this?

thx

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,140

In the AT LINE-SELECTION event, after calling your dialog, you need to re-write the list.

at line-selection.

* Call the dialog

sy-lsind = sy-lsing - 1.  " Reset the list indicator
perform write_list.

Regards,

Rich Heilman

8 REPLIES 8
Read only

Former Member
0 Likes
1,140

Hi mike,

1. when we COME BACK

(after line-selection),

2. we cannot trace that event.

3. Hence, if we make our own toolbar,

only then can we DETECT,

the BACK Button,

and write our own code.

regards,

amit m.

Read only

Former Member
0 Likes
1,140

Hi,

After changing the dataset, store the sy-subrc value in some global variable, at the event when back or cancel pressed, if the stored sy-subrc value is zero then submit the same report. U will get ur problem solved.

Sreedhar

Read only

0 Likes
1,140

@Sreedhar Kanchanapalli

I also tried to solve the problem in this way. I used the function 'RS_REFRESH_FROM_SELECTOPTIONS' to get the actual selection-criteria and then submitted the program again. It worked!

But don't you think it may cause a problem, after submitting the program multiple times?

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,141

In the AT LINE-SELECTION event, after calling your dialog, you need to re-write the list.

at line-selection.

* Call the dialog

sy-lsind = sy-lsing - 1.  " Reset the list indicator
perform write_list.

Regards,

Rich Heilman

Read only

0 Likes
1,140

... another question: Which sy-parameter do I have to change, that the list-header works correctly, after generating the list again? It doesn't appear after performing list-output again.

Read only

0 Likes
1,140

You must put your list headings in the TOP-OF-PAGE event and the top-of-page DURING LINE-SELECTION event.

top-of-page.
perform write_headings.

top-of-page DURING LINE-SELECTION .
perform write_headings.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
1,140

Hi,

Yes it does.....but again it depends on the complexity of the program and how many no of times this program would be re-run if it is less u can very much use this if not try the logic as said by Rich.

Sreedhar

Read only

0 Likes
1,140

@rich heilman

ok, i also tried your solution, before I posted in forum, but I didn't no how to realise to jump back correctly.

'sy-lsind = sy-lsing - 1.' is the solution for my problem.

thx