Application Development and Automation 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: 
Read only

Function Module

Former Member
0 Kudos
351

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
Read only

Former Member
0 Kudos
330

Hi Sarada,

Just check with FM GET_KEY_FIELDS_OF_TABLE

Hope this will help.

Regards,

Nitin.

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Kudos
330

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

Read only

Former Member
0 Kudos
330

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.

Read only

0 Kudos
330

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

Thanks in advance!!

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Kudos
330

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

Read only

Former Member
0 Kudos
330

try this

GET_KEY_FIELDS_OF_TABLE