2014 Aug 07 9:35 AM
Hi Experts,
We are using cl_salv_table=>factory( ) for diaplaying alv report and post data to sap.
On the first screen, we have some buttons like post data, simulate posting, refresh all.Requirement is once we post the data and refresh and press on back button, the initial selection screen should be displayed. But its not happening so, on pressing back button the same screen, the previous alv screens get diplayed and to actually see the sel screen we have to press it several times. please help me resolve this issue.
Thanks and regards,
Amith
2014 Aug 07 9:50 AM
Hi ,
use cl_gui_alv_grid
2014 Aug 07 9:50 AM
2014 Aug 07 10:07 AM
@ Asim
Given issue is not a strong enough reason to switch from SALV to cl_gui_alv_grid.
@ Amith:
Run demo program SALV_DEMO_TABLE_SIMPLE and choose radio button "Output as Grid" and Execute.
Back button is able to navigate back to selection screen because of the way user command is handled in PAI block of screen. Observe this in debug and then implement same thing in your program.
Since you are pressing back several times, it is possible then instead of refreshing existing ALV, program is calling new ALV from PAI block on every refresh.
2014 Aug 07 9:50 AM
Hi Amith,
I did't get the exact requirement. As of my understand, can you solve this using LEAVE LIST-PROCESSING?
I think you are calling a screen from ALV user command,
Write LEAVE LIST-PROCESSING after CALL OR SUMBIT staement.
Regards
Sreekanth
2014 Aug 07 10:02 AM
Hi Amith ,
At the time of click on Back button it should be call previous screen i.e,
Selection screen...
Then try this code For the Back button....
write this code in Back Button..............
IF sy-ucomm = 'BACK'.
leave to screen 0.
Means it calls previous screen.....
Hope you understand.
vamsilakshman.p
2014 Aug 07 10:16 AM
Hi,
Implement subroutine for User Command and put the following code in it :
CASE SY-UCOMM.
WHEN 'BACK'. "or whatever the fct code is for back button
LEAVE TO TRANSACTION SY-TCODE.
ENDCASE.
Regards,
Ashish
2014 Aug 07 10:19 AM
Hi,
Check Whether your PF-STATUS and CODE ASSOCIATED with it is activated.
Regards
2014 Aug 07 10:37 AM
Hi Amith,
Also check your Pf Status is activated or not ..
In PAI
When 'Back'
Leave to screen 0.
Regards
Arun VS
2014 Aug 07 10:48 AM
To all who are suggesting "Leave to screen 0".
Please don't forget Screen number 0 is used for previous screen and which is already happening in his report. His requirement is to go to the first screen not the previous.
Thanks.
2014 Aug 07 11:08 AM
Hi amith
IN PAI
WHEN 'EXIT' OR 'BACK' OR 'CANC'.
*Destructor
CALL METHOD go_custom_container->free.
Leave to screen 0.
Regards
Arun VS
2014 Aug 12 6:25 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |