cancel
Showing results for 
Search instead for 
Did you mean: 

How to restrict the values in seach helps

Former Member
0 Kudos

Dear All,

I am new to the BSP concept.I have a requirement

where in the BSP i need to restrict the values of the search help.i.e. 2 values are coming in the help i need to display only 1 value.

can anybody please explain how to do it.

Cheers,

Deepthee Kasal

Edited by: Craig Cmehil on Sep 2, 2008 8:21 AM

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

I assume that you read values for the search help with function 'F4IF_FIELD_VALUE_REQUEST' and in a later step you display values with <htmlb:tableview>. If that is true and the function is delivering too many records as you mention, you could then restrict the output table of values like this:

TABLES mara.

DATA: mytable TYPE TABLE OF ddshretval WITH HEADER LINE.
DATA l_repid TYPE syrepid.

PARAMETERS p_mtart LIKE mara-mtart.

AT SELECTION-SCREEN ON VALUE-REQUEST
FOR p_mtart.

l_repid = sy-repid.

CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
tabname = 'MARA'
fieldname = 'MTART'
dynpprog = l_repid
callback_program = l_repid
callback_form = 'F4CALLBACK'
TABLES
return_tab = mytable
EXCEPTIONS
field_not_found = 1
no_help_for_field = 2
inconsistent_help = 3
no_values_found = 4
OTHERS = 5.

START-OF-SELECTION.

blah, blah, blah


*---------------------------------------------------------------------
* Form F4_form
*---------------------------------------------------------------------
* Exclude all material types that start with F & H 
----------------------------------------------------------------------
FORM f4callback
TABLES record_tab STRUCTURE seahlpres
CHANGING shlp TYPE shlp_descr
callcontrol LIKE ddshf4ctrl.

DATA: aux_struc TYPE ddshselopt.

MOVE: 'H_T134' to aux_struc-shlpname,
'MTART' TO aux_struc-shlpfield,
'E' TO aux_struc-sign,
'CP' TO aux_struc-option,
'F*' TO aux_struc-low.

append aux_struc to SHLP-SELOPT.

MOVE: 'H_T134' to aux_struc-shlpname,
'MTART' TO aux_struc-shlpfield,
'E' TO aux_struc-sign,
'CP' TO aux_struc-option,
'H*' TO aux_struc-low.

append aux_struc to SHLP-SELOPT.

ENDFORM. "F4_form

Mark points if helpful

Former Member
0 Kudos

Hi,

For each search help there would be an associated page/view in which the data would be populated in an internal table. Identify the proper view associated to the Search help and try to find out the internal table. After that u can just use delete statement to delete the unwanted values.

I can help u if u can elaborate ur issue.

Best Regards,

Sneha.