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

Display paramters based on select-option click

Former Member
0 Likes
704

Hi ABAP Experts,

I have a question regarding displaying parameter based on select-option.

Suppose, we have 2 select-option on selection screen and 2 parameters. Then, Can we make any parameter invisible based on click on low or high of any select-option ?

If yes, please let me know the possible solution.

Thanks in advance,

Akash

Hi ABAP Experts,

I have a question regarding displaying parameter based on select-option.

Suppose, we have 2 select-option on selection screen and 2 parameters. Then, Can we make any parameter invisible based on click on low or high of any select-option ?

If yes, please let me know the possible solution.

Thanks in advance,

Akash

6 REPLIES 6
Read only

Former Member
0 Likes
684

Hii!

We can do this

Check out this sample code


REPORT z_sdn.
TABLES:
  scarr.

SELECT-OPTIONS:
  s_carrid FOR scarr-carrid .
PARAMETERS:
  p_carrid TYPE scarr-carrid MODIF ID car.


AT SELECTION-SCREEN OUTPUT.
  IF s_carrid IS NOT INITIAL.
    LOOP AT SCREEN.
      IF screen-group1 EQ 'CAR'.
        screen-input = 0.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ELSEIF s_carrid IS INITIAL.
    LOOP AT SCREEN.
      IF screen-group1 EQ 'CAR'.
        screen-input = 1.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ENDIF.

Regards

Abhijeet

Read only

Former Member
0 Likes
684

hi check this....

enter a value in the s_date low....

parameters:p_test .

select-options:s_date for sy-datum.

at selection-screen output.

loop at screen.

if not s_date is initial.

if screen-name = 'P_TEST'.

screen-active = 0.

modify screen.

endif.

if screen-name = '%_P_TEST_%_APP_%-TEXT'.

screen-active = 0.

modify screen.

endif.

endif.

endloop.

Read only

Former Member
0 Likes
684

HII Akash,

use below code.

SELECTION-SCREEN BEGIN OF LINE.
parameters:p_test .
SELECTION-SCREEN END OF LINE.


SELECTION-SCREEN BEGIN OF LINE.
select-options:s_date for sy-datum.
SELECTION-SCREEN END OF LINE.
AT SELECTION-SCREEN OUTPUT .

  IF s_date IS NOT INITIAL .
    LOOP AT SCREEN.
      IF screen-name CS 'P_TEST'.
        screen-invisible = 1.
        MODIFY SCREEN.
      ENDIF.                           
    ENDLOOP.                           

  ELSE.
   LOOP AT SCREEN.
      IF screen-name CS 'p_test'.
        screen-invisible = 0.
        MODIFY SCREEN.
      ENDIF.                           
    ENDLOOP.                           
  ENDIF.

regards

twinkal

Read only

Former Member
0 Likes
684

Hi Akash,

I dont hink so we can do it under 'AT SELECTION-SCREEN OUTPUT'.

Coz, what you are asking like, when cursor focus enter into low or high, some parameters should get invisible. This cursor focus functionality can be handled by Windows, I dont think so this can be posible.

You can very well achieve this by using radio buttons or Check boxes.

regards,

Sujatha

Read only

0 Likes
684

Hi Sujatha,

You got it correctly. We need to make any parameter invisible based on click on either low or high of select-option.

Also, it does not have any thing to do with select-option value. That is, its not necessary that select-option should contain any value.

Thanks,

Akash

Edited by: Akash Sawant on Jul 24, 2008 1:12 PM

Read only

0 Likes
684

Hi Akash,

I dont think so it is possible as per my knowledge,coz as I already said, focus gaining & loosing can be handled by Windows but not with SAP.

You can change the requirement that can be handled with Radio button or check boxes...

Regards,

Sujatha