Skip to Content
avatar image
Former Member

How to add a field to the Search help

Hi.

I create a Search help 'ZSH_ELE' in SE11.

Selection Method name is KNA1.

Search help Exit Name is ZSEARCHHELP_EXIT

In Search help Paramenters i provide KUNNR and LAND1.

when i press f4 i got the data also.

Now the Problem is when i press F4 i want get the details of KUNNR, LAND1 and also NAME1.

But i do not want add any NAME1 in my search help.

By seeing SDN i write the code in Search help exit like this.

Source Code of the Function Module.

FUNCTION ZSEARCHHELP_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

*"----


DATA: WA_SHLP TYPE DFIES,

V_NAME1 TYPE KNA1-NAME1,

V_KUNNR TYPE KNA1-KUNNR,

V_VAR(13) TYPE C.

LOOP AT RECORD_TAB.

READ TABLE SHLP-FIELDDESCR INTO WA_SHLP

WITH KEY TABNAME = 'KNA1'

FIELDNAME = 'KUNNR'.

IF SY-SUBRC = 0.

V_VAR = RECORD_TAB-STRING+0(13).

CONDENSE V_VAR NO-GAPS.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

INPUT = V_VAR

IMPORTING

OUTPUT = V_VAR.

SELECT KUNNR NAME1 FROM KNA1 INTO (V_KUNNR, V_NAME1) WHERE KUNNR = V_VAR+3(10).

IF V_NAME1 IS NOT INITIAL.

CONCATENATE RECORD_TAB-STRING V_NAME1 INTO RECORD_TAB-STRING.

MODIFY RECORD_TAB.

ENDIF.

ENDSELECT.

ENDIF.

ENDLOOP.

ENDFUNCTION.

Based on this i did not get the NAME1 values.

How we can add the field(NAME1) to this Search help.

If it is ok. i will add the field in the Predefine search help also.

Thank u.

Krishna.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Oct 20, 2008 at 09:35 AM

    if you add that field in the search help and then only it will apear in the search help .

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 20, 2008 at 12:28 PM

    why you do not want to add field in the search help?

    add the field 'NAME1' to search help 'ZSH_ELE' and activate it. You will get the details of Name1 along with the other two fields that you have included in search help.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 20, 2008 at 02:11 PM
    Add comment
    10|10000 characters needed characters exceeded