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
1,668

HI GUYS,

Can you guys help me with the search helps, i Created a elementary search help for two fields and when im trying to apply the search helps to the screen fields, somehow it doesn't work. I created this search help so that when i chose value for first input it should give the related value for first and second fields in their respective input fields. it works fine when i execute the serach help but when i apply to the screen fields it doesn't work.

Is there any thing i need to do more. appreciate some helpful answers .

Thanks,

Venkat

HI GUYS,

Can you guys help me with the search helps, i Created a elementary search help for two fields and when im trying to apply the search helps to the screen fields, somehow it doesn't work. I created this search help so that when i chose value for first input it should give the related value for first and second fields in their respective input fields. it works fine when i execute the serach help but when i apply to the screen fields it doesn't work.

Is there any thing i need to do more. appreciate some helpful answers .

Thanks,

Venkat

5 REPLIES 5
Read only

Former Member
0 Likes
821

<b>Basic Search Help</b>

Creating a basic search help which allows you to provide the user with a selection help to select specific fields from a table or view is very straight forward. Simply create a search help with the desired table as the selection method and add the fields you want them to see/select into the search help parameters section. See below for details of how to create a search help for table TRDIR.

<b>Step1:</b> Execute transaction SE11

<b>Step2:</b> Create new search help called 'ZSH' (must be less than 5 chars long to be used as matchcode)

<b>Step3</b>: Enter the following details

<b>Step4:</b> Save and activate

<b>Step5:</b> Add following line into your program:

PARAMETER p_prog LIKE trdir-name MATCHCODE OBJECT zsh.

Or see other methods of adding a search help.

<b>

Please see this link for Screen shot of the Elementary search Help .</b>

<a href="http://">http://www.sapdevelopment.co.uk/dictionary/shelp/shelp_elementary.htm</a>

reward points if it is usefull....

Girish

Read only

Former Member
0 Likes
821

Hi Ramana,

you can also programatically populate the values for f4 using this fm - <b>F4IF_INT_TABLE_VALUE_REQUEST</b>

or for search help pls look into the below link

http://www.sapdevelopment.co.uk/dictionary/shelp/shelp_elementary.htm

<b>Reward pts if found usefull:)</b>

regards

Sathish

Read only

Former Member
0 Likes
821

Hi

For screen fields F4 help see this

For F4 Values on Screen:

PROCESS ON VALUE_REQUEST

using module call starting with FIELD i.e FIELD field MODULE module

There are number of function modules that can be used for the purpose, but these

can fullfill the task easily or combination of them.

DYNP_VALUE_READ

F4IF_FIELD_VALUE_REQUEST

F4IF_INT_TABLE_VALUE_REQUEST

POPUP_WITH_TABLE_DISPLAY

DYNP_VALUE_READ

This function module is used to read values in the screen fields. Use of this

FM causes forced transfer of data from screen fields to ABAP fields.

There are 3 exporting parameters

DYNAME = program name = SY-CPROG

DYNUMB = Screen number = SY-DYNNR

TRANSLATE_TO_UPPER = 'X'

and one importing TABLE parameter

DYNPFIELDS = Table of TYPE DYNPREAD

The DYNPFIELDS parameter is used to pass internal table of type DYNPREAD

to this FM and the values read from the screen will be stored in this table.This

table consists of two fields:

FIELDNAME : Used to pass the name of screen field for which the value is to

be read.

FIELDVALUE : Used to read the value of the field in the screen.

e.g.

DATA: SCREEN_VALUES TYPE TABLE OF DYNPREAD ,

SCREEN_VALUE LIKE LINE OF SCREEN_VALUES.

SCREEN_VALUE-FIELDNAME = 'KUNNR' . * Field to be read

APPEND SCREEN_VALUE TO SCREEN_VALUES. * Fill the table

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

DYNAME = SY-CPROG

DYNUMB = SY-DYNNR

TRANSLATE_TO_UPPER = 'X'

TABLES

DYNPFIELDS = SCREEN_VALUES.

READ TABLE SCREEN_VALUES INDEX 1 INTO SCREEN_VALUE.Now the screen value for field KUNNR is in the SCREEN_VALUE-FIELDVALUE and can be used for further processing like using it to fill the internal table to be used as parameter in F4IF_INT_TABLE_VALUE_REQUEST ETC.

F4IF_FIELD_VALUE_REQUEST

This FM is used to display value help or input from ABAP dictionary.We have to pass the name of the structure or table(TABNAME) along with the field name(FIELDNAME) . The selection can be returned to the specified screen field if three

parameters DYNPNR,DYNPPROG,DYNPROFIELD are also specified or to a table if RETRN_TAB is specified.

CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'

EXPORTING

TABNAME = table/structure

FIELDNAME = 'field name'

DYNPPROG = SY-CPROG

DYNPNR = SY-DYNR

DYNPROFIELD = 'screen field'

IMPORTING

RETURN_TAB = table of type DYNPREAD

.

F4IF_INT_TABLE_VALUE_REQUEST

This FM is used to dsiplay values stored in an internal table as input

help.This FM is used to program our own custom help if no such input help

exists in ABAP dictionary for a particular field. The parameter VALUE_TAB is used to pass the internal table containing input values.The parameter RETFIELD

is used to specify the internal table field whose value will be returned to the screen field or RETURN_TAB.

If DYNPNR,DYNPPROG and DYNPROFIELD are specified than the user selection is passed to the screen field specified in the DYNPROFIELD. If RETURN_TAB is specified the selectionis returned in a table.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = field from int table whose value will be returned

DYNPPROG = SY-CPROG

DYNPNR = SY-DYNNR

DYNPROFIELD = 'screen field'

VALUE_ORG = 'S'

TABLES

VALUE_TAB = internal table whose values will be shown.

RETURN_TAB = internal table of type DDSHRETVAL

EXCEPTIONS

parameter_error = 1

no_values_found = 2

others = 3.

POPUP_WITH_TABLE_DISPLAY

This FM is used to display the contents of an internal table in a popup window.The user can select a row and the index of that is returned in the CHOISE

parameter.The VALUETAB is used to pass the internal table.

A suitable title can be set using TITLETEXT parameter. The starting and end position of the popup can be specified by the parameters STARTPOS_COL / ROW and ENDPOS_ROW / COL .

CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'

EXPORTING

ENDPOS_COL =

ENDPOS_ROW =

STARTPOS_COL =

STARTPOS_ROW =

TITLETEXT = 'title text'

IMPORTING

CHOISE =

TABLES

VALUETAB =

EXCEPTIONS

BREAK_OFF = 1

OTHERS = 2.

e.g.

DATA: w_choice TYPE SY-TABIX.

DATA: BEGIN OF i_values OCCURS 0 WITH HEADER LINE,

values TYPE I,

END OF i_values.

PARAMETRS : id TYPE I.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR id

i_values-values = '0001'.

APPEND i_values.

i_values-values = '0002'.

APPEND i_values.

i_values-values = '0003'.

APPEND i_values.

i_values-values = '0004'.

APPEND i_values.

CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'

EXPORTING

ENDPOS_COL = 40

ENDPOS_ROW = 12

STARTPOS_COL = 20

STARTPOS_ROW = 5

TITLETEXT = 'Select an ID'

IMPORTING

CHOISE = w_choice

TABLES

VALUETAB = i_values

EXCEPTIONS

BREAK_OFF = 1

OTHERS = 2.

CHECK w_choice > 0.

READ TABLE i_values INDEX w_choice....now we can process the selection as it is contained

...in the structure i_values.

Other FM that may be used to provide input help is HELP_START .

for CREATING SEARCH HELP

1) Elementary search helps describe a search path. The elementary search help must define where the data of the hit list should be read from (selection method), how the exchange of values between the screen template and selection method is implemented (interface of the search help) and how the online input help should be defined (online behavior of the search help).

2) Collective search helps combine several elementary search helps. A collective search help thus can offer several alternative search paths.

3)An elementary search help defines the standard flow of an input help.

4) A collective search help combines several elementary search helps. The user can thus choose one of several alternative search paths with a collective search help.

5)A collective search help comprises several elementary search helps. It combines all the search paths that are meaningful for a field.

6)Both elementary search helps and other search helps can be included in a collective search help. If other collective search helps are contained in a collective search help, they are expanded to the level of the elementary search helps when the input help is called.

CREATION:

Go to SE11 Tcode

select search help

give the 'z' search help name and create

select the selection method ur table name eg : 'mara'

dialog module 'display value immediately'.

add the field whatever u want and lpos = 1 and spos = 1 and check import and export parameter.

where left position when displaying and spos = search position

and then save and activate ..

See the links:

http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee38446011d189700000e8322d00/content.htm

http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee45446011d189700000e8322d00/content.htm

https://forums.sdn.sap.com/click.jspa?searchID=3173469&messageID=2176485

https://forums.sdn.sap.com/click.jspa?searchID=3173469&messageID=3601619

pls go through this for search help creation

http://help.sap.com/saphelp_nw2004s/helpdata/en/41/f6b237fec48c67e10000009b38f8cf/content.htm

Search Help Exits:

<b>Reward points for useful Answers</b>

Regards

Anji

Read only

Former Member
0 Likes
821

Ya i used the 'F4IF_INT_TABLE_VALUE_REQUEST function along with other oneDYNP_VALUES_READ but for some reason while returning the rhits on the dialog window it shows nothing but it still says that 1 entries found which is correct for my input.

Read only

Former Member
0 Likes
821

Hi,

check out the link:

<a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ee5f446011d189700000e8322d00/content.htm">http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ee5f446011d189700000e8322d00/content.htm</a>

PLs reward helpful points.

Regards,

Ameet