2007 Dec 12 6:22 AM
I have two blocks b1 and b2 on selections screens
and I have two push buttons .
If i click one button b1 should be visible and b2 should be hided .
If i push another button b2 should be visible and b1 should be hided .
Thanks and Regards
Ramesh.G
2007 Dec 12 6:29 AM
Hi,
Instead of Push buttons you can have radio options. To do
While declaring the selection screen parameters you have mention the parameters and select-options as groups.
At selection screen output event.
You can use the below logic.
Loop at screen.
if screen-group = 'Group name'.
screen-field = 'Fieldname' "Give the name of the fields to be hidden
screen-invisible = 0.
modify screen.
endif.
if screen-group = 'Other Group name'.
screen-field = 'Fieldname' "Give the name of the fields to be hidden
screen-invisible = 0.
modify screen.
endif.
endloop.Thanks,
Sriram Ponna.
I have two blocks b1 and b2 on selections screens
and I have two push buttons .
If i click one button b1 should be visible and b2 should be hided .
If i push another button b2 should be visible and b1 should be hided .
Thanks and Regards
Ramesh.G
2007 Dec 12 6:27 AM
To disable the parameter field you need to loop at screen table and give the "SCREEN-INPUT = 0". Which will make the field disable for the input.
Check the scenario i have pasted here. Here i am taking two radio buttons. If the first button is selected then then the related fields of the other radio button should be disabled. <b>Replace the Radio button definition with Push buttons.</b>
PARAMETERS:
P_VAR1 TYPE C,
R1 RADIOBUTTON GROUP G1 USER_COMMAND U1,
R2 RADIOBUTTON GROUP G1 DEFAULT 'X',
P_VAR2 TYPE I MODIFID SC1,
P_VAR3 TYPE I MODIFID SC2.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF R1 ='X'.
IF SCREEN-GROUP = 'SC1'.
SCREEN-ACTIVE = 1.
MODIFY SCREEN.
ELSEIF SCREEN-GROUP = 'SC2'.
SCREEN-ACTIVE = 1.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ELSEIF R2 ='X'.
IF SCREEN-GROUP = 'SC1'.
SCREEN-ACTIVE = 1.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ELSEIF SCREEN-GROUP = 'SC2'.
SCREEN-ACTIVE = 1.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
Reward points if useful.
2007 Dec 12 7:27 AM
I have push buttons on application tool bar not on screen to replace pushbuttons with radio buttons
2007 Dec 12 9:00 AM
dont use different blocks
use same one block BLOCK_1
add select options and parameters of first block b1 with modif id sb1 in BLOCK_1
add select options and parameters of second block b2 with modif id sb2 in BLOCK_1
add both of above in same block
in pai use ok_code
if ok_code eq 'Button_1'.
Loop at screen.
if screen-group = 'sb2'.
screen-field = 'Fieldname' "Give the name of the fields to be hidden
screen-invisible = 0.
modify screen.
endif.
endloop.
endif.
if ok_code eq 'Button_2'.
Loop at screen.
if screen-group = 'sb1'.
screen-field = 'Fieldname' "Give the name of the fields to be hidden
screen-invisible = 0.
modify screen.
endif.
endloop.
endif.
2007 Dec 12 6:29 AM
Hi,
Instead of Push buttons you can have radio options. To do
While declaring the selection screen parameters you have mention the parameters and select-options as groups.
At selection screen output event.
You can use the below logic.
Loop at screen.
if screen-group = 'Group name'.
screen-field = 'Fieldname' "Give the name of the fields to be hidden
screen-invisible = 0.
modify screen.
endif.
if screen-group = 'Other Group name'.
screen-field = 'Fieldname' "Give the name of the fields to be hidden
screen-invisible = 0.
modify screen.
endif.
endloop.Thanks,
Sriram Ponna.
2007 Dec 12 6:30 AM
Hi,
Instead of Push buttons you can have radio options. To do
While declaring the selection screen parameters you have mention the parameters and select-options as groups.
At selection screen output event.
You can use the below logic.
Loop at screen.
if screen-group = 'Group name'.
screen-field = 'Fieldname' "Give the name of the fields to be hidden
screen-invisible = 0.
modify screen.
endif.
if screen-group = 'Other Group name'.
screen-field = 'Fieldname' "Give the name of the fields to be hidden
screen-invisible = 0.
modify screen.
endif.
endloop.Thanks,
Sriram Ponna.
2007 Dec 12 6:32 AM
Hi,
Instead of Push buttons you can have radio options. To do
While declaring the selection screen parameters you have mention the parameters and select-options as groups.
At selection screen output event.
You can use the below logic.
Loop at screen.
if screen-group = 'Group name'.
screen-field = 'Fieldname' "Give the name of the fields to be hidden
screen-invisible = 0.
modify screen.
endif.
if screen-group = 'Other Group name'.
screen-field = 'Fieldname' "Give the name of the fields to be hidden
screen-invisible = 0.
modify screen.
endif.
endloop.Thanks,
Sriram Ponna.
2007 Dec 12 7:36 AM
Hi,
Refer this code
----
PARAMETERS & SELECT-OPTIONS *
----
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-011.
PARAMETERS : p_pay1 RADIOBUTTON GROUP grp USER-COMMAND fc DEFAULT 'X',
p_pay2 RADIOBUTTON GROUP grp.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-001.
SELECT-OPTIONS : s_pernr FOR pa0000-pernr. "Personnel Number
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT (31) text-018.
PARAMETERS : p_begda LIKE pa0000-begda OBLIGATORY. "Start Date
SELECTION-SCREEN COMMENT 52(05) text-019.
PARAMETERS : p_endda LIKE pa0000-endda OBLIGATORY. "End Date
SELECTION-SCREEN END OF LINE.
SELECT-OPTIONS : s_stat2 FOR pa0000-stat2, "Status
s_werks FOR pa0001-werks, "Personnel Area
s_raufnr FOR catsdb-raufnr MODIF ID md1. "Internal Order Number
SELECTION-SCREEN END OF BLOCK b2.
----
AT SELECTION-SCREEN *
----
AT SELECTION-SCREEN OUTPUT.
IF p_pay1 EQ 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'MD1'.
screen-active = '1'.
screen-input = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSEIF p_pay2 EQ 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'MD1'.
screen-active = '1'.
screen-input = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
regards,
Prashant
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |