10-09-2007 8:17 AM
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
10-09-2007 8:24 AM
hi,
create your own help.
then attach it to your parameter.
PARAMETER: P_PARAM like T001-BUKRS matchcode object searchhelpname.
10-09-2007 8:24 AM
hi,
create your own help.
then attach it to your parameter.
PARAMETER: P_PARAM like T001-BUKRS matchcode object searchhelpname.
10-09-2007 8:25 AM
Hi Sonali,
Is this the best answer? Someone said that I should use the VALUE-REQUEST functionality.
Thanks.
Benedict
10-09-2007 8:29 AM
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
10-09-2007 8:32 AM
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.
10-09-2007 8:51 AM
10-09-2007 8:40 AM