03-20-2010 12:31 PM
Hi,
We want to make a Field as default in my Z Report.
For that i use default function for one values, but we have 2 values to insert in that field.
How can we make 2 values as default in field and also make non-changeable mode. means we want that user cann't change the values, inserted in that field.
Plz guide...
03-20-2010 2:38 PM
Why don't you use a program variant for defining a default value (even 2 values for the same field, which is of course defined as a select-options) and protecting the field? You'll find all the solutions in the forum and in the documentation (and please look at SAP examples in SE38 menu Environment, Examples, ABAP examples, then choose Screens and selection screens).
03-20-2010 2:57 PM
Try following Sample Code :
PARAMETERS: p_todate LIKE sy-datum DEFAULT '20001220'.
* At Selection-Screen Output
AT SELECTION-SCREEN OUTPUT.
PERFORM disable_to_date.
FORM disable_to_date.
LOOP AT SCREEN.
IF screen-name = 'P_TODATE'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDFORM.
Hope this helps.
Regards,
Chandravadan
03-20-2010 5:07 PM
Hi,
we have 2 values to insert in that field.
Can you explain? I don't know how to overcome the restriction to have one value in one field at a given time.
Regards,
Clemens
03-20-2010 8:44 PM
If the user cannot change them, make them constants and program that way. It's kinda useless to present parameters or ranges that a user cannot change, isn't it? Why even bother... And obligatory for a value that can't be changed? Why?
If on the other hand, you want them to appear on screen, you will need a select-options (ranges) statement for the value, since a parameter will hold only one value.
10-05-2010 10:46 AM
Define the field as a listbox, and use FM VRM_SET_VALUES or domain values to fill the list.
Regards,
Raymond