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

Table Maintenance Generator accepting blank values

Former Member
0 Likes
3,797

Hello Experts,

I have z table with a composite key of BUKRS(Company Code), SAKNR (GL Account no), & one more custom field. i had created a table maintenance generator for it. while testing we found out that the maintenance was allowing blank values to be accepted.

Is there any sort of validation be applied which may check the key fields whether they are null or not.

Kindly reply fast.

Thanks & Regards

Priyesh Shah

1 ACCEPTED SOLUTION
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,840

In table maintenance we can change the screen property to obligatory through the screen field attributes. I don't recommend this because once the maintenance is regenerated then this changes will vanish( overwritten) and you have to set it again.

You have to use table maintenance events to validate this. Please search in SCN for table maintenance events. Its not "null" vaues its termed as "initial" values. This check box gets marked by default for the key fields when you create it via se11.

Hello Experts,

I have z table with a composite key of BUKRS(Company Code), SAKNR (GL Account no), & one more custom field. i had created a table maintenance generator for it. while testing we found out that the maintenance was allowing blank values to be accepted.

Is there any sort of validation be applied which may check the key fields whether they are null or not.

Kindly reply fast.

Thanks & Regards

Priyesh Shah

4 REPLIES 4
Read only

former_member16553
Active Participant
0 Likes
1,840

Hi

    Use TMG event for validation , find out the suitable event as per your requirement na dwrite code inside that like.

if feild is initial.

message: 'please enter data' type 'e'.

endif.

Read only

0 Likes
1,840

Thanks Gridhari,

I tried to create an event for validation before saving for field 1 i.e company code, but while creating the same event for 2nd field the system was giving an error.

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,841

In table maintenance we can change the screen property to obligatory through the screen field attributes. I don't recommend this because once the maintenance is regenerated then this changes will vanish( overwritten) and you have to set it again.

You have to use table maintenance events to validate this. Please search in SCN for table maintenance events. Its not "null" vaues its termed as "initial" values. This check box gets marked by default for the key fields when you create it via se11.

Read only

sridhar_meesala
Active Contributor
0 Likes
1,840

Hi,

You can use the event 05 (On Save) to check if the value is blank and raise the error accordingly.

IF database_table-field IS INITIAL.

   MESSAGE 'Fill the required fields' TYPE 'E'.

ENDIF.

Thank you,

Sri.