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

f4 help for the selection criteria

Hi ,

I need to develop a report in with the input would be a text.

The user s asking for a f4 help for the text .

Actually, I need to get the text also by doing the read_text for all the materials .

Can someone help me with the code ? I have never tried with this type of code .

Thanks

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 18, 2008 at 12:22 PM

    Hi ,

    will give you a chunk of code regarding F4 help on the selection screen.

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

    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-023.

    SELECT-OPTIONS:S_PIDNUM FOR ZMST_PERMIT-ZPIDNUM ,

    S_ENGDSC FOR ZMST_PERMIT-ZENGDSC NO INTERVALS LOWER CASE,

    S_ARBDSC FOR ZMST_PERMIT-ZARBDSC NO INTERVALS LOWER CASE,

    S_TARIFF FOR ZMST_PERMIT-ZTARIFF NO INTERVALS,

    S_PERNUM FOR ZMST_PERMIT-ZPERNUM NO INTERVALS,

    S_ARRPRT FOR ZMST_PERMIT-ZARRPRT NO INTERVALS MATCHCODE OBJECT ZMST_PORTS.

    PARAMETER:P_PERTYP(2) TYPE C AS LISTBOX VISIBLE LENGTH 20.

    SELECTION-SCREEN END OF BLOCK B1.

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_PIDNUM-LOW.

    W_NAME2 = 'S_PIDNUM-LOW'.

    W_NAME1 = 'ZPIDNUM'.

    PERFORM F4_HELP USING W_NAME1 W_NAME2 . "calling subroutine to provide desired F4 help

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_PIDNUM-HIGH.

    W_NAME2 = 'S_PIDNUM-HIGH'.

    W_NAME1 = 'ZPIDNUM'.

    PERFORM F4_HELP USING W_NAME1 W_NAME2 . "calling subroutine to provide desired F4 help

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_ENGDSC-LOW.

    W_NAME2 = 'S_ENGDSC'.

    W_NAME1 = 'ZENGDSC'.

    PERFORM F4_HELP USING W_NAME1 W_NAME2 . "calling subroutine to provide desired F4 help

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_ARBDSC-LOW.

    W_NAME2 = 'S_ARBDSC'.

    W_NAME1 = 'ZARBDSC'.

    PERFORM F4_HELP USING W_NAME1 W_NAME2 . "calling subroutine to provide desired F4 help

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_TARIFF-LOW.

    W_NAME2 = 'S_TARIFF'.

    W_NAME1 = 'ZTARIFF'.

    PERFORM F4_HELP USING W_NAME1 W_NAME2 . "calling subroutine to provide desired F4 help

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_PERNUM-LOW.

    W_NAME2 = 'S_PERNUM'.

    W_NAME1 = 'ZPERNUM'.

    PERFORM F4_HELP USING W_NAME1 W_NAME2 . "calling subroutine to provide desired F4 help

    FORM F4_HELP USING: W_VAR TYPE DFIES-FIELDNAME

    W_VAR1 TYPE HELP_INFO-DYNPROFLD .

    Fetching data from zmst_permit for F4 help on PERMIT ID No. --


    IF IT_PERMIT[] IS INITIAL.

    SELECT ZPIDNUM

    ZENGDSC

    ZARBDSC

    ZTARIFF

    ZPERNUM

    ZARRPRT

    ZEFFDT

    ZEXPDT

    FROM ZMST_PERMIT INTO CORRESPONDING FIELDS OF TABLE IT_PERMIT.

    ENDIF.

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

    RETFIELD = W_NAME1 " 'ZPIDNUM'

    DYNPPROG = 'ZMSTR0022'

    DYNPNR = SY-DYNNR

    DYNPROFIELD = W_NAME2 "'S_PIDNUM'

    VALUE_ORG = 'S'

    TABLES

    VALUE_TAB = IT_PERMIT

    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.

    ENDFORM.

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

    So use read_text to get the text into an internal table and pass that internal table to the function module 'F4IF_INT_TABLE_VALUE_REQUEST' .

    I hope this will help you.

    Help children of U.N World Food Program by rewarding them and encourage others to answer your queries

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 18, 2008 at 12:20 PM

    can you elaborate ur requirement....

    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.