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

F4 help in select options

Former Member
0 Likes
780

Hi All,

I have a select-options variable in my program for a field of a database table. I want to delete some of the values in the F4 help for this select options variable. Any pointers on how I can do this.

Thanks & Regards,

Rahul Rathi

Hi All,

I have a select-options variable in my program for a field of a database table. I want to delete some of the values in the F4 help for this select options variable. Any pointers on how I can do this.

Thanks & Regards,

Rahul Rathi

5 REPLIES 5
Read only

Former Member
0 Likes
747

hai

use this,syntex

PARAMETERS <p> ... MATCHCODE OBJECT <search_help>.

Read only

Former Member
0 Likes
747

You have two options.

Use the command

AT SELECTION-SCREEN ON VALUE_REQUEST FOR FIELD p_stuff

to create your own drop down entries. Use the FM F4IF_INT_TABLE_VALUE_REQUEST

or

Create your own Search help and use an exit function.

Read only

Former Member
0 Likes
747

hai

sorry previously i send u the syntax for paramters.

u need it for select-options know.

syntax:

SELECT-OPTIONS <p> ... MATCHCODE OBJECT <search_help>.

SELECT-OPTIONS <p> ... VALUE-REQUEST [ FOR {LOW|HIGH} ]

Read only

Former Member
0 Likes
747

Hello Rahul,

For this create a search help and use the search help exit. For that u need to copy this FM

Use this FM

F4IF_SHLP_EXIT_EXAMPLE

Copy this Fm to a ZF4IF_SHLP_EXIT_XXXXX and do the changes as u required.

Don't Forget to reward points.

Regards,

Vasanth

Read only

anversha_s
Active Contributor
0 Likes
747

hi,

chk a sample code.

REPORT abc.

TYPES: BEGIN OF ztable,
numde(20),

KUNNR LIKE KNA1-KUNNR.
TYPES: END OF ztable.

DATA: i_ztable TYPE ztable OCCURS 0 WITH HEADER LINE.
DATA:r_table TYPE ztable OCCURS 0 WITH HEADER LINE.

DATA: v_choice TYPE i.


PARAMETERS: p_kunnr LIKE kna1-kunnr .

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_kunnr.

i_ztable-numde = 'JOHN05001'.
i_ztable-kunnr = '1'.
APPEND i_ztable.
CLEAR i_ztable.
i_ztable-numde = 'PETE05001'.
i_ztable-kunnr = '2'.
APPEND i_ztable.
CLEAR i_ztable.
i_ztable-numde = 'JOHN05002'.
i_ztable-kunnr = '1'.
APPEND i_ztable.
CLEAR i_ztable.
i_ztable-numde = 'PETE05002'.
i_ztable-kunnr = '2'.
APPEND i_ztable.


CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
* DDIC_STRUCTURE = ' '
retfield = 'I_ZTABLE-KUNNR'
* PVALKEY = ' '
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'P_KUNNR'

* STEPL = 0
* WINDOW_TITLE =
* VALUE = '*'
value_org = 'S'
* MULTIPLE_CHOICE = ' '
* DISPLAY = ' '
* CALLBACK_PROGRAM = ' '
* CALLBACK_FORM = ' '
* MARK_TAB =
* IMPORTING
* USER_RESET =
TABLES
value_tab = i_ztable
* FIELD_TAB =
* return_tab =
* DYNPFLD_MAPPING =
* EXCEPTIONS
* PARAMETER_ERROR = 1
* NO_VALUES_FOUND = 2
* OTHERS = 3
.
* IF SY-SUBRC <> 0.
** MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
** WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
* ENDIF.

IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
CLEAR i_ztable.
READ TABLE i_ztable INDEX v_choice.
MOVE i_ztable-kunnr TO p_kunnr.
ENDIF.

rgds

Anver