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
940

I need search help on a parameter on selection screen. On pressing F4 records should come from a database table.Is it possible directly or i have to use FM F4IF_INT_ TABLE_VALUE_REQUEST after selecting the record from the database table into internal table.

9 REPLIES 9
Read only

Former Member
0 Likes
727

U can create search help and attach to the Data Element of the field or else u have to use the function module FM F4IF_INT_ TABLE_VALUE_REQUEST

Read only

0 Likes
727

Hi,

I cannot create a search help on a data element as it is related to just my current program. Just check where i am wrong.This is not working

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

PARAMETERS: p_mblnr LIKE mkpf-mblnr obligatory,

SELECTION-SCREEN END OF BLOCK b1.

at selection-screen.

select MBLNR from MKPF into table i_MKPF.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'MBLNR'

DYNPPROG = sy-repid

DYNPNR = sy-dynnr

VALUE_ORG = 'S'

tables

value_tab = i_mkpf

EXCEPTIONS

PARAMETER_ERROR = 1

NO_VALUES_FOUND = 2

OTHERS = 3.

Read only

Former Member
0 Likes
727

U create a Match code / Search help and add it to the parameter.

PARAMETERS p MATCHCODE OBJECT mobj .

Read only

Former Member
0 Likes
727

HI

GOOD

AS PER YOUR REQUIREMENT IT IS POSSIBLE DIRECTLY,ONLY THINKG YOU HAVE TO DO IS CREATING A SEARCH HELP USING SE11.

THANKS

MRUTYUN

Read only

Former Member
0 Likes
727

Hai Mukesh

go through the following code

DATA: T_FIELD LIKE DFIES OCCURS 0 WITH HEADER LINE,

T_RETURN LIKE DDSHRETVAL OCCURS 0 WITH HEADER LINE,

L_RETFIELD TYPE DFIES-FIELDNAME.

  • find atinn number of given characteristic

CLEAR CABNT.

SELECT ATINN INTO CABNT-ATINN UP TO 1 ROWS FROM CABNT

WHERE ATBEZ = CHARACTERISTIC_IN.

ENDSELECT.

CHECK SY-SUBRC = 0.

  • clear down tables

REFRESH: T_FIELD,

T_VALUETAB.

  • append fields required for help view

MOVE: 'AUSP' TO T_FIELD-TABNAME,

'ATWRT' TO T_FIELD-FIELDNAME.

APPEND T_FIELD. CLEAR T_FIELD.

*-- End of add lakshmanak 16/11/2005

  • append returned values to help value table

CLEAR CAWN.

SELECT ATWRT INTO T_VALUETAB-VAL FROM CAWN

WHERE ATINN = CABNT-ATINN.

APPEND T_VALUETAB.

ENDSELECT.

L_RETFIELD = 'ATWRT'.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = L_RETFIELD

TABLES

VALUE_TAB = T_VALUETAB

FIELD_TAB = T_FIELD

RETURN_TAB = T_RETURN

EXCEPTIONS

PARAMETER_ERROR = 1

NO_VALUES_FOUND = 2

OTHERS = 3

.

READ TABLE T_RETURN INDEX 1.

IF SY-SUBRC = 0.

D_VALUE = T_RETURN-FIELDNAME.

ELSE.

CLEAR D_VALUE.

ENDIF.

Thanks & regards

Sreenivasulu P

Read only

Former Member
0 Likes
727

Hi Mukesh,

If you are dealing with database table you can directly add a search help to a field and attachthe search help to the selection screen.

creating search help

http://help.sap.com/saphelp_erp2005/helpdata/en/8b/415d363640933fe10000009b38f839/frameset.htm

the FM F4IF_INT_ TABLE_VALUE_REQUEST is used when you want to programatically fill the f4 help.

Regards,

Kinshuk

mark helpful answers

Read only

Former Member
0 Likes
727

see if while declaring MBLNR in the internal table u referred to std dictionary field. and see if the fields are in proper case... like if u use upper case use upper case every where....

try to send entire code related to search help... table declaration etc.....

Read only

0 Likes
727

declared like this:

DATA : BEGIN OF it_val OCCURS 0,

mc_stext LIKE hrp1000-mc_stext,

objid LIKE hrp1000-objid,

END OF it_val.

DATA: progname LIKE sy-repid,

dynnum LIKE sy-dynnr,

dynpro_values TYPE TABLE OF dynpread.

DATA : return_tab LIKE ddshretval OCCURS 0 WITH HEADER LINE.

use this FM something like this:

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'S_OBJID-LOW'

dynpprog = progname

dynpnr = dynnum

dynprofield = 'S_OBJID-LOW'

value_org = 'S'

TABLES

value_tab = it_val

return_tab = return_tab

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

reward points if it helps

regards

gunjan

Read only

Former Member
0 Likes
727

Hi, Mukesh,

try this FM. it will help to create search help on f4.

regards,

Aakash...

PROCESS ON VALUE-REQUEST.

FIELD it_zsd00003-prctr MODULE f4_help_for_pctr.

MODULE f4_help_for_pctr INPUT.

NOTE:

Tabname/fieldname is the name of the table and field

for which F4 should be shown.

*

Dynprog/Dynpnr/Dynprofield are the names of the Progran/Dynpro/Field

in which the f4 value should be returned.

*

Value: The value of the Dynpro fuield when calling the F4 help.

You can limit the values shown, by inseting a value in this parameter

e.g '50*' to show only values beginning with 50

CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'

EXPORTING

tabname = 'ZSD00003'

fieldname = 'PRCTR'

  • SEARCHHELP = ' '

  • SHLPPARAM = ' '

dynpprog = 'ZSD00002_BRUGERKONV_LISTE'

dynpnr = '0100'

dynprofield = 'IT_ZSD00003-PRCTR'

  • STEPL = 0

value = '50*'

  • MULTIPLE_CHOICE = ' '

  • DISPLAY = ' '

  • SUPPRESS_RECORDLIST = ' '

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

TABLES

  • RETURN_TAB =

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.

ENDMODULE. " F4_help_for_pctr INPUT.