2010 Feb 25 8:39 AM
Hi,
i've searched in the forum and have found a lot of threads about search help, but not the one i'm looking for.
I've created a elementary search help.
Now i want to check whether a single value is part of the values of the search help.
Is there a function module or method that is doing this ?
regards,
Hans
2010 Feb 25 9:02 AM
Search help value list is created dynamically on runtime.
But if you want to restrict some values or add some additional records, you can do it by search help exit.
There is a lot of info how to make some - try to search on SDN or Google
Some info you can find here
http://help.sap.com/saphelp_47x200/helpdata/en/cf/21ee52446011d189700000e8322d00/content.htm
2010 Feb 25 9:19 AM
I dont want the search help value to change.
I want to check whether the entered value is part of the values of the search help !
Hans
2010 Feb 25 9:38 AM
Hi,
Base your specific search help on a specific View.
Add your specific search help to your table/strcuture
Add a foreign key to your table/strcuture link with your specific View.
With this only value on your specific View is allow.
Rgds
2010 Feb 25 9:54 AM
Thanks for your answer, but it will not solve my problem in this situation.
I need a function module / method that returns OK / NOT OKE with inputparameters the name of the search help and a value.
Hans
2010 Feb 25 10:05 AM
Hi,
see with this FM F4IF_FIELD_VALUE_REQUEST F4 help for fields that are only known at runtime
I see the FM return exeption NO_VALUES_FOUND
You can pass Search help , field, value.
Rgds
2010 Feb 25 1:50 PM
This will not work, i''m getting exception because i'm having no dynpro.
Hans
2010 Feb 26 8:10 AM
Hi,
Try perhaps to found a FM in Function group SDHI
DATA IT_RETURN_TAB TYPE TABLE OF DDSHRETVAL.
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
TABNAME = 'T000'
FIELDNAME = 'MSEH3'
SEARCHHELP = 'H_T006'
* SHLPPARAM = ' '
* DYNPPROG = ' '
* DYNPNR = ' '
* DYNPROFIELD = ' '
* STEPL = 0
VALUE = '125'
* MULTIPLE_CHOICE = ' '
* DISPLAY = ' '
SUPPRESS_RECORDLIST = 'X'
* CALLBACK_PROGRAM = ' '
* CALLBACK_FORM = ' '
* SELECTION_SCREEN = ' '
* IMPORTING
* USER_RESET =
TABLES
RETURN_TAB = IT_RETURN_TAB
EXCEPTIONS
FIELD_NOT_FOUND = 1
NO_HELP_FOR_FIELD = 2
INCONSISTENT_HELP = 3
NO_VALUES_FOUND = 4
OTHERS = 5
.
BREAK-POINT.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
READ TABLE IT_RETURN_TAB WITH KEY FIELDNAME = 'MSEH3'
FIELDVAL = 'Your_value'
TRANSPORTING NO FIELDS.
if sy-subrc EQ 0.
* value found
else.
* value not found
endif.
Rgds
Edited by: stéphane mouraux on Feb 26, 2010 9:19 AM
2010 Feb 26 8:25 AM
Hi,
i've solved the problem.
The function module F4IF_SELECT_VALUES did the job.
Thanks for all replies.
regards,
Hans