2008 May 28 10:48 AM
Hi all,
I have got a requirement where there is a selection screen which has a check box.
when the check box is clicked then one more must appear in the same screen
for eq
my selection screen has following fields.
Company code
plant
customer
and a check box named detailed.
when we click detailed then we should have a selection screen with following fields
Company code
plant
customer
and a check box(checked) named detailed
equipment
description.
any help is highly appreciated.
thanks in advance.
regards
lakshmi Prasanna gandham
Hi all,
I have got a requirement where there is a selection screen which has a check box.
when the check box is clicked then one more must appear in the same screen
for eq
my selection screen has following fields.
Company code
plant
customer
and a check box named detailed.
when we click detailed then we should have a selection screen with following fields
Company code
plant
customer
and a check box(checked) named detailed
equipment
description.
any help is highly appreciated.
thanks in advance.
regards
lakshmi Prasanna gandham
2008 May 28 10:51 AM
Hi Prasanna
All you have to do is use SCREEN table ( screen-input = 1) .
Before that use modif id while defining checkbox.
finally use modify screen.
to avoid pressing enter add user command abc at the end of checkbox definition
Rewards if found useful.
Cheers
Vamshi
Edited by: vamshi dhar on May 28, 2008 11:56 AM
2008 May 28 10:53 AM
hi.
PARAMETERS : p_chck as checkbox USER-COMMAND check .
PARAMETERS : p_kunnr like kna1-kunnr modif id abc,
p_vbeln like vbak-vbeln modif id abc.
AT SELECTION-SCREEN OUTPUT.
loop at screen.
if p_chck = 'X'.
IF screen-group1 = 'ABC'.
screen-active = 1.
MODIFY SCREEN.
endif.
else.
IF screen-group1 = 'ABC'.
screen-active = 0.
MODIFY SCREEN.
endif.
endif.
endloop.
reward if helpful
mahesh
2008 May 28 10:54 AM
Hi,
We cannot directly acheive this requirement, but we can through some other way like after checking the check box user must press enter key then only we meet the requirement.
Check the below code....
AT SELECTION-SCREEN OUTPUT.
IF Check box = 'X'.
LOOP AT SCREEN.
IF screen-name = 'P_EQUNR'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSE.
LOOP AT SCREEN.
IF screen-name = 'P_EQUNR'.
screen-active = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP
ENDIF.
Rgds,
Bujji
2008 May 28 10:54 AM
hi!
1. Create a MODIF ID for all the fields you are displaying in Selection-screen
2. use AT SELECTION-SCREEN OUTPUT
3. raise a condition
if chek_box = 'X'.
loop at screen.
if screen-name = 'MODIF_ID of palnt'
screen-active = 0.
endif.
modify screen.
endloop.
endif.
4. MODIF ID accepts 3 char 1y.
5. screen-active accepts 0 & 1 for enable & disable options.
6. raise the screen-name check for all the fields in screen.
if check_box is checked make the equipment & other field enable else disable it.
NOTE: if any mandatory field screen wnt accept this logic if so assign some default values for the mandatory fields.
Reward if its useful.
Regards,
Nagulan
2008 May 28 10:58 AM
Hi ,
You have to do this in the event At Selection Screen Output
At Selection Screen Output
if checkbox1 EQ 'X'.
loop at screen .
when screen-name = 'CHECKBOX 2'.
screen-visible = '1'.
endloop.
Above is the logic which u can use for displaying the checkbox . Above code is not syntactically correct , just a logic but will give u a idea how to go .
2008 May 28 11:03 AM
Hi lakshmi.
Use following code.
PARAMETERS: a AS CHECKBOX,
b AS CHECKBOX DEFAULT 'X'.
INITIALIZATION.
LOOP AT SCREEN.
IF screen-group1 = 'SC1' and b = u2018Xu2019.
Screen-output = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Regards.
Jay
2008 May 28 11:09 AM
Hi ,
Pl. check the below code....
SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME TITLE text-100.
PARAMETERS: r_appl RADIOBUTTON GROUP rad1
USER-COMMAND ucom,
r_pres RADIOBUTTON GROUP rad1 DEFAULT 'X'.
PARAMETERS: p_ofile TYPE rlgrap-filename
DEFAULT '/data/tea/extdom/'
MODIF ID g1 NO-DISPLAY,
p_opfile TYPE rlgrap-filename
DEFAULT text-998
MODIF ID g2.
SELECTION-SCREEN END OF BLOCK a.
AT SELECTION-SCREEN OUTPUT.
PERFORM disable_path.
form disable_path .
w_count = w_count + 1.
LOOP AT SCREEN.
IF ( w_count GE 1 ) AND ( screen-group1 = 'G1' ).
IF r_appl <> 'X'.
screen-input = 0.
ENDIF.
ELSEIF ( w_count GE 1 ) AND ( screen-group1 = 'G2' ).
IF r_pres <> 'X'.
screen-input = 0.
ENDIF.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
endform.
Regards,
Biswanath
2008 May 28 11:35 AM
Hi,
Just try the below code :
selection-screen : begin of block b1 with frame.
parameter : company(10) type c,
plant type werks,
customer type kunnr.
parameter : detail as checkbox user-command check.
parameter : equi(10) type c modif id S1,
des type maktx modif id S1.
selection-screen : end of block b1.
at selection-screen output.
loop at screen.
if detail = 'X'.
if screen-group1 = 'S1'.
screen-active = 0.
modify screen.
endif.
else.
if screen-group1 = 'S1'.
screen-active = 1.
modify screen.
endif.
endif.
endloop.NOTE :
Change the data type for the fields as per your requirement and assign the selection text for the fields.
Regards,
Raghu
2008 May 28 11:39 AM
Hi,
PARAMETERS : p_chk AS CHECKBOX USER-COMMAND radio.
PARAMETERS : p_disp RADIOBUTTON GROUP radi
MODIF ID mod,
p_chng RADIOBUTTON GROUP radi MODIF ID mod,
p_er_log RADIOBUTTON GROUP radi MODIF ID mod.
AT SELECTION-SCREEN OUTPUT.
**Disable and enabling the screen fields dynamically
IF p_chk EQ c_x .
LOOP AT SCREEN.
IF screen-group1 EQ 'MOD'.
screen-active = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSE.
LOOP AT SCREEN.
screen-active = 0.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
Pls. reward if useful...
2008 May 28 12:43 PM
Hi,
Try the following code,
assign a user command to the chk box and modification id for the fileds that have to be modified.
PARAMETERS : p_cmcode(10) TYPE c ,
p_plant(5) TYPE c,
p_cust(10) TYPE c,
p_chkbox TYPE c AS CHECKBOX USER- COMMAND select,
p_desc(20) TYPE c MODIF ID mod,
p_equip(5) TYPE c MODIF ID mod.
AT SELECTION-SCREEN OUTPUT.
IF p_chkbox NE 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'MOD'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSEIF p_chkbox EQ 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'MOD'.
screen-active = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
Regards,
Hema.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |