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 in calling a selection-screen

Former Member
0 Likes
703

Hi Friends,

Please see the code below.

when r_rbr = 'X', I'm calling sel screen 100.

when r_cvr = 'X', I'm calling selection screen 200.

Now the problem is that when I call screen 100 or 200 & press BACK button, even then also it goes to start of selection.Please help.

AT SELECTION-SCREEN ON RADIOBUTTON GROUP r1.

IF g_flag IS INITIAL.

IF r_rbr = c_x.

*BREAK-POINT.

CALL SELECTION-SCREEN 100.

g_flag = 'X'.

ELSEIF r_cvr = c_x.

CALL SELECTION-SCREEN 200.

g_flag = 'X'.

ENDIF.

ENDIF.

START-OF-SELECTION.

  • fetch data from data base tables

IF r_rbr = c_x

AND g_flag NE 'X'.

PERFORM fetch_data.

PERFORM data_consolidate.

ENDIF.

IF r_cvr = c_x.

  • AND g_flag NE 'X'.

PERFORM fetch_data1.

ENDIF.

5 REPLIES 5
Read only

Former Member
0 Likes
672

You need to handle PF_STATUS for your screens & module_exit_command.

If you set 'E' in the status for your back button, when you press this it'll come out of the program.

Read only

Former Member
0 Likes
672

Hi,

In the PAI event of the screens 100,200, write the below statement:

CALL SELECTION-SCREEN <numb> (usually if it is a report program, the selection screen no will be 1000)

other wise from the selection screen, Menu->status(to get the selection screen no)

Hope this helps you

Regards

Shiva

Read only

Former Member
0 Likes
672

Hi,

Do it this way...

Tables : SSCRFIELDS.  " Added

AT SELECTION-SCREEN ON RADIOBUTTON GROUP r1.

IF g_flag IS INITIAL.

IF r_rbr = c_x.
*BREAK-POINT.
CALL SELECTION-SCREEN 100.
g_flag = 'X'.
clear sscrfields-ucomm.      " Added line
ELSEIF r_cvr = c_x.
CALL SELECTION-SCREEN 200.
g_flag = 'X'.
clear sscrfields-ucomm.  " Added line
ENDIF.
ENDIF.

START-OF-SELECTION.
* fetch data from data base tables
IF r_rbr = c_x
AND g_flag NE 'X'.
PERFORM fetch_data.

PERFORM data_consolidate.
ENDIF.

IF r_cvr = c_x.
* AND g_flag NE 'X'.

PERFORM fetch_data1.
ENDIF.

Please let me know if this does not work

Regards,

Siddarth

Read only

0 Likes
672

Hi Siddharth,

Its not working yet...when I'm executing the program on second screen..its throwing me on first screen

Read only

Former Member
0 Likes
672

This message was moderated.