2007 Mar 23 9:27 AM
Hi guys ,
i have a report and on the selection screen there are many select options
and one parameters.
I have to display a default value in the parameters when the selection screen
is displayed. Till here it is working fine. but i also want that when that default
value is displayed in the parameters in the selection screen , the value should not
be editable.
i tried using loop at screen . but it is not working
as when i make screen-input = 0 . it makes the feild not editable as required
but the default value disappears
kindly help
points will be awarded
Regards,
Tarang Shah
Hi,
Please verify whether you have the code like this:
PARAMETERS: p_para TYPE I DEFAULT 2.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-name = 'P_PARA'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
This is working fine.
Please check.
Thanks and regards,
S. Chandra Mouli.
2007 Mar 23 9:29 AM
chk this
REPORT YCHATEST1.
PARAMETERS : P_MATNR LIKE MARA-MATNR DEFAULT '1000'.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-NAME EQ 'P_MATNR'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
2007 Mar 23 9:30 AM
Hi,
Write the parameters: P_var like vbak-vbeln default '0010004567'.
Use Loop at screen..endloop. but use the property SCREEN-INVISIBLE = 'X'.
and modify the screen.
regards,
Anji
2007 Mar 23 9:30 AM
Hi tarang ,
Try this
PARAMETERS: P_DATE2 LIKE SY-DATUM DEFAULT SY-DATUM.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-NAME = 'P_DATE2'.
SCREEN-INPUT = '0'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
2007 Mar 23 9:32 AM
HI ,
CHECK this works ok for me .
PARAMETERS: test1(10) TYPE c MODIF ID sc1 default 'qqqqqqqp' ,
test2(10) TYPE c MODIF ID sc2,
test3(10) TYPE c MODIF ID sc1,
test4(10) TYPE c MODIF ID sc2.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-group1 = 'SC1'.
screen-intensified = '1'.
screen-input = 0 .
MODIFY SCREEN.
CONTINUE.
ENDIF.
IF screen-group1 = 'SC2'.
screen-intensified = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Thanks .
2007 Mar 23 9:34 AM
Hi,
Please verify whether you have the code like this:
PARAMETERS: p_para TYPE I DEFAULT 2.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-name = 'P_PARA'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
This is working fine.
Please check.
Thanks and regards,
S. Chandra Mouli.
2007 Mar 23 9:35 AM
Tarang,
PARAMETERS : P_KUNNR LIKE KNA1-KUNNR DEFAULT 'XXXXX'.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-NAME EQ 'P_KUNNR'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Don't forget reward for all useful ans.
2007 Mar 23 9:55 AM
Guys it is not workin the exact code is as uner :
&----
*& Report ZKANBAN_DETAILS *
*& *
&----
*& *
*& *
&----
REPORT ZKANBAN_DETAILS .
TABLES: LFA1,MARA,MARC,EKKO.
SELECT-OPTIONS: VENDOR FOR LFA1-LIFNR,
MATERIAL FOR MARA-MATNR,
PLANT FOR MARC-WERKS,
PUR_ORG FOR EKKO-EKORG.
PARAMETERS: LAST_DAT LIKE SY-DATUM MEMORY ID DATE .
DATA: DAT LIKE SY-DATUM.
AT SELECTION-SCREEN OUTPUT.
GET PARAMETER ID 'DATE' FIELD DAT.
loop at screen.
if screen-name = 'LAST_DAT'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
endloop.
AT SELECTION-SCREEN.
DAT = SY-DATUM.
SET PARAMETER ID 'DATE' FIELD DAT.
&----
*& Report ZKANBAN_DETAILS *
*& *
&----
*& *
*& *
&----
REPORT ZKANBAN_DETAILS .
TABLES: LFA1,MARA,MARC,EKKO.
SELECT-OPTIONS: VENDOR FOR LFA1-LIFNR,
MATERIAL FOR MARA-MATNR,
PLANT FOR MARC-WERKS,
PUR_ORG FOR EKKO-EKORG.
PARAMETERS: LAST_DAT LIKE SY-DATUM MEMORY ID DATE .
DATA: DAT LIKE SY-DATUM.
AT SELECTION-SCREEN OUTPUT.
GET PARAMETER ID 'DATE' FIELD DAT.
loop at screen.
if screen-name = 'LAST_DAT'.
SCREEN-INPUT = 0. " here it makes the feild not editable but the value disappears
MODIFY SCREEN.
ENDIF.
endloop.
AT SELECTION-SCREEN.
DAT = SY-DATUM.
SET PARAMETER ID 'DATE' FIELD DAT.
Regards ,
Tarang Shah.
2007 Mar 23 10:02 AM
Tarang,
First make the field non-editable at 'AT SELECTION-SCREEN' event, and then assign the value at INITIALIZATION event.
here is the code.
parameters : date type sy-datum.
at selection-screen output.
loop at screen.
if screen-name = 'DATE'.
screen-input = '0'.
modify screen.
endif.
endloop.
initialization.
date = sy-datum.
Pls close the thread if u met with right answer.
Regards,
Sujatha.
2007 Mar 23 1:20 PM
2007 Mar 23 1:32 PM
Try this..It will solve ur problem
REPORT ZKANBAN_DETAILS .
TABLES: LFA1,MARA,MARC,EKKO.
SELECT-OPTIONS: VENDOR FOR LFA1-LIFNR,
MATERIAL FOR MARA-MATNR,
PLANT FOR MARC-WERKS,
PUR_ORG FOR EKKO-EKORG.
PARAMETERS: LAST_DAT LIKE SY-DATUM MEMORY ID DATE .
DATA: DAT LIKE SY-DATUM.
INITIALIZATION.
DAT = SY-DATUM.
SET PARAMETER ID 'DATE' FIELD DAT.
AT SELECTION-SCREEN OUTPUT.
GET PARAMETER ID 'DATE' FIELD LAST_DAT.
LOOP AT SCREEN.
IF SCREEN-NAME = 'LAST_DAT'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Reward if useful
2007 Mar 23 1:39 PM
Hi,
The following code works perfectly for me. Just give a try.
PARAMETERS: p_date TYPE datum DEFAULT '20070323'.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-name = 'P_DATE'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Hope this solved ur problem
Enjoy SAP. Reward points if useful.
Rajasekhar
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |