Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Function Module

Former Member
0 Kudos
84

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

6 REPLIES 6

Former Member
0 Kudos
63

Hi Sarada,

Just check with FM GET_KEY_FIELDS_OF_TABLE

Hope this will help.

Regards,

Nitin.

0 Kudos
63

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

Former Member
0 Kudos
63

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.

0 Kudos
63

Thanks, but how to compare whether both the sort statement sequence and binary search sequence is same or not??

Thanks in advance!!

0 Kudos
63

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

Former Member
0 Kudos
63

try this

GET_KEY_FIELDS_OF_TABLE