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: 

which function module used instead of search help

Former Member
0 Kudos

but wen it comes on selection screen, d f4 functionality is nt comg using fm f4if_int_table_value_request .

near at selection-screen how 2 pass selection-screen fld i.e s_kunnr instead of kunnr becoz we r creating search help for s_kunnr . d case which is given below

case 1

parameter : s_kunnr like kunnr.

created one it_kna1 type standard table of kna1

select * from kna1 into table it_kna1 where kunnr = s_kunnr.

help me in dis case wt,which fld & where shld i pass in fm

plz help me with d code

3 REPLIES 3

Former Member
0 Kudos

Hi,

Check out this code.

REPORT z_test11 .

PARAMETERS:

p_carrid(2).

DATA: table1 LIKE

ddshretval

OCCURS 0 WITH HEADER LINE.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_carrid.

CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'

EXPORTING

tabname = 'scarr'

fieldname = 'carrid'

  • SEARCHHELP = ' '

  • SHLPPARAM = ' '

  • DYNPPROG = ' '

  • DYNPNR = ' '

  • DYNPROFIELD = 'p_carrid'

  • STEPL = 0

  • VALUE = ' '

  • MULTIPLE_CHOICE = ' '

  • DISPLAY = ' '

  • SUPPRESS_RECORDLIST = ' '

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

  • SELECTION_SCREEN = ' '

TABLES

return_tab = table1

EXCEPTIONS

field_not_found = 1

no_help_for_field = 2

inconsistent_help = 3

no_values_found = 4

OTHERS = 5

.

IF sy-subrc 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

p_carrid = table1-fieldval.

START-OF-SELECTION.

WRITE: p_carrid.

Regards

Surinder

Former Member
0 Kudos

If your doubt is how to create Search Help for a Selection Screen Object then.

Then use this example.

MODULE USER_COMMAND_0301.

PROCESS ON VALUE-REQUEST.

FIELD ITAB_ITEM-ZMATNR MODULE SEARCH_MATERIAL.

Inside the PAI ****************

MODULE search_material INPUT.

DATA : it TYPE TABLE OF ddshretval .

CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'

EXPORTING

tabname = 'ZMARA_101754'

fieldname = 'ZMATNR'

  • SEARCHHELP = ' '

  • SHLPPARAM = ' '

dynpprog = sy-cprog

dynpnr = '0301'

dynprofield = 'ITAB_ITEM-ZMATNR'

  • STEPL = 0

  • VALUE = ' '

  • MULTIPLE_CHOICE = ' '

  • DISPLAY = ' '

  • SUPPRESS_RECORDLIST = ' '

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

  • SELECTION_SCREEN = ' '

  • IMPORTING

  • USER_RESET =

TABLES

return_tab = it

  • EXCEPTIONS

  • FIELD_NOT_FOUND = 1

  • NO_HELP_FOR_FIELD = 2

  • INCONSISTENT_HELP = 3

  • NO_VALUES_FOUND = 4

  • OTHERS = 5

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ZMARA_101754 -


> The DBtable

ZMATNR -


> DB Field

sy-cprog -


> Program Name

0301 -


> Screen Number

ITAB_ITEM-ZMATNR -


> The Name of the Field on the Screen (Ex for your Field it will be S_KUNNR).

If your doubt is not cleared Please let me know.

Regards,

Amit.

Former Member
0 Kudos

Hi,

If the FM is not working then you can directly assign search help using SE11.

Please refer to the foloowing link for the same

http://www.sapfans.com/forums/viewtopic.php?f=13&t=313139

http://www.sap-abap4.com/sap/search-help/

hope this will solve your problem

Regards,

Manish