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

search help

Former Member
0 Likes
596

hi,

while creating search help for the particular field what are the parameters have to pass in this fuction module

F4IF_INT_TABLE_VALUE_REQUEST.......

1 ACCEPTED SOLUTION
Read only

varma_narayana
Active Contributor
0 Likes
579

Hi..

This is the Sample code

DATA: lf_repid LIKE sy-repid,

lf_dynnr LIKE sy-dynnr,

lf_dynprofield LIKE help_info-dynprofld,

lf_retfield LIKE dfies-fieldname.

MOVE sy-repid TO lf_repid.

MOVE sy-dynnr TO lf_dynnr.

MOVE 'PA_DPROF' TO lf_dynprofield.

MOVE 'PROFILNAME' TO lf_retfield.

PERFORM prepare_gt_value_tab.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = lf_retfield "Return field

dynpprog = lf_repid "Program name

dynpnr = lf_dynnr "Screen no

dynprofield = lf_dynprofield "Screen field which needs F4 HELP

value_org = 'S'

TABLES

value_tab = it_value_tab "Where all values are stored for F4 help

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.

<b>Reward if Helpful</b>

hi,

while creating search help for the particular field what are the parameters have to pass in this fuction module

F4IF_INT_TABLE_VALUE_REQUEST.......

5 REPLIES 5
Read only

Former Member
0 Likes
579

Read only

varma_narayana
Active Contributor
0 Likes
580

Hi..

This is the Sample code

DATA: lf_repid LIKE sy-repid,

lf_dynnr LIKE sy-dynnr,

lf_dynprofield LIKE help_info-dynprofld,

lf_retfield LIKE dfies-fieldname.

MOVE sy-repid TO lf_repid.

MOVE sy-dynnr TO lf_dynnr.

MOVE 'PA_DPROF' TO lf_dynprofield.

MOVE 'PROFILNAME' TO lf_retfield.

PERFORM prepare_gt_value_tab.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = lf_retfield "Return field

dynpprog = lf_repid "Program name

dynpnr = lf_dynnr "Screen no

dynprofield = lf_dynprofield "Screen field which needs F4 HELP

value_org = 'S'

TABLES

value_tab = it_value_tab "Where all values are stored for F4 help

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.

<b>Reward if Helpful</b>

Read only

Former Member
0 Likes
579

Hi balu,

here a short example:

PARAMETERS: P_MATN1 LIKE MARA-MATNR.

DATA: BEGIN OF VALUE_TAB OCCURS 0,

VALUE(40),

END OF VALUE_TAB.

*

DATA: BEGIN OF FIELD_TAB OCCURS 0.

INCLUDE STRUCTURE DFIES.

DATA END OF FIELD_TAB.

*

DATA: BEGIN OF RETURN_TAB OCCURS 0.

INCLUDE STRUCTURE DDSHRETVAL.

DATA END OF RETURN_TAB.

*

AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_MATN1.

*

  • für P_MATN1

FIELD_TAB-TABNAME = 'MAKT'.

FIELD_TAB-FIELDNAME = 'MATNR'.

APPEND FIELD_TAB.

*

FIELD_TAB-TABNAME = 'MAKT'.

FIELD_TAB-FIELDNAME = 'MAKTX'.

APPEND FIELD_TAB.

*

SELECT * FROM MAKT UP TO 10 ROWS WHERE SPRAS = SY-LANGU.

clear value_tab. MOVE MAKT-MATNR TO VALUE_TAB-VALUE. APPEND VALUE_TAB.

clear value_tab. MOVE MAKT-MAKTX TO VALUE_TAB-VALUE. APPEND VALUE_TAB.

ENDSELECT.

*

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = 'MATNR'

WINDOW_TITLE = 'Statusselektion'

MULTIPLE_CHOICE = 'X'

TABLES

VALUE_TAB = VALUE_TAB

FIELD_TAB = FIELD_TAB

RETURN_TAB = RETURN_TAB

EXCEPTIONS

PARAMETER_ERROR = 1

NO_VALUES_FOUND = 2

OTHERS = 3.

*

IF SY-SUBRC <> 0.

MESSAGE I010 WITH SY-SUBRC.

ELSE.

P_MATN1 = RETURN_TAB-FIELDVAL.

ENDIF.

Hope it helps.

Regards, Dieter

Read only

Former Member
0 Likes
579

Hi,

Refer to my code as follows:

AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_WERK-LOW.

REFRESH ITEMP.

CLEAR ITEMP.

SELECT WERKS

NAME1

FROM T001W

INTO TABLE ITEMP

WHERE IWERK = 'M011'.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

  • DDIC_STRUCTURE = ' '

<b>RETFIELD = 'WERKS'</b>

  • PVALKEY = ' '

  • DYNPPROG = ' '

  • DYNPNR = ' '

  • DYNPROFIELD = ' '

  • STEPL = 0

  • WINDOW_TITLE =

  • VALUE = ' '

<b>VALUE_ORG = 'S'</b>

  • MULTIPLE_CHOICE = ' '

  • DISPLAY = ' '

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

TABLES

<b>VALUE_TAB = ITEMP</b>

  • FIELD_TAB =

<b>RETURN_TAB = T_RETURN</b>

  • 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.

S_WERK-LOW = T_RETURN-FIELDVAL.

Hope this helps.

Reward if helpful.

Regards,

Sipra

Read only

Former Member
0 Likes
579

Hi

Check this samll sample report

parameters p_matnr type matnr.

data: begin of itab_matnr occurs 0,
matnr type matnr,
end of itab_matnr.

DATA: ITAB_SELECTED_MATNR TYPE DDSHRETVAL OCCURS 0 WITH HEADER LINE.


initialization.

do 20 times.
move sy-index to itab_matnr.
append itab_matnr.
enddo.


at selection-screen on value-request for p_matnr.


CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'P_MATNR'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = itab_matnr
return_tab = ITAB_SELECTED_MATNR
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
.
IF SY-SUBRC eq 0.
READ TABLE ITAB_SELECTED_MATNR INDEX 1.
MOVE ITAB_SELECTED_MATNR-FIELDVAL TO P_MATNR.
ELSE.
* MESSAGE ....
ENDIF.


start-of-selection.

write p_matnr.

Reward all helpfull answers

Regarsd

Pavan