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
627

hi all,

can anyone help me, regarding this, i have a selection screen and i need to call a display variants and search help, do anyone know any function modules that can execute like this for search help and/or display variants.

Thanx a lot, i do really appreciate your efforts.

regards,

jc

hi all,

can anyone help me, regarding this, i have a selection screen and i need to call a display variants and search help, do anyone know any function modules that can execute like this for search help and/or display variants.

Thanx a lot, i do really appreciate your efforts.

regards,

jc

3 REPLIES 3
Read only

dani_mn
Active Contributor
0 Likes
580

HI,

check this program for attaching search help in selection screen.

<b>REPORT Z_SEARCH_HELP .

data : RETURN_TAB LIKE DDSHRETVAL occurs 0 .

DATA : BEGIN OF ITAB OCCURS 0,
          BUKRS LIKE BKPF-BUKRS,
          BELNR LIKE BKPF-BELNR,
          GJAHR LIKE BKPF-GJAHR,
       END OF ITAB.



PARAMETERS : BELNR LIKE BKPF-BELNR.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR BELNR.

  SELECT bukrs belnr gjahr  INTO TABLE itab
  FROM bkpf.




  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
       EXPORTING
            retfield    = 'BELNR'
            DYNPPROG    = SY-REPID
            DYNPNR      = SY-DYNNR
            DYNPROFIELD = 'BELNR'
            VALUE_ORG   = 'S'
       TABLES
            value_tab   = ITAB
            return_tab  = return_tab.</b>

REgards,

Read only

anversha_s
Active Contributor
0 Likes
580

hi,

chk this sample code

*WILL GET THE COUNTRY DESCRIPTION FROM T005T TABLE

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

rgds

anver.

if helped mark points

Read only

Former Member
0 Likes
580

Hi use this FM

F4IF_INT_TABLE_VALUE_REQUEST

regs

rams