‎2006 Jul 19 1:47 PM
hi
two questions
I am trying to make a parameter field have a default value with un-editable mode...
So I did it this way
&----
*& Report Z_506757_TEST3 *
*& *
&----
*& *
*& *
&----
REPORT Z_506757_TEST3 .
TYPES: STR(20).
TABLES: VBRP.
SELECTION-SCREEN BEGIN OF BLOCK B1.
PARAMETERS: FNAME TYPE STR,
LNAME TYPE STR,
FINAL TYPE STR DEFAULT '200'.
SELECTION-SCREEN END OF BLOCK B1.
*
*INITIALIZATION.
*
final = '200'.
APPEND final.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-NAME = 'FINAL'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
PERFORM MERGE.
ENDLOOP.
&----
*& Form merge
&----
text
----
FORM MERGE.
CONCATENATE FNAME LNAME INTO FINAL.
ENDFORM. "merge
I dont get the default value as 200.. if the screen-input = 0... so how should handle this problem
Another problem is if i fill the FNAME AND LNAME fields, WITHOUT PRESSING THE EXECUTE BUTTON i should get the value filled in the FINAL field
Can this be handled in the At-SELECTIOn Screen output
Is this possible
‎2006 Jul 19 1:54 PM
Firstly remove the PERFORM merge statement from the loop and the default value will appear on the screen.
If you need the value of fname and lname in final this can be handled in the AT-SELECTION-SCREEN event but the use needs to perform some action on the sel screen( press enter) to trigger this event.
This cannot be handled in AT SELECTION SCREEN OUTPUT as this event is executed only once before the screen is displayed and at this point there are no values in the fields fname and lname.
-Kiran
‎2006 Jul 19 1:58 PM
Hello,
Do this for ur first quetion,
INITIALIZATION.
PARAMETERS: P_SPART LIKE KNVV-SPART DEFAULT '47' .
LOOP AT SCREEN.
IF SCREEN-NAME = 'P_SPART'.
SCREEN-INPUT = '0'.
SCREEN-OUTPUT = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
If useful reward points.
Vasanth
‎2006 Jul 19 2:06 PM
hi
Now its working fine.. well wanted to know what SCREEN-OUTPUT = '1' this one does.
Kiran according to u if remove the perform merge it works but i get the field in editable mode..
I worked on this using selct-options making the higher value field invisible
Message was edited by: Rahul Kavuri
‎2006 Jul 19 2:14 PM
I tried this code in my system and it works as expected. The field FINAL is not input enabled and is defauled to 200.
REPORT zkartest.
TYPES: str(20).
PARAMETERS: fname TYPE str,
lname TYPE str,
final TYPE str DEFAULT '200'.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-name = 'FINAL'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
‎2006 Jul 19 2:22 PM
Hi,
In the code:
LOOP AT SCREEN.
IF screen-name = 'FINAL'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
making it screen-input = 0 will make it as display only.
Regards!