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

Selection screen

Former Member
0 Likes
436

Hi,

I am able to disable the check box in the selection screen.The reqiurement is,

After entering the selection screen values user has excuted the report.It displays the report.When the user press the Back button (F3) it will display the selection screen again now I want to enable the checkbox dynamically. How?

Thanks & Regards,

KS

5 REPLIES 5
Read only

Former Member
0 Likes
414
WHEN 'BACK'.

  LOOP AT SCREEN.
   IF SCREEN-NAME = 'C1'.   "  C1 is ur checkbox name
      SCREEN-INPUT = '1'.
      MODIFY SCREEN.
   ENDI.
  ENDLOOP.
Read only

Former Member
0 Likes
414

Hi Siva,

Use one flag for the report execution and check that value when disableing the check box.

I means to say... I think you might be written some code in at selection-screen output event to disable the check box, here you jest check whether this flag is initial or not. if initial then disable the checkbox, and if not do not disable.

Regards,

Satya.

Read only

Former Member
0 Likes
414

Hello,

Declare one global variable flag of type c with default value space.

In your code somewhere u will check whether the check box is checkec or not. In that place set this variable flag to 'X'. Now in the SELECTION-SCREEN OUTPUT event code like this,

LOOP AT SCREEN.

IF SCREEN-NAME = 'CH'.

if <global_var> eq 'X'.

screen-input = 1.

else.

screen-input = 0.

endif.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

Regs,

Venkat Ramanan N

Read only

Former Member
0 Likes
414

Hi,

parameter P1 as checkbox .

at selection-screen output .

LOOP AT SCREEN.

if P1 eq 'X'.

screen-input = 1.

else.

screen-input = 0.

endif.

MODIFY SCREEN.

ENDLOOP.

if sy-tabix eq 5 .

LOOP AT SCREEN.

screen-input = 0.

MODIFY SCREEN.

ENDLOOP.

Message was edited by:

Lakshminarayanan rohini

Read only

Former Member
0 Likes
414

Hi,

You want to have a switch, which you can query after execution has ended. For that you will have to either use memory, or a static in a function call.

In this example, I used memory.

...

DATA: ATFIRST TYPE BOOLE_D.

AT SELECTION-SCREEN OUTPUT.

IMPORT ATFIRST FROM MEMORY ID ANYID.

LOOP AT SCREEN.

CHECK SCREEN-GROUP1 = '999'.

IF ATFIRST IS INITIAL.

SCREEN-INPUT = '0'.

ELSE.

SCREEN-INPUT = '1'.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ENDIF.

START-OF-SELECTION.

ATFIRST = 'X'.

EXPORT ATFIRST TO MEMORY ID ANYID.

...

Be aware, that after first execution, the switch will remain set for as long as you stay in the same session. If this is not what you want, be sure to put something like:

DELETE FROM MEMORY ID ANYID.

after second execution.

regards