‎2012 Dec 19 3:44 PM
Hi,
I am new to ABAP and I'm facing an issue with Domain Fixed Value. I created a sample table with two columns, one of which represents the primary key.
I tried to set a domain fixed value for both. I found that the fixed value logic (i.e. not accepting any other value other than the range values) is applicable only to the column which is not the primary key but the primary key column accepts values other than the range values.
Can anyone explain this concept to me? Is the Domain Fixed value applicable only to non-key fields?
Thanks,
Priyanka
‎2012 Dec 19 5:06 PM
That's strange. Fixed domain values should be enforced for the key field as well. Please double check.
‎2012 Dec 19 10:20 PM
Hi Priyanka,
Just did a quick test and had no issues in creating such table structure... Which error message you're receiveing?
Edgar
‎2012 Dec 19 11:27 PM
HI Priyanka,
just now i have created a custom table ZSTUDEN with 2 fields.. in this SID is primary key field with dataelement-ZSID1, and its domain-ZSTDID
another non key field SNAME with dataelement - ZSNAME_1 ,Domain - ZSNAMEE
Created domain ZSTDID with fixed value ranges. and repeated it for another field also.
Now i have created table maintanence generator to create entries and able to create entries in it successfully without any problems.
Please refer to screen shots attached and reply me for any info...
thanks,
venkata Vamsi krishna ch
‎2012 Dec 26 11:50 AM
Thank you for your reply and sorry that I put the question wrongly...
Actually the problem is that when I am using char datatype it is working perfectly but when I am using int2 it is not working.
The field is accepting all values while it should accept only those values declared in the domain fixed value.
For eg., in the given attachment the field is accepting the value 6 while it should accept {1,2,3} and must throw an error if the value is other than {1,2,3}.
‎2012 Dec 28 8:44 PM
That is standard behavior of dialog maintenance, check online help for "Fixed Values" of "domains".
It is only possible to define fixed values for domains of data types CHAR, NUMC, DEC, INT1, INT2 and INT4. There is only an input check of the template for data types CHAR and NUMC.
Regards,
Raymond
‎2013 Jan 07 2:15 PM
Guess Raymond is correct. The way you could try to achieve same result is to define your domain as NUMC instead of INT (once you would have fixed values defined it will avoid to accept undesired input values such as 01, 02 and so on, with leading zeros). Please try and let us know.
Edgar
‎2013 Jan 07 6:34 PM
hi ,
Raymond has given correct explanation.
Please go through this link for full information: http://help.sap.com/saphelp_nw04s/helpdata/en/e2/66708f730811d2959500a0c929b3c3/frameset.htm
Thanks,
Venkata vamsi krishna ch
‎2013 Feb 02 5:31 PM
Hello,
Domain Fixed values work for any field regardless of it bieng a primary key or not.
Make sure you are following proper procedure and entering your fixed values in Fixed values field not Range field.
1 value per Fixed value row.
If filling values in range field and it would accept all values that would comply with the range.
Thank You.