‎2010 Apr 16 12:18 PM
Hello everyone,
I have two probably simple problems.
First - I have selection screen with tabs. On first tab I have select-option field and below the checkbox. How can I dynamically hide the select-option field when I click a checkbox.
My code:
SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
SELECT-OPTIONS s_valid FOR lv_valid MODIF ID gr1.
PARAMETER p_chkab AS CHECKBOX DEFAULT ' '.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN END OF SCREEN 100.
SELECTION-SCREEN: BEGIN OF TABBED BLOCK mytab FOR 10 LINES,
TAB (20) t1_en USER-COMMAND push1
DEFAULT SCREEN 100,
TAB (20) t2_partn USER-COMMAND push2
DEFAULT SCREEN 200,
...
END OF BLOCK mytab.
INITIALIZATION.
t1_en = 'DATES'.
t2_partn = 'partn'.
mytab-prog = sy-repid.
mytab-dynnr = 100.
mytab-activetab = 'T1_EN'.
I tried to use LOOP AT SCREEN but AT SELECTION-SCREEN OUTPUT i do not have access to the fields in tabs (only to the tabs). and this event is not triggered when I checked the checkbox. What can I do to make it works?
‎2010 Apr 16 12:26 PM
Hi Max,
Welcome to SCN/SDN
*PARAMETER p_chkab AS CHECKBOX DEFAULT ' '.
PARAMETER p_chkab AS CHECKBOX USER-COMMAND ABC DEFAULT ' '. " Add USER-COMMAND
This will trigger automatic PAI/PBO
AT SELECTION-SCREEN OUTPUT.
IF P_CHKAB = 'X'.
loop at screen.
screen-name = '%_S_VALID_%_APP_%-TEXT' or " Get these from Screen Layout
screen-name = 'S_VALID-LOW' or
screen-name = 'S_ERDAT-HIGH' .
SCREEN-ACTIVE = 0.
MODIFY SCREEN.
endloop.
endif.Cheerz
Ram
‎2010 Apr 16 12:25 PM
Hi,
You have to use Usercommand Keyword.
e.g.
PARAMETER p_chkab AS CHECKBOX DEFAULT ' ' user-command fcode.
Try it .
Hope it helps.
Regards
Arbind
‎2010 Apr 16 12:26 PM
Hi Max,
Welcome to SCN/SDN
*PARAMETER p_chkab AS CHECKBOX DEFAULT ' '.
PARAMETER p_chkab AS CHECKBOX USER-COMMAND ABC DEFAULT ' '. " Add USER-COMMAND
This will trigger automatic PAI/PBO
AT SELECTION-SCREEN OUTPUT.
IF P_CHKAB = 'X'.
loop at screen.
screen-name = '%_S_VALID_%_APP_%-TEXT' or " Get these from Screen Layout
screen-name = 'S_VALID-LOW' or
screen-name = 'S_ERDAT-HIGH' .
SCREEN-ACTIVE = 0.
MODIFY SCREEN.
endloop.
endif.Cheerz
Ram
‎2010 Apr 16 12:31 PM
use SCREEN-INVISIBLE = 1, to hide the screen field.
example:
selection-screen begin of block b1 with frame title text-001.
parameters : rad1 radiobutton group rad default 'X' user-command radio.
parameters : rad2 radiobutton group rad.
parameters : rad3 radiobutton group rad.
selection-screen end of block b1.
selection-screen begin of block b2 with frame title text-005.
parameter : p_file type ibipparms-path modif id m1.
select-options : p_delno for likp-vbeln no intervals modif id m2.
select-options : p_vbeln for likp-vbeln modif id m3.
selection-screen end of block b2.
at selection-screen output.
loop at screen.
if rad1 eq 'X'.
if screen-group1 = 'M1'.
move 1 to screen-input.
move 0 to screen-invisible.
elseif screen-group1 = 'M2'.
move 0 to screen-input.
move 1 to screen-invisible.
elseif screen-group1 = 'M3'.
move 0 to screen-input.
move 1 to screen-invisible.
endif.
endif.
modify screen.
endloop.Regards
Vinod