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

Report Events

Former Member
0 Likes
1,035

In which event we can perform the enable and disable operations

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,014

Hi,

At selection-screen on output.

Thanks,

Anitha

7 REPLIES 7
Read only

Former Member
0 Likes
1,015

Hi,

At selection-screen on output.

Thanks,

Anitha

Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
1,014

Hi,

Its

AT SELECTION-SCREEN OUTPUT.

Regards,

Sesh

Read only

Former Member
0 Likes
1,014

At selection-screen output.

loop at screen.

if screen-name = 'feild1' " your field name

screen-input = 0. " to make the field disable

endif.

if screen-name = 'field2' " your field name

screen-input = 1. " to make the field enable

endif.

modify screen.

endloop.

please reward points if useful,

Aleem.

Read only

former_member223446
Active Participant
0 Likes
1,014

hi laxmi

below code is helpful for u.

At selection-screen output.

loop at screen.

if screen-name = 'fld1' " your field name

screen-input = 0. " to make the field disable

else

if screen-name = 'fld2' " your field name

screen-input = 1. " to make the field enable

modify screen.

endif.

endloop.

reward points

kiran

Read only

jaideeps
Product and Topic Expert
Product and Topic Expert
0 Likes
1,014

hi lakshmi,

you can enable and disable the fields, using the event

at selection-screen output.

loop at screen.

if screen-name = 'fld1' --- field name

screen-input = 0. -


to disable

endif.

*for enable.

screen-input = 1. " to make the field enable

modify screen.

endloop.

you can also create MODIF ID for fields so that u can make this as a group...

then in order to hide you should use:

screen-active = 0.

thanks

jaideep

if useful plz reward points

Read only

Former Member
0 Likes
1,014

Hi poornima,

AT SELECTION-SCREEN OUTPUT

event is triggered. This event block allows you to modify the selection screen directly before it is displayed.

Example

PARAMETERS: TEST1(10) MODIF ID SC1,

TEST2(10) MODIF ID SC2,

TEST3(10) MODIF ID SC1,

TEST4(10) MODIF ID SC2.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'SC1'.

SCREEN-INPUT = '1'.

MODIFY SCREEN.

CONTINUE.

ENDIF.

IF SCREEN-GROUP1 = 'SC2'.

SCREEN-INPUT = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

These 2 operations in AT-SELECTION-SCREEN event will make enable & disable in Selection screen.

Regards,

Kavitha.

Read only

Former Member
0 Likes
1,014

hi laxmi ,

below example is useful

TABLES : VBAK.

*DATA : ITAB LIKE VBAK OCCURS 0 WITH HEADER LINE.

DATA : BEGIN OF ITAB OCCURS 0,

VBELN LIKE VBAK-VBELN,

ERNAM LIKE VBAK-ERNAM,

KUNNR LIKE VBAK-KUNNR,

END OF ITAB.

PARAMETERS : P_RAD1 RADIOBUTTON GROUP GRP USER-COMMAND AA DEFAULT 'X',

P_RAD2 RADIOBUTTON GROUP GRP.

SELECTION-SCREEN BEGIN OF BLOCK BLK WITH FRAME TITLE TEXT-000.

SELECT-OPTIONS : S_VBELN FOR VBAK-VBELN,

S_ERDAT FOR VBAK-ERDAT,

S_ERNAM FOR VBAK-ERNAM,

S_KUNNR FOR VBAK-KUNNR.

SELECTION-SCREEN END OF BLOCK BLK .

INITIALIZATION.

S_VBELN-SIGN = 'I'.

S_VBELN-OPTION = 'BT'.

S_VBELN-LOW = '4970'.

S_VBELN-HIGH = '5000'.

APPEND S_VBELN.

CLEAR S_VBELN.

AT SELECTION-SCREEN.

SELECT SINGLE * FROM VBAK WHERE VBELN EQ S_VBELN-LOW .

IF SY-SUBRC NE 0.

MESSAGE E002(ZSS) .

ENDIF.

AT SELECTION-SCREEN OUTPUT.

IF P_RAD1 = 'X'.

LOOP AT SCREEN.

IF SCREEN-GROUP4 EQ '005'

OR SCREEN-GROUP4 EQ '006'.

SCREEN-INVISIBLE = 1.

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

IF P_RAD2 = 'X'.

LOOP AT SCREEN.

IF SCREEN-GROUP4 EQ '003'

OR SCREEN-GROUP4 EQ '004'.

SCREEN-INVISIBLE = 1.

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

START-OF-SELECTION.

SELECT VBELN

ERNAM

KUNNR FROM VBAK INTO TABLE ITAB WHERE VBELN IN

S_VBELN AND

ERDAT IN S_ERDAT AND

ERNAM IN S_ERNAM AND

KUNNR IN S_KUNNR.

LOOP AT ITAB.

WRITE : / ITAB-VBELN,ITAB-ERNAM,ITAB-KUNNR.

ENDLOOP.

TOP-OF-PAGE.

WRITE : / 'SALES DOC'.

ULINE.

END-OF-PAGE.

WRITE : / 'END OF-PAGE', SY-PAGNO.