Skip to Content
avatar image
Former Member

F4 help

Hello All,

I developed one report where in selection-screen I put S_NAME1 FOR KNA1-NAME1, but here no F4 is there.I want F4 help.can any body help me.

Thanks,

Rakesh

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

8 Answers

  • Sep 16, 2008 at 08:28 AM

    Hi...

    You can create search help for this in the event AT SELECTION SCREEN ON VALUE REQUEST FOR S_NAME1-low.

    Use the function module F4IF_INT_TABLE_VALUE_REQUEST for this.

    Check this sample code...

    data: begin of itab occurs 0,
             name like kunnr-name1,
             end of itab.
      refresh: itab.
    
    AT SELECTION SCREEN ON VALUE REQUEST FOR S_NAME1.  
    
    <write select query to fill this internal tabel with required data or append this internal table with req: entries>
    
      call function 'F4IF_INT_TABLE_VALUE_REQUEST'
        exporting
    *     DDIC_STRUCTURE         = 'ZSPECIALTY_DESC'
          retfield               = 'S_NAME1'                     
    *     PVALKEY                = ' '
          dynpprog               = sy-repid
          dynpnr                 = sy-dynnr
          dynprofield            = 'CCODE'
    *     STEPL                  = 0
    *     window_title           = 'Specialties'
    *     VALUE                  = ' '
          value_org              = 'S'
    *     MULTIPLE_CHOICE        = ' '
    *     display                = 'F'
    *     CALLBACK_PROGRAM       = ' '
    *     CALLBACK_FORM          = ' '
    *     MARK_TAB               =
    *     IMPORTING
    *     USER_RESET             =
        tables
          value_tab              = itab_ccode[]
    *     FIELD_TAB              = fieldtab[]
    *     return_tab             = ret_tab
    *     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.

    call this FM in subroutine and call that subroutine for S_NAME1-HIGH in the same event, to get search help for both lower and upper limits

    Thanks,

    Naveen.I

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 16, 2008 at 08:28 AM

    There is no Standerd Help for that field is available

    You will have to Put Process-on value request in

    selection Screen.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 16, 2008 at 08:28 AM

    Hi,

    Try to include TABLES: KNA1. in your declaration..

    Hope this helps.

    Regards,

    Leonard Chomi

    Just tested it now, and yes there is no search help for that you have to create it.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 16, 2008 at 08:30 AM

    Hi Rakesh,

    Check whether this field KNA1-Name1 has Search Help,goto SE11 and select this field and press Search Help button which shows whether u have search help for this field or no.

    Thanks

    Sudharshan

    Add comment
    10|10000 characters needed characters exceeded

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

    HI...

    Populate an internal table using with the possible values of NAME1 in the INITIALIZATION event.

    In the event

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

    call the FM F4IF_INT_TABLE_VALUE_REQUEST

    It will show the F4 help

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 16, 2008 at 08:41 AM

    There is no search help assigned to KNA1-NAME1.

    Try bellow code see if it is help full.

    REPORT ztest.

    TABLES: kna1.

    SELECT-OPTIONS: s_name1 FOR kna1-name1.

    DATA: BEGIN OF it_kna1 OCCURS 0,

    name1 LIKE kna1-name1,

    END OF it_kna1.

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

    PERFORM get_custname.

    &----


    *& Form get_custname

    &----


    • text

    ----


    • --> p1 text

    • <-- p2 text

    ----


    FORM get_custname .

    DATA: repid LIKE sy-repid.

    repid = sy-repid.

    REFRESH it_kna1.

    CLEAR it_kna1.

    SELECT name1 FROM kna1 INTO TABLE it_kna1 UP TO 100 ROWS.

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

    retfield = 'NAME1'

    dynpprog = repid

    dynpnr = sy-dynnr

    dynprofield = 'S_NAME1-LOW'

    value_org = 'S'

    callback_program = repid

    TABLES

    value_tab = it_kna1.

    ENDFORM. "get_custname

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 16, 2008 at 08:55 AM

    hi,

    you can use function module F4IF_INT_TABLE_VALUE_REQUEST

    or can follow these simple steps for search help:

    go to se11==> put some name after ticking search help radiobutton==> create==>

    then tick " elementery search help " and press enter ===>then put description and table name in selection method ===>then put the field on which u want search help

    in search help parameter==> tick IMP EXP ==> write 1 in lpos and spos===>save and activate===> double click on table name ===> select that field and press search help tab above===> then copy

    i hope it will help u a lot

    thaks and regards

    rahul sharma

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 16, 2008 at 10:51 AM

    DATA: BEGIN OF IT_KNA1 OCCURS 0,

    name1 TYPE KNA1-name1,

    END OF IT_KNA1.

    DATA: RETURN TYPE TABLE OF DDSHRETVAL WITH HEADER LINE.

    SELECT name1

    FROM KNA1

    INTO TABLE IT_KNA1 UP TO 1000 ROWS.

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

    RETFIELD = 'name1'

    DYNPPROG = SY-REPID

    DYNPNR = SY-DYNNR

    DYNPROFIELD = 'V_name1'

    VALUE_ORG = 'S'

    TABLES

    VALUE_TAB = IT_KNA1

    RETURN_TAB = RETURN

    EXCEPTIONS

    PARAMETER_ERROR = 1

    NO_VALUES_FOUND = 2

    OTHERS = 3.

    IF SY-SUBRC = 0.

    SORT RETURN BY FIELDVAL DESCENDING.

    LOOP AT RETURN.

    V_name1 = RETURN-FIELDVAL.

    ENDLOOP.

    ENDIF.

    ENDMODULE. " VALUE_REQUEST INPUT

    Add comment
    10|10000 characters needed characters exceeded