2010 Jan 21 5:00 AM
Hi Experts,
Iam trying to use the Value Check addition for a paramter,but it does not do any validation.
Parameters : p_bukrs type t001-bukrs obligatory value check.
It allows me to enter any wrong values
Is there any thing that i need to do in addition to this.
Regards,
Ratna
2010 Jan 21 5:14 AM
VALUE CHECK addition checks the input value against the fixed values defined in the domain of the data type. And if, If the data type is a component of a foreign key table, a check against the check table is done. See if either of these exists.
VALUE CHECK addition checks the input value against the fixed values defined in the domain of the data type. And if, If the data type is a component of a foreign key table, a check against the check table is done. See if either of these exists.
2010 Jan 21 5:10 AM
Hi Ratna.
You can also write a logic for the validation.
use select query and show error if bukrs does not exist.
eg.
tables: t001.
select single bukrs
from t001
into t001-bukrs.
if sy-subrc <> 0. "no data exists
message: 'Company Code does not exist' type 'E'.
endif.
2010 Jan 21 5:14 AM
hi, try this
AT SELECTION-SCREEN.
IF <your condition not satisfied>.
MESSAGE E000(ZMSG_MUSTER) .
ENDIF.Sumit
2010 Jan 21 5:14 AM
VALUE CHECK addition checks the input value against the fixed values defined in the domain of the data type. And if, If the data type is a component of a foreign key table, a check against the check table is done. See if either of these exists.
2010 Jan 21 5:22 AM
Thanks for your Replies
But,
1) I dont write an additionall select,because the use of Valucheck is to avoid it.
2) This has already the Value table.
Regards,
Ratna
2010 Jan 21 5:25 AM
Hi
Use T001D Instead of T001
Parameters bukrs type t001d-bukrs obligatory value check
"Since t001 bukrs doesnot have foreign key established it will not do value check
"in case of T001d-bukrs foreign key is with table T001-BUKRS so it works for youRatna wrote
This has already the Value table.
Please note Having a Value table doesnt mean that there is a Foreign key provided it only proposesCheerz
Ram
2010 Jan 21 5:28 AM
Hi Ratna,
You can see that the field BUKRS in table T001 does not have foriegn key relation and neither does it have a value range. Check table of the domain BUKRS is table T001 itself and hence Foriegn Key maintenance is not possible.
So in such a case I think you will have to use FM COMPANY_CODE_READ as mentioned in one of the posts above or use any of the tables that has T001 as check table.
2010 Jan 21 5:19 AM
Hi Ratna,
implement at the event "AT-SELECTION-SCREN" the FM "COMPANY_CODE_READ"
AT-SELECTION-SCREEN.
CALL FUNCTION 'COMPANY_CODE_READ'
EXPORTING
i_bukrs = pa_bukrs.
Regards
Dirk
Edited by: Dirk Altmann on Jan 21, 2010 6:19 AM
2010 Jan 21 5:20 AM
2010 Jan 21 5:25 AM
Hi ,
When you use Value Check addition for a paramter content of the input field is checked against the fixed values defined in the domain of the data type. In case data type is a component of a foreign key table, a check against the check table is executed.
In case of T001-bukrs check table is same table T001.
If you will test same for Parameters :
p_MANDT type t001-MANDT obligatory value check.
Error message will come.
So , you can write your own logic for validation of field value from T001-bukrs.
Hope this helps you.
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |