2008 Jul 24 11:46 AM
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
2008 Jul 24 11:52 AM
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
2008 Jul 24 11:52 AM
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.
2008 Jul 24 12:06 PM
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
2008 Jul 24 12:07 PM
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
2008 Jul 24 12:11 PM
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
2008 Jul 24 12:54 PM
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
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |