2007 Jun 29 6:55 AM
In which event we can perform the enable and disable operations
2007 Jun 29 6:56 AM
In which event we can perform the enable and disable operations
2007 Jun 29 6:56 AM
2007 Jun 29 7:05 AM
2007 Jun 29 7:42 AM
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.
2007 Jun 29 8:39 AM
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
2007 Jun 30 1:46 PM
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
2007 Jul 02 11:33 AM
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.
2007 Sep 04 11:10 AM
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.