‎2010 Jun 04 11:30 AM
Hi
I have created a transaction which when executed displays a selection screen and on entering proper search criteria, result data is displayed in the form of ALV list. (for example name this screen 'A' ). Here, On the application toolbar, there is a button named 'POST', which is used to post the selected entries from the ALV list into the database. To know Whether the entries are posted or not a status is maintained and also the status is to be displayed. for this the ALV list is displayed again with modified status.From here when I press the BACK button from the standard toolbar, the control first goes from this screen to screen A, and then when I press the BACK button again, the control reaches the selection screen.
My requirement is that when I press the back button from the screen in which the modified ALV list is displayed(that is the last screen), it should directly come back to the selection screen of the transaction.
Many thanks in advance.
Regards
Smriti
‎2010 Jun 04 11:49 AM
Hello Smriti Roopesh Kapur ,
On display of back button on the second screen you can Leave same transaction to transaction this is one option ( simplest) check for LEAVE TO TRANSACTION STATEMENT OR
you can use set screen <your selection screen number > when you are on screen B ie. the posted report OR
you can use leave to screen <your selection screen number >. ( your selection screen no will 1000 if its default one ...!) or
you can use CALL SELECTION SCREEN <your selection screen number >
( Mind you can do all this operation when you are on report B Check for SY-DYNNR ie. the current screen number and manipulate it..)
‎2010 Jun 04 11:53 AM
u must have used
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_callback_pf_status_set = 'ALV_PF_STATUS_SET'
i_callback_user_command = 'ALV_USER_COMMAND'
is_layout = is_layout
it_fieldcat = it_fieldcat
it_events = g_t_events
TABLES
t_outtab = i_output
EXCEPTIONS
program_error = 1
OTHERS = 2.
u might have defined the pf-status for the ALV list.check if u hav given function code for BACK button as &F03?
‎2010 Jun 04 11:36 PM
Hi ,
You can do one more thing.
Open SE41,click the icon for copy status it will open one window.
You have to give:
Program--> SAPLKKBL
Status--> STANDARD
After that enter:
Prg name--> Your program name
Status-->Your Own Status Name
And press copy.
Then In your created status go to application toolbar and Add your Button.
Then In the program Create a Form
FORM pf_status "#EC *
USING p_extab TYPE slis_t_extab.
SET PF-STATUS 'STAT1' EXCLUDING p_extab.
ENDFORM. "PF_STATUS
Here 'STAT1 is your own Status Name
Then in the FM -->CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
Pass i_callback_pf_status_set = 'PF_STATUS' this.
For more info, kindly visit links:
1. http://wiki.sdn.sap.com/wiki/display/ABAP/ProcesstocreateALVwith+OOPS
May it helps you.
Regards.
Deepak Sharma.