‎2010 Jul 12 12:59 PM
Hello,
As everyone of you may know that we can use a listbox item selection to hide other parameter in a report.
Like for instance, if user selects an item in listbox then we will usually loop at screen and make other radio button fields visible / invisible.
I am able to hide the radio buttons but when i try to set a parameter ( textbox like ) then i can see the parameter ( textbox ) filled with stars ********
Why a radio button is hiding successfully and not a textbox parameter ?
Can someone help me how to hide a textbox parameter?
Thank you.
‎2010 Jul 12 1:03 PM
Hi,
first make tat text field input disable and then invisible ,
SCREEN-INPUT = 0.
SCREEN-INVISIBLE = 1.
MODIFY SCREEN.
this will work , hope this helps you
Edited by: Madhukar Shetty on Jul 12, 2010 2:04 PM
‎2010 Jul 12 1:03 PM
Hi,
first make tat text field input disable and then invisible ,
SCREEN-INPUT = 0.
SCREEN-INVISIBLE = 1.
MODIFY SCREEN.
this will work , hope this helps you
Edited by: Madhukar Shetty on Jul 12, 2010 2:04 PM
‎2010 Jul 12 1:41 PM
Hi Madhukar Shetty ,
Thank you so much for your reply.
Your idea helped me a lot. I would like to hide the corresponding text element along with the Parameter ( textbox ).
Can you please suggest me ?
Thanks in advance.
‎2010 Jul 12 1:49 PM
I would like to hide the corresponding text element along
If its a module pool , then yu can use field screen-name to do this.
‎2010 Jul 13 5:00 AM
Hi Keshav,
If it is a module pool then you are right. But my problem here is with the Report.
Can anyone suggest me a solution for this Text element hiding in reports?
Thanks in advance.
‎2010 Jul 13 5:06 AM
Hi,
Have you tried with MODIF ID ?
PARAMETERS
: p_test TYPE char01,
p_nor TYPE char10
MODIF ID nor.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-group1 = 'NOR'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.Regards
‎2010 Jul 13 6:01 AM
Hi Rajvansh Ravi,
I have already tried it but it didnt work in my report.
Please give more suggestions.
Thanks.
‎2010 Jul 13 6:24 AM
‎2010 Jul 13 6:36 AM
Hi,
Here is my code.
PARAMETERS: P_BENEF AS LISTBOX VISIBLE LENGTH 35 USER-COMMAND abc.
PARAMETERS:
P_RFQ_NO LIKE EKKO-EBELN MODIF ID bl2,
P_COL_NO LIKE EKKO-SUBMI MODIF ID bl3.
INITIALIZATION.
* Populate list box values
name = 'P_BENEF'.
value-key = '1'. value-text = 'Value1'.
APPEND value TO list.
value-key = '2'. value-text = Value2'.
APPEND value TO list.
AT SELECTION-SCREEN OUTPUT.
* Set list box with value
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = name
values = list.
* Control the display of screen components
LOOP AT SCREEN.
IF P_BENEF = 1.
IF screen-name = 'P_RFQ_NO'.
SCREEN-INPUT = 1.
screen-invisible = 0.
ELSEIF screen-name = 'P_COL_NO'.
SCREEN-INPUT = 0.
screen-invisible = 1.
ENDIF.
MODIFY SCREEN.
ELSEIF P_BENEF = 2.
IF screen-name = 'P_RFQ_NO'.
SCREEN-INPUT = 0.
screen-invisible = 1.
ELSEIF screen-name = 'P_COL_NO'.
SCREEN-INPUT = 1.
screen-invisible = 0.
ENDIF.
MODIFY SCREEN.
ELSEIF P_BENEF = space.
* clear: P_RFQ_NO,P_COL_NO.
ENDIF.
ENDLOOP.
‎2010 Jul 13 7:06 AM
Hi,
Instead of SCREEN-NAME you have to use SCREEN-GROUP1 as i have mentioned in my previous post. You have not changed that in you code
Something like this
LOOP AT SCREEN.
IF screen-group1 = 'BL2'.
SCREEN-ACTIVE = 0.
ELSEIF screen-group1 = 'BL3'.
SCREEN-ACTIVE = 0.
ENDIF.
MODIFY SCREEN.
IF screen-group1 = 'BL2'.
SCREEN-ACTIVE = 0.
ELSEIF screen-group1 = 'BL3'.
SCREEN-ACTIVE = 0.
ENDIF.
MODIFY SCREEN.
* clear: P_RFQ_NO,P_COL_NO.
ENDLOOP.Change the code accordingly
Regards
‎2010 Jul 13 7:16 AM
Hi Ashok,
I have made few corrections to your code. Pls check
TYPE-POOLS VRM.
DATA
: name TYPE VRM_ID,
list TYPE VRM_VALUES,
value TYPE VRM_VALUE.
PARAMETERS: P_BENEF AS LISTBOX VISIBLE LENGTH 35 USER-COMMAND abc.
PARAMETERS:
P_RFQ_NO LIKE EKKO-EBELN MODIF ID bl2,
P_COL_NO LIKE EKKO-SUBMI MODIF ID bl3.
INITIALIZATION.
* Populate list box values
name = 'P_BENEF'.
value-key = '1'. value-text = 'Value1'.
APPEND value TO list.
value-key = '2'. value-text = 'Value2'.
APPEND value TO list.
* Set list box with value
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = name
values = list.
AT SELECTION-SCREEN OUTPUT.
* Control the display of screen components
LOOP AT SCREEN.
IF P_BENEF = 1.
IF screen-group1 = 'BL2'.
SCREEN-ACTIVE = 1.
ELSEIF screen-group1 = 'BL3'.
SCREEN-ACTIVE = 0.
ENDIF.
MODIFY SCREEN.
ELSEIF P_BENEF = 2.
IF screen-group1 = 'BL2'.
SCREEN-ACTIVE = 0.
ELSEIF screen-name = 'BL3'.
SCREEN-ACTIVE = 1.
ENDIF.
MODIFY SCREEN.
ELSEIF P_BENEF = space.
* clear: P_RFQ_NO,P_COL_NO.
ENDIF.
ENDLOOP.
‎2010 Jul 13 7:21 AM
Thanks Ravi,
Your code worked.
Thanks again for the timely help.
‎2010 Jul 13 7:23 AM
Now i understand i should put screen items in a group and make SCREEN-ACTIVE = 0 instead of SCREEN-INSIVIBLE =1.
Thanks everyone.