Hi,
@Philip/ V S : The table is indeed sorted and also the pre requisites are met.
I have found the solution. This worked for me:
I added an extra entry ( of DOKNR ) in the Sort table of that loop as below:
This creates an entry in smartform as below:
There is no extra code added with respect to DOKNR , as can be seen in screenshot.
And now the smartform gives the desired result.
I tried with debugging in both the cases. And Sort Begin for MATNR now trigerrs correctly.
From this observation, I believe , the columns that should take part in triggering of AT NEW Event should be present in the sort criteria.
Any more explanation regarding this behaviour would be greatly appreciated.
I am glad that this trial and error worked for me.
Regards,
Barkha