2006 Aug 21 7:01 AM
initially there are two push buttons and the parameters should not be displayed.
when any one push button is clicked on one parameter should be displayed.
i had written the following code but is not working
please help me
with regards
bob
TABLES : SSCRFIELDS.
PARAMETERS : P LIKE MARA-MATNR MODIF ID ABC.
PARAMETERS : P1 LIKE MARC-WERKS MODIF ID ABC.
SELECTION-SCREEN : begin of line,
PUSHBUTTON 2(10) PB1 USER-COMMAND A,
PUSHBUTTON 20(10) PB2 USER-COMMAND B,
end of line.
AT SELECTION-SCREEN ." OUTPUT.
CASE SSCRFIELDS-UCOMM.
WHEN 'A'.
LOOP AT SCREEN.
IF SCREEN-NAME = 'P'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
endcase.
initially there are two push buttons and the parameters should not be displayed.
when any one push button is clicked on one parameter should be displayed.
i had written the following code but is not working
please help me
with regards
bob
TABLES : SSCRFIELDS.
PARAMETERS : P LIKE MARA-MATNR MODIF ID ABC.
PARAMETERS : P1 LIKE MARC-WERKS MODIF ID ABC.
SELECTION-SCREEN : begin of line,
PUSHBUTTON 2(10) PB1 USER-COMMAND A,
PUSHBUTTON 20(10) PB2 USER-COMMAND B,
end of line.
AT SELECTION-SCREEN ." OUTPUT.
CASE SSCRFIELDS-UCOMM.
WHEN 'A'.
LOOP AT SCREEN.
IF SCREEN-NAME = 'P'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
endcase.
2006 Aug 21 7:15 AM
HI,
check this program it is doing the same you required.
<b>REPORT zwa_test2.
TABLES : SSCRFIELDS.
DATA: comm(1).
PARAMETERS : P LIKE MARA-MATNR MODIF ID P.
PARAMETERS : P1 LIKE MARC-WERKS MODIF ID p1.
SELECTION-SCREEN : begin of line,
PUSHBUTTON 2(10) PB1 USER-COMMAND A,
PUSHBUTTON 20(10) PB2 USER-COMMAND B,
end of line.
INITIALIZATION.
LOOP AT SCREEN.
IF SCREEN-group1 = 'P' OR
SCREEN-group1 = 'P1'.
SCREEN-active = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
AT SELECTION-SCREEN.
IF sy-ucomm = 'A'.
comm = 'A'.
elseif sy-ucomm = 'B'.
comm = 'B'.
ENDIF.
AT SELECTION-SCREEN output.
LOOP AT SCREEN.
IF SCREEN-group1 = 'P'.
if comm = 'A'.
SCREEN-active = '1'.
else.
SCREEN-active = '0'.
endif.
MODIFY SCREEN.
ENDIF.
IF SCREEN-group1 = 'P1'.
if comm = 'B'.
SCREEN-active = '1'.
else.
SCREEN-active = '0'.
endif.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
clear: comm.</b>REgards,
HRA
2006 Aug 21 7:21 AM
you must do in "at selection-screen output" statement.
and you must use a copy of SY-UCOMM like this.
data : ucom like sy-ucomm.
at selection-screen.
ucom = sy-ucomm.
at selection-screen output.
case ucomm.
when 'A'.
loop at screen.
if screen-name eq 'P'.
screen-active = 0.
endif.
endloop.
endcase.ibrahim
2006 Aug 21 7:21 AM
Hi Gangadhar,
Try the following code. Its working on my side.
TABLES : SSCRFIELDS.
PARAMETERS : P LIKE MARA-MATNR MODIF ID ABC.
PARAMETERS : P1 LIKE MARC-WERKS MODIF ID ABC.
SELECTION-SCREEN : begin of line,
PUSHBUTTON 2(10) PB1 USER-COMMAND A,
PUSHBUTTON 20(10) PB2 USER-COMMAND B,
end of line.
DATA : FLAG TYPE C.
AT SELECTION-SCREEN OUTPUT.
IF FLAG IS INITIAL..
LOOP AT SCREEN.
IF SCREEN-NAME = 'P'.
SCREEN-ACTIVE = '1'.
SCREEN-INPUT = '0'.
SCREEN-OUTPUT = '1'.
SCREEN-INVISIBLE = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
AT SELECTION-SCREEN .
CASE SSCRFIELDS-UCOMM.
WHEN 'A'.
FLAG = '1'.
LOOP AT SCREEN.
IF SCREEN-NAME = 'P'.
SCREEN-ACTIVE = '1'.
SCREEN-INPUT = '1'.
SCREEN-OUTPUT = '1'.
SCREEN-INVISIBLE = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Endcase.
Hope this helps,
Pragya
2006 Aug 21 8:12 AM
SELECTION-SCREEN PUSHBUTTON 15(15) KIS1 USER-COMMAND ID1.
SELECTION-SCREEN PUSHBUTTON 35(15) KIS2 USER-COMMAND ID2.
parameters: KISHAN1(15) MODIF ID ID1.
parameters: KISHAN2(15) MODIF ID ID2.
TABLES: sscrfields.
data l_button like sy-ucomm.
INITIALIZATION.
KIS1 = 'Pushbutton1'.
KIS2 = 'Pushbutton2'.
l_button = 'ID1'.
AT SELECTION-SCREEN.
IF sscrfields-ucomm = 'ID1'
OR sscrfields-ucomm = 'ID2'.
l_button = sscrfields-ucomm.
ENDIF.
AT SELECTION-SCREEN OUTPUT.
loop at screen.
IF SCREEN-GROUP1 = 'ID1'.
IF SCREEN-GROUP1 <> L_BUTTON.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
loop at screen.
IF SCREEN-GROUP1 = 'ID2'.
IF SCREEN-GROUP1 <> L_BUTTON.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |