‎2006 Jun 14 1:20 PM
Hi,
I want to create a check table for a data type. Here is what I have created so far:
data type: ZDAT (Domain ZDOM)
domain: ZDOM (Value Table)
table: ZTAB (Containing field ZFIE with field type ZDAT)
I try to create a foreign key for the ZFIE but receive the following message:
<i>
Check table of the domain is current table (FK maintenance not possible)</i>
Finally, I have created a report containing a field that points to ZDAT. The value table is working fine, but there is no check on the field.
Anybody who knows how I can get the check working?
Thanks.
Elvez
‎2006 Jun 14 1:23 PM
Elvez,
If u used value table means it proposes a check table when u create a foreign key. But it does not validate the values.
- Selvapandian Arunachalam
‎2006 Jun 14 1:26 PM
For do a check the possible way is to write a
select single query with the key fields passing in where clause.. You can write this code on AT-SECLECTION-SCREEN.
rgds,
TM
‎2006 Jun 14 1:28 PM
Hi Thomas,
is there anyway to do this without programming?
/Elvez
‎2006 Jun 14 1:30 PM
Elvez,
in the parameter, use <u><b>value check</b></u> addition. automatically it will check against the corresponding database table.
- Selvapandian Arunachalam
‎2006 Jun 14 1:35 PM
Hi,
you need to validate explicitly in your program under the event <b>at selection-screen.</b>
using the
select single * from ztab into wa where <condition>.Regards
vijay
‎2006 Jun 14 1:36 PM
Hi Selvapandian Arunachalam,
it is not working for me, could you provide an example?
/Elvez
‎2006 Jun 14 1:39 PM
Hi Vijay,
see answer above - is it possible to do this without further programming?
/Elvez
‎2006 Jun 14 1:52 PM
‎2006 Jun 14 1:55 PM
Hi Elvez,
The 'Value Check' option is for a selection screen parameter.. to quote SAP help " It Ensures that the value entered in the field is checked against the check table or fixed values defined in the ABAP Dictionary. There must be a LIKE reference to an ABAP Dictionary field. "
How have you declared the field ZFIE in your Program?
Regards,
Suresh Datti
‎2006 Jun 14 2:03 PM
Hi Suresh,
that might be it - I have declared ZFIE type ZDAT.
/Elvez
‎2006 Jun 14 5:07 PM
Hi Elvez,
Sorry, I'm left for the day that time.
Syntax:
PARAMETERS: <<i><b>Parameter variable</b></i>> like <<i><b>Database table</b></i>>-<<i><b>field name</b></i>> VALUE CHECK.
Ex:
PARAMETERS: P_MATNR like MARA-MATNR VALUE CHECK.
It will check against the DDID table.
‎2006 Jun 15 7:11 AM
Hi,
this time I am the one apologizing for having left for the day.
The code did not check anything when I entered a non-sense value? How come?
/Elvez
‎2006 Jun 15 7:42 AM
Hi Elvez,
try this
Parameters : p_var <b>type</b> mara-WRKST value check.
this wud provide an automatic check...