08-28-2007 9:27 AM
Hi,
I created an ALV report using methods and OO, when i click back to go to the selection screen it used to just go back to the SAP start-up menu. So i used CALL TRANSACTION 'xxxxxxx' instead to make sure it always gets back to the selection screen. But now when i try to hit back from the selection screen it dumps!
<i>Exception condition "CNTL_ERROR" raised.</i> with the standard line below highlighted
<i>* check control
IF CONTROL->H_CONTROL IS INITIAL.
RAISE CNTL_ERROR.
ENDIF. </i>
Any help would be appreciated,
Thanks.
08-28-2007 9:30 AM
Hi Dave,
Instead of CALL TRANSACTION 'xxxxxx'. try this
WHEN 'BACK'.
LEAVE TO SCREEN 0.
08-28-2007 9:30 AM
Hi!
Have you tried instead of the CALL TRANSACTION, the LEAVE TO SCREEN 0. statement?
Regards
Tamá
08-28-2007 9:38 AM
Unfortunatly using leave to screen 0 is what brings it to the start up screen and not the selection screen
08-28-2007 9:45 AM
08-28-2007 9:48 AM
Dave,
U can use LEAVE TO SCREEN 0. Just make sure the screen on which ur displaying the ALV grid - has the same screen number as Next screen ( in attributes of this screen).
Say, ur calling screen 9001 for displaying ur ALV grid, go to the attributes tab for this screen 9001 and , change the Next Screen param to 9001.
I hope it will solve ur problem.
08-28-2007 9:47 AM
Hi Dave,
If you are using the OO ALV in a report the std fn.s like BACK will be handled automatically because we are not creating any screens.If you are using methods from cl_salv_table class and using full screen type the above fact works.
But if u are using grid type in the same class,then u will have to create a screen only for alv(not for sel.screen).Here for BACK button, u can give
when 'BACK'.
leave to screen 0.
In both cases sel screen will be standard only.ie
selection-screen begin of block gen with frame.
PARAMETERS: name like <field> obligatory.
SELECT-OPTIONS: name for <field>.
selection-screen end of block gen.
Reward if helpful.
Thanks..