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

define sort order in searchhelp...

Former Member
0 Likes
3,078

I have remade the premk searchhelp and I was wondering If I could influence the sort order of the fields displayed.

it sorts by default on the first field in the output list but I also want to sort it on a second column.

I can't find in the selopt tables in function HRMC_PREM_EXIT where the sort order is defined or whether it's sap standard to only sort on the first field ? can I influence the sort order in the view perhaps ?

kind regards

arthur de smidt

Edited by: A. de Smidt on Jul 28, 2008 10:44 AM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,924

Hello De Smidt,

Goto PREMK search help,

Goto the search help exit in it, HRMC_PREM_EXIT_A

it has a FM, HRMC_PREM_EXIT

which has another FM, HR_CHECK_AUTHORITY_SEARCH_HELP

which has the FM, F4UT_PARAMETER_VALUE_GET

By calling this FM in a search help exit, you can find out the current contents of a search help parameter. Here, the select-options table is sorted.

Regards

Indu.

I have remade the premk searchhelp and I was wondering If I could influence the sort order of the fields displayed.

it sorts by default on the first field in the output list but I also want to sort it on a second column.

I can't find in the selopt tables in function HRMC_PREM_EXIT where the sort order is defined or whether it's sap standard to only sort on the first field ? can I influence the sort order in the view perhaps ?

kind regards

arthur de smidt

Edited by: A. de Smidt on Jul 28, 2008 10:44 AM

5 REPLIES 5
Read only

Former Member
0 Likes
1,924

Hi,

Always you can go for something called search help exit:

http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee52446011d189700000e8322d00/frameset.htm

/wg

Read only

Former Member
0 Likes
1,925

Hello De Smidt,

Goto PREMK search help,

Goto the search help exit in it, HRMC_PREM_EXIT_A

it has a FM, HRMC_PREM_EXIT

which has another FM, HR_CHECK_AUTHORITY_SEARCH_HELP

which has the FM, F4UT_PARAMETER_VALUE_GET

By calling this FM in a search help exit, you can find out the current contents of a search help parameter. Here, the select-options table is sorted.

Regards

Indu.

Read only

0 Likes
1,924

thanks for the input, the reactions had lead me to

and the function F4UT_PARAMETER_SORT

only it allows only 1 sort field ?? if I put the function twice in the user exit only the last 1 is actualy defining the sort order ?? how can I define the sort for more fields ??

kind regards

arthur de smidt

Read only

0 Likes
1,924

Hello Arthur De Smidt,

In the PARAMETER_SORT variable, take the field names

Eg.:

If you want a table to be sorted by carrid and connid,

data:

w_sort(20) type c value 'CARRID CONNID'.

Now pass w_sort to the parameter PARAMETER_SORT in the FM.

Dont call the FM twice. Use a character work variable which has the field names separated by space and pass that work variable to the FM.

Hope it helps you.

Get back for further help.

Regards

Indu.

Read only

0 Likes
1,924

In case others are having issues with this ...

I had to change the sort condition to use a comma and no spaces to get this to work e.g. 

data:   w_sort(20) type c value 'CARRID,CONNID'.