Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Listbox item selection event should hide another Parameter - Problem

Former Member
0 Likes
2,360

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,802

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

12 REPLIES 12
Read only

Former Member
0 Likes
1,803

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

Read only

0 Likes
1,802

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.

Read only

0 Likes
1,802

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.

Read only

0 Likes
1,802

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.

Read only

0 Likes
1,802

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

Read only

0 Likes
1,802

Hi Rajvansh Ravi,

I have already tried it but it didnt work in my report.

Please give more suggestions.

Thanks.

Read only

0 Likes
1,802

Hi Ashok,

Pls provide your code

Regards

Read only

0 Likes
1,802

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.

Read only

0 Likes
1,802

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

Read only

0 Likes
1,802

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.

Read only

0 Likes
1,802

Thanks Ravi,

Your code worked.

Thanks again for the timely help.

Read only

0 Likes
1,802

Now i understand i should put screen items in a group and make SCREEN-ACTIVE = 0 instead of SCREEN-INSIVIBLE =1.

Thanks everyone.