Providing F4 help for a field

Dear All,
We have a requirement like providing f4 help for the field Purchase Requisitioner (appears in Items tab of ME51N). I know that we can extend the existing search help by using search help exits but not sure whether will i be able to <b>create a new search help for a field in Std SAP Transaction.</b>
Any inputs on how to do this will be appreciated...
Thank you all in advance,
Regards,
Lakshmi

You can add the INPUT help in an user exit provided.

Similar Messages

  • How can we provide F4 help for parameter field.

    Hi All,
    How can I provide F4 help for parameter field.
    Regards,
    Amar

    hi,
    different ways of applying search help are :
    you can use anyone:
    1)   CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    or
    2) 
    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
    3 )
    methods of applyind search help:
    For search help sometimes we use MATCHCODE----->when we apply it directly to parameter or select option.they are obselete now ii.For search help sometimes we CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST' ??------->if we want to populate data of internal table as search help.
    iii.For search help sometimes we declare tablename-fieldname in selection?------>if that field in that table is having seach help or check table ..F4 will be avaliable directly.
    also:
    Fixed value of domain can also work as search help.
    i hope it will help u a lot
    thaks and regards
    rahul sharma

  • How to provide search help for input field

    Hi Experts,
    I have a field WBS elements on my selection screen view1 .  I need to provide search help for that.
    Can anyone please help how to proceed with that?
    Regards,
    Chitrasen

    hi ,
    pls refer this WIKI on SDN :
    http://wiki.sdn.sap.com/wiki/display/WDABAP/UsingSearchhelpattachmentsforWebDynproABAP
    refer this online SAP help :
    http://help.sap.com/saphelp_nwmobile71/helpdata/en/3d/e53642e2a3ab04e10000000a1550b0/content.htm
    also go thru this thhread :
    Re: search help event
    regards,
    amit

  • How to provide F4 help for a field in table control

    Hi Friends,
    I have requirement like below.
    1.Create one custom transaction code with header and item information.
    2.In item level, we will be designed table control to enter/display the data.
    3.Table control’s first field will be material number and next DOT number (Material may have many DOT numbers) and so on.
    4.First user will enter material number in the table control’s first row’s first field and go to DOT number field.
    5.DOT number has drop down option. If user selects drop down box of DOT number, he gets all the DOT numbers available in database. User selects one DOT number and double clicks on it then it will be populated in DOT number field box.
    But for point number 5,  business wants like when ever user enters material number in table control first field then select DOT number’s drop down then they want to see the particular material’s DOT numbers only in the drop down list for selection. Not all DOT numbers available in data base. Same thing should happen for all item lines in table control.
    Please see below example. 
    Assume data base table has 10 DOT numbers. But material number has only 2 DOT numbers. When ever user enters material number in item level table control and selects DOT number’s drop down then it should show only 2 DOT numbers which are related to particular material number. Not all 10 DOT numbers.
    Could you please suggest me, how can we achieve this?

    Hello,
    Check this :-
    For POV
    Input Help in Dialog Modules
    You can call dialog modules in the POV event using the event keyword PROCESS ON VALUE-REQUEST.
    PROCESS ON VALUE-REQUEST.
    FIELD <f> MODULE <mod>.
    After the PROCESS ON VALUE-REQUEST statement, you can only use the MODULE statement together with the FIELD statement. When the user chooses F4 for a field <f>, the system calls the module <mod> belonging to the FIELD <f> statement. If there is more than one FIELD statement for the same field <f>, only the first is executed. The module <mod> is defined in the ABAP program like a normal PAI module. However, the contents of the screen field <f> are not available, since it is not transported by the FIELD statement during the PROCESS ON HELP-REQUEST event. You can now program your own value lists in the module. However, this procedure is only recommended if it really is not possible to use a search help. Defining search helps is much easier than PROCESS ON VALUE-REQUEST, since the system takes over some of the standard operations, such as getting field contents from the screen. It also ensures that the F4 help has a uniform look and feel throughout the system. Furthermore, it means that you do not have to reassign input help to fields on each screen.
    Despite the introduction of search helps (and search help exits), there are still cases in which you need to use parts of the standard F4 functions directly. In this case, there are some standard function modules that you can use in the POV event. They support search helps, as well as all other kinds of input help, and are responsible for data transport between the screen and the input help. These all have the prefix F4IF_. The most important are:
    F4IF_FIELD_VALUE_REQUEST
    Calls the input help of the ABAP Dictionary dynamically. You can pass the component names of a structure or database table of the ABAP Dictionary to the function module in the import parameters TABNAME and FIELDNAME. The function module starts the ABAP Dictionary input help for this component. All of the relevant screen fields are read. If you specify the import parameters DYNPPROG, DYNPNR, and DYNPROFIELD, the user’s selection is returned to the corresponding field on the screen. If you specify the table parameter RETURN_TAB, the selection is returned into the table instead.
    F4IF_INT_TABLE_VALUE_REQUEST
    This function module displays a value list that you created in an ABAP program. The value list is passed to the function module as the table parameter VALUE_TAB. If you specify the import parameters DYNPPROG, DYNPNR, and DYNPROFIELD, the user’s selection is returned to the corresponding field on the screen. If you specify the table parameter RETURN_TAB, the selection is returned into the table instead.
    There are also two function modules - DYNP_VALUES_READ and DYNP_VALUES_UPDATE - that can read the values of screen fields and return values to them during the POV event. For further information, refer to the relevant function module documentation.
    Input help in dialog modules
    REPORT DEMO_DYNPRO_F4_HELP_MODULE.
    TYPES: BEGIN OF VALUES,
    CARRID TYPE SPFLI-CARRID,
    CONNID TYPE SPFLI-CONNID,
    END OF VALUES.
    DATA: CARRIER(3) TYPE C,
    CONNECTION(4) TYPE C.
    DATA: PROGNAME LIKE SY-REPID,
    DYNNUM LIKE SY-DYNNR,
    DYNPRO_VALUES TYPE TABLE OF DYNPREAD,
    FIELD_VALUE LIKE LINE OF DYNPRO_VALUES,
    VALUES_TAB TYPE TABLE OF VALUES.
    CALL SCREEN 100.
    MODULE INIT OUTPUT.
    PROGNAME = SY-REPID.
    DYNNUM = SY-DYNNR.
    CLEAR: FIELD_VALUE, DYNPRO_VALUES.
    FIELD_VALUE-FIELDNAME = 'CARRIER'.
    APPEND FIELD_VALUE TO DYNPRO_VALUES.
    ENDMODULE.
    MODULE CANCEL INPUT.
    LEAVE PROGRAM.
    ENDMODULE.
    MODULE VALUE_CARRIER INPUT.
    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
    EXPORTING
    TABNAME = 'DEMOF4HELP'
    FIELDNAME = 'CARRIER1'
    DYNPPROG = PROGNAME
    DYNPNR = DYNNUM
    DYNPROFIELD = 'CARRIER'.
    ENDMODULE.
    MODULE VALUE_CONNECTION INPUT.
    CALL FUNCTION 'DYNP_VALUES_READ'
    EXPORTING
    DYNAME = PROGNAME
    DYNUMB = DYNNUM
    TRANSLATE_TO_UPPER = 'X'
    TABLES
    DYNPFIELDS = DYNPRO_VALUES.
    READ TABLE DYNPRO_VALUES INDEX 1 INTO FIELD_VALUE.
    SELECT CARRID CONNID
    FROM SPFLI
    INTO CORRESPONDING FIELDS OF TABLE VALUES_TAB
    WHERE CARRID = FIELD_VALUE-FIELDVALUE.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    RETFIELD = 'CONNID'
    DYNPPROG = PROGNAME
    DYNPNR = DYNNUM
    DYNPROFIELD = 'CONNECTION'
    VALUE_ORG = 'S'
    TABLES
    VALUE_TAB = VALUES_TAB.
    ENDMODULE.
    The next screen (statically defined) for screen 100 is itself. It has the following layout:
    The input fields have been adopted from the program fields CARRIER and CONNECTION. The pushbutton has the function code CANCEL with function type E.
    The screen flow logic is as follows:
    PROCESS BEFORE OUTPUT.
    MODULE INIT.
    PROCESS AFTER INPUT.
    MODULE CANCEL AT EXIT-COMMAND.
    PROCESS ON VALUE-REQUEST.
    FIELD CARRIER MODULE VALUE_CARRIER.
    FIELD CONNECTION MODULE VALUE_CONNECTION.
    When the user chooses input help for the individual fields, the following is displayed:
    For the Airline field, the POV module VALUE_CARRIER is called. The function module F4IF_FIELD_VALUE_REQUEST displays the input help for the component CARRIER1 of the structure DEMOF4HELP from the ABAP Dictionary, namely the search help DEMOF4DE. The user’s selection is returned to the screen field CARRIER.
    For the Flight number field, the POV module VALUE_CONNECTION is called. The function module DYNP_VALUE_READ transports the value of the screen field CARRIER into the program. The program then reads the corresponding values from the database table SPFLI into the internal table VALUES_TAB using a SELECT statement, and passes the internal table to F4IF_INT_TABLE_VALUE_REQUEST. This displays the internal table as input help, and places the user’s selection into the screen field CONNECTION.
    For POH------------
    Field Help
    There are three ways of displaying field help for screen elements:
    Data Element Documentation
    If you place a field on the screen in the Screen Painter by copying a ABAP Dictionary field, the corresponding data element documentation from the ABAP Dictionary is automatically displayed when the user chooses field help (as long as the help has not been overridden in the screen flow logic).
    For further information about creating data element documentation, refer to data elements.
    Data Element Supplement Documentation
    If the data element documentation is insufficient, you can expand it by writing a data element supplement
    Data element supplement documentation contains the heading Definition, as well as the following others:
    Use
    Procedure
    Examples
    Dependencies
    To create data element supplement documentation for a screen, choose Goto ® Documentation ® DE supplement doc. from the element list of the screen. A dialog box appears in which the system proposes a number as the identified for the data element supplement. You can then enter help texts for the above headings using the SAPscript editor.
    Data element supplement documentation created in this way is program- and screen-specific. Any data element supplement documentation created in the ABAP Dictionary with the same number is overridden by the screen-specific documentation. You can link existing data element supplement documentation created in the ABAP Dictionary with a screen field by using the table THLPF. To do this, crate a new row in THLPF containing the following data: Program name, screen name, field name, and number of the data element supplement documentation.
    To display data element supplement documentation, you must code the following screen flow logic in the POH event:
    PROCESS ON HELP-REQUEST.
    FIELD <f> [MODULE <mod>] WITH <num>.
    After PROCESS ON HELP-REQUEST, you can only use FIELD statements. If there is no PROCESS ON HELP-REQUEST keyword in the flow logic of the screen, the data element documentation for the current field, or no help at all is displayed when the user chooses F1. Otherwise, the next FIELD statement containing the current field <f> is executed.
    If there is screen-specific data element supplement documentation for the field <f>, you can display it by specifying its number <num>. The number <num> can be a literal or a variable. The variable must be declared and filled in the corresponding ABAP program.
    You can fill the variables, for example, by calling the module <mod> before the help is displayed. However, the FIELD statement does not transport the contents of the screen field <f> to the ABAP program in the PROCESS ON HELP-REQUEST event.
    For further information about data element supplement documentation, refer to Data Element Supplements.
    Calling Help Texts from Dialog Modules
    If data element supplement documentation is insufficient for your requirements, or you want to display help for program fields that you have not copied from the ABAP Dictionary, you can call dialog modules in the POH event:
    PROCESS ON HELP-REQUEST.
    FIELD <f> MODULE <mod>.
    After the PROCESS ON HELP-REQUEST statement, you can only use the MODULE statement together with the FIELD statement. When the user chooses F1 for a field <f>, the system calls the module <mod> belonging to the FIELD <f> statement. If there is more than one FIELD statement for the same field <f>, only the first is executed. However, the contents of the screen field <f> are not available in the module <mod>, since it is not transported by the FIELD statement during the PROCESS ON HELP-REQUEST event. The field help should not be dependent on the user input.
    The module <mod> is defined in the ABAP program like a normal PAI module. The processing logic of the module must ensure that adequate help is displayed for the field in question. Instead of calling an extra screen with text fields, you should use one of the following function modules to display a suitable SAPscript document:
    HELP_OBJECT_SHOW_FOR_FIELD
    This function module displays the data element documentation for components of any structure or database table from the ABAP Dictionary. You pass the name of the component and structure or table to the import parameters FIELD and TABLE.
    HELP_OBJECT_SHOW
    Use this function module to display any SAPscript document. You must pass the document class (for example, TX for general texts, DE for data element documentation) and the name of the document to the import parameters DOKCLASS and DOKNAME. For technical reasons, you must also pass an empty internal table with the line type TLINE to the tables parameter of the function module.
    For further information about how to create SAPscript documents, refer to the Documentation of System Objects documentation.
    Field help on screens.
    REPORT DEMO_DYNPRO_F1_HELP.
    DATA: TEXT(30),
    VAR(4),
    INT TYPE I,
    LINKS TYPE TABLE OF TLINE,
    FIELD3, FIELD4.
    TABLES DEMOF1HELP.
    TEXT = TEXT-001.
    CALL SCREEN 100.
    MODULE CANCEL INPUT.
    LEAVE PROGRAM.
    ENDMODULE.
    MODULE F1_HELP_FIELD2 INPUT.
    INT = INT + 1.
    CASE INT.
    WHEN 1.
    VAR = '0100'.
    WHEN 2.
    VAR = '0200'.
    INT = 0.
    ENDCASE.
    ENDMODULE.
    MODULE F1_HELP_FIELD3 INPUT.
    CALL FUNCTION 'HELP_OBJECT_SHOW_FOR_FIELD'
    EXPORTING
    DOKLANGU = SY-LANGU
    DOKTITLE = TEXT-002
    CALLED_FOR_TAB = 'DEMOF1HELP'
    CALLED_FOR_FIELD = 'FIELD1'.
    ENDMODULE.
    MODULE F1_HELP_FIELD4 INPUT.
    CALL FUNCTION 'HELP_OBJECT_SHOW'
    EXPORTING
    DOKCLASS = 'TX'
    DOKLANGU = SY-LANGU
    DOKNAME = 'DEMO_FOR_F1_HELP'
    DOKTITLE = TEXT-003
    TABLES
    LINKS = LINKS.
    ENDMODULE.
    The next screen (statically defined) for screen 100 is 100. It has the following layout:
    The screen fields DEMOf1HELP-FIELD1 and DEMOF1HELP-FIELD2 from the ABAP Dictionary and the program fields FIELD3 and FIELD4 are assigned to the input fields. The pushbutton has the function code CANCEL with function type E.
    The screen flow logic is as follows:
    PROCESS BEFORE OUTPUT.
    PROCESS AFTER INPUT.
    MODULE CANCEL AT EXIT-COMMAND.
    PROCESS ON HELP-REQUEST.
    FIELD DEMOF1HELP-FIELD2 MODULE F1_HELP_FIELD2 WITH VAR.
    FIELD FIELD3 MODULE F1_HELP_FIELD3.
    FIELD FIELD4 MODULE F1_HELP_FIELD4.
    The components FIELD1 and FIELD2 of structure DEMOF1HELP both refer to the data element DEMOF1TYPE. This data element is documented, and also has two supplements with numbers 0100 and 0200.
    The following field help is displayed:
    When the user chooses F1 on the input field for DEMOF1HELP-FIELD1, the data element documentation for DEMOF1TYPE is displayed, since the field does not occur in the PROCESS ON HELP-REQUEST event.
    If the user chooses F1 repeatedly for the input field DEMOF1HELP-FIELD2, the data element documentation is displayed, along with the supplement documentation for either 0100 or 0200 alternately. The variable VAR is filled in the dialog module F1_HELP_FIELD2.
    When the user chooses F1 on the input field for FIELD3, the data element documentation for DEMOF1TYPE is displayed, since this is called in the dialog module F1_HELP_FIELD3 by the function module HELP_OBJECT_SHOW_FOR_FIELD.
    When the user chooses F1 on the input field for FIELD4, the SAPscript documentation DEMO_FOR_F1_HELP is displayed, since this is called in the dialog module F1_HELP_FIELD4 by the function module HELP_OBJECT.
    Regards,
    Deepu.K

  • How to provide F4 help for given field

    Hello Experts,
    IN moduleprogram screen i have 3 fields .
    Plant , material and sorage location.
    Based on plant and materil i need to provide the possible values of storage location when we press on F4 on storage location field.
    Pleasegive me the code asap.

    Hi Raja
    Pls go thru the code.
    Pls reward pts if help.
    Deepanker
    REPORT Ztest_HELP .
    TABLES : MARA.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETERS : P_MATNR(10) TYPE C.
    SELECTION-SCREEN END OF BLOCK B1.
    DATA : BEGIN OF ITAB OCCURS 0,
    MATNR TYPE MATNR,
    END OF ITAB.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_MATNR.
    SELECT MATNR
    FROM MARA
    INTO TABLE ITAB
    UP TO 10 ROWS.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    RETFIELD = 'MATERIAL NUMBER'
    DYNPPROG = SY-REPID
    DYNPNR = SY-DYNNR
    DYNPROFIELD = 'P_MATNR'
    VALUE_ORG = 'S'
    TABLES
    VALUE_TAB = ITAB
    EXCEPTIONS
    PARAMETER_ERROR = 1
    NO_VALUES_FOUND = 2
    OTHERS = 3. 
    Pls reward pts if help.

  • One example for edit the grid in oops and provide f4 help for particular field in Grid

    Hi all
    Here is the code for that editable Grid
    *& Report  YVAMC_EDIT_GRID
    REPORT  YVAMC_EDIT_GRID.
    DATA GR_ALVGRID TYPE REF TO CL_GUI_ALV_GRID .
    *--- Name of the custom control added on the screen
    DATA GC_CUSTOM_CONTROL_NAME TYPE SCRFNAME VALUE 'CC1_ALV' .
    *--- Custom container instance reference
    DATA GR_CCONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER .
    *--- Field catalog table
    DATA GT_FIELDCAT TYPE LVC_T_FCAT .
    TYPES: BEGIN OF IT_LIST,
             BANFN TYPE EBAN-BANFN,
             BNFPO TYPE EBAN-BNFPO,
             BSART TYPE EBAN-BSART,
             BSTYP TYPE EBAN-BSTYP,
             BSAKZ TYPE EBAN-BSAKZ,
             LOEKZ TYPE EBAN-LOEKZ,
             STATU TYPE EBAN-STATU,
             ESTKZ TYPE EBAN-ESTKZ,
             FRGKZ TYPE EBAN-FRGKZ,
             FRGZU TYPE EBAN-FRGZU,
           END OF IT_LIST.
    DATA: GT_LIST TYPE STANDARD TABLE OF IT_LIST,
           WA_LIST TYPE IT_LIST.
    DATA GS_LAYOUT TYPE LVC_S_LAYO .
    DATA OK_CODE TYPE SY-UCOMM.
    DATA ZFLAG.
    ** data for event handling
    DATA: GS_F4 TYPE LVC_S_F4,
           GT_F4 TYPE LVC_T_F4.
    START-OF-SELECTION.
       SELECT BANFN
              BNFPO
              BSART
              BSTYP
              BSAKZ
              LOEKZ
              STATU
              ESTKZ
              FRGKZ
              FRGZU
         FROM  EBAN INTO TABLE GT_LIST.
       CALL SCREEN 9000.
    *&      Module  DISPLAY_ALV  OUTPUT
    *       text
    MODULE STATUS_9000 OUTPUT.
       set pf-status 'ZNEW_STS'.
       PERFORM DISPLAY_ALV.
    ENDMODULE.                 " DISPLAY_ALV  OUTPUT
    *&      Module  USER_COMMAND_9000  INPUT
    *       text
    MODULE USER_COMMAND_9000 INPUT.
       OK_CODE = SY-UCOMM.
       CASE OK_CODE.
         WHEN 'BACK'.
           LEAVE TO SCREEN 0.
         WHEN 'EXIT'.
           LEAVE PROGRAM.
         WHEN 'EDIT'.
           ZFLAG = '1'.
           PERFORM UPDATE_FIELD_CATALOG CHANGING GT_FIELDCAT.
           PERFORM REGISTER_EDIT.
         WHEN 'DISPLAY'.
           ZFLAG = '0'.
           PERFORM UPDATE_FIELD_CATALOG CHANGING GT_FIELDCAT.
       ENDCASE.
    ENDMODULE.                 " USER_COMMAND_9000  INPUT
    *&      Form  DISPLAY_ALV
    *       text
    FORM DISPLAY_ALV.
       IF GR_ALVGRID IS INITIAL.
         CREATE OBJECT GR_CCONTAINER
           EXPORTING
    *        parent                      =
             CONTAINER_NAME              = GC_CUSTOM_CONTROL_NAME  .
         IF SY-SUBRC <> 0.
    *     MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
         ENDIF.
         CREATE OBJECT GR_ALVGRID
           EXPORTING
             I_PARENT = GR_CCONTAINER.
         IF SY-SUBRC <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
         ENDIF.
    *----Preparing field catalog.
         PERFORM PREPARE_FIELD_CATALOG CHANGING GT_FIELDCAT .
         CALL METHOD GR_ALVGRID->SET_TABLE_FOR_FIRST_DISPLAY
       EXPORTING
          IS_LAYOUT                     = GS_LAYOUT
       CHANGING
             IT_OUTTAB                     = GT_LIST[]
             IT_FIELDCATALOG               = GT_FIELDCAT
         IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
         ENDIF.
       ELSE.
         CALL METHOD GR_ALVGRID->REFRESH_TABLE_DISPLAY
    *    EXPORTING
    *      is_stable      =
    *      i_soft_refresh =
    *    EXCEPTIONS
    *      finished       = 1
    *      others         = 2
         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.                    "DISPLAY_ALV
    *&      Form  prepare_field_catalog
    *       text
    *      -->PT_FIELDCAT  text
    FORM PREPARE_FIELD_CATALOG CHANGING PT_FIELDCAT TYPE LVC_T_FCAT .
       DATA LS_FCAT TYPE LVC_S_FCAT .
       LS_FCAT-FIELDNAME = 'BANFN' .
       LS_FCAT-INTTYPE = 'C' .
    *ls_fcat-outputlen = '10' .
       LS_FCAT-COLTEXT = 'Requisition no' .
    *  LS_FCAT-SELTEXT = 'Requisition no' .
       APPEND LS_FCAT TO PT_FIELDCAT .
       LS_FCAT-FIELDNAME = 'BNFPO' .
       LS_FCAT-INTTYPE = 'N' .
    *ls_fcat-outputlen = '5' .
       LS_FCAT-COLTEXT = 'Item no' .
       LS_FCAT-SELTEXT = 'Item no' .
       APPEND LS_FCAT TO PT_FIELDCAT .
       LS_FCAT-FIELDNAME = 'BSART' .
       LS_FCAT-INTTYPE = 'C' .
    *ls_fcat-outputlen = '5' .
       LS_FCAT-COLTEXT = 'Doc Type' .
       LS_FCAT-SELTEXT = 'Doc Type' .
       APPEND LS_FCAT TO PT_FIELDCAT .
       LS_FCAT-FIELDNAME = 'BSTYP' .
       LS_FCAT-INTTYPE = 'C' .
    *ls_fcat-outputlen = '1' .
       LS_FCAT-COLTEXT = 'Doc Category' .
       LS_FCAT-SELTEXT = 'Doc Category' .
       APPEND LS_FCAT TO PT_FIELDCAT .
       LS_FCAT-FIELDNAME = 'BSAKZ' .
       LS_FCAT-INTTYPE = 'C' .
    *ls_fcat-outputlen = '1' .
       LS_FCAT-COLTEXT = 'Control Indicator' .
       LS_FCAT-SELTEXT = 'Control Indicator' .
       APPEND LS_FCAT TO PT_FIELDCAT .
       LS_FCAT-FIELDNAME = 'LOEKZ' .
       LS_FCAT-INTTYPE = 'C' .
    *ls_fcat-outputlen = '1' .
       LS_FCAT-COLTEXT = 'Deletion Indicator' .
       LS_FCAT-SELTEXT = 'Deletion Indicator' .
       APPEND LS_FCAT TO PT_FIELDCAT .
       LS_FCAT-FIELDNAME = 'STATU' .
       LS_FCAT-INTTYPE = 'C' .
       LS_FCAT-F4AVAILABL = 'X'.
    *ls_fcat-outputlen = '1' .
       LS_FCAT-COLTEXT = 'Processing status' .
       LS_FCAT-SELTEXT = 'Processing Status' .
       APPEND LS_FCAT TO PT_FIELDCAT .
       LS_FCAT-FIELDNAME = 'ESTKZ' .
       LS_FCAT-INTTYPE = 'C' .
    *ls_fcat-outputlen = '1' .
       LS_FCAT-COLTEXT = 'Creation Indicator' .
       LS_FCAT-SELTEXT = 'Creation Indicator' .
       APPEND LS_FCAT TO PT_FIELDCAT .
       LS_FCAT-FIELDNAME = 'FRGKZ' .
       LS_FCAT-INTTYPE = 'C' .
    *  ls_fcat-outputlen = '1' .
       LS_FCAT-COLTEXT = 'Release Indicator' .
       LS_FCAT-SELTEXT = 'Release Indicator' .
       APPEND LS_FCAT TO PT_FIELDCAT .
       LS_FCAT-FIELDNAME = 'FRGZU' .
       LS_FCAT-INTTYPE = 'C' .
    *ls_fcat-outputlen = '8' .
       LS_FCAT-COLTEXT = 'Release Status' .
       LS_FCAT-SELTEXT = 'Release Status' .
       APPEND LS_FCAT TO PT_FIELDCAT .
    ENDFORM.                    "prepare_field_catalog
    *&      Form  update_field_catalog
    *       text
    *      -->PT_FIELDCAT  text
    FORM UPDATE_FIELD_CATALOG CHANGING PT_FIELDCAT TYPE LVC_T_FCAT.
       DATA LS_FCAT TYPE LVC_S_FCAT .
       CALL METHOD GR_ALVGRID->GET_FRONTEND_FIELDCATALOG
         IMPORTING
           ET_FIELDCATALOG = PT_FIELDCAT[].
       LOOP AT PT_FIELDCAT INTO LS_FCAT .
         IF ZFLAG = '1'.
           IF LS_FCAT-FIELDNAME = 'BSART' .
             LS_FCAT-EDIT = 'X' .
             LS_FCAT-F4AVAILABL = 'X'.
             LS_FCAT-REF_TABLE = 'T161T'.
             LS_FCAT-REF_FIELD = 'BSART'.
             MODIFY PT_FIELDCAT FROM LS_FCAT .
           ENDIF .
           IF LS_FCAT-FIELDNAME = 'BSTYP' .
             LS_FCAT-EDIT = 'X' .
             MODIFY PT_FIELDCAT FROM LS_FCAT .
           ENDIF .
           IF LS_FCAT-FIELDNAME = 'BSAKZ' .
             LS_FCAT-EDIT = 'X' .
             MODIFY PT_FIELDCAT FROM LS_FCAT .
           ENDIF .
           IF LS_FCAT-FIELDNAME = 'LOEKZ' .
             LS_FCAT-EDIT = 'X' .
             MODIFY PT_FIELDCAT FROM LS_FCAT .
           ENDIF .
           IF LS_FCAT-FIELDNAME = 'STATU' .
             LS_FCAT-EDIT = 'X' .
             LS_FCAT-F4AVAILABL = 'X'.
    *        ls_fcat-drdn_hndl = '1'.
    *        ls_fcat-outputlen = 15.
             MODIFY PT_FIELDCAT FROM LS_FCAT .
           ENDIF .
           IF LS_FCAT-FIELDNAME = 'ESTKZ' .
             LS_FCAT-EDIT = 'X' .
             MODIFY PT_FIELDCAT FROM LS_FCAT .
           ENDIF .
           IF LS_FCAT-FIELDNAME = 'FRGKZ' .
             LS_FCAT-EDIT = 'X' .
    * for laready attcahed search help
             LS_FCAT-F4AVAILABL = 'X'.
             LS_FCAT-REF_TABLE = 'T161U'.
             LS_FCAT-REF_FIELD = 'FRGKZ'.
             MODIFY PT_FIELDCAT FROM LS_FCAT .
           ENDIF.
           IF LS_FCAT-FIELDNAME = 'FRGZU' .
             LS_FCAT-EDIT = 'X' .
             MODIFY PT_FIELDCAT FROM LS_FCAT .
           ENDIF .
    * add customise f4 help on feild STATU
           CLEAR GT_F4.
           GS_F4-FIELDNAME  = 'STATU'.
           GS_F4-REGISTER   = 'X'.
    *      gs_f4-getbefore  = check_be.               "§7a
    *      gs_f4-chngeafter = chn_aft.               "§7b
           APPEND GS_F4 TO GT_F4.
           CALL METHOD GR_ALVGRID->REGISTER_F4_FOR_FIELDS
             EXPORTING
               IT_F4 = GT_F4.
         ELSEIF ZFLAG = '2'.
           IF LS_FCAT-FIELDNAME = 'BANFN' .
             LS_FCAT-EDIT = 'X' .
             MODIFY PT_FIELDCAT FROM LS_FCAT .
           ENDIF .
           IF LS_FCAT-FIELDNAME = 'BNFPO' .
             LS_FCAT-EDIT = 'X' .
             MODIFY PT_FIELDCAT FROM LS_FCAT .
           ENDIF .
         ELSE.
           IF LS_FCAT-FIELDNAME = 'BSART' .
             LS_FCAT-EDIT = SPACE.
             MODIFY PT_FIELDCAT FROM LS_FCAT .
           ENDIF .
           IF LS_FCAT-FIELDNAME = 'BSTYP' .
             LS_FCAT-EDIT = SPACE .
             MODIFY PT_FIELDCAT FROM LS_FCAT .
           ENDIF .
           IF LS_FCAT-FIELDNAME = 'BSAKZ' .
             LS_FCAT-EDIT = SPACE .
             MODIFY PT_FIELDCAT FROM LS_FCAT .
           ENDIF .
           IF LS_FCAT-FIELDNAME = 'LOEKZ' .
             LS_FCAT-EDIT = SPACE .
             MODIFY PT_FIELDCAT FROM LS_FCAT .
           ENDIF .
           IF LS_FCAT-FIELDNAME = 'STATU' .
             LS_FCAT-EDIT = SPACE .
             MODIFY PT_FIELDCAT FROM LS_FCAT .
           ENDIF .
           IF LS_FCAT-FIELDNAME = 'ESTKZ' .
             LS_FCAT-EDIT = SPACE .
             MODIFY PT_FIELDCAT FROM LS_FCAT .
           ENDIF .
           IF LS_FCAT-FIELDNAME = 'FRGKZ' .
             LS_FCAT-EDIT = SPACE .
             MODIFY PT_FIELDCAT FROM LS_FCAT .
           ENDIF .
           IF LS_FCAT-FIELDNAME = 'FRGZU' .
             LS_FCAT-EDIT = SPACE .
             MODIFY PT_FIELDCAT FROM LS_FCAT .
           ENDIF .
         ENDIF.
       ENDLOOP .
       CALL METHOD GR_ALVGRID->SET_FRONTEND_FIELDCATALOG
         EXPORTING
           IT_FIELDCATALOG = PT_FIELDCAT[].
    ENDFORM.                    "update_field_catalog
    *&      Form  register_edit
    *       text
    FORM REGISTER_EDIT .
       CALL METHOD GR_ALVGRID->REGISTER_EDIT_EVENT
         EXPORTING
           I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_MODIFIED.
    ENDFORM.                    "register_edit

    Hi all
    Here is the code for that editable Grid
    *& Report  YVAMC_EDIT_GRID
    REPORT  YVAMC_EDIT_GRID.
    DATA GR_ALVGRID TYPE REF TO CL_GUI_ALV_GRID .
    *--- Name of the custom control added on the screen
    DATA GC_CUSTOM_CONTROL_NAME TYPE SCRFNAME VALUE 'CC1_ALV' .
    *--- Custom container instance reference
    DATA GR_CCONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER .
    *--- Field catalog table
    DATA GT_FIELDCAT TYPE LVC_T_FCAT .
    TYPES: BEGIN OF IT_LIST,
             BANFN TYPE EBAN-BANFN,
             BNFPO TYPE EBAN-BNFPO,
             BSART TYPE EBAN-BSART,
             BSTYP TYPE EBAN-BSTYP,
             BSAKZ TYPE EBAN-BSAKZ,
             LOEKZ TYPE EBAN-LOEKZ,
             STATU TYPE EBAN-STATU,
             ESTKZ TYPE EBAN-ESTKZ,
             FRGKZ TYPE EBAN-FRGKZ,
             FRGZU TYPE EBAN-FRGZU,
           END OF IT_LIST.
    DATA: GT_LIST TYPE STANDARD TABLE OF IT_LIST,
           WA_LIST TYPE IT_LIST.
    DATA GS_LAYOUT TYPE LVC_S_LAYO .
    DATA OK_CODE TYPE SY-UCOMM.
    DATA ZFLAG.
    ** data for event handling
    DATA: GS_F4 TYPE LVC_S_F4,
           GT_F4 TYPE LVC_T_F4.
    START-OF-SELECTION.
       SELECT BANFN
              BNFPO
              BSART
              BSTYP
              BSAKZ
              LOEKZ
              STATU
              ESTKZ
              FRGKZ
              FRGZU
         FROM  EBAN INTO TABLE GT_LIST.
       CALL SCREEN 9000.
    *&      Module  DISPLAY_ALV  OUTPUT
    *       text
    MODULE STATUS_9000 OUTPUT.
       set pf-status 'ZNEW_STS'.
       PERFORM DISPLAY_ALV.
    ENDMODULE.                 " DISPLAY_ALV  OUTPUT
    *&      Module  USER_COMMAND_9000  INPUT
    *       text
    MODULE USER_COMMAND_9000 INPUT.
       OK_CODE = SY-UCOMM.
       CASE OK_CODE.
         WHEN 'BACK'.
           LEAVE TO SCREEN 0.
         WHEN 'EXIT'.
           LEAVE PROGRAM.
         WHEN 'EDIT'.
           ZFLAG = '1'.
           PERFORM UPDATE_FIELD_CATALOG CHANGING GT_FIELDCAT.
           PERFORM REGISTER_EDIT.
         WHEN 'DISPLAY'.
           ZFLAG = '0'.
           PERFORM UPDATE_FIELD_CATALOG CHANGING GT_FIELDCAT.
       ENDCASE.
    ENDMODULE.                 " USER_COMMAND_9000  INPUT
    *&      Form  DISPLAY_ALV
    *       text
    FORM DISPLAY_ALV.
       IF GR_ALVGRID IS INITIAL.
         CREATE OBJECT GR_CCONTAINER
           EXPORTING
    *        parent                      =
             CONTAINER_NAME              = GC_CUSTOM_CONTROL_NAME  .
         IF SY-SUBRC <> 0.
    *     MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
         ENDIF.
         CREATE OBJECT GR_ALVGRID
           EXPORTING
             I_PARENT = GR_CCONTAINER.
         IF SY-SUBRC <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
         ENDIF.
    *----Preparing field catalog.
         PERFORM PREPARE_FIELD_CATALOG CHANGING GT_FIELDCAT .
         CALL METHOD GR_ALVGRID->SET_TABLE_FOR_FIRST_DISPLAY
       EXPORTING
          IS_LAYOUT                     = GS_LAYOUT
       CHANGING
             IT_OUTTAB                     = GT_LIST[]
             IT_FIELDCATALOG               = GT_FIELDCAT
         IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
         ENDIF.
       ELSE.
         CALL METHOD GR_ALVGRID->REFRESH_TABLE_DISPLAY
    *    EXPORTING
    *      is_stable      =
    *      i_soft_refresh =
    *    EXCEPTIONS
    *      finished       = 1
    *      others         = 2
         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.                    "DISPLAY_ALV
    *&      Form  prepare_field_catalog
    *       text
    *      -->PT_FIELDCAT  text
    FORM PREPARE_FIELD_CATALOG CHANGING PT_FIELDCAT TYPE LVC_T_FCAT .
       DATA LS_FCAT TYPE LVC_S_FCAT .
       LS_FCAT-FIELDNAME = 'BANFN' .
       LS_FCAT-INTTYPE = 'C' .
    *ls_fcat-outputlen = '10' .
       LS_FCAT-COLTEXT = 'Requisition no' .
    *  LS_FCAT-SELTEXT = 'Requisition no' .
       APPEND LS_FCAT TO PT_FIELDCAT .
       LS_FCAT-FIELDNAME = 'BNFPO' .
       LS_FCAT-INTTYPE = 'N' .
    *ls_fcat-outputlen = '5' .
       LS_FCAT-COLTEXT = 'Item no' .
       LS_FCAT-SELTEXT = 'Item no' .
       APPEND LS_FCAT TO PT_FIELDCAT .
       LS_FCAT-FIELDNAME = 'BSART' .
       LS_FCAT-INTTYPE = 'C' .
    *ls_fcat-outputlen = '5' .
       LS_FCAT-COLTEXT = 'Doc Type' .
       LS_FCAT-SELTEXT = 'Doc Type' .
       APPEND LS_FCAT TO PT_FIELDCAT .
       LS_FCAT-FIELDNAME = 'BSTYP' .
       LS_FCAT-INTTYPE = 'C' .
    *ls_fcat-outputlen = '1' .
       LS_FCAT-COLTEXT = 'Doc Category' .
       LS_FCAT-SELTEXT = 'Doc Category' .
       APPEND LS_FCAT TO PT_FIELDCAT .
       LS_FCAT-FIELDNAME = 'BSAKZ' .
       LS_FCAT-INTTYPE = 'C' .
    *ls_fcat-outputlen = '1' .
       LS_FCAT-COLTEXT = 'Control Indicator' .
       LS_FCAT-SELTEXT = 'Control Indicator' .
       APPEND LS_FCAT TO PT_FIELDCAT .
       LS_FCAT-FIELDNAME = 'LOEKZ' .
       LS_FCAT-INTTYPE = 'C' .
    *ls_fcat-outputlen = '1' .
       LS_FCAT-COLTEXT = 'Deletion Indicator' .
       LS_FCAT-SELTEXT = 'Deletion Indicator' .
       APPEND LS_FCAT TO PT_FIELDCAT .
       LS_FCAT-FIELDNAME = 'STATU' .
       LS_FCAT-INTTYPE = 'C' .
       LS_FCAT-F4AVAILABL = 'X'.
    *ls_fcat-outputlen = '1' .
       LS_FCAT-COLTEXT = 'Processing status' .
       LS_FCAT-SELTEXT = 'Processing Status' .
       APPEND LS_FCAT TO PT_FIELDCAT .
       LS_FCAT-FIELDNAME = 'ESTKZ' .
       LS_FCAT-INTTYPE = 'C' .
    *ls_fcat-outputlen = '1' .
       LS_FCAT-COLTEXT = 'Creation Indicator' .
       LS_FCAT-SELTEXT = 'Creation Indicator' .
       APPEND LS_FCAT TO PT_FIELDCAT .
       LS_FCAT-FIELDNAME = 'FRGKZ' .
       LS_FCAT-INTTYPE = 'C' .
    *  ls_fcat-outputlen = '1' .
       LS_FCAT-COLTEXT = 'Release Indicator' .
       LS_FCAT-SELTEXT = 'Release Indicator' .
       APPEND LS_FCAT TO PT_FIELDCAT .
       LS_FCAT-FIELDNAME = 'FRGZU' .
       LS_FCAT-INTTYPE = 'C' .
    *ls_fcat-outputlen = '8' .
       LS_FCAT-COLTEXT = 'Release Status' .
       LS_FCAT-SELTEXT = 'Release Status' .
       APPEND LS_FCAT TO PT_FIELDCAT .
    ENDFORM.                    "prepare_field_catalog
    *&      Form  update_field_catalog
    *       text
    *      -->PT_FIELDCAT  text
    FORM UPDATE_FIELD_CATALOG CHANGING PT_FIELDCAT TYPE LVC_T_FCAT.
       DATA LS_FCAT TYPE LVC_S_FCAT .
       CALL METHOD GR_ALVGRID->GET_FRONTEND_FIELDCATALOG
         IMPORTING
           ET_FIELDCATALOG = PT_FIELDCAT[].
       LOOP AT PT_FIELDCAT INTO LS_FCAT .
         IF ZFLAG = '1'.
           IF LS_FCAT-FIELDNAME = 'BSART' .
             LS_FCAT-EDIT = 'X' .
             LS_FCAT-F4AVAILABL = 'X'.
             LS_FCAT-REF_TABLE = 'T161T'.
             LS_FCAT-REF_FIELD = 'BSART'.
             MODIFY PT_FIELDCAT FROM LS_FCAT .
           ENDIF .
           IF LS_FCAT-FIELDNAME = 'BSTYP' .
             LS_FCAT-EDIT = 'X' .
             MODIFY PT_FIELDCAT FROM LS_FCAT .
           ENDIF .
           IF LS_FCAT-FIELDNAME = 'BSAKZ' .
             LS_FCAT-EDIT = 'X' .
             MODIFY PT_FIELDCAT FROM LS_FCAT .
           ENDIF .
           IF LS_FCAT-FIELDNAME = 'LOEKZ' .
             LS_FCAT-EDIT = 'X' .
             MODIFY PT_FIELDCAT FROM LS_FCAT .
           ENDIF .
           IF LS_FCAT-FIELDNAME = 'STATU' .
             LS_FCAT-EDIT = 'X' .
             LS_FCAT-F4AVAILABL = 'X'.
    *        ls_fcat-drdn_hndl = '1'.
    *        ls_fcat-outputlen = 15.
             MODIFY PT_FIELDCAT FROM LS_FCAT .
           ENDIF .
           IF LS_FCAT-FIELDNAME = 'ESTKZ' .
             LS_FCAT-EDIT = 'X' .
             MODIFY PT_FIELDCAT FROM LS_FCAT .
           ENDIF .
           IF LS_FCAT-FIELDNAME = 'FRGKZ' .
             LS_FCAT-EDIT = 'X' .
    * for laready attcahed search help
             LS_FCAT-F4AVAILABL = 'X'.
             LS_FCAT-REF_TABLE = 'T161U'.
             LS_FCAT-REF_FIELD = 'FRGKZ'.
             MODIFY PT_FIELDCAT FROM LS_FCAT .
           ENDIF.
           IF LS_FCAT-FIELDNAME = 'FRGZU' .
             LS_FCAT-EDIT = 'X' .
             MODIFY PT_FIELDCAT FROM LS_FCAT .
           ENDIF .
    * add customise f4 help on feild STATU
           CLEAR GT_F4.
           GS_F4-FIELDNAME  = 'STATU'.
           GS_F4-REGISTER   = 'X'.
    *      gs_f4-getbefore  = check_be.               "§7a
    *      gs_f4-chngeafter = chn_aft.               "§7b
           APPEND GS_F4 TO GT_F4.
           CALL METHOD GR_ALVGRID->REGISTER_F4_FOR_FIELDS
             EXPORTING
               IT_F4 = GT_F4.
         ELSEIF ZFLAG = '2'.
           IF LS_FCAT-FIELDNAME = 'BANFN' .
             LS_FCAT-EDIT = 'X' .
             MODIFY PT_FIELDCAT FROM LS_FCAT .
           ENDIF .
           IF LS_FCAT-FIELDNAME = 'BNFPO' .
             LS_FCAT-EDIT = 'X' .
             MODIFY PT_FIELDCAT FROM LS_FCAT .
           ENDIF .
         ELSE.
           IF LS_FCAT-FIELDNAME = 'BSART' .
             LS_FCAT-EDIT = SPACE.
             MODIFY PT_FIELDCAT FROM LS_FCAT .
           ENDIF .
           IF LS_FCAT-FIELDNAME = 'BSTYP' .
             LS_FCAT-EDIT = SPACE .
             MODIFY PT_FIELDCAT FROM LS_FCAT .
           ENDIF .
           IF LS_FCAT-FIELDNAME = 'BSAKZ' .
             LS_FCAT-EDIT = SPACE .
             MODIFY PT_FIELDCAT FROM LS_FCAT .
           ENDIF .
           IF LS_FCAT-FIELDNAME = 'LOEKZ' .
             LS_FCAT-EDIT = SPACE .
             MODIFY PT_FIELDCAT FROM LS_FCAT .
           ENDIF .
           IF LS_FCAT-FIELDNAME = 'STATU' .
             LS_FCAT-EDIT = SPACE .
             MODIFY PT_FIELDCAT FROM LS_FCAT .
           ENDIF .
           IF LS_FCAT-FIELDNAME = 'ESTKZ' .
             LS_FCAT-EDIT = SPACE .
             MODIFY PT_FIELDCAT FROM LS_FCAT .
           ENDIF .
           IF LS_FCAT-FIELDNAME = 'FRGKZ' .
             LS_FCAT-EDIT = SPACE .
             MODIFY PT_FIELDCAT FROM LS_FCAT .
           ENDIF .
           IF LS_FCAT-FIELDNAME = 'FRGZU' .
             LS_FCAT-EDIT = SPACE .
             MODIFY PT_FIELDCAT FROM LS_FCAT .
           ENDIF .
         ENDIF.
       ENDLOOP .
       CALL METHOD GR_ALVGRID->SET_FRONTEND_FIELDCATALOG
         EXPORTING
           IT_FIELDCATALOG = PT_FIELDCAT[].
    ENDFORM.                    "update_field_catalog
    *&      Form  register_edit
    *       text
    FORM REGISTER_EDIT .
       CALL METHOD GR_ALVGRID->REGISTER_EDIT_EVENT
         EXPORTING
           I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_MODIFIED.
    ENDFORM.                    "register_edit

  • Providing F4 help for a feld in alv report

    Hi,
      I created ALV report.......In tthat report I want to allow the user to edit the field by
    providing F4 help for that field............
    Is there any ways two provide that............will be appreciated.
    Regards,
    Naveen M.

    pass the field name and db table name in the ref_fieldname and ref_tabname in fieldcatalog
    check this, this will clarify your doubt.
    type-POOLs : slis.
    data : BEGIN OF gt_vb OCCURS 0,
             auart type auart,
           END OF gt_vb.
    DATA : gt_vbak type STANDARD TABLE OF vbak,
           gt_fcat TYPE slis_t_fieldcat_alv,
           gs_fcat TYPE slis_fieldcat_alv.
    SELECT auart from vbak into TABLE gt_vb UP TO 50 ROWS."gt_vbak UP TO 50 ROWS.
    gs_fcat-col_pos = 1.
    gs_fcat-fieldname = 'AUART'.
    gs_fcat-ref_fieldname = 'AUART'.
    gs_fcat-ref_tabname = 'VBAK'.
    APPEND gs_fcat to gt_fcat.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
       I_CALLBACK_PROGRAM                = sy-repid
       IT_FIELDCAT                       = gt_fcat
      TABLES
        t_outtab                          = gt_vb
    EXCEPTIONS
       PROGRAM_ERROR                     = 1
       OTHERS                            = 2.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Edited by: soumya prakash mishra on Aug 17, 2009 10:54 AM

  • Can we provide new f4 help for a field in a list using grid display

    Hi Gurus,
    Can I provide F4 help for field in edit mode for (which is not using any std. data type, uses only custom char field ) in the list displayed using CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'.
    I know this can be done using OOPS concepts but, I need to know whether it is possible in this manner.
    And please dont suggest me to use CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE' to get automatic  f4 help.
    I need to provide F4 help with my own logic once I press F4 in the edited field in GRID_DISPLAY
    Regards
    Mac.

    Hi Macmohan,
    You have to use F4AVAILABL attribute of fieldcatalog to achieve this.
    lv_fldcat-f4availabl = 'X'.
      lv_fldcat-ref_table = 'T582A'.
      lv_fldcat-ref_field = 'ZEITB'.
    This works with ALV GRID CONTROL
    Regards
    Abhii
    Edited by: Abhii on Dec 16, 2009 3:37 PM

  • For Tcodeme51n , there is no F4 help for one field, how can we provide F4 .

    Hi  ABAP Gurus,
    I am Ramu,
    For tcode me51n, there is one field, for that no F4 help. How can we provide F4 help for that particular field.
    Thanks in Advance.

    Hi Ram
    Pls try the below source code.
    Reward pts if help.
    regards
    Deepanker
    See the following ex:
    TYPES: BEGIN OF TY_MBLNR,
    MBLNR LIKE MKPF-MBLNR,
    END OF TY_MBLNR.
    DATA: IT_MBLNR TYPE STANDARD TABLE OF TY_MBLNR WITH HEADER LINE.
    data: it_ret like ddshretval occurs 0 with header line.
    At selection-screen on value-request for s_mat-low.
    Select MBLNR from mkpf into table it_mblnr.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    DDIC_STRUCTURE = ' '
    RETFIELD = 'MBLNR'
    PVALKEY = ' '
    DYNPPROG = ' '
    DYNPNR = ' '
    DYNPROFIELD = ' '
    STEPL = 0
    WINDOW_TITLE =
    VALUE = ' '
    VALUE_ORG = 'S'
    MULTIPLE_CHOICE = ' '
    DISPLAY = ' '
    CALLBACK_PROGRAM = ' '
    CALLBACK_FORM = ' '
    MARK_TAB =
    IMPORTING
    USER_RESET =
    TABLES
    VALUE_TAB = IT_MBLNR
    FIELD_TAB =
    RETURN_TAB = IT_RET
    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.
    IF SY-SUBRC = 0.
    read table it_ret index 1.
    move it_ret-fieldval to S_mat-low.
    ENDIF.
    Go through the test program.
    REPORT Ztest_HELP .
    TABLES : MARA.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETERS : P_MATNR(10) TYPE C.
    SELECTION-SCREEN END OF BLOCK B1.
    DATA : BEGIN OF ITAB OCCURS 0,
    MATNR TYPE MATNR,
    END OF ITAB.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_MATNR.
    SELECT MATNR
    FROM MARA
    INTO TABLE ITAB
    UP TO 10 ROWS.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    RETFIELD = 'MATERIAL NUMBER'
    DYNPPROG = SY-REPID
    DYNPNR = SY-DYNNR
    DYNPROFIELD = 'P_MATNR'
    VALUE_ORG = 'S'
    TABLES
    VALUE_TAB = ITAB
    EXCEPTIONS
    PARAMETER_ERROR = 1
    NO_VALUES_FOUND = 2
    OTHERS = 3. 
    Reward pts if help.

  • F4 help for a field in module pool

    Hello Experts,
    I need to provide f4 help on field sales office(VKBUR) in my module pool program.
    I have searched forums about it. but all forum contains either doc. no or customers etc.
    these field are directly available on table, so very easy to find.
    But for sales office, how can i provide f4 help. there is no straight entries in tables like for this company code this sales office.
    so its getting difficult for me to provide help.
    so if anybody know the solution plz help, and if anyone know table where all sales offices are stored, i will be thankful.
    Thanks,
    Amar

    Hi amar_war,
    use screen painter to edit the screen layout where the field VKBUR is on. Double click the field to get the details screen. Here you can attach a search help to the field.
    H_TVBUR has no more parameters, it will display a list of al sales offices with description text
    H_TVBVK will also show the sales group, if VKGRP is a screen field, it will restrict the result list automatically on matching VKGRP.
    H_TVKBZ has also VKORG VTWEG SPART - it will take those values from screen if filled.
    If you are not satisfied with the results, you can easily create your own search help using own selection method and own search help exits if required.
    Try standard search help for standard field first.
    You can create a copy of VKBUR as ZVKBUR and attach search help there, you can create your own screen structure and attach the search help there - 50 ways to get your search help...
    Regards,
    Clemens

  • F4 help for one field in modulepool program..(Possible values)

    Hello Experts,
    I have 3 fields in my module pool screen.
    PLANT, MATERIALNO AND STORAGELOCATION.
    BASED ON PLANT AND MATERIAL I NEED TO PROVIDE F4 HELP FOR STORAGE LOCATION(LGORT).
    How can i write the code in PROCESS ON VALUE REQUEST ..
    AND WHICH FUNCTION MODULE SHOULD BE USED.
    Please can anybody send me the code asap.
    I will give u full points if ur code matches my requirement.

    Hi Raja,
               i will send a sample code for ur problem check in once..In that code i explicitly hardcoded the values for serchhelp.Instead of that we have to use select statement based on ur condition and place them in internal table ok.
    FUNCTION MODULE:
    F4IF_INT_TABLE_VALUE_REQUEST.
    CODE:
    *& Report  YSEARCHHELP                                                 *
    *& DEVELOPER   : KIRAN KUMAR.G.A                                       *
    *& PURPOSE     : DEMO ON SEARCH HELP                                   *
    *& CREATION DT : 27/12/2007                                            *
    *& REQUEST     : ERPK900035                                            *
    REPORT  YSEARCHHELP.
    INTERNAL TABLE FOR STORING NAMES IN SELECTION LIST
    data: begin of t_itab occurs 0,
            name(10) type c,
          end of t_itab.
    *FIELDNAME AND TAB NAME FOR THE SELECTION
    DATA :field_tab LIKE dfies  OCCURS 0 WITH HEADER LINE.
    *THE TABLE FOR RETURNING THE NAME OF THE SELECTED ITEM
    DATA : return_tab LIKE ddshretval OCCURS 0 WITH HEADER LINE.
    *START THE SELECTION SCREEN BLOCK
    selection-screen begin of block ss1 with frame.
    parameters: p_name1(10) type c.
    selection-screen end of block ss1.
    *& F4 Help for p_name1                                                 *
    at selection-screen on value-request for p_name1.
    *CLEAR ALL EXISTING DATA
    *TO BE DONE EVERYTIME F4 HELP IS REQUESTED
    REFRESH t_itab.
    REFRESH field_tab.
      field_tab-fieldname = 'ERNAM'.
      field_tab-tabname = 'VBAK'.
    APPEND field_tab.
    t_itab-name = 'Andrews'.
    append t_itab.
    t_itab-name = 'Jennie'.
    append t_itab.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
      EXPORTING
      DDIC_STRUCTURE         = ' '
        retfield               = field_tab-fieldname
      PVALKEY                = ' '
      DYNPPROG               = ' '
      DYNPNR                 = ' '
      DYNPROFIELD            = ' '
      STEPL                  = 0
        WINDOW_TITLE           = 'Select name'
      VALUE                  = ' '
      VALUE_ORG              = 'C'
      MULTIPLE_CHOICE        = ' '
      DISPLAY                = ' '
      CALLBACK_PROGRAM       = ' '
      CALLBACK_FORM          = ' '
      MARK_TAB               =
    IMPORTING
      USER_RESET             =
      tables
       value_tab              = t_itab
       FIELD_TAB              = field_tab
       RETURN_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.
    else.
    p_name1 = return_tab-fieldval.
    ENDIF.
    Award points if helpful.
    Kiran Kumar.G
                    Have a Nice Day..

  • F4 help for a field in item table in a view cluster

    Hi All,
    I have a view cluster with two tables. I should provide F4 help for field in item table based on the selected row of the header table.
    F4 should have only values fetched based on the header table entry.
    How can i achieve this. Please suggest.
    Regards,
    Kusuma K.

    Hi amar_war,
    use screen painter to edit the screen layout where the field VKBUR is on. Double click the field to get the details screen. Here you can attach a search help to the field.
    H_TVBUR has no more parameters, it will display a list of al sales offices with description text
    H_TVBVK will also show the sales group, if VKGRP is a screen field, it will restrict the result list automatically on matching VKGRP.
    H_TVKBZ has also VKORG VTWEG SPART - it will take those values from screen if filled.
    If you are not satisfied with the results, you can easily create your own search help using own selection method and own search help exits if required.
    Try standard search help for standard field first.
    You can create a copy of VKBUR as ZVKBUR and attach search help there, you can create your own screen structure and attach the search help there - 50 ways to get your search help...
    Regards,
    Clemens

  • Search Help for a Field of a Table Control

    I have designed a screen using 'Table Control' with fields like Date, BoxNo,Quantity etc. Kindly tell me how to go about providing a search help for the field 'BoxNo' of this table control so that the user is not required to scroll down the entire table/list for selecting a particular box no.
    Thanx in advance,
    Alok.

    When you go to screen painer, in screen painter attributes window, there is an atribute called search help, fill it.
    Another way is, after PAI put:
    PROCESS ON VALUE-REQUEST.
      FIELD box_no MODULE f1_help_box_no.
    And gives logic in that module using FM F4IF_INT_TABLE_VALUE_REQUEST.
    Regards.

  • How to create Search Help for a field in Table control !!

    Hello Friends,
                  I like to know - How to create Search Help for a field in Table control. Is it possible, if it is please share ur knowledge, I wud be happy if U provide some source code example for this.
    Thanks,
    Senthil

    Check the sample code:
    *&  Include           ZSRO_MPRN_SEARCH                                 *
    MODULE PSTLZ_F4 INPUT
    MODULE pstlz_f4 INPUT.
    reading post code
      DATA: stepl TYPE systepl,
            stepl_index TYPE systepl.
      CLEAR: stepl, stepl_index.
      CLEAR:   lt_returntab,lt_dynpfields,i_mprn1.
      REFRESH: lt_returntab,lt_dynpfields,i_mprn1.
      lt_dynpfields-fieldname = 'I_MPRN-POST_CODE'.
      lt_dynpfields-stepl     = stepl.
      APPEND lt_dynpfields. CLEAR lt_dynpfields.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname               = sy-repid
          dynumb               = sy-dynnr
          translate_to_upper   = c_x
          determine_loop_index = c_x
        TABLES
          dynpfields           = lt_dynpfields
        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 EQ 0.
        READ TABLE lt_dynpfields INDEX 1.
      ENDIF.
      ws_outcode  = lt_dynpfields-fieldvalue.
      stepl_index = lt_dynpfields-stepl.
      REPLACE '*' WITH ' ' INTO lt_dynpfields-fieldvalue.
      IF NOT lt_dynpfields-fieldvalue IS INITIAL.
        MOVE lt_dynpfields-fieldvalue TO ws_outcode.
        ws_len = STRLEN( lt_dynpfields-fieldvalue ).
        IF ws_len GE 7.
          ws_len = ws_len - 3.
         ws_icode = ws_code+ws_len(3).
          lt_dynpfields-fieldvalue = lt_dynpfields-fieldvalue+0(ws_len).
          CONCATENATE lt_dynpfields-fieldvalue '%'
              INTO ws_outcode.
          CONDENSE lt_dynpfields-fieldvalue.
       REPLACE ws_icode WITH ' ' INTO lt_dynpfields-fieldvalue.
        ELSE.
          CONCATENATE lt_dynpfields-fieldvalue+0(4) '%'
            INTO ws_outcode.
        ENDIF.
       ws_ocode = ws_code+0(3).
      ENDIF.
    reading MPRN
      CLEAR:   lt_returntab,lt_dnpfields,i_mprn1.
      REFRESH: lt_returntab,lt_dnpfields,i_mprn1.
      lt_dnpfields-fieldname = 'I_MPRN-MPRN'.
      lt_dnpfields-stepl     = stepl_index.
      APPEND lt_dnpfields. CLEAR lt_dnpfields.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname               = sy-repid
          dynumb               = sy-dynnr
          translate_to_upper   = 'X'
        TABLES
          dynpfields           = lt_dnpfields
        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 EQ 0.
        READ TABLE lt_dnpfields INDEX 1.
      ENDIF.
    MPRN blank and Post code exist
      IF lt_dnpfields-fieldvalue IS INITIAL.
        IF NOT lt_dynpfields-fieldvalue IS INITIAL.
          SELECT mprn ser_num sub_bud bud_name del_pt_alias
                 bud_num dep_street prin_street dbl_dep_street
                 dep_locty post_town county outcode incode
                 lg_site_ind file_date FROM zspa_mprn INTO
                 CORRESPONDING FIELDS OF TABLE i_mprn1
                 WHERE outcode LIKE ws_outcode.
        ELSE.
    MPRN blank and Post code blank
          SELECT mprn ser_num sub_bud bud_name del_pt_alias
                 bud_num dep_street prin_street dbl_dep_street
                 dep_locty post_town county outcode incode
                 lg_site_ind file_date FROM zspa_mprn INTO
                 CORRESPONDING FIELDS OF TABLE i_mprn1.
        ENDIF.
      ELSE.
    MPRN exist and Post code exist
        IF NOT lt_dynpfields-fieldvalue IS INITIAL.
          SELECT mprn ser_num sub_bud bud_name del_pt_alias
                 bud_num dep_street prin_street dbl_dep_street
                 dep_locty post_town county outcode incode
                 lg_site_ind file_date FROM zspa_mprn INTO
                 CORRESPONDING FIELDS OF TABLE i_mprn1
                 WHERE outcode LIKE ws_outcode AND
                       mprn EQ lt_dnpfields-fieldvalue.
        ELSE.
    MPRN exist and Post code blank
          SELECT mprn ser_num sub_bud bud_name del_pt_alias
                 bud_num dep_street prin_street dbl_dep_street
                 dep_locty post_town county outcode incode
                 lg_site_ind file_date FROM zspa_mprn INTO
                 CORRESPONDING FIELDS OF TABLE i_mprn1
                 WHERE mprn EQ lt_dnpfields-fieldvalue.
        ENDIF.
      ENDIF.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'MPRN'
          dynpprog        = sy-repid
          dynpnr          = sy-dynnr
          window_title    = 'Select MPRN'
          value_org       = 'S'
        TABLES
          value_tab       = i_mprn1 "lt_mprn
          return_tab      = lt_returntab
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
      IF sy-subrc EQ 0.
        READ TABLE lt_returntab INDEX 1.
        READ TABLE i_mprn1 WITH KEY mprn = lt_returntab-fieldval.
        IF sy-subrc EQ 0.
    Updating post code
          CONCATENATE i_mprn1-outcode  i_mprn1-incode
                        INTO ws_postcode
                             SEPARATED BY space.
          MOVE ws_postcode TO i_mprn-post_code.
          CLEAR   : i_dnpfld,
                    ws_dynpfld.
          REFRESH : i_dnpfld.
          ws_dyname   = 'ZSRO_MASTER_DATA'.
          ws_dynumb   = '0301'.
          ws_dynpfld-fieldname  ='I_MPRN-POST_CODE'.
          ws_dynpfld-fieldvalue = ws_postcode .
          ws_dynpfld-stepl      = stepl_index.
          APPEND ws_dynpfld TO i_dnpfld.
          CALL FUNCTION 'DYNP_VALUES_UPDATE'
            EXPORTING
              dyname               = ws_dyname
              dynumb               = ws_dynumb
            TABLES
              dynpfields           = i_dnpfld
            EXCEPTIONS
              invalid_abapworkarea = 1
              invalid_dynprofield  = 2
              invalid_dynproname   = 3
              invalid_dynpronummer = 4
              invalid_request      = 5
              no_fielddescription  = 6
              undefind_error       = 7
              OTHERS               = 8.
          IF sy-subrc <> 0.
          ENDIF.
    Updating MPRN
          MOVE i_mprn1-mprn TO i_mprn-mprn.
          CLEAR   : i_dnpfld,
                    ws_dynpfld.
          REFRESH : i_dnpfld.
          ws_dyname   = 'ZSRO_MASTER_DATA'.
          ws_dynumb   = '0301'.
          ws_dynpfld-fieldname  ='I_MPRN-MPRN'.
          ws_dynpfld-fieldvalue = i_mprn1-mprn .
          ws_dynpfld-stepl      = stepl_index.
          APPEND ws_dynpfld TO i_dnpfld.
          CALL FUNCTION 'DYNP_VALUES_UPDATE'
            EXPORTING
              dyname               = ws_dyname
              dynumb               = ws_dynumb
            TABLES
              dynpfields           = i_dnpfld
            EXCEPTIONS
              invalid_abapworkarea = 1
              invalid_dynprofield  = 2
              invalid_dynproname   = 3
              invalid_dynpronummer = 4
              invalid_request      = 5
              no_fielddescription  = 6
              undefind_error       = 7
              OTHERS               = 8.
          IF sy-subrc <> 0.
          ENDIF.
        ENDIF.
      ELSEIF sy-subrc EQ 2.
        MESSAGE s005(zspa) WITH ws_postcode .
      ENDIF.
    ENDMODULE.                    "PSTLZ_F4 INPUT
    MODULE MPRN_F4 INPUT
    MODULE mprn_f4 INPUT.
    reading post code
    DATA: stepl TYPE systepl,
           stepl_index TYPE systepl.
      CLEAR: stepl, stepl_index.
      CLEAR:   lt_returntab,lt_dynpfields,i_mprn1.
      REFRESH: lt_returntab,lt_dynpfields,i_mprn1.
      lt_dynpfields-fieldname = 'I_MPRN-POST_CODE'.
      lt_dynpfields-stepl     = stepl.
      APPEND lt_dynpfields. CLEAR lt_dynpfields.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname               = sy-repid
          dynumb               = sy-dynnr
          translate_to_upper   = c_x
          determine_loop_index = c_x
        TABLES
          dynpfields           = lt_dynpfields
        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 EQ 0.
        READ TABLE lt_dynpfields INDEX 1.
      ENDIF.
      ws_outcode = lt_dynpfields-fieldvalue.
      stepl_index = lt_dynpfields-stepl.
      REPLACE '*' WITH ' ' INTO lt_dynpfields-fieldvalue.
      IF NOT lt_dynpfields-fieldvalue IS INITIAL.
        MOVE lt_dynpfields-fieldvalue TO ws_outcode.
        ws_len = STRLEN( lt_dynpfields-fieldvalue ).
        IF ws_len GE 7.
          ws_len = ws_len - 3.
         ws_icode = ws_code+ws_len(3).
          lt_dynpfields-fieldvalue = lt_dynpfields-fieldvalue+0(ws_len).
          CONCATENATE lt_dynpfields-fieldvalue '%'
              INTO ws_outcode.
          CONDENSE lt_dynpfields-fieldvalue.
       REPLACE ws_icode WITH ' ' INTO lt_dynpfields-fieldvalue.
        ELSE.
          CONCATENATE lt_dynpfields-fieldvalue+0(4) '%'
            INTO ws_outcode.
        ENDIF.
       ws_ocode = ws_code+0(3).
      ENDIF.
    reading MPRN
      CLEAR:   lt_returntab,lt_dnpfields,i_mprn1.
      REFRESH: lt_returntab,lt_dnpfields,i_mprn1.
      lt_dnpfields-fieldname = 'I_MPRN-MPRN'.
      lt_dnpfields-stepl     = stepl_index.
      APPEND lt_dnpfields. CLEAR lt_dnpfields.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname               = sy-repid
          dynumb               = sy-dynnr
          translate_to_upper   = 'X'
        TABLES
          dynpfields           = lt_dnpfields
        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 EQ 0.
        READ TABLE lt_dnpfields INDEX 1.
      ENDIF.
    MPRN blank and Post code exist
      IF lt_dnpfields-fieldvalue IS INITIAL.
        IF NOT lt_dynpfields-fieldvalue IS INITIAL.
          SELECT mprn ser_num sub_bud bud_name del_pt_alias
                 bud_num dep_street prin_street dbl_dep_street
                 dep_locty post_town county outcode incode
                 lg_site_ind file_date FROM zspa_mprn INTO
                 CORRESPONDING FIELDS OF TABLE i_mprn1
                 WHERE outcode LIKE ws_outcode.
        ELSE.
    MPRN blank and Post code blank
          SELECT mprn ser_num sub_bud bud_name del_pt_alias
                 bud_num dep_street prin_street dbl_dep_street
                 dep_locty post_town county outcode incode
                 lg_site_ind file_date FROM zspa_mprn INTO
                 CORRESPONDING FIELDS OF TABLE i_mprn1.
        ENDIF.
      ELSE.
    MPRN exist and Post code exist
        IF NOT lt_dynpfields-fieldvalue IS INITIAL.
          SELECT mprn ser_num sub_bud bud_name del_pt_alias
                 bud_num dep_street prin_street dbl_dep_street
                 dep_locty post_town county outcode incode
                 lg_site_ind file_date FROM zspa_mprn INTO
                 CORRESPONDING FIELDS OF TABLE i_mprn1
                 WHERE outcode LIKE ws_outcode AND
                       mprn EQ lt_dnpfields-fieldvalue.
        ELSE.
    MPRN exist and Post code blank
          SELECT mprn ser_num sub_bud bud_name del_pt_alias
                 bud_num dep_street prin_street dbl_dep_street
                 dep_locty post_town county outcode incode
                 lg_site_ind file_date FROM zspa_mprn INTO
                 CORRESPONDING FIELDS OF TABLE i_mprn1
                 WHERE mprn EQ lt_dnpfields-fieldvalue.
        ENDIF.
      ENDIF.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'MPRN'
          dynpprog        = sy-repid
          dynpnr          = sy-dynnr
          window_title    = 'Select MPRN'
          value_org       = 'S'
        TABLES
          value_tab       = i_mprn1 "lt_mprn
          return_tab      = lt_returntab
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
      IF sy-subrc EQ 0.
        READ TABLE lt_returntab INDEX 1.
        READ TABLE i_mprn1 WITH KEY mprn = lt_returntab-fieldval.
        IF sy-subrc EQ 0.
    Updating MPRN
          MOVE i_mprn1-mprn TO i_mprn-mprn.
          CLEAR   : i_dnpfld,
                    ws_dynpfld.
          REFRESH : i_dnpfld.
          ws_dyname   = 'ZSRO_MASTER_DATA'.
          ws_dynumb   = '0301'.
          ws_dynpfld-fieldname  ='I_MPRN-MPRN'.
          ws_dynpfld-fieldvalue = i_mprn1-mprn .
          ws_dynpfld-stepl      = stepl_index.
          APPEND ws_dynpfld TO i_dnpfld.
    **code changed by laxman 10.08.2005
         ws_dynpfld-stepl  = mprn-current_line.
    **code changed by laxman 10.08.2005
          CALL FUNCTION 'DYNP_VALUES_UPDATE'
            EXPORTING
              dyname               = ws_dyname
              dynumb               = ws_dynumb
            TABLES
              dynpfields           = i_dnpfld
            EXCEPTIONS
              invalid_abapworkarea = 1
              invalid_dynprofield  = 2
              invalid_dynproname   = 3
              invalid_dynpronummer = 4
              invalid_request      = 5
              no_fielddescription  = 6
              undefind_error       = 7
              OTHERS               = 8.
          IF sy-subrc <> 0.
          ENDIF.
    Updating post code
          CONCATENATE i_mprn1-outcode  i_mprn1-incode
                        INTO ws_postcode
                             SEPARATED BY space.
          MOVE ws_postcode TO i_mprn-post_code.
          CLEAR   : i_dnpfld,
                    ws_dynpfld.
          REFRESH : i_dnpfld.
          ws_dyname   = 'ZSRO_MASTER_DATA'.
          ws_dynumb   = '0301'.
          ws_dynpfld-fieldname  ='I_MPRN-POST_CODE'.
          ws_dynpfld-fieldvalue = ws_postcode .
          ws_dynpfld-stepl      = stepl_index.
          APPEND ws_dynpfld TO i_dnpfld.
    **code changed by laxman 10.08.2005
         break gblap0.
         ws_dynpfld-stepl  = mprn-current_line.
         LOOP AT i_mprn.
           MOVE i_mprn1-mprn TO i_mprn-mprn.
           MOVE ws_postcode TO i_mprn-post_code.
           MODIFY i_mprn INDEX
                    mprn-current_line." transporting MPRN POST_CODE.
         ENDLOOP.
    **code changed by laxman 10.08.2005
          CALL FUNCTION 'DYNP_VALUES_UPDATE'
            EXPORTING
              dyname               = ws_dyname
              dynumb               = ws_dynumb
            TABLES
              dynpfields           = i_dnpfld
            EXCEPTIONS
              invalid_abapworkarea = 1
              invalid_dynprofield  = 2
              invalid_dynproname   = 3
              invalid_dynpronummer = 4
              invalid_request      = 5
              no_fielddescription  = 6
              undefind_error       = 7
              OTHERS               = 8.
          IF sy-subrc <> 0.
          ENDIF.
        ENDIF.
      ELSEIF sy-subrc EQ 2.
        MESSAGE s006(zspa) WITH i_mprn1-mprn .
      ENDIF.
    ENDMODULE.                    "MPRN_F4 INPUT
    MODULE GNTC_F4 INPUT
    MODULE gntc_f4 INPUT.
      DATA: BEGIN OF lt_gntc OCCURS 0,
              gntc LIKE iflot-zzgntc,
            END OF lt_gntc.
      CLEAR:   lt_returntab, lt_gntc.
      REFRESH: lt_returntab, lt_gntc.
      lt_gntc-gntc = 'DM'.
      APPEND lt_gntc. CLEAR lt_gntc.
      lt_gntc-gntc = 'NDM'.
      APPEND lt_gntc. CLEAR lt_gntc.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'ZZGNTC'
          dynpprog        = sy-repid
          dynpnr          = sy-dynnr
          window_title    = 'Select Gas Nomination Type Code'
          value_org       = 'S'
        TABLES
          value_tab       = lt_gntc
          return_tab      = lt_returntab
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
      IF sy-subrc EQ 0.
        READ TABLE lt_returntab INDEX 1.
        i_mprn-dm_ndm = lt_returntab-fieldval.
      ENDIF.
    ENDMODULE.                    "GNTC_F4 INPUT
    *&      Module  mprn1_f4  INPUT
          text
    MODULE mprn1_f4 INPUT.
      DATA: lt_f4          TYPE ddshretval OCCURS 0 WITH HEADER LINE,
            lt_returntab1  LIKE ddshretval OCCURS 0 WITH HEADER LINE,
            lt_dynpfields1 LIKE dynpread OCCURS 0 WITH HEADER LINE,
            lt_dnpfields1  LIKE dynpread OCCURS 0 WITH HEADER LINE.
      DATA: stepl1 TYPE systepl,
            stepl_index1 TYPE systepl.
      DATA : i_dnpfld1      LIKE dynpread OCCURS 0 WITH HEADER LINE,
             ws_dyname1     LIKE d020s-prog,
             ws_dynumb1     LIKE d020s-dnum,
             ws_dynpfld1    LIKE dynpread.
      CLEAR: i_dnpfld1,  ws_dyname1, ws_dynumb1, ws_dynpfld1,
             lt_f4, lt_returntab1,lt_dynpfields1, lt_f4,
             stepl1, stepl_index1.
      REFRESH: i_dnpfld1, lt_returntab1,lt_dynpfields1, lt_f4.
    To Determine Steploop Index
      lt_dynpfields1-fieldname = 'I_MPRN-POST_CODE'.
      lt_dynpfields1-stepl     = stepl1.
      APPEND lt_dynpfields1. CLEAR lt_dynpfields1.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname               = sy-repid
          dynumb               = sy-dynnr
          translate_to_upper   = 'X'
          determine_loop_index = 'X'
        TABLES
          dynpfields           = lt_dynpfields1
        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 EQ 0.
        READ TABLE lt_dynpfields1 INDEX 1.
      ENDIF.
      stepl_index1 = lt_dynpfields1-stepl.
      CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
        EXPORTING
          tabname           = 'IFLOT'
          fieldname         = 'I_MPRN-MPRN'
          searchhelp        = 'ZS_MPRN_PC'
          dynpprog          = sy-repid
          dynpnr            = sy-dynnr
        TABLES
          return_tab        = lt_f4
        EXCEPTIONS
          field_not_found   = 1
          no_help_for_field = 2
          inconsistent_help = 3
          no_values_found   = 4
          OTHERS            = 5.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    Update tablecontrol
      READ TABLE lt_f4 WITH KEY fieldname = 'MPRN'.
      IF sy-subrc = 0.
        MOVE lt_f4-fieldval TO i_mprn-mprn.
        ws_dyname1   = 'ZSRO_MASTER_DATA'.
        ws_dynumb1   = '0301'.
        ws_dynpfld1-fieldname  ='I_MPRN-MPRN'.
        ws_dynpfld1-fieldvalue = i_mprn-mprn.
        ws_dynpfld1-stepl      = stepl_index1.
        APPEND ws_dynpfld1 TO i_dnpfld1.
        CALL FUNCTION 'DYNP_VALUES_UPDATE'
          EXPORTING
            dyname               = ws_dyname1
            dynumb               = ws_dynumb1
          TABLES
            dynpfields           = i_dnpfld1
          EXCEPTIONS
            invalid_abapworkarea = 1
            invalid_dynprofield  = 2
            invalid_dynproname   = 3
            invalid_dynpronummer = 4
            invalid_request      = 5
            no_fielddescription  = 6
            undefind_error       = 7
            OTHERS               = 8.
        IF sy-subrc <> 0.
        ENDIF.
      ENDIF.
      CLEAR  : i_dnpfld1, ws_dynpfld1.
      REFRESH: i_dnpfld1.
      READ TABLE lt_f4 WITH KEY fieldname = 'ZZPSTLZ'.
      IF sy-subrc = 0.
        MOVE lt_f4-fieldval TO i_mprn-post_code.
        ws_dyname1   = 'ZSRO_MASTER_DATA'.
        ws_dynumb1   = '0301'.
        ws_dynpfld1-fieldname  ='I_MPRN-POST_CODE'.
        ws_dynpfld1-fieldvalue = i_mprn-post_code.
        ws_dynpfld1-stepl      = stepl_index1.
        APPEND ws_dynpfld1 TO i_dnpfld1.
        CALL FUNCTION 'DYNP_VALUES_UPDATE'
          EXPORTING
            dyname               = ws_dyname1
            dynumb               = ws_dynumb1
          TABLES
            dynpfields           = i_dnpfld1
          EXCEPTIONS
            invalid_abapworkarea = 1
            invalid_dynprofield  = 2
            invalid_dynproname   = 3
            invalid_dynpronummer = 4
            invalid_request      = 5
            no_fielddescription  = 6
            undefind_error       = 7
            OTHERS               = 8.
        IF sy-subrc <> 0.
        ENDIF.
      ENDIF.
    ENDMODULE.                 " mprn1_f4  INPUT
    *&      Module  pstlz1_f4  INPUT
          text
    MODULE pstlz1_f4 INPUT.
      CLEAR: i_dnpfld1,  ws_dyname1, ws_dynumb1, ws_dynpfld1,
              lt_f4, lt_returntab1,lt_dynpfields1, lt_f4,
              stepl1, stepl_index1.
      REFRESH: i_dnpfld1, lt_returntab1,lt_dynpfields1, lt_f4.
    To Determine Steploop Index
      lt_dynpfields1-fieldname = 'I_MPRN-MPRN'.
      lt_dynpfields1-stepl     = stepl1.
      APPEND lt_dynpfields1. CLEAR lt_dynpfields1.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname               = sy-repid
          dynumb               = sy-dynnr
          translate_to_upper   = 'X'
          determine_loop_index = 'X'
        TABLES
          dynpfields           = lt_dynpfields1
        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 EQ 0.
        READ TABLE lt_dynpfields1 INDEX 1.
      ENDIF.
      stepl_index1 = lt_dynpfields1-stepl.
      CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
        EXPORTING
          tabname           = 'IFLOT'
          fieldname         = 'I_MPRN-POST_CODE'
          searchhelp        = 'ZS_MPRN_PC'
          dynpprog          = sy-repid
          dynpnr            = sy-dynnr
        TABLES
          return_tab        = lt_f4
        EXCEPTIONS
          field_not_found   = 1
          no_help_for_field = 2
          inconsistent_help = 3
          no_values_found   = 4
          OTHERS            = 5.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    Update tablecontrol
      READ TABLE lt_f4 WITH KEY fieldname = 'ZZPSTLZ'.
      IF sy-subrc = 0.
        MOVE lt_f4-fieldval TO i_mprn-post_code.
        ws_dyname1   = 'ZSRO_MASTER_DATA'.
        ws_dynumb1   = '0301'.
        ws_dynpfld1-fieldname  ='I_MPRN-POST_CODE'.
        ws_dynpfld1-fieldvalue = i_mprn-post_code.
        ws_dynpfld1-stepl      = stepl_index1.
        APPEND ws_dynpfld1 TO i_dnpfld1.
        CALL FUNCTION 'DYNP_VALUES_UPDATE'
          EXPORTING
            dyname               = ws_dyname1
            dynumb               = ws_dynumb1
          TABLES
            dynpfields           = i_dnpfld1
          EXCEPTIONS
            invalid_abapworkarea = 1
            invalid_dynprofield  = 2
            invalid_dynproname   = 3
            invalid_dynpronummer = 4
            invalid_request      = 5
            no_fielddescription  = 6
            undefind_error       = 7
            OTHERS               = 8.
        IF sy-subrc <> 0.
        ENDIF.
      ENDIF.
      CLEAR  : i_dnpfld1, ws_dynpfld1.
      REFRESH: i_dnpfld1.
      READ TABLE lt_f4 WITH KEY fieldname = 'MPRN'.
      IF sy-subrc = 0.
        MOVE lt_f4-fieldval TO i_mprn-mprn.
        ws_dyname1   = 'ZSRO_MASTER_DATA'.
        ws_dynumb1   = '0301'.
        ws_dynpfld1-fieldname  ='I_MPRN-MPRN'.
        ws_dynpfld1-fieldvalue = i_mprn-mprn.
        ws_dynpfld1-stepl      = stepl_index1.
        APPEND ws_dynpfld1 TO i_dnpfld1.
        CALL FUNCTION 'DYNP_VALUES_UPDATE'
          EXPORTING
            dyname               = ws_dyname1
            dynumb               = ws_dynumb1
          TABLES
            dynpfields           = i_dnpfld1
          EXCEPTIONS
            invalid_abapworkarea = 1
            invalid_dynprofield  = 2
            invalid_dynproname   = 3
            invalid_dynpronummer = 4
            invalid_request      = 5
            no_fielddescription  = 6
            undefind_error       = 7
            OTHERS               = 8.
        IF sy-subrc <> 0.
        ENDIF.
      ENDIF.
    ENDMODULE.                 " pstlz1_f4  INPUT
    Regards,
    Prakash.

  • How to provide input help for a variant

    Hi,
    I have a parameter on the selection screen.
    P_layout like disvariant-variant value check.
    How do I provide input help for this parameter and also how do i check wheather the input entered is correct or not.

    Hi,
    You can create a serch help for the field and add it in program like:
    P_layout like disvariant-variant match-code object 'Searche help name'.
    then if you need to do any validation u can do it at selection screen:
    like:
    at selection-screen for P_layout.
    if..conditions..
    regards,

Maybe you are looking for

  • Time Machine issues (16030) sparsebundle" is already in use for Time Capsule backup

    Time Machine issues (16030) sparsebundle" is already in use for Time Capsule backup process.  Just started happeing been using it for over two years.

  • Sharing file paths on server via email

    Basic question, using either Entourage or Mail.app is it possible to provide a hyperlink to a document located on a leopard server share? thanks

  • Adobe AIR Apps Won't Install!!! Help!

    Please help me. Whenever I' try to install adobe air apps i get an error message: "Something went wrong trying to install this application. Please install the latest version of Adobe AIR from http"//www.adobe.com/go/getair and then try again." I've d

  • Problem in extracting the XMLType schema

    I've registered the XML Schema, created the table based on the schema and inserted values from the table. I'm having trouble in extracting the values from the table. Here are the steps that I've done. Thanks for the help in advance. BEGIN DBMS_XMLSCH

  • Blinking led (fréquence​)

    on peut ajuster la fréquence de "blink" dans tools/option/FP on peut également modifier la fréquence dans le "fichier ini" de LV donc .... la "variable" existe bien dans le code de LV ... mais il n'existe aucun noeud de propriété qui pemette de modif