Application Development 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: 

Short Dump when pressing back from Selection Screen

Former Member
0 Kudos

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.

6 REPLIES 6

Former Member
0 Kudos

Hi Dave,

Instead of CALL TRANSACTION 'xxxxxx'. try this

WHEN 'BACK'.
  LEAVE TO SCREEN 0.

Former Member
0 Kudos

Hi!

Have you tried instead of the CALL TRANSACTION, the LEAVE TO SCREEN 0. statement?

Regards

Tamá

0 Kudos

Unfortunatly using leave to screen 0 is what brings it to the start up screen and not the selection screen

0 Kudos

try this

WHEN 'BACK'.
  CALL SELECTION-SCREEN 1000.

0 Kudos

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.

Former Member
0 Kudos

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..