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

F4 HELP

hi experts,

suppose there is a select-option field for lifnr..i wan to create f4 help on this field for lifnr..how cud i do this

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 31, 2008 at 11:16 AM

    Use FM F4IF_INT_TABLE_VALUE_REQUEST

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 31, 2008 at 11:18 AM

    hi,

    you can make search help

    or

    u can use

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST' EXPORTING

    retfield = field_tab-fieldname

    TABLES

    value_tab = value_tab

    field_tab = field_tab

    return_tab = return_tab

    EXCEPTIONS

    parameter_error = 1

    no_values_found = 2

    OTHERS = 3.

    IF sy-subrc = 0.

    kunnr-low = return_tab-fieldval.

    ENDIF.

    like

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

    SELECT lfa1lifnr lfa1name1

    INTO TABLE i_lfa1

    FROM lfa1 INNER JOIN rbkp

    ON lfa1lifnr = rbkplifnr.

    SORT i_lfa1 BY lifnr.

    DELETE ADJACENT DUPLICATES FROM i_lfa1.

    CLEAR : value_tab1,field_tab,return_tab.

    REFRESH : value_tab1,field_tab,return_tab.

    field_tab-fieldname = 'LIFNR'.

    field_tab-tabname = 'LFA1'.

    APPEND field_tab.

    field_tab-fieldname = 'NAME1'.

    field_tab-tabname = 'LFA1'.

    APPEND field_tab.

    field_tab-fieldname = 'LIFNR'.

    LOOP AT i_lfa1 .

    value_tab1-lifnr = i_lfa1-lifnr.

    APPEND value_tab1.

    CLEAR value_tab1.

    value_tab1-name1 = i_lfa1-name1.

    APPEND value_tab1.

    ENDLOOP.

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

    retfield = field_tab-fieldname

    TABLES

    value_tab = value_tab1

    field_tab = field_tab

    return_tab = return_tab

    EXCEPTIONS

    parameter_error = 1

    no_values_found = 2

    OTHERS = 3.

    IF sy-subrc = 0.

    lifnr-low = return_tab-fieldval.

    ENDIF.

    TYPES : BEGIN OF ty_lfa1,

    lifnr TYPE lfa1-lifnr, "Vendor Code

    name1 TYPE lfa1-name1, "Vendor Name

    END OF ty_lfa1.

    DATA : wa_value_tab1 TYPE ty_lfa1.

    DATA : value_tab1 LIKE wa_value_tab1 OCCURS 0 WITH HEADER LINE.

    DATA : field_tab LIKE dfies OCCURS 0 WITH HEADER LINE.

    DATA : return_tab LIKE ddshretval OCCURS 0 WITH HEADER LINE.

    reward if usefull

    Edited by: Dhwani shah on Jan 31, 2008 12:19 PM

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 31, 2008 at 12:10 PM

    Hi Raman,

    Check this code,

    REPORT<b>demo_selection_screen_f4</b>.

    PARAMETERS: p_carr_1 TYPE spfli-carrid,

    p_carr_2 TYPE spfli-carrid.

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_carr_2.

    CALL SCREEN 100 STARTING AT 10 5

    ENDING AT 50 10.

    MODULE value_list OUTPUT.

    SUPPRESS DIALOG.

    LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.

    SET PF-STATUS space.

    NEW-PAGE NO-TITLE.

    WRITE 'Star Alliance' COLOR COL_HEADING.

    ULINE.

    p_carr_2 = 'AC '.

    WRITE: / p_carr_2 COLOR COL_KEY, 'Air Canada'.

    HIDE p_carr_2.

    p_carr_2 = 'LH '.

    WRITE: / p_carr_2 COLOR COL_KEY, 'Lufthansa'.

    HIDE p_carr_2.

    p_carr_2 = 'SAS'.

    WRITE: / p_carr_2 COLOR COL_KEY, 'SAS'.

    HIDE p_carr_2.

    p_carr_2 = 'THA'.

    WRITE: / p_carr_2 COLOR COL_KEY, 'Thai International'.

    HIDE p_carr_2.

    p_carr_2 = 'UA '.

    WRITE: / p_carr_2 COLOR COL_KEY, 'United Airlines'.

    HIDE p_carr_2.

    CLEAR p_carr_2.

    ENDMODULE.

    AT LINE-SELECTION.

    CHECK NOT p_carr_2 IS INITIAL.

    LEAVE TO SCREEN 0.

    or you can create a search_help in SE11 and use in ur report as MATCHCODE OBJECT search_help .

    <b>reward if useful</b>

    Regards,

    sunil kairam.

    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.