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

AT SELECTION-SCREEN OUTPUT.

Former Member
37,932

what is the syntax

AT SELECTION-SCREEN OUTPUT.

what does the following code do?

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF screen-name CS 'EN_EBELN'.

screen-invisible = 1.

screen-input = 0.

ENDIF.

IF screen-name CS 'EN_EKORG'.

screen-invisible = 1.

screen-input = 0.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

the report uses a logical database ENM

thanks for the help.

1 ACCEPTED SOLUTION
Read only

Former Member
15,179

hi,

AT SELECTION-SCREEN OUTPUT is the selection screen event which is trigerred before the list is being displayed. It is PBO event you can say.

This is triggered when the selection screen is loaded in memory before being displayed. We can change the appearence and values of the fields before display and after INITIALIZATION.

Hope this will help.

Regards

Sumit Agarwal

9 REPLIES 9
Read only

former_member156446
Active Contributor
0 Likes
15,179

based on the screen-name it will make some field modifiable.. some invisible

SCREEN is a SAP standard structure which will hold data related to the selection screen or the screen elements.

Read only

former_member654348
Participant
0 Likes
15,179

SCREEN is an intertnal table,

which has the fields like,

input, invisible....

AT SELECTION-SCREEN OUTPUT u can make a few fields visible, few rady for input and few not... like that.

for example, u have 2 fields number, name as screen fields.

While displaying the screen u don't want the name filed ready for input.

dat time u loop at screen and make sreen-input = 0. like that....

screen-invisible = 0 --- whether u want to display dat field on screen or not....

Read only

Former Member
0 Likes
15,179

If the selection screen contains any element having string EN_EBELN in it the it will make that particular element invisible and make it no editable similar is the case wid en_ekorg.

well i think the code is redundant as if u r setting screen-invisible=1 them it wud be invisible then thr's no question of making it editable or non editable with screen-input.

hope i helped.

reward if useful.

regards,

kartik

Read only

Former Member
0 Likes
15,179

Hi,

AT SELECTION-SCREEN OUTPUT is an event in which we can handle the screen elements dynamically.

For Example if a radio button on the selection is selected , field 'A' is to be invisable.

This can be achived Using

Loop at screen.

endloop.

Regards,

Jaya Vani

Read only

former_member200872
Active Participant
0 Likes
15,179

Hi,

The code makes the fields invisible that have the strings EN_EBELN, EN_EKORG in their field names .

Regards,

Wajid Hussain P

Edited by: Wajid Hussain P on Jul 3, 2008 1:06 PM

Read only

Former Member
15,179

Test this code understand the logic:


*&---------------------------------------------------------------------*
*& Report  ZTEST_SOURAV9
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
 
REPORT  ztest_sourav9.
 
PARAMETERS:
p_desk RADIOBUTTON GROUP 1 DEFAULT 'X' USER-COMMAND flag, "Desktop location
p_unix RADIOBUTTON GROUP 1 ,  "Unix location
p_file1 LIKE rlgrap-filename MODIF ID m1 DEFAULT 'File 1' ,
p_file2 LIKE filename-fileextern MODIF ID m2 DEFAULT 'File 2'.
 
AT SELECTION-SCREEN OUTPUT.
 
  LOOP AT SCREEN.
    IF p_desk = 'X' AND
      screen-group1 = 'M2'.
      screen-active = '0'.
    ELSEIF p_unix = 'X' AND
       screen-group1 = 'M1'.
      screen-active = '0'.
    ENDIF.
    MODIFY SCREEN.
  ENDLOOP.
 
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file1.
*....
 
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file2.
*...
 
START-OF-SELECTION.
  IF p_desk = 'X'.
    WRITE: p_file1.
  ELSE.
    WRITE:  p_file2.
  ENDIF.
 

Read only

soumya_jose3
Active Contributor
0 Likes
15,179

Hi,

This is making some fields ( the fields whose names contains the strings 'EN_EBELN' or 'EN_EKORG') invisble and disabling the input (ie, that field is not open for input) while displaying the selection screen.

Regards,

Soumya.

Read only

Former Member
0 Likes
15,179

Hi,

AT SELECTION-SCREEN OUTPUT event is triggered just before the screen is displayed .And if you want to make any visibility changes of fields which are there on the selection screen,you can do it here.

The attributes of all fields of a screen are stored in the system table SCREEN.

This can be edited line by line using LOOP AT SCREEN ... ENDLOOP.

Changes to the properties of the attributes of the current screen field can be put into effect using MODIFY SCREEN.

When evere you make any changes to the attributes of the field then use MODIFY SCREEN.

Regards ,

Rajitha.

Read only

Former Member
15,180

hi,

AT SELECTION-SCREEN OUTPUT is the selection screen event which is trigerred before the list is being displayed. It is PBO event you can say.

This is triggered when the selection screen is loaded in memory before being displayed. We can change the appearence and values of the fields before display and after INITIALIZATION.

Hope this will help.

Regards

Sumit Agarwal