‎2009 Nov 12 9:55 AM
Hi ABAPpers,
I have created a field in a Z-table as Y_LINENUMBER with dataelement and domain name as Z_LINENUMBER and data type NUMC.
I have defined the fixed value in tha value range of domain as 0001 and 0002.
Now during creating the table entries, it should take only these 2 values but it accepting the initials(blank) and when i see the table entries, it has value 0.
I dont want this 0 value for this field.
I only have to restrict the table entries to 0001 and 0002 which should be mandatory.
How to validate it, please reply soon.
Regards,
Rahul
‎2009 Nov 12 10:03 AM
Hi Rahul,
You better created a check table with the list of valid values in it. & assign this table in your main table using foreign key concept.
Kindly revert if you need anymore information.
Regards
Abhii..
‎2009 Nov 12 10:05 AM
Hi Abhii,
Even with check table , the system would accept blank values since the field is not mandatory
‎2009 Nov 12 10:12 AM
Hi Harini,
I have just tested. It doesnt take any blank entries. It will take only values which are maintained there in the check table.
Regards
Abhii..
‎2009 Nov 12 10:51 AM
Hi Abhii,
Why cant you make a table field manadatory?? obviously you can make it a key field by checking the key check box next to field.
‎2009 Nov 12 1:11 PM
Hi,
I have already made this field as key field.
Regards,
Rahul
‎2009 Nov 12 1:18 PM
Hi Rahul,
Do one thing create table maintainence for your table. & write the validations as per your requirement.
If you dont have any idea on how to do this search on SDN on How to create a Table maintainence & how to code in events.
Please set to resolved if it helps you.
Regards
Abhii...
‎2009 Nov 12 10:03 AM
Hi,
Make this field manadatory. If the user saves with a blank entry then they system would not save this recored and would give a error message
‎2009 Nov 12 10:08 AM
Hi Harini,
I dont think there is such option to make a table field mandatory.
Please follow foreign key concept, I had suggested.
Regards
Abhii...
‎2009 Nov 12 10:12 AM
Hi,
Maintain the table field as key & Initial as uncheck then it would not allow any initial value in the t able.
Thanks,
Nelson
‎2009 Nov 12 10:18 AM
Surprising for me,
Hope you are using it in a screen
use fm GET_DOMAIN_VALUES or DD_DOMVALUES_GET for validation
‎2009 Nov 12 10:27 AM
‎2010 Dec 30 4:33 AM