‎2007 Jun 27 10:09 AM
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.
‎2007 Jun 27 2:30 PM
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