Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Validation during Table Entries

Former Member
0 Likes
1,526

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

12 REPLIES 12
Read only

Former Member
0 Likes
1,400

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..

Read only

0 Likes
1,400

Hi Abhii,

Even with check table , the system would accept blank values since the field is not mandatory

Read only

0 Likes
1,400

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..

Read only

0 Likes
1,400

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.

Read only

0 Likes
1,400

Hi,

I have already made this field as key field.

Regards,

Rahul

Read only

0 Likes
1,400

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...

Read only

Former Member
0 Likes
1,400

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

Read only

0 Likes
1,400

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...

Read only

0 Likes
1,400

Hi,

Maintain the table field as key & Initial as uncheck then it would not allow any initial value in the t able.

Thanks,

Nelson

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,400

Surprising for me,

Hope you are using it in a screen

use fm GET_DOMAIN_VALUES or DD_DOMVALUES_GET for validation

Read only

Former Member
0 Likes
1,400

Hi

Create Check table & add it

Read only

Former Member
0 Likes
1,400

Thanks