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

regading F4 help Popup

Hi all,

I wanted to know that I have a selection-screen in which i have a select-option for company code where i m going for F4 help, so what i need is once F4 help is triggered i need customer number should come hard coded in the popup screen. But the problem is for one company code there are N number of customer , so is there any way to get a particular customer.

Neccesary help is appreciated.

Thanks,

satish

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2008 at 09:45 AM

    Hi,

    U need to call a function module for F4 help(dont remember the name)

    u can populate the internal table of this FM using your logic.

    this ensures that when u press f4 it displays only those values which u want user to see.

    tc

    saji

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2008 at 10:14 AM

    Hi,

    gothorugh the below sample code.

    TABLES: mara.

    DATA:

    BEGIN OF x_matnr OCCURS 0,

    matnr LIKE mara-matnr,

    maktx like makt-maktx,

    END OF x_matnr.

    DATA:

    l_dynprofld TYPE help_info-dynprofld,

    l_matnr(7) TYPE c VALUE 'P_MATNR',

    l_prog TYPE sy-repid,

    l_dynnr TYPE sy-dynnr.

    PARAMETERS: p_matnr LIKE mara-matnr,

    p_maktx like makt-maktx.

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_maktx.

    PERFORM f_get_values.

    *&----


    *

    *& Form F_GET_VALUES

    *&----


    *

    • text

    *----


    *

    • --> p1 text

    • <-- p2 text

    *----


    *

    FORM f_get_values.

    DATA: i_return LIKE ddshretval OCCURS 0,

    i_dynpfields like DYNPREAD occurs 0 with header line,

    l_repid like sy-repid.

    l_repid = sy-repid.

    i_dynpfields-fieldname = 'P_MATNR'.

    APPEND I_DYNPFIELDS.

    CALL FUNCTION 'DYNP_VALUES_READ'

    EXPORTING

    dyname = l_repid

    dynumb = '1000'

    tables

    dynpfields = i_dynpfields .

    IF sy-subrc = 0.

    READ TABLE I_DYNPfields INDEX 1.

    IF SY-SUBRC = 0.

    CALL FUNCTION 'CONVERSION_EXIT_MATN2_INPUT'

    EXPORTING

    input = I_DYNPfields-FIELDVALUE

    IMPORTING

    OUTPUT = I_DYNPfields-FIELDVALUE.

    select matnr maktx from makt into table x_matnr

    where matnr = I_DYNPfields-FIELDVALUE.

    ENDIF.

    ENDIF.

    IF NOT X_MATNR[] IS INITIAL.

    l_prog = sy-repid.

    l_dynnr = sy-dynnr.

    l_dynprofld = l_matnr.

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

    retfield = 'MAKTX'

    dynpprog = l_prog

    dynpnr = l_dynnr

    dynprofield = l_dynprofld

    value_org = 'S'

    TABLES

    value_tab = x_matnr

    return_tab = i_return.

    IF sy-subrc <> 0.

    • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    ENDIF.

    ENDFORM. " F_GET_VALUES

    Reward if useful.

    Thanks,

    Ashok.

    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.