‎2007 Nov 02 4:58 AM
Hi Friends
I am doing some Table validations.
My table contains:
<b>A/C Number ValidFrom Text ValidTo Code</b>
The requirement is : No overlapping entries if the month of the new from date is greater than the month of the existing from date are allowed.
I had written some logic to handle this.
But when user enter like
000001 02.11.2007 test1 10.11.2007 ab
000002 11.11.2007 test2 20.11.2007 cd
The above 2 are valid entries because no overlapping here.
Ofcourse my logic working perfectly for this case.
But suppose if the user changes the Todate of 1st entry as follws:
000001 02.11.2007 test1 <b>12.11.2007</b> ab
000002 11.11.2007 test2 20.11.2007 cd
In this case it's has to give a error message because these are overlapping here.
Here my logic is failing.
Can anyone please suggest me the logic to handle this case.
<b>Points are assured for useful answers.</b>
Regards,
Sree
‎2007 Nov 02 5:18 AM
loop at itab into wa_itab1.
v_index = sy-index + 1.
read table itab into wa_itab2 index v_index.
if wa_itab1-validTo > wa_itab2-ValidFrom.
message e000.
endif.
endloop.
here we r reading the consecutive records n checkin dates if its less dan prev date..else giv an error message
Hope dis helps..Reward points if it does
Regards
‎2007 Nov 02 5:18 AM
loop at itab into wa_itab1.
v_index = sy-index + 1.
read table itab into wa_itab2 index v_index.
if wa_itab1-validTo > wa_itab2-ValidFrom.
message e000.
endif.
endloop.
here we r reading the consecutive records n checkin dates if its less dan prev date..else giv an error message
Hope dis helps..Reward points if it does
Regards
‎2007 Nov 02 5:25 AM
Hi Sree,
Check ur int table sy-index.
within DO loop. check if ur 1st line ToDate > 2nd line From date. Then throw msg.
Regards
Srimanta
‎2007 Nov 02 6:35 AM
Hi Friends
Thanks for your responses.
I need diffrent test perceptions how a lemon can enter the data into the above table
by violating the overlapping records constraint.
<b>Points are assured for correct answers.</b>
Regards,
Sree