Skip to Content
author's profile photo Former Member
Former Member

Prefill "Restrict value range" ?

Hello. My first posting, but after searching, I can't find any threads discussing this subject.


My code is like this:

select-options: %%hyperi for ska1-saknr,

%%saknr for ska1-saknr.

When the users press F4 on these fields, they get the same search-help. I want to prefill this search-help so that correct "sub-sheet" is selected, and values are correct.

Is this possible?

I've tried to use

at selection-screen on value-request for %%hyperi-low

and so on..

after filling an internal table, but the funcionality isn't good enough I feel.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 25, 2004 at 01:54 PM

    Hi Helge,

    It is not very clear whether you just want the user to get a different "tab" of the search help for each of these fields, or whether you (also) want to fill your own values into the search-help. I shall try to explain to you both these cases.

    Case 1 : You just want to display a different tab for the user for each of these fields, when he presses F4.

    The search help SAKO, which is being used in this case, has around 8 different tabs from which the user can select a value. This search-help is therefore called a "Collective search-help", becauses you are providing the suer with several ways of obtaining the input help through a single search-help.

    Now, let us assume that you want the user to be able to select from "G/L account number in company code" for the first field. That is to say, when he presses F4 for the first field, he should be able to see only that tab of the actual search-help.

    In your program, you will ahve to code something like this:


    call function 'F4IF_FIELD_VALUE_REQUEST'


    tabname = 'SKA1'

    fieldname = 'SAKNR'



    return_tab = ITAB_RETVAL.





    Here ITAB_RETVAL is the return table which contains the entry the user has selected. It is of the type DDSHRETVAL.

    2. If you want to use your own values in the F4 help of the user, it is generally recommended to use the search-help exit. However, you can always programmatically control that,too. The function Module F4IF_INT_TABLE_VALUE_REQUEST can be used for the same. Please go through the documentation for this Function Module - SAP has explained it better than I ever can :-).

    In general, you should always try to search for the Function Modules beginning with F4IF* for any information on programming the input-help.

    Hope this information has been useful.


    Anand Mandalika.

    P.S: In case you did not get how I obtained the search-help GL_ACCT_CA_NO for use in the above example, just go to SE11, and display the search-help SAKO. you will find a tab called "Included search helps". Just dig a little deeper into it and at the end of it, you will understand how several elementary search-helps make up the different tabs of the collective search help.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 25, 2004 at 01:04 PM

    Hi Helge,

    Search help SAKO is used for diplaying the values. I think the best way to go forward is using the search help exit. In the standard system exit GL_ACCT_F4_EXIT_SET_GET is used which you can just copy to have your own logic.



    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 13, 2004 at 08:11 AM

    Your answers were quick and correct. I got what I needed.

    Thank you!

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.