Skip to Content
avatar image
Former Member

How to get f4help for field when we adding search help to the table?

Hi Experts,

I added one search help to the custom table.

but when i am executing the table the fields are not showing f4help to get the values from search help.

can anybody give me inputs.

Thanks in Advance,

venkat

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • avatar image
    Former Member
    Sep 09, 2008 at 09:06 AM

    Hi,

    Give the search help name in the field. I think you might have missed the fieldname to be given in the search help

    In the search help creation add the field name for which you want the search help and give the value range or Value table for that search help.

    In the table, we can attach that search help object for that field.

    Pls search in SDN for adding this search help to a table.

    Regards

    Lekha

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      Try this code again I tired it I'm getting the values.

      PARAMETERS :
        p_carrid LIKE spfli-carrid,
        p_connid LIKE spfli-connid.
      
      DATA:
        T_DYNPRO TYPE
        STANDARD TABLE
              OF DYNPREAD
            WITH HEADER LINE.
      data:
        W_PROG LIKE D020S-PROG,
        W_DYNP LIKE D020S-DNUM.
      
       DATA:
        FIELD_VALUE LIKE LINE OF T_DYNPRO.
      
       DATA:
          W_TABIX LIKE SY-TABIX,
          w_carrid LIKE spfli-carrid,
          W_CONNID LIKE SPFLI-CONNID.
      
      DATA:
        T_RETURN TYPE STANDARD TABLE OF DDSHRETVAL WITH HEADER LINE.
      
      DATA:
       W_CONN TYPE dfies-fieldnamE,
       W_CARR TYPE dfies-fieldname.
      
       DATA:
          BEGIN OF T_FLIGHT OCCURS 0,
            carrid TYPE SPFLI-CARRID,
            connid TYPE SPFLI-CONNID,
            FLDATE TYPE SFLIGHT-FLDATE,
         END OF  T_FLIGHT .
      
       DATA:
          BEGIN OF itab_connid OCCURS 3,
            carrid TYPE S_CARR_ID,
            connid TYPE SPFLI-CONNID,
         END OF itab_connid.
      
        DATA:
          BEGIN OF itab_carrid OCCURS 3,
            carrid TYPE SPFLI-CARRID,
         END OF itab_carrid.
      
      START-OF-SELECTION.
      
      SELECT CARRID
             CONNID
             FLDATE
        INTO TABLE T_FLIGHT
        FROM SFLIGHT
       WHERE CARRID = P_CARRID
         AND CONNID = P_CONNID.
      
      LOOP AT T_FLIGHT.
        WRITE :/  T_FLIGHT-CARRID,
                  T_FLIGHT-CONNID,
                  T_FLIGHT-FLDATE.
      ENDLOOP.
      
      AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_connid.
      
      * CARRID INITIAL
      
        CLEAR: FIELD_VALUE, T_DYNPRO.
        FIELD_VALUE-FIELDNAME = 'P_CARRID'.
        APPEND FIELD_VALUE TO T_DYNPRO.
      
      w_prog = sy-repid.
      w_dynp = sy-dynnr.
      
      ***TO READ VALUES
       CALL FUNCTION 'DYNP_VALUES_READ'
             EXPORTING
                  DYNAME                   = W_PROG
                  DYNUMB                   = W_DYNP
                  TRANSLATE_TO_UPPER       = 'X'
             TABLES
                  DYNPFIELDS               =  T_DYNPRO.
      
        READ TABLE  T_DYNPRO INDEX 1 INTO FIELD_VALUE.
      
        W_CARRID = FIELD_VALUE-FIELDVALUE.
      
        P_CARRID = W_CARRID.
      ***TO READ VALUES
      IF P_CARRID IS NOT INITIAL.
      
        SELECT carrid connid
                        FROM spfli
                        INTO CORRESPONDING FIELDS OF TABLE itab_connid
                WHERE carrid EQ W_carrid.
      
      
        CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
          EXPORTING
            retfield        = W_CONN
            value_org       = 'S'
          TABLES
            value_tab       = itab_connid
            RETURN_TAB      = T_RETURN
      
          EXCEPTIONS
            parameter_error = 1
            no_values_found = 2
            OTHERS          = 3.
        IF sy-subrc EQ 0.
        ENDIF.
      
       w_connid = T_RETURN-FIELDVAL.
       p_connid =  w_connid.
      
      ELSE.
      
      SELECT CARRID
             CONNID
        INTO TABLE ITAB_CONNID
        FROM SPFLI.
      
          CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
          EXPORTING
            retfield        = W_CONN
            value_org       = 'S'
          TABLES
            value_tab       = itab_connid
            RETURN_TAB      = T_RETURN
      
          EXCEPTIONS
            parameter_error = 1
            no_values_found = 2
            OTHERS          = 3.
        IF sy-subrc EQ 0.
      
      
        ENDIF.
      
      
       w_connid = T_RETURN-FIELDVAL.
       p_connid =  w_connid.
      
      select single carrid
        from spfli
        into w_carrid
       where connid = w_connid.
      
      p_carrid = w_carrid.
      
      ENDIF.

      Or try this code too. For the first time press the enter key in the connid after having selected the carrid in the list.

      tables: spfli.
      
      data:
      begin of t_value1 occurs 0,
      connid type  s_conn_id,
      end of t_value1.
      
      data: t_value2 like standard table of t_value1 with header line,
      p_value1 like t_value1.
      DATA: tVALUE_TAB LIKE scarr OCCURS 0 WITH HEADER LINE,
            t_connid like DFIES-FIELDNAME,
            w_connid like DFIES-FIELDNAME,
            w_repid type sy-repid,
            w_dynnr type sy-dynnr,
            w_field type HELP_INFO-DYNPROFLD,
            w_tabix type sy-tabix,
            w_ftab like DFIES occurs 0 with header line,
            w_value type HELP_INFO-FLDVALUE.
      
      parameters:
      p_carrid type s_carr_id,
      p_connid type spfli-connid.
      
      w_tabix = sy-tabix.
      w_repid = sy-repid.
      w_dynnr = sy-dynnr.
      
      
      at selection-screen on value-request for p_connid.
      
      select carrid
            connid
       from spfli
       into corresponding fields of table t_value1
       where carrid = p_carrid.
      
      if t_value1[] is not initial.
      CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'
        EXPORTING
          endpos_col         = 4
          endpos_row         = 4
          startpos_col       = 1
          startpos_row       = 1
          titletext          = 'Connection Id'
       IMPORTING
         CHOISE             = w_tabix
        tables
          valuetab           = t_value1
       EXCEPTIONS
         BREAK_OFF          = 1
         OTHERS             = 2
                .
      IF sy-subrc <> 0.
       MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      
      else.
      read table t_value1 index w_tabix into p_value1 .
      ENDIF.
      
      w_connid = p_value1.
      p_connid = w_connid.
      endif.
      start-of-selection.
      loop at t_value1.
      write:
        / t_value1-connid.
      endloop.

      Regards

      Lekha

  • avatar image
    Former Member
    Sep 09, 2008 at 09:09 AM

    After the search help is created, goto the table and to the corresponding field goto Enty help/check tab and you need to add the newly created search help in Srch help field and activate the table.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 09, 2008 at 09:12 AM

    Hi,

    You can add search help at Data Element Level or you can give at Check table, Have you done like this only.

    Regards

    jana

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 09, 2008 at 09:35 AM

    Hi venkat,

    After the search help is created, goto the table and to the corresponding field click on Entry help/check tab and you need to add the newly created search help in Search help field and activate the table.

    Regards,

    ganesh

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 09, 2008 at 12:04 PM

    Hi All,

    Thanks for you effort.

    I solved this problem by giving searchhelp name for each field name in the table through menu bar.

    now it is working fine.

    Add comment
    10|10000 characters needed characters exceeded