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

Restrict Value Range

bjorn-henrik_zink
Contributor
0 Likes
4,643

Hi,

is it possible to set the values of Restrictions (F4) programmatically. How?

Thanks.

/Elvez

1 ACCEPTED SOLUTION
Read only

suresh_datti
Active Contributor
0 Likes
3,294

YOu can use SELECT_OPTIONS_RESTRICT.

regards,

Suresh Datti

19 REPLIES 19
Read only

suresh_datti
Active Contributor
0 Likes
3,295

YOu can use SELECT_OPTIONS_RESTRICT.

regards,

Suresh Datti

Read only

0 Likes
3,294

Hi Suresh,

could you provide an example where you, for example, set the pernr to 08800108 without using at selection-screen on?

/Elvez

Read only

0 Likes
3,294

You do it in the INITIALIZATION event.i e

INITIALIZATION.

pnppernr-low = '08800108'.

append pnppernr.

Regards,

Suresh Datti

Read only

0 Likes
3,294

Hi,

check this thread...

Regards

vijay

Read only

0 Likes
3,294

Hi Suresh,

I do not understand where you get the data element from. Assume you want to use search help <b>PREMN</b>, but you are not using pernr as an inputfield.

/Elvez

Read only

0 Likes
3,294

Hi Vijay,

I have already read that thread. How do I set a given selection value, for example molga = 99 (I do not have it as an inputfield)?

/ Björn

Read only

0 Likes
3,294

Hi Elvez,

I am lost..didn't quite get ur reqt.. The PREMN search help is to retrieve/search Pernrs by Last name - First Name.. What exactly are you trying to do? restrict the values that are returned by search help? then may be you can take a look at the search help exit 'HRMC_PREM_EXIT_A' for 'PREMN'.

Regards,

Suresh Datti

Read only

0 Likes
3,294

Yes Suresh,

I am trying to restrict the values of the search help. Even if I use the search help exit I still face the problem of transferring selection data (because it is not an inputfield).

/Elvez

Read only

0 Likes
3,294

If it is not an input field, how and actually why are you even trying to provide a F4 for that field? Is this a display only parameter on the selection screen and you want to default it to something before it shown to the user and restrict the user from changing it? What exactly is your requirement?

Read only

0 Likes
3,294

Hi Srinivas,

I would like to default the selection screen to something, however, dynamically and not be setting the default value in the search help. Here is the what I would like to achieve:

1) F4 help for an additional infotype field with competence category id.

2) The F4 uses molga, begda, endda to select data.

=> Problem: How to transfer the selection parameters to F4 when they are not fields on the screen?

/Elvez

Read only

Clemenss
Active Contributor
0 Likes
3,294

you can use functions like F4IF... to display your own value list.

Enforce the restrictions with event

At selection-screen on P_xyz.

<pre>

IF P_xyz CA 'ABC'.

MESSAGE e002(00)."Please enter valid value

ENDIF

</pre>

This will reject any values containg letters A, B or C.

Regards,

Clemens

Read only

0 Likes
3,294

Hi Clemens,

I am using search helps.

/Elvez

Read only

Clemenss
Active Contributor
0 Likes
3,294

Hi Elvez,

copy the search help to your own search help. Use search help exits to influence the value list.

If I have special requirements for search help value lists, I use function module F4IF_INT_TABLE_VALUE_REQUEST. It is quite well documented.

Regards,

Clemens

Read only

0 Likes
3,294

Hi Clemens,

thanks for your answer. As you can see above the problem is not developing the search help itself, but how to pass the selection parameters to the search help. Do you know how to do it?

/Elvez

Read only

Clemenss
Active Contributor
0 Likes
3,294

Hi Elvez,

in the searchhelp definition, mark the search help parameter as 'INPUT'. In ther definition of the screen, tab 'References', put the name of the search help in the column 'search help' for your field to be connected. Example: Program RFEPOS00, screen 100, field RFXPO-VONKN is connected to search help DEBI.

Regards,

Clemens

Read only

0 Likes
3,294

Hi Clemens,

The problem is that I want to pass other values to the search help besides the one that is in the field.

/Elvez

Read only

Clemenss
Active Contributor
0 Likes
3,294

Elvez,

define your "other values" as screen fields. Have Import parameters for them in the search help. Associate the screen fields with the search help - connection is established via identical data elements.

May it would be easier to understand if you just describe your business case and requirements.

Regards,

Clemens

Read only

Clemenss
Active Contributor
0 Likes
3,294

Elvez,

you could possibly define the required values as invisible screen fields - they can be accessed.

Or you export them to memory and in the search help (exit) import them from memory. Should work.

Regards,

Clemens

Read only

Former Member
0 Likes
3,294

Hi,

Go for Search help exit.

Hope this helps.

Regs,

Vnkat Ramanan