I got this transaction ZENSY0470M to insert data and this web panel to insert (or update) information into the above transaction
I'm having trouble validating the date when trying to update a record For example If a record has the same key ZENSY0470M_SalOutCd7Plc = 1, ZENSY0470M_BseCd =1 and ZENSY0470M_EvntCd = 1
- I pick the date range (ZENSY0470M_AplyPrdFrm ~ ZENSY0470M_AplyPrdTo) is 1/10 to 5/10
- The next record which has the same key ZENSY0470M_SalOutCd7Plc = 1, ZENSY0470M_BseCd =1 and ZENSY0470M_EvntCd = 1 CANNOT have a date in the 1/10 to 5/10 range (1/10, 2/10, ... 5/10), for ex, 30/0 ~ 2/10 would be wrong) But when I update a record using the web panel, I need to change the date range from 1/10 ~ 5/10 to 2/10 ~ 6/10, it will trigger the validation, how can I avoid this (I still want to validate the date range, but it needs to exclude the record that I'm updating and compare to other records. Thank you!
Maybe you should add in the 'ChkRegister' subroutine the part of the key (ZENSY0470M_TmpltId) that's missing to exclude from the search the record you're updating: