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

F4 help

hiii

i had a requirement to attach F4 help plss send me dummy code how to attach it

Regards

hitesh

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    Posted on Sep 18, 2007 at 03:07 PM

    Here is an example of how to do it thru code.

    
    report zrich_0001 .
    
    tables: t001.
    
    data: begin of it001 occurs 0,
          bukrs type t001-bukrs,
          butxt type t001-butxt,
          ort01 type t001-ort01,
          land1 type t001-land1,
          end of it001.
    
    select-options s_bukrs for t001-bukrs.
    
    initialization.
    
      select bukrs butxt ort01 land1 into table it001 from t001.
    
      sort it001 ascending by bukrs.
      delete adjacent duplicates from it001 comparing bukrs.
    
    at selection-screen on value-request for s_bukrs-low.
    
      call function 'F4IF_INT_TABLE_VALUE_REQUEST'
           exporting
                retfield    = 'BUKRS'
                dynprofield = 'S_BUKRS'
                dynpprog    = sy-cprog
                dynpnr      = sy-dynnr
                value_org   = 'S'
           tables
                value_tab   = it001.
    
    start-of-selection.
    
    

    Regards,

    Rich Heilman

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 18, 2007 at 03:10 PM

    ABAP FAQ

    <b>Providing all local n sequential files as f4 help</b>

    REPORT Z50651_FILENAMES_F4 MESSAGE-ID ZMSG_50651.

    ***********SELECTION SCREEN***********************

    PARAMETERS : LOCAL RADIOBUTTON GROUP G1 USER-COMMAND UCOM1,

    APPLN RADIOBUTTON GROUP G1 .

    PARAMETERS : P_HEADER TYPE IBIPPARMS-PATH.

    ***********DATA DECLARATIONS*********************

    DATA : V_FLAG,

    V_HEADER1 TYPE DXFIELDS-LONGPATH,

    V_HEADER TYPE IBIPPARMS-PATH.

    AT SELECTION-SCREEN ON RADIOBUTTON GROUP G1.

    PERFORM CHECK_RADIO.

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_HEADER.

    PERFORM GET_F4_HELP.

    **************FORMS*********************************

    &----


    *& Form CHECK_RADIO

    &----


    • text

    ----


    • --> p1 text

    • <-- p2 text

    ----


    FORM CHECK_RADIO .

    CASE SY-UCOMM.

    WHEN 'UCOM1'.

    IF LOCAL = 'X'.

    V_FLAG = 'L'.

    ELSE.

    V_FLAG = 'A'.

    ENDIF.

    ENDCASE.

    ENDFORM. " CHECK_RADIO

    &----


    *& Form GET_F4_HELP

    &----


    • text

    ----


    • --> p1 text

    • <-- p2 text

    ----


    FORM GET_F4_HELP .

    IF V_FLAG = 'L'.

    CALL FUNCTION 'F4_FILENAME'

    EXPORTING

    PROGRAM_NAME = SYST-CPROG

    DYNPRO_NUMBER = SYST-DYNNR

    FIELD_NAME = 'P_HEADER'

    IMPORTING

    FILE_NAME = V_HEADER.

    P_HEADER = V_HEADER.

    ELSEIF V_FLAG = 'A'.

    CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'

    EXPORTING

    I_LOCATION_FLAG = 'A'

    I_SERVER = '?'

    • I_PATH =

    FILEMASK = '.'

    FILEOPERATION = 'R'

    IMPORTING

    • O_LOCATION_FLAG =

    • O_SERVER =

    O_PATH = V_HEADER1

    • ABEND_FLAG =

    EXCEPTIONS

    RFC_ERROR = 1

    ERROR_WITH_GUI = 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.

    ENDIF.

    ENDFORM. " GET_F4_HELP

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

    <b>F4 help to posnr based on entered vbeln</b>

    REPORT Z50651_F4 MESSAGE-ID ZMSG_50651.

    ******************TABLES DECLARATION*********************

    TABLES : VBAP.

    ******************DATA DECLARATIONS********************

    DATA : PGMNAME LIKE SY-REPID.

    DATA : DYNNO LIKE SY-DYNNR.

    *****************INTERNAL TABLES*************************

    DATA : BEGIN OF IT_VBAP OCCURS 0,

    VBELN LIKE VBAP-VBELN,

    POSNR LIKE VBAP-POSNR,

    END OF IT_VBAP.

    DATA : DYNVALUE TYPE TABLE OF DYNPREAD,

    FIELD_VALUE LIKE LINE OF DYNVALUE.

    ************INITIALIZATION*************************

    INITIALIZATION.

    PGMNAME = SY-REPID.

    DYNNO = SY-DYNNR.

    *************SELECTION SCREEN**********

    PARAMETERS : P_VBELN LIKE VBAP-VBELN,

    P_POSNR LIKE VBAP-POSNR.

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_POSNR.

    PERFORM GET_ENTERED_VBELN.

    PERFORM POPULATE_IT_VBAP.

    PERFORM PROVIDE_F4_VBELN.

    &----


    *& Form PROVIDE_F4_VBELN

    &----


    • text

    ----


    • --> p1 text

    • <-- p2 text

    ----


    FORM PROVIDE_F4_VBELN .

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

    • DDIC_STRUCTURE = ' '

    RETFIELD = 'P_POSNR'

    • PVALKEY = ' '

    DYNPPROG = PGMNAME

    DYNPNR = DYNNO

    DYNPROFIELD = 'P_POSNR'

    • STEPL = 0

    • WINDOW_TITLE =

    • VALUE = ' '

    VALUE_ORG = 'S'

    • MULTIPLE_CHOICE = ' '

    • DISPLAY = ' '

    • CALLBACK_PROGRAM = ' '

    • CALLBACK_FORM = ' '

    • MARK_TAB =

    • IMPORTING

    • USER_RESET =

    TABLES

    VALUE_TAB = IT_VBAP

    • FIELD_TAB =

    • RETURN_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.

    ENDFORM. " PROVIDE_F4_VBELN

    &----


    *& Form POPULATE_IT_VBAP

    &----


    • text

    ----


    • --> p1 text

    • <-- p2 text

    ----


    FORM POPULATE_IT_VBAP .

    READ TABLE DYNVALUE INDEX 1 INTO FIELD_VALUE.

    SELECT VBELN

    POSNR

    FROM VBAP

    INTO TABLE IT_VBAP

    WHERE VBELN = FIELD_VALUE-FIELDVALUE.

    ENDFORM. " POPULATE_IT_VBAP

    &----


    *& Form GET_ENTERED_VBELN

    &----


    • text

    ----


    • --> p1 text

    • <-- p2 text

    ----


    FORM GET_ENTERED_VBELN .

    CLEAR : DYNVALUE,FIELD_VALUE.

    FIELD_VALUE-FIELDNAME = 'P_VBELN'.

    APPEND FIELD_VALUE TO DYNVALUE.

    CALL FUNCTION 'DYNP_VALUES_READ'

    EXPORTING

    DYNAME = PGMNAME

    DYNUMB = DYNNO

    TRANSLATE_TO_UPPER = 'X'

    • REQUEST = ' '

    • PERFORM_CONVERSION_EXITS = ' '

    • PERFORM_INPUT_CONVERSION = ' '

    • DETERMINE_LOOP_INDEX = ' '

    TABLES

    DYNPFIELDS = DYNVALUE

    EXCEPTIONS

    INVALID_ABAPWORKAREA = 1

    INVALID_DYNPROFIELD = 2

    INVALID_DYNPRONAME = 3

    INVALID_DYNPRONUMMER = 4

    INVALID_REQUEST = 5

    NO_FIELDDESCRIPTION = 6

    INVALID_PARAMETER = 7

    UNDEFIND_ERROR = 8

    DOUBLE_CONVERSION = 9

    STEPL_NOT_FOUND = 10

    OTHERS = 11

    .

    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. " GET_ENTERED_VBELN

    Regards

    Vasu

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 18, 2007 at 04:00 PM
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 18, 2007 at 04:26 PM

    Hi,

    can u plz clarify ur req. as 1)it is a report or module pool.

    2) simple selection based on a table or only particular values based on some criteria.

    3)u want F4 help for std field or custom field

    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.