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

Problem with same Container for 2 different outputs

Former Member
0 Likes
979

Hi,

I am using method set_table_for_first_display to display 2 different output with same container depending upon the selection of radio button. but the problem I am facing is when I click BACK button after dispaying second output and executing first output, it is showing prebious output only. is there any method to handle this problem?

Regards,

Nilanjana

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
944

Please try flushing the buffer using the class method CL_GUI_CFW=>FLUSH. This should refresh your buffer data in the container.

Regards

Ranganath

8 REPLIES 8
Read only

madhu_vadlamani
Active Contributor
0 Likes
944

Hi,

As you told code is working perfect. Write code in such a way leave program or leave screen.

case sy-ucomm.

when 'Back'.

leave program.

end case.

check if it is useful.

Regards,

Madhu.

Read only

Former Member
0 Likes
944

HI,

When you are clicking on BACK button you should clear the Internal Table it_outtab.Hope your problem will be sloved.You can check in debugging mode also when you press the second radio button what is the content of the it_outtab table...

Regards,

Suvajit...

Read only

MarcinPciak
Active Contributor
0 Likes
944

Well, by standard back button is ued for switching b/w different screens.

Are you using:

- same screen?

- same container?

- same ALV control?

In order to simplify everything you should consider two ALV's which can be in turn swapped inside one container.

Regards

Marcin

Read only

0 Likes
944

Hi Marcin,

yes I am using

same screen and container but different fieldcatalog.

when i am executing second layout after first the output is changed but its not getting changed for vice versa.

Edited by: nilanjana sinha on Feb 16, 2011 9:33 AM

Read only

vinod_vemuru2
Active Contributor
0 Likes
944

Hi,

On clicking back use leave to screen 0 in the PAI module of the screen.

Call screen 100.

PROCESS BEFORE OUTPUT.

Logic

.

.

.

PROCESS AFTER INPUT.

MODULE USER_COMMAND.

MODULE USER_COMMAND INPUT.

IF sy-ucomm EQ 'User command defined for BACK button'.

LEAVE TO SCREEN 0. "Go back to selection screen

ENDIF.

END MODULE.

Have a look at the method FREE of class cl_gui_alv_grid.

eg:


CALL METHOD wcl_alvgrid1->free
  EXCEPTIONS
    cntl_error        = 1
    cntl_system_error = 2
    OTHERS            = 3.

Thanks,

Vinod.

Read only

Former Member
0 Likes
945

Please try flushing the buffer using the class method CL_GUI_CFW=>FLUSH. This should refresh your buffer data in the container.

Regards

Ranganath

Read only

0 Likes
944

flush free is not working, refresh_table_display is working if I place it before set_table_for_first_display.

Thanks all for the replies.

Edited by: nilanjana sinha on Feb 16, 2011 10:03 AM

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
944

Hi Please chech this blog by Uwe.

The same scenario is made so easy

link:[Against All Odds - Programming of Communicating (S)ALV Grid Controls|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/21504] [original link is broken] [original link is broken] [original link is broken];