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: 

Value check with search help ?

h_senden2
Active Contributor
0 Kudos
1,561

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

8 REPLIES 8

Former Member
0 Kudos
498

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

0 Kudos
498

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

StMou
Active Participant
0 Kudos
498

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

0 Kudos
498

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

StMou
Active Participant
0 Kudos
498

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

0 Kudos
498

This will not work, i''m getting exception because i'm having no dynpro.

Hans

StMou
Active Participant
0 Kudos
498

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

h_senden2
Active Contributor
0 Kudos
498

Hi,

i've solved the problem.

The function module F4IF_SELECT_VALUES did the job.

Thanks for all replies.

regards,

Hans