‎2008 Jan 30 10:27 AM
HI.
What is the use of Value check in parameter?
To be reward all helpfull answers.
JNJ
‎2008 Jan 30 10:33 AM
Hi ,
VALUE CHECK
Effect
Ensures that the value entered in the field is checkedagainst the check table or fixed values defined in the ABAP Dictionary.There must be a LIKE reference to an ABAP Dictionary field.
Note
If there is a check table, the full foreign key check isgenerated. Consequently, all of the ABAP Dictionary fields involved inthe check must be filled for the check to be meaningful.
The check is also performed if the field is empty. You should thereforeuse the OBLIGATORY addition as well when you use VALUE CHECK.
Example
TABLES SBOOK.
...
PARAMETERS CARRID LIKE SPFLI-CARRID.
PARAMETERS CONNID LIKE SBOOK-CONNID VALUE CHECK.
...
AT SELECTION-SCREEN OUTPUT.
IF CARRID IS INITIAL.
SBOOK-CARRID = 'LH'.
ELSE.
SBOOK-CARRID = CARRID.
ENDIF.
The foreign key check for SBOOK-CONNID uses the currentcontents of SBOOK-CARRID:
SELECT * FROM SPFLI WHERE
CONNID = CONNID
AND CARRID = SBOOK-CARRID.
In the example, the AT SELECTION-SCREEN OUTPUT event makessure that a value is placed in field SBOOK-CARRID.
Regards,
Vind
‎2008 Jan 30 10:33 AM
Hi JNJ,
From the SAP Help:
"This addition can only be specified if the type of parameter is defined through a reference to a data type from the ABAP Dictionary.
If you have a user action on the selection screen, the current content of the input field is checked against the fixed values possibly defined in the domain of the data type. If the data type is a component of a foreign key table, a check against the check table is executed. If the check is not successful, an error message is displayed in the status line of the selection screen. If the program was called through SUBMIT without display of the selection screen, it is displayed in case of error. "
Regards,
John.
‎2008 Jan 30 12:57 PM
Hi,
It will check against foreign key rlation in check table against the values u enter.
and error message if wrong input..
Regards,
Renjith Michael.