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

Need to hide function keys in report

Former Member
0 Likes
2,969

hi ,

I created three buttons using function keys using

INITIALIZATION .

sscrfields-functxt_01 = 'Button1'.

sscrfields-functxt_02 = 'Button2'

sscrfields-functxt_03 = 'Button3'.

SELECTION-SCREEN: FUNCTION KEY 1,

FUNCTION KEY 2,

FUNCTION KEY 3.

It is working fine . But now i got a requirment like after clicking button1 only button2 should be disabled .

Can you please help me how to achieve this .

Thanks in advance ,

Vijay

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,927

Hi,

perhaps you´ll have to change your programme´s type to Module Pool, since you need to work with screens and the event PBO, for making a loop to the screen, where you can hide objects on the screen.

loop at screen.
   IF screen-group1 = 'ABC'
      screen-invisible = '0' or '1'.
      MODIFY SCREEN.
   endif.
endloop.

There´s event AT SELECTION-SCREEN OUTPUT, where you can do your code, but this one is executed only once (after start of programme).

Solved with above code..

8 REPLIES 8
Read only

anup_deshmukh4
Active Contributor
0 Likes
1,927

use LOOP AT SCREEN

" USE ACTIVE FIELD OF YOUR SCREEN ELEMENT IE NAME = <YOUR SCEEN ELEMENT NAME>

MODIFY SCREEN.

ENDLOODP.

USE FOLLOWING EVENT....

AT SELECTION SCREEN OUTPUT.

Read only

0 Likes
1,927

Hi Anup ,

Thax for quick reply . I am not having having much idea on report events .

Can you please send any code sample or something that ll we more help ful to me ..

Thanks in advance ,

Vijay

Read only

Former Member
0 Likes
1,928

Hi,

perhaps you´ll have to change your programme´s type to Module Pool, since you need to work with screens and the event PBO, for making a loop to the screen, where you can hide objects on the screen.

loop at screen.
   IF screen-group1 = 'ABC'
      screen-invisible = '0' or '1'.
      MODIFY SCREEN.
   endif.
endloop.

There´s event AT SELECTION-SCREEN OUTPUT, where you can do your code, but this one is executed only once (after start of programme).

Read only

0 Likes
1,927

Hi Jorge ,

Thanx for your quick reply . Is there any other way witjout changing program to module pool .

Vijay

Read only

0 Likes
1,927

At SELECTION-SCREEN OUTPUT is processed repeatedly....every time something happens on screen that would normally cause a PAI event will result in the program execution the event.

Read only

0 Likes
1,927

Hello

Try this:


DATA GT_EXCLUDE TYPE TABLE OF RSEXFCODE WITH HEADER LINE.

INITIALIZATION .

sscrfields-functxt_01 = 'Button1'.
sscrfields-functxt_02 = 'Button2'.
sscrfields-functxt_03 = 'Button3'.

SELECTION-SCREEN: FUNCTION KEY 1,
FUNCTION KEY 2,
FUNCTION KEY 3.
AT SELECTION-SCREEN.
  CASE sy-ucomm.
  WHEN 'FC01'.
    GT_EXCLUDE-FCODE  = 'FC02'.
    APPEND GT_EXCLUDE.
  ENDCASE.
AT SELECTION-SCREEN OUTPUT.
  CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
       EXPORTING
            P_STATUS  = '%_00'
            P_PROGRAM = 'RSSYSTDB'
       TABLES
            P_EXCLUDE = GT_EXCLUDE[].

Read only

Former Member
0 Likes
1,927

Hi ,

AT SELECTION-SCREEN output

If you click button1

loop at screen

if screen-name = 'BUTTON2[

screen-input = 0.

modify screen.

endif.

endloop.

Read only

Former Member
0 Likes
1,927

Solved with above code..