2009 Feb 03 5:32 AM
Hi,
Is there any function module which can determine or capture the sequence of the key fields in a read..binary search statement.
Thank you
2009 Feb 03 5:35 AM
Hi Sarada,
Just check with FM GET_KEY_FIELDS_OF_TABLE
Hope this will help.
Regards,
Nitin.
2009 Feb 03 5:39 AM
Hello Nitin,
Did you check this FM ? Does it return the KEY-FIELDS of an internal table on which a READ ... BINARY SEARCH has been performed.
I dont think so.
BR,
Suhas
2009 Feb 03 5:39 AM
It all depends on the sequence of fields on which you have sorted the internal table.
The sorting field sequence and reading the internal table on the key fields should be the same.
2009 Feb 03 5:49 AM
Thanks, but how to compare whether both the sort statement sequence and binary search sequence is same or not??
Thanks in advance!!
2009 Feb 03 5:53 AM
Hello Sarada,
Yours is a novel idea. As suggested by Vijay the SORT sequence & the READ...BINARY SEARCH key sequence should be same.
What exactly do you want to do? In your code you can search for the string "SORT ITAB" and check the SORT seq. and match.
BR,
Suhas
2009 Feb 03 5:41 AM