F4 selection help

Question: Hi,

Is there any way to restrict the data output in F4?
eg: You wrote a program for AU country.
When u press F4 for company code it should only list out AU* code
but not others --> SG* etc

Thanks.

Answer:
You could write your own F4 help.

Look at the help of AT SELECTION-SCREEN ON VALUE-REQUEST.

There's a function module you can use in this event (sorry, can't remember the name), which will call a search help, which you'll also have defined. Alternatively, you can write your own popup.

You may also need to use FM DYNP_VALUES_READ to get the country, if it is being held in another screen field.

m@t
_________________
TULY The quality of answers is roughly proportional to the quality of the question.

The downside of being better than everyone else is that people tend to assume you're pretentious.

Answer:
Or create your own matchcode object / search help and attach it to your selection parameter / select-options.

Answer:
Hi,

DYNP_VALUES_READ is just for reading the screen value in but not for the one i've mentioned as above.

Answer:
Yes, I know what DYNP_VALUE_READ does. I was assuming that you had a parameter to specify the country you're interested in. If you've hard coded it, of course you don't need to use that FM.

m@t
_________________
TULY The quality of answers is roughly proportional to the quality of the question.

The downside of being better than everyone else is that people tend to assume you're pretentious.

Answer:
Thanks for replying, M@t.

Hmmm..

Lets say on selection screen, i have parameter - Company code (bukrs)

If user don't know what to enter and press F4, the F4 window should only display country which starts from AU1 to AU10 but not the others (Eg: SG1 to SG10, TW1 - TW10,etc)

How do i set it?

Answer:
Did you try Maen's solution? I've actually NEVER written a search-help...

Did you read the help on AT SELECTION-SCREEN ON VALUE-REQUEST? Within that event,you could program a little dialog popup, which has the values you want.

Or you can use a pre-existing search help, and use the function module F4IF_START_VALUE_REQUEST. In conjunction with class CL_RSDM_F4SERVICE.

Regards

m@t
_________________
TULY The quality of answers is roughly proportional to the quality of the question.

The downside of being better than everyone else is that people tend to assume you're pretentious.

Answer:
hi,

Just have a look @ the standard report RUTSHEXP ( I Am on 4.6C ), This will give you a fair idea.

I hope this helps,

Regards
Raju Chitale

Answer:
There should also be a user exit available in search helps. Is is made for a case like yours or to filter out data a particular type that a user should not see.
Some info about it is here.
Copyright ?2007 - 2008 www.jt77.com