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: 

Define Max hits in F4 help:

Former Member
0 Kudos

Hi All,

I am using fuction F4IF_INT_TABLE_VALUE_REQUEST for F4 help. In my case internal table having more than 5000 records. I want to give optiosn on screen to choose the used for maximum hits. Please let me know what are the parameter i have to pass in function to provide the require option.

I am using below piece of code.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = ' ZKEY'

DYNPROFIELD = 'ZKEY'

DYNPPROG = SY-CPROG

DYNPNR = SY-DYNNR

VALUE_ORG = 'S'

TABLES

VALUE_TAB = HELP_ITEM11.

Regards,

Piyush Mathur

6 REPLIES 6

Former Member
0 Kudos

Hi Piyush

Why don't you delete the entries int the internal table HELP_ITEM11 based on the value given on selection screen.

Regards

Ranganath

0 Kudos

Hi Ranganath,

Actually in this case there is no selection condition on selection screen, so i am populatinf the entire table. Now if table contains more than 1000 records, so it will be difficult to user to scroll for the require result.So i want to give an option to user to define the maximum hits in F4 help.

Even if there is selection condition on selection screen , ther can be no of records.

Piyush

Former Member
0 Kudos

Dispay the source code of this function module in Se37.. you will notice that the following is commented out..

CALLCONTROL-MAXRECORDS = 500.

if u want to pass only 200 records to the internal table instead of all records.

deleting lines in your program is probably the only option..

ie

data w_lines type i.

w_lines = lines( itab ).

delete itab from 201 to w_lines.

Former Member
0 Kudos

How are you getting data into HELP_ITEM11?

If it is using a select statement, get it using SELECT...UPTO N ROWS.

Where N will be your max hits.

0 Kudos

Hi Rao,

It can be case that i had more than 1000 records for the pass selection conditions.In that case might be user want to define the max hits. In some standard search help, whenever you press f4 help, it will show the relevant records. and alos give the options to define the max hits with some selection condition.

I require the same functionality in my search help.

Piyush

Former Member
0 Kudos

You may have to create your own screen with Max hit as input.

Add the logic of selection of data in PAI of this screen. Display the selected records using LEAVE TO LIST PROCESSING.

All this will involve time.

Check details of creation of search helps as well. Hope search helps will help. They should have the default functionality of Max hits.