2006 Mar 28 3:30 PM
Hi,
I have a character field in a table and need to make it mandatory ( i cant make it a key field). The flag 'initial' only ensures that the field will be populated by the default initial value of the data type. I need to ensure that it have some value. How can i do this?
Regards,
Hari.
Hi,
I have a character field in a table and need to make it mandatory ( i cant make it a key field). The flag 'initial' only ensures that the field will be populated by the default initial value of the data type. I need to ensure that it have some value. How can i do this?
Regards,
Hari.
2006 Mar 28 3:40 PM
Hi Hari,
How are you maintaing this table. How are you inserting data into this table? Is there a custom program or are you using SM30 table maintenance?
ashish
2006 Mar 28 3:40 PM
Hi Harikrishnan,
you can do it programatically using table maintenance generator. Just open the table, goto Utilities -> Table Maintenance Generator. Specify a function group, package, screen number and click on the source code. Here you can write the code for ensuring that this field is populated with a value other than the initial value for the data type.
Please reward some points if it helps.
Regards,
Amit M. Mishra
2006 Mar 28 3:42 PM
Hi Amit,
Unfortunately we are using a Z program to do a direct data base update to populate this table. Is there anything at the data definition level where i can control this?
Regards,
Hari.
2006 Mar 28 3:46 PM
In that case you can add validation in this Z program which will check field values and will update if it contains data. Else it will populate error log and this can be displayed in output.
2006 Mar 28 3:50 PM
Thanks again, that is an option, but i wanted a control at the data base level as i want to restrict any future Z programs that may update this table.
2006 Mar 28 4:32 PM
Hi Hari,
Goto DD03L table , there is one field MANDATORY which indicates that a field is mandatory in that table.
i had checked one entry which is mandatory and from the F1 help of that field i came to know that making a field mandatory is obsolete. I am into 4.7
just and R&D , i am not sure
2006 Mar 28 5:25 PM
2006 Mar 28 7:45 PM
At the domain level, you can assign individual values, or ranges of values. Select the value tab of the domain and you will see what I mean.
If you choose to do this, you'll probably want to create a new domain to associate with the data element that is assigned to the field of the database table. You want to make sure that any values you assign to the domain will cover the entire range of possible values you want the field to contain.
Bruce
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |