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: 

Needs to have a specific table for the F4 functionality

Former Member
0 Kudos

Hi Gurus,

I have created a parameter which uses the F4 functionality.

I have used

PARAMETER: P_PARAM like T001-BUKRS.

What I need is the F4 should call a custom table and not the default search help that is being called.

Thanks in advance.

Benedict

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi,

create your own help.

then attach it to your parameter.

PARAMETER: P_PARAM like T001-BUKRS matchcode object searchhelpname.

6 REPLIES 6

Former Member
0 Kudos

hi,

create your own help.

then attach it to your parameter.

PARAMETER: P_PARAM like T001-BUKRS matchcode object searchhelpname.

0 Kudos

Hi Sonali,

Is this the best answer? Someone said that I should use the VALUE-REQUEST functionality.

Thanks.

Benedict

raymond_giuseppi
Active Contributor
0 Kudos

Create you own search help on the other table via SE11, then attach it to the parameter via MATCHCODE OBJECT mobj .

Alternatively you can intercept the F4 (in report AT SELECTION-SCREEN AT REQUEST or in screen logic step PROCESS ON VALUE-REQUEST) There you can call function module like F4IF_INT_TABLE_VALUE_REQUEST.

Regards

Former Member
0 Kudos

Hi,

Use the below code

DATA: BEGIN OF it_bukrs OCCURS 0,

bukrs LIKE t001k-bukrs,

END OF it_bukrs.

SELECTION-SCREEN: BEGIN OF BLOCK main WITH FRAME TITLE text-001.

SELECTION-SCREEN SKIP.

PARAMETERS: p_bukrs(4) TYPE c.

SELECTION-SCREEN END OF BLOCK main.

*----


  • Validation Section

*----


INITIALIZATION.

SELECT DISTINCT bukrs FROM t001k INTO TABLE it_bukrs.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_bukrs.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'BUKRS'

dynpprog = sy-repid

dynpnr = sy-dynnr

dynprofield = 'P_BUKRS'

value_org = 'S'

TABLES

value_tab = it_bukrs

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.

0 Kudos

Hi Velangini,

This is creating dump.

Thanks.

Benedict