2012 Apr 09 7:24 AM
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
2012 Apr 09 7:37 AM
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.
2012 Apr 09 7:31 AM
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.
2012 Apr 09 7:40 AM
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.
2012 Apr 09 7:37 AM
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.
2012 Apr 09 7:45 AM
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.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |