07-18-2016 8:09 AM
Dear All,
In my selection screen, by default a field is made disable. I want to make this field enable if user chooses a specific condition from a drop down list. Please suggest how to do that.
Thanks.
With regards.
07-18-2016 8:16 AM
Just manage it in the PBO (AT SELECTION-SCREEN OUTPUT) trigger this event by assigning some dummy function code to the drop-down list.
Regards,
Raymond
07-18-2016 9:18 AM
Dear Raymond,
Thanks a lot. I am using this event to make my fields enable or disable. This event not captures the selected condition.
For example,
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF p1 = 'X'.
IF r1 = 'X'.
IF screen-group1 = 'M1'.
screen-input = 0.
ENDIF.
IF screen-group1 = 'M2'."
screen-input = 0.
ENDIF.
...............................
............................
ENDLOOP.
I want this group M2 to be enabled after user selects a specific condition from the drop down list.
07-18-2016 9:23 AM
Hello,
It is not working because you are not using MODIFY SCREEN before ENDLOOP.
Bests.
07-18-2016 9:32 AM
I have not posted the whole code here. Actually Modify Screen is there in my coding. I use breakpoint here and saw this event not captures the selected condition value.
07-18-2016 10:25 AM
Dd you miss my
trigger this event by assigning some dummy function code to the drop-down list.
Try a code like
PARAMETERS: p_field1 TYPE text20 AS LISTBOX VISIBLE LENGTH 50 USER-COMMAND dummy, " trigger PAI/PBO cycle
p_field2 TYPE text20 MODIF ID m2.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
CASE screen-group1.
WHEN 'M2'.
IF p_field1 EQ 'SOMEVALUE'. " internal format!
screen-input = '1'.
ELSE.
screen-input = '0'.
ENDIF.
ENDCASE.
MODIFY SCREEN.
ENDLOOP.
Regards,
Raymond
07-18-2016 9:18 AM
Hello,
You can adjust below code according to your requirement.
Regards.
SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME TITLE text-000.
SELECT-OPTIONS : s_default FOR vbak-erdat MODIF ID S2.
PARAMETERS : p_dropdwn type spmon MODIF ID S1.
SELECTION-SCREEN END OF BLOCK a1.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF p_dropdwn = 'X' AND screen-group1 = 'S2'.
screen-active = '0'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
07-18-2016 9:28 AM
Dear Ekrem,
Thanks a lot. AT SELECTION-SCREEN OUTPUT not catches the value of selection screen fields. Though I tried with this logic and failed.
Regards.
07-18-2016 9:31 AM
Hi Mr. anonymous,
use PARAMETER addition USER-COMMAND fcode for the listbox parameter. This triggers PAI and then PBO. In PBO you can use the LOOP AT SCREEN as suggested.
Regards
Clemens
P.S.: Although this is not facebook (albeit looking like) you may use your real name.
07-18-2016 10:48 AM