Skip to Content
author's profile photo Former Member
Former Member

search help for A field in select option which doesnt have search help in c

u have table in QM which is QMFE in whihc field FECOD which doesnt have search help , but my requirement is that in select option in report to have users to see its search help, anyone there to help me

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 19, 2008 at 02:49 AM

    hi,you can use

    SELECT-OPTIONS: s_f4 for wa_tab-f1.

    INITIALIZATION.

    PERFORM get_search_hlp_values.

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_f4-low.

    PERFORM get_f4help CHANGING s_f4-low.

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_f4-high.

    PERFORM sub_get_f4help CHANGING s_f4-high.

    FORM get_search_hlp_values.

    fill itab with values here

    ENDFORM. " sub_get_search_hlp_values

    FORM sub_get_f4help_for_user CHANGING p_bname TYPE char10.

    DATA: l_i_field TYPE STANDARD TABLE OF dfies INITIAL SIZE 0,

    l_wa_field TYPE dfies,

    l_i_return TYPE TABLE OF ddshretval,

    l_wa_return TYPE ddshretval.

    CONSTANTS: c_feild TYPE dfies-fieldname VALUE 'BNAME',

    c_dynprg TYPE sy-repid VALUE 'RSSYSTBD',

    c_dynpnr TYPE sy-dynnr VALUE '1000',

    c_dynfeild TYPE help_info-dynprofld VALUE 'S_BNAME-LOW',

    c_stepl TYPE sy-stepl VALUE '0',

    c_valueorg TYPE ddbool_d VALUE 'C'.

    Populate the Field table

    l_wa_field-tabname = 'QMFE'.

    l_wa_field-fieldname = 'FECOD'.

    APPEND l_wa_field TO l_i_field.

    IF NOT i_data[] IS INITIAL.

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

    retfield = c_feild

    dynpprog = c_dynprg

    dynpnr = c_dynpnr

    stepl = c_stepl

    value_org = c_valueorg

    TABLES

    value_tab = i_tab

    field_tab = l_i_field

    return_tab = l_i_return

    EXCEPTIONS

    parameter_error = 1

    no_values_found = 2

    OTHERS = 3.

    READ TABLE l_i_return INTO l_wa_return

    WITH KEY fieldname = 'FECOD'.

    IF sy-subrc EQ 0.

    p_bname = l_wa_return-fieldval.

    ENDIF.

    ENDIF.

    ENDFORM. " get_F4help

    thanks

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 19, 2008 at 02:57 AM

    Hi sridhar loganathan,

    For this goto SE11 and create a ZFECOD Search help for that field. In Defination Tab enter table name

    QMFE and Enter Z_F4_FECOD_EXIT in Search help Exit.

    Then create a FM in SE37 as Z_F4_FECOD_EXIT under a FG. And then write code as follows for example:

    FUNCTION Z_F4_REG_EXIT.

    *"----


    ""Local Interface:

    *" TABLES

    *" SHLP_TAB TYPE SHLP_DESCR_TAB_T

    *" RECORD_TAB STRUCTURE SEAHLPRES

    *" CHANGING

    *" VALUE(SHLP) TYPE SHLP_DESCR_T

    *" VALUE(CALLCONTROL) LIKE DDSHF4CTRL STRUCTURE DDSHF4CTRL

    *"----


    TYPES: begin of ty_code,

    dam_code type QMFE-FECOD ,

    end of ty_code.

    DATA : tw_code type ty_code,

    ta_code type table of ty_code.

    IF "callcontrol-step <> 'SELONE' AND

    callcontrol-step <> 'SELECT' AND

    callcontrol-step <> 'DISP'.

    EXIT.

    ENDIF.

    IF callcontrol-step = 'SELECT'.

    CALL FUNCTION 'F4UT_PARAMETER_ALLOCATE'

    EXPORTING

    PARAMETER = 'FECOD'

    TABLES

    SHLP_TAB = shlp_tab

    RECORD_TAB = record_tab

    CHANGING

    SHLP = shlp

    CALLCONTROL = callcontrol

    EXCEPTIONS

    OTHERS = 3.

    ENDIF.

    IF callcontrol-step = 'DISP'.

    • Get the Region

    CALL FUNCTION 'F4UT_PARAMETER_VALUE_GET'

    EXPORTING

    PARAMETER = 'FECOD'

    FIELDNAME = 'FECOD'

    TABLES

    SHLP_TAB = shlp_tab

    RECORD_TAB = record_tab

    RESULTS_TAB = ta_code

    CHANGING

    SHLP = shlp

    CALLCONTROL = callcontrol

    EXCEPTIONS

    PARAMETER_UNKNOWN = 1

    OTHERS = 2.

    IF SY-SUBRC = 0.

    SORT TA_CODE BY DAM_CODE.

    • Deleting duplicate damage codes in Internal Table ta_code

    DELETE ADJACENT DUPLICATES FROM TA_CODE COMPARING DAM_CODE.

    • Passing changed Internal table to FM

    CALL FUNCTION 'F4UT_PARAMETER_RESULTS_PUT'

    EXPORTING

    PARAMETER = 'REGION'

    FIELDNAME = 'REGION'

    TABLES

    SHLP_TAB = shlp_tab

    RECORD_TAB = record_tab

    SOURCE_TAB = ta_code

    CHANGING

    SHLP = shlp

    CALLCONTROL = callcontrol

    EXCEPTIONS

    PARAMETER_UNKNOWN = 1

    OTHERS = 2.

    ENDIF.

    ENDIF.

    ENDFUNCTION.

    Revert me for any clarifications.

    Regards,

    Suneel G.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.