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

How to create Search Help for a field in Table control !!

Hello Friends,

I like to know - How to create Search Help for a field in Table control. Is it possible, if it is please share ur knowledge, I wud be happy if U provide some source code example for this.

Thanks,

Senthil

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Nov 29, 2005 at 10:36 AM

    Hi,

    Tow ways to do this. If you have already defined search help for that filed you can use attaching search help in the Screen attributes in SE51.

    Second way is programitically you can do thos.

    in the Flow logic call:

    • Value Request

    PROCESS ON VALUE-REQUEST.

    Field dt_members-PERNR :

    MODULE DISPLAY_PERNR.

      REFRESH: dt_fields, dt_contents.
    
    
      dt_fields-tabname   = 'PA0001'.
      dt_fields-fieldname = 'PERNR'.
      dt_fields-selectflag = c_x.
      APPEND dt_fields.
      CLEAR dt_fields.
    
      dt_fields-tabname   = 'PA0001'.
      dt_fields-fieldname = 'ENAME'.
      APPEND dt_fields.
      CLEAR dt_fields.
    
      CLEAR dt_contents.
    
    * Select from PA0001
      SELECT pernr
             ename
        INTO TABLE dt_contents
        FROM pa0001.
      IF sy-subrc = 0.
        SORT dt_contents BY pernr.
    
        DELETE ADJACENT DUPLICATES FROM dt_contents
          COMPARING pernr.
    
    * Give F4 help
        CALL FUNCTION 'HELP_VALUES_GET_NO_DD_NAME'
             EXPORTING
                  selectfield                  = 'PERNR'
                  titel                        = 'Member PERNR'(028)
             IMPORTING
                  ind                          = dg_ind
             TABLES
                  fields                       = dt_fields
                  full_table                   = dt_contents
             EXCEPTIONS
                  full_table_empty             = 1
                  no_tablestructure_given      = 2
                  no_tablefields_in_dictionary = 3
                  more_then_one_selectfield    = 4
                  no_selectfield               = 5
                  OTHERS                       = 6.
    
        IF sy-subrc EQ 0.
          READ TABLE dt_contents INDEX dg_ind transporting pernr.
          dt_members-pernr = dt_contents-pernr.
        ENDIF.
      ELSE.
       MESSAGE s999 WITH 'No Help Values Found for Primary Contact ID'(012).
      ENDIF.
    
    Thanks&Regards,
    Siri.
    

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Dear Ms. Srilatha,

      This refers to your reply to the thread 'How to create Search Help for a field in Table control'. In your reply you have used two structures dt_fields, dt_contents. May I know the definition of these.

      Regards,

      Alok.

  • author's profile photo Former Member
    Former Member
    Posted on Nov 29, 2005 at 10:38 AM

    Hi,

    I hope this code will help you....

    This code should be done in PAI of your screen.

    PROCESS ON VALUE-REQUEST.

    FIELD it_1001-pernr MODULE freqtyp_data.

    data: begin of it_1001 occurs 0,

    pernr like zfdmr_records-pernr,

    end of t_itab.

    DATA: t_return like ddshretval occurs 0 with header line.

    refresh it_1001.

    clear t_return.

    select pernr from zfdmr_records into table it_1001.

    delete adjacent duplicates from it_1001.

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

    • DDIC_STRUCTURE = ' '

    RETFIELD = 'PERNR'

    • PVALKEY = ' '

    DYNPPROG = sy-cprog

    DYNPNR = sy-dynnr

    DYNPROFIELD = 'ZFDMR_RECORDS-PERNR'

    • STEPL = 0

    • WINDOW_TITLE =

    • VALUE = ' '

    VALUE_ORG = 'S'

    MULTIPLE_CHOICE = ' '

    DISPLAY = 'F'

    • CALLBACK_PROGRAM = ' '

    • CALLBACK_FORM = ' '

    TABLES

    VALUE_TAB = it_1001

    • FIELD_TAB =

    RETURN_TAB = t_return

    • 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 t_return INDEX 1.

    **********

    p_s_pernr = t_return-fieldval.

    here you need to assign the value where ever you want.

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

    Thnaks.

    If this helps you award points and close the thread.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 29, 2005 at 10:42 AM

    hi,

    if you displayed table control using structure then attach the search help in the structure to the corresponding field.

    regards,

    KBS REDDY

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 06, 2006 at 10:05 AM

    Hi,

    Why would you really want to do things the hard way, when you can really do it easily. Attach a search help to the screen field attributes in the screen painter.

    Rgds

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 06, 2006 at 12:18 PM

    .

    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.