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
532

Hello Friends

Can any one tell me the different ways to provide Search Help and the priority of the Help in which they will be displayed and there use.

Pulkit Agrawal

6 REPLIES 6
Read only

Former Member
0 Likes
483
Read only

0 Likes
483

Hi kishan negi

It provide info about the six different search helps but does not specify which help will be displayed in what order

Means if i will apply all or some of these helps then which will have preference of displayed over the other and what is the specific use of each search help

Read only

0 Likes
483

I don't think the order is an issue here.. as you will be able to tie only one search help to a field at any time..

~Suresh

Read only

0 Likes
483

I think it is important as there are 6 different method to apply search help so definately they will have specific purpose and sequence till they are not cleare who can i say that this method is best or not.

Read only

anversha_s
Active Contributor
0 Likes
483

hi pulkit,

chk this

there are 2 type of search help.

1. static -> use 'F4IF_FIELD_VALUE_REQUEST'

2.dyanamic -> use 'F4IF_INT_TABLE_VALUE_REQUEST'

chk the code below.

1.static

******************

&----


*& Form F_GET_COUNTRY_DESC

&----


  • WILL GET THE COUNTRY DESCRIPTION FROM T005T TABLE

----


  • --> p1 F_GET_COUNTRY_DESC

  • <-- p2 F_GET_COUNTRY_DESC

----


FORM f_get_country_desc .

CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'

EXPORTING

tabname = 'T005'

fieldname = 'LAND1'

searchhelp = 'H_T005_LAND'

  • SHLPPARAM = ' '

dynpprog = sy-cprog

dynpnr = sy-dynnr

dynprofield = 'WF_COUNTRY_CODE'

  • STEPL = 0

  • VALUE = ' '

  • MULTIPLE_CHOICE = ' '

  • DISPLAY = ' '

  • SUPPRESS_RECORDLIST = ' '

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

  • SELECTION_SCREEN = ' '

  • IMPORTING

  • USER_RESET =

TABLES

return_tab = int_ret

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.

*--READING THE FIRST INDEX OF THE TABLE.

READ TABLE int_ret INDEX 1 INTO int_ret.

*--FETCHES THE COUNTRY CODE FROM INTERNAL TABLE 'INT_RET'.

wf_country_code = int_ret-fieldval.

*COUNTRY DESCRIPTION FROM T005T TABLE

SELECT SINGLE landx

FROM t005t

INTO wf_country_desc

WHERE land1 = wf_country_code

AND spras = sy-langu.

IF sy-subrc NE 0.

*MESSAGE IS 'Country Description Not Available'>

MESSAGE s020(zm050) WITH wf_country_desc.

ENDIF.

ENDFORM. " F_GET_COUNTRY_DESC

2.dynamic

*******************.

&----


*& Form F_GET_ZONE_DESC

&----


  • THIS SUB ROUTINE WILL FETCH THE ZONE DESCRIPTION

----


  • --> p1 F_GET_ZONE_DESC

  • <-- p2 F_GET_ZONE_DESC

----


FORM f_get_zone_desc .

CLEAR int_ret.

IF wf_country_code IS INITIAL.

*--MESSAGE IS 'Country Not Selected'.

MESSAGE s016(zm050).

ELSE.

*--THIS WILL FETCH THE ZONE CODES INTO THE INTERNAL TABLE'INT_ZONE_CODE'

*--WITH RESPECT TO A COUNTRY CODE.

SELECT zonecode zone_desc

FROM zmpets_zone

INTO TABLE int_zone_code

WHERE land1 = wf_country_code

AND loekz NE 'X'.

IF sy-subrc NE 0.

*MESSAGE IS 'No Zone Available In <COUNTRY_NAME>

MESSAGE s019(zm050) WITH wf_country_desc.

ELSE.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

  • DDIC_STRUCTURE = ' '

retfield = 'WF_ZONE_CODE'

  • PVALKEY = ' '

  • DYNPPROG = ' '

  • DYNPNR = ' '

  • DYNPROFIELD = ' '

  • STEPL = 0

  • WINDOW_TITLE =

  • VALUE = ' '

value_org = 'S'

  • MULTIPLE_CHOICE = ' '

  • DISPLAY = ' '

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

  • MARK_TAB =

  • IMPORTING

  • USER_RESET =

TABLES

value_tab = int_zone_code

  • FIELD_TAB =

return_tab = int_ret

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

READ TABLE int_ret INDEX 1." INTO INT_RET.

wf_zone_code = int_ret-fieldval.

IF wf_zone_code IS NOT INITIAL AND wf_zone_code NE wf_tmp_zn.

*--THIS WILL FETCH THE ZONE DETAILS INTO THE SCREEN WITH RESPECT TO

*---A ZONE CODE

*Convert the zone code with padded zeroes on left side

PERFORM f_convert_zone_code.

SELECT SINGLE zonecode zone_desc mfzone mfcountry

FROM zmpets_zone

INTO fs_zone_tab

WHERE zonecode = wf_zone_code.

IF sy-subrc NE 0.

*MESSAGE IS 'Zone Description Not Available'

MESSAGE s021(zm050) WITH wf_country_desc.

ELSE.

*--FILL THE SCREEN FIELDS FROM THE STRUCTURE 'FS_ZONE_TAB'.

PERFORM f_fill_screen_fields.

CLEAR fs_zone_tab.

ENDIF.

ENDIF.

ENDIF.

ENDIF.

ENDFORM. " F_GET_ZONE_DESC

for any clarifiaction pls mail me.

pls reward points, if this helped u.

regards,

anversha.

anversha.shahul@wipro.com

Read only

anversha_s
Active Contributor
0 Likes
483

in the above posted code..

int_ret is...

DATA : BEGIN OF int_ret OCCURS 10.

INCLUDE STRUCTURE ddshretval.

DATA : END OF int_ret.

***********************

One more method is that u can give search help in the data base level.