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

Doubt in parameters

Former Member
0 Likes
1,048

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

11 REPLIES 11
Read only

Former Member
0 Likes
1,025
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.
Read only

Former Member
0 Likes
1,025

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

Read only

Former Member
0 Likes
1,025

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.

Read only

Former Member
0 Likes
1,025

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 .

Read only

former_member784222
Active Participant
0 Likes
1,025

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.

Read only

Former Member
0 Likes
1,025

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.

Read only

Former Member
0 Likes
1,025

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.

Read only

Former Member
0 Likes
1,025

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.

Read only

Former Member
0 Likes
1,025

hI guys the problem is still not resolved

pls help

Read only

0 Likes
1,025
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
Read only

rajasekhar_matukumalli3
Active Participant
0 Likes
1,025

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