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

Putting restriction on Table fields while saving

Former Member
0 Likes
360

Hi..

I have a table z_tab1 with 4 fields as:

Field1 Field2 Field3 Field4.

I want to put the restriction as

(1)No space value is allowed in table .Either user has to enter a value or ' * '.

(2)If a user enter a ' * ' in Field2 then he can only enter ' * ' in Feild3 and Field4.

(3)if a user enter a ' * ' in Field3 then he can only enter a ' * ' in Field4.

Do anybody knows how to create such table with all these restriction.

All the helps are welcome !..

Regards,

Nazir.

1 REPLY 1
Read only

Former Member
0 Likes
307

Hi,

To make all the fields mandatory :

You can restrict the fields in table maintainence generator->Modification -> Maintainence Screen, select any of the screen under element list tab in that special attribute make all the field as required in input column. For field to accept ' * ' check the *entry column.

To validate the fields:

You have to create a validation module under the PAI block as below

Module validation

if table_name-field1 eq '*'.

if table_name-field2 eq '*'.

if table_name-field3 eq '*'.

if table_name-field4 ne '*'.

message "enter valid value".

endif.

else.

message "enter valid value".

endif.

else.

message "enter valid value".

endif.

else.

message "enter valid value".

endif.

end module

Reward points if it is useful.

thanks,

Muthu