F4IF_FIELD_VALUE_REQUEST,

Hi Experts ,
Please Explain how the Functions
F4IF_FIELD_VALUE_REQUEST
F4IF_INT_TABLE_VALUE_REQUEST
are used with an example code

Hi jitendra,
F4IF_INT_TABLE_VALUE_REQUEST
1. sample code (just copy paste)
2.
REPORT ABC.
DATA : BEGIN OF ITAB OCCURS 0,
UNAME LIKE USR01-BNAME,
END OF ITAB.
data : RETURN_TAB LIKE DDSHRETVAL occurs 0 .
data : RETURN_wa LIKE DDSHRETVAL .
PARAMETERS : A(12) TYPE C.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR A.
ITAB-UNAME = 'U01'. APPEND ITAB.
ITAB-UNAME = 'U02'. APPEND ITAB.
ITAB-UNAME = 'U03'. APPEND ITAB.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
retfield = 'ITAB-UNAME'
PVALKEY = ' '
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'A'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
tables
value_tab = ITAB
FIELD_TAB = FTAB
RETURN_TAB = return_tab
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
break-point.
regards,
amit m.

Similar Messages

  • How to avoid popup & pass value dynamically in 'F4IF_FIELD_VALUE_REQUEST' ?

    Hello Experts,
    I am trying to test usage of f4 help function module.
    We want to dynamically pass values from remote machines into the given input parameters of a Given Search help and receive the output into a table (no dialogs required .. so no pop ups )
    I wrote a test program to just test if we can really do that at runtime ?
    This program pops up the window of search help First I want to surpress that window and Second I have no clue
    ( How to pass the input parameters as value eg. 20 to a given field as we pass manually )
    Can some one suggest something here ?
    REPORT  ZTEST_F4_TEST.
    data lt_return TYPE TABLE OF DDSHRETVAL.
    data ls_return TYPE DDSHRETVAL.
    data lt_return_ddic TYPE TABLE OF zDDSHRETVAL.
    data ls_return_ddic TYPE zDDSHRETVAL.
    PARAMETERS ptable type tabname.
    PARAMETERS pfield type fieldname.
    PARAMETERS pshelp type SHLPNAMe.
    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
      EXPORTING
        tabname                   = ptable
        fieldname                 = pfield
        SEARCHHELP                = pshelp
    *   SHLPPARAM                 = ' '
    *   DYNPPROG                  = ' '
    *   DYNPNR                    = ' '
    *   DYNPROFIELD               = ' '
    *   STEPL                     = 0
    *    VALUE                     = ' '
        MULTIPLE_CHOICE           = 'X'
        DISPLAY                   = 'F'
        SUPPRESS_RECORDLIST       = 'X'
    *   CALLBACK_PROGRAM          = ' '
    *   CALLBACK_FORM             = ' '
    *   SELECTION_SCREEN          = ' '
    * IMPORTING
    *   USER_RESET                =
    TABLES
       RETURN_TAB                = lt_return
    * 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.
    data lv_count type i.
    delete lt_return where fieldname <> pfield.
    sort lt_return by fieldval.
    delete ADJACENT DUPLICATES FROM lt_return COMPARING fieldval.

    Hello Sim,
    We will be exposing the Input parameters and Output lists of the SAP Search helps (simple search helps only) as input output of a Webservice.
    So I need to understand how can we exploit the SAP Search Helps ?
    What function modules can take these inputs as structures  and can provide the output in form of a table ?
    Regards,
    Ravi

  • F4IF_FIELD_VALUE_REQUEST   for internal table ?

    Hi,
    I have an internal table with field ORDERNO. How do I use in this FM to get data?
    I am not able to get any F4 help though I have given all values.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield                 = 'ORDERNO'
          dynpprog             = 'ZTEST'
          dynpnr                 = '1010'
          dynprofield           = 'S_ord-LOW'
         TABLES
          value_tab              = orders
         EXCEPTIONS
          parameter_error = 1
          NO_VALUES_FOUND = 2
          others          = 3.
    any help?
    regards,
    ashish
    P.S.: Points will be rewarded

    Hi Ashish,
    Where you call this FM.
    You should call this FM under  PROCESS ON VALUE-REQUEST
    Check this Sample Code,
    PROCESS ON VALUE-REQUEST.
      FIELD D0200_FIELD_TAB-BUFFER MODULE D0200_VALUE_REQU.
    MODULE d0200_value_requ.
    "call the FM here.
          CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
               EXPORTING
                   tabname             = tabname
                   fieldname           = fname
               SEARCHHELP          = ' '
               SHLPPARAM           = ' '
               dynpprog            = progname
               dynpnr              = dynnr
               dynprofield         = ' '
               stepl               = dynp_stepl
                   value               = value_bef_f4
               MULTIPLE_CHOICE     = ' '
               DISPLAY             = ' '
               SUPPRESS_RECORDLIST = ' '
                   callback_program    = progname
                   callback_form       = 'CALLBACK_F4'
              TABLES
                   return_tab          = return_tab
              EXCEPTIONS
                   field_not_found     = 1
                   no_help_for_field   = 2
                   inconsistent_help   = 3
                   no_values_found     = 4
                   OTHERS              = 5.
    ENDMODULE.                    "d0200_value_requ
    Thanks,
    Reward If Helpful.

  • I have used F4IF_FIELD_VALUE_REQUEST function module.but i am not getting t

    Hi friends,
    I have 2 screen fields EQUNR & EQKTX.i have attached custom help to EQUNR.when i select value from f4 help  then i want corresponding value from search help should get populated in the EQKTX field.
    I have used F4IF_FIELD_VALUE_REQUEST function module.but i am not getting the result.
    DATA: lt_return_tab      TYPE TABLE OF ddshretval.
      DATA: lw_return_tab      TYPE ddshretval.
      DATA: lv_equnr LIKE eqkt-equnr,
            lv_eqktx LIKE eqkt-eqktx.
      CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
        EXPORTING
          tabname                   = 'EQKT'
          fieldname                 = 'EQUNR'
          searchhelp                = 'Z_EQKT'
          SHLPPARAM                 = ' '
         dynpprog                  = sy-repid
           dynpnr                    = sy-dynnr
         dynprofield               = 'GW_SCREEN-WPTXT'
          STEPL                     = 0
          VALUE                     = ' '
          MULTIPLE_CHOICE           = 'X'
          DISPLAY                   = ' '
          SUPPRESS_RECORDLIST       = ' '
          CALLBACK_PROGRAM          = ' '
          CALLBACK_FORM             = ' '
          SELECTION_SCREEN          = ' '
        IMPORTING
          USER_RESET                =
       TABLES
         return_tab                = lt_return_tab
        EXCEPTIONS
          FIELD_NOT_FOUND           = 1
          NO_HELP_FOR_FIELD         = 2
          INCONSISTENT_HELP         = 3
          NO_VALUES_FOUND           = 4
          OTHERS                    = 5
      IF sy-subrc = 0.
        READ TABLE lt_return_tab INTO lw_return_tab INDEX 1.
        IF sy-subrc = 0.
         MOVE lw_return_tab-fieldval TO lv_equnr.
          CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
            EXPORTING
              input  = lw_return_tab-fieldval
            IMPORTING
              output = lv_equnr.
          SELECT SINGLE eqktx
            INTO lv_eqktx
            FROM eqkt
            WHERE equnr = lv_equnr AND
                  spras = sy-langu.
          IF sy-subrc = 0.
            gw_screen-wptxt = lv_eqktx.
            gw_screen-equnr = lv_equnr.
          ENDIF.
        ENDIF.
      ENDIF.
    Please provide the solution.

    I have written the same code as you said but still its not giving me the equnr value.
    DATA :  lt_dynpread1        TYPE STANDARD TABLE OF dynpread,
              lt_dynpread11       TYPE STANDARD TABLE OF dynpread,
              lw_dynpread1        LIKE LINE  OF lt_dynpread1,
              lw_dynpread11       LIKE LINE  OF lt_dynpread11,
              lt_return_tab1      TYPE TABLE OF ddshretval,
              lw_return_tab1      TYPE ddshretval,
              lv_equnr1           LIKE eqkt-equnr,
              lv_eqktx1           LIKE eqkt-eqktx,
             lt_eqkt            TYPE STANDARD TABLE OF eqkt,
              li_dselc       TYPE STANDARD TABLE OF dselc,
               lwa_dselc      TYPE dselc.
      TYPES: BEGIN OF lty_eqkt,
            equnr TYPE eqkt-equnr,
            eqktx TYPE eqkt-eqktx,
            END OF lty_eqkt.
      DATA: lt_eqkt TYPE TABLE OF lty_eqkt,
            li_dynpread    TYPE STANDARD TABLE OF dynpread,
            lwa_dynpread   TYPE dynpread.
      DATA:
            lg_condition    TYPE string.
      TYPES: BEGIN OF lty_eqktx,
               sign(1)   TYPE c,
               option(2) TYPE c,
               low       TYPE eqkt-eqktx,
               high      TYPE eqkt-eqktx,
              END OF lty_eqktx.
      DATA: lt_eqktx TYPE STANDARD TABLE OF lty_eqktx.
      DATA:lw_eqktx TYPE lty_eqktx.
      lwa_dynpread-fieldname = 'GW_SCREEN-WPTXT'.
      APPEND lwa_dynpread TO li_dynpread.
      CLEAR lwa_dynpread.
    Read Screen Field Values.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname     = sy-repid
          dynumb     = sy-dynnr
        TABLES
          dynpfields = li_dynpread.
    Read the first record as only one record will be present
      READ TABLE li_dynpread INTO lwa_dynpread INDEX 1.
      gw_screen-wptxt = lwa_dynpread-fieldvalue.
      CLEAR lw_eqktx.
      lw_eqktx-sign = 'I'.
      lw_eqktx-option = 'CP'.
      lw_eqktx-low = gw_screen-wptxt.
      APPEND lw_eqktx TO lt_eqktx.
      CLEAR lw_eqktx.
      IF gw_screen-wptxt IS INITIAL.
        SELECT equnr eqktx
             INTO TABLE lt_eqkt
             FROM eqkt.
      ELSE.
       MOVE 'EQKTX CP GW_SCREEN-WPTXT' TO lg_condition.
    *lg_condition = GW_SCREEN-WPTXT.
        SELECT  equnr eqktx
             INTO TABLE lt_eqkt
             FROM eqkt
          WHERE eqktx IN lt_eqktx.
      ENDIF.
      lwa_dselc-fldname = 'F0002'.
      lwa_dselc-dyfldname = 'GW_SCREEN-WPTXT'.
      APPEND lwa_dselc TO li_dselc.
      CLEAR lwa_dselc.
      lwa_dselc-fldname = 'F0003'.
      lwa_dselc-dyfldname = 'GW_SCREEN-EQUNR'.
      APPEND lwa_dselc TO li_dselc.
      CLEAR lwa_dselc.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
      DDIC_STRUCTURE         = ' '
          retfield               = 'GW_SCREEN-WPTXT'
      PVALKEY                = ' '
          dynpprog          = sy-repid
          dynpnr            = sy-dynnr
          dynprofield            = 'GW_SCREEN-WPTXT'
      STEPL                  = 0
      WINDOW_TITLE           =
      VALUE                  = ' '
          value_org              = 'S'
      MULTIPLE_CHOICE        = ' '
      DISPLAY                = ' '
      CALLBACK_PROGRAM       = ' '
      CALLBACK_FORM          = ' '
      MARK_TAB               =
    IMPORTING
      USER_RESET             =
        TABLES
          value_tab              = lt_eqkt
      FIELD_TAB              =
          return_tab             = lt_return_tab1
          dynpfld_mapping        = li_dselc
    EXCEPTIONS
       parameter_error        = 1
       no_values_found        = 2
       OTHERS                 = 3

  • Got dump ITS_TEMPLATE_NOT_FOUND

    Hi,
    Info on ITS_TEMPLATE_NOT_FOUND.
    Short text : Template interpretation failed. Template does not exist.
    What happened? :
    The ITS service "bbp_poc" failed since not template could be found for
    the screen with the number 100 in the program "SAPLWDTM".
    The template was searched in the following ITS services:
    "bbp_poc"
    Note that for language-dependent templates the language is included
    in the search.
    What can you do?
    Call transaction SE80 and choose the Internet service "bbp_poc". Check
    if the template exists.
    If the template exists in the service, publish the entire service
    to the SITE INTERNAL.
    Note down which actions and inputs caused the error.
    To process the problem further, contact you SAP system
    administrator.
    Using Transaction ST22 for ABAP Dump Analysis, you can look
    at and manage termination messages, and you can also
    keep them for a long time.
    Error analysis:
    As a test, you can set the service parameter ~generateDynpro = 1. The
    system then generates the HTML page for this service without a template.
    You can then at least see which screen was sent by the WebAs. Make sure
    to reset the parameter to its original value.
    Information on where terminated
    Termination occurred in the ABAP program "SAPLWDTM" - in "SYSTEM-EXIT".
    The main program was "SAPLBBP_PO_UI_ITS ".
    In the source code you have the termination point in line 0
    Contents of system fields
    Name Val.
    SY-SUBRC 0
    SY-INDEX 3
    SY-TABIX 8
    SY-DBCNT 6
    SY-FDPOS 40
    SY-LSIND 0
    SY-PAGNO 0
    SY-LINNO 1
    SY-COLNO 1
    SY-PFKEY TABCMOD
    SY-UCOMM REFRESH
    SY-TITLE MCX_DUMMY_POPUP
    SY-MSGTY
    SY-MSGID
    SY-MSGNO 000
    SY-MSGV1
    SY-MSGV2
    SY-MSGV3
    SY-MSGV4
    SY-MODNO 0
    SY-DATUM 20100628
    Active Calls/Events
    No. Ty. Program Include Line
    Name
    11 EVENT SAPLWDTM ??? 0
    SYSTEM-EXIT
    10 FUNCTION SAPLWDTM LWDTMU20 154
    TABCONTROL_SH_START
    9 FORM SAPLSDSD LSDSDF10 131
    F4PROZ_OCX_CALL
    8 FORM SAPLSDSD LSDSDF05 740
    F4PROZ_STEP_PRESEL
    7 FUNCTION SAPLSDSD LSDSDU14 80
    DD_SHLP_SINGLE_STEP
    6 FORM SAPLSDSD LSDSDF05 151
    F4PROZ_LOOP
    5 FORM SAPLSDSD LSDSDF05 55
    F4PROZ
    4 FUNCTION SAPLSDHI LSDHIU12 300
    F4IF_FIELD_VALUE_REQUEST
    3 FORM SAPLBBP_PO_UI_ITS LBBP_PO_UI_ITSF1K 36
    F4_SEARCH_CATEGORY_LIST
    2 MODULE (PAI) SAPLBBP_PO_UI_ITS LBBP_PO_UI_ITSI0M 5
    F4_SEARCH_CATEGORY_LIST
    1 EVENT SAPLBBP_PO_UI_ITS ??? 0
    SYSTEM-EXIT
    SY-UZEIT 134402
    SY-XPROG SAPMSSY1
    SY-XFORM XAB_READ
    of the (Include) program " ".
    Thanks and Regards,
    Shiva

    Hi Matthew,
    Thanks for the reply.
    Active Calls/Events
    No.   Ty.          Program                             Include                             Line
          Name
       12 EVENT        SAPLWDTM                            ???                                     0
          SYSTEM-EXIT
       11 FUNCTION     SAPLWDTM                            LWDTMU20                              154
          TABCONTROL_SH_START
       10 FORM         SAPLSDSD                                LSDSDF10                              131
          F4PROZ_OCX_CALL
        9 FORM         SAPLSDSD                                 LSDSDF05                              740
          F4PROZ_STEP_PRESEL
        8 FUNCTION     SAPLSDSD                              LSDSDU14                               80
          DD_SHLP_SINGLE_STEP
        7 FORM         SAPLSDSD                                 LSDSDF05                              151
          F4PROZ_LOOP
        6 FORM         SAPLSDSD                                 LSDSDF05                               55
          F4PROZ
        5 FUNCTION     SAPLSDHI                                          LSDHIU12                              300
          F4IF_FIELD_VALUE_REQUEST
        4 FUNCTION     SAPLBBP_PDH_PARTNER                 LBBP_PDH_PARTNERU01                   115
          BBP_PDH_PARTNER_SEARCH_HELP
        3 FORM         SAPLBBP_PDH_PARTNER                    LBBP_PDH_PARTNERF16                    22
          F4_SEARCH_PARTNER
        2 MODULE (PAI) SAPLBBP_PDH_PARTNER                 LBBP_PDH_PARTNERI05                     6
          F4_SEARCH_PARTNER
        1 EVENT        SAPLBBP_PO_UI_ITS                   ???                                     0
          SYSTEM-EXIT
    These are active calls before termination of program.
    I dont know how they got dump.
    Thanks and Regards,
    Shiva

  • Dynamic value assignment to a particular column in a vertical ALV

    Hi Friends,
    In the present program ALV has 44 fields and output row is only one(with some field editable).
    My requirement is to change present output to vertical ALV and editable field should be available
    as editable.
    Now I have changed this to transposed ALV manually(not dynamically) with required fields editable.
    Now there is 44 rows and two column "FIELD and "VALUE'.Some values in the second column is editable.
    Previously output was like this:
    field1   field2  field3 ...
    val1     val2    val3   ...
    Now output is like:
    FIELD   VALUE
    field1  value1(type INT)
    field2  value2(type char5) Editable(need F4 help)
    field3  value3(type date)
    My present structure declaration is:
    types: begin of ty_itab,
            field type char 50,
            value type char70,
            celltab type lvc_t_styl,(for editing some values in VALUE column).
           end of ty_itab.
    data: itab type standard table of ty_itab.
    Now the second column i have declared as CHAR70 which contains only char
    values because to put all differt types of values to one single column named
    'VALUE'.
    But as field1 field2 field3... had differnt type of value like integer char date...I need to validate some values
    (specially those which are editable) before saving to custom DB table.
    So I need dynamic value assignment to VALUE column when preparing internal table for display.
    What I want to say is that VALUE column should be able to contain different type of values like INT, DATE, CHAR...etc
    Is the requirement is feasible?
    If yes then How should I declare the structure and populate different type of values within single column 'VALUE'.
    Also is it possible to have F4 helps in the second column (VALUE)???

    Hi Manab,
    I did something comparable: We have a very complex transaction with several subscreens with multiple fields to be filled with complex logic to create a very special contract. The requirement was to create a method to create a copy of this contract being able to apply some changes.
    I created a wizard (transaction SBPT_WIZARD_BUILDER - Wizard-Builder) to accomplish that. I grouped all the fields to just 3 logical groups and thius created 3 stesp where the user gets an ALV as you describe, but we have the rows like FIELD  with the new value editable. Additionally I have hidden fields with table name and field name so that I can determine the characteristics (datatype) at run time.
    The value fields are just strings (every ALV field is a text field on the surface).
    For editable fields, you have an event DATA_CHANGED. I used this method as a handler for the event:
    (I will leave out the wizard part here - maybe a good idea for a blog to explain that)
    METHOD handle_data_changed.
        CALL FUNCTION 'RS_CONV_EX_2_IN'
          EXPORTING
             input_external                     = <mod>-value
             table_field                        = ls_tabfield
    I also created handlers for F1 and F4
    Handler for CL_GUI_ALV_GRID->ONF1
    METHOD handle_f1.
        CALL FUNCTION 'HELP_OBJECT_SHOW_FOR_FIELD'
          EXPORTING
            called_for_tab   = lv_tabname
            called_for_field = lv_fieldname
          EXCEPTIONS
            object_not_found = 1
            sapscript_error  = 2
            OTHERS           = 3.
    Handler for CL_GUI_ALV_GRID->HANDLE_F4
    METHOD handle_f4.
      CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
        EXPORTING
          tabname    = lv_tabname
          fieldname  = lv_fieldname
        TABLES
          return_tab = lt_return_tab
        EXCEPTIONS
          OTHERS     = 5.
        er_event_data->m_event_handled = abap_true.
    * if er_event_data->m_event_handled is not set to abap_true, system will handle it.
    * In this context the message 'Keine Eingabehilfe verfügbar' will be displayed
    ENDMETHOD.
    This is just an excerpt from my project. It shows that you can do more in ALV as you knew.
    I tried to post a little more but the formatting break down, possibly a result of the character limit
    Regards,
    Clemens

  • Own F4 for one field in ALV-OO

    Hi,
    i try to create an own F4 for a specific field in my ALV-OO.
    I do it like this:
    CLASS LCL_EVENT_HANDLER DEFINITION .
      PUBLIC SECTION .
        METHODS:
       HANDLE_ONF4
             FOR EVENT ONF4 OF CL_GUI_ALV_GRID
             IMPORTING E_FIELDNAME
                       E_FIELDVALUE
                       ES_ROW_NO,
    CLASS LCL_EVENT_HANDLER IMPLEMENTATION .
      METHOD HANDLE_ONF4.
        PERFORM HANDLE_ONF4 USING E_FIELDNAME
                                  E_FIELDVALUE
                                  ES_ROW_NO.
      ENDMETHOD.
      GR_EVENT_HANDLER->HANDLE_ONF4               FOR GR_ALVGRID.
      SET HANDLER
      CALL METHOD GR_ALVGRID->SET_TABLE_FOR_FIRST_DISPLAY
        EXPORTING
          IT_TOOLBAR_EXCLUDING = GT_EXCLUDE
    FORM HANDLE_ONF4 USING E_FIELDNAME E_FIELDVALUE ES_ROW_NO.
      BREAK-POINT.
    ENDFORM.
    My problem is, that the break-point will not be reached. Has anyone an ides what mistake i do.
    Have i to set anything in fieldcat?
    Thanks.
    Regards, Dieter

    Hi Dieter,
    modify according to your needs:
    Look at ... * loop once and append F4 result to event reference table
    METHOD handle_f4.
    * Importing VALUE( E_FIELDNAME )    TYPE LVC_FNAME  OPTIONAL  Feldname
    * Importing VALUE( E_FIELDVALUE )   TYPE LVC_VALUE  OPTIONAL  ALV-Control: Zelleninhalt
    * Importing VALUE( ES_ROW_NO )      TYPE LVC_S_ROID OPTIONAL  Zeilen ID
    * Importing VALUE( ER_EVENT_DATA )  TYPE REF TO CL_ALV_EVENT_DATA OPTIONAL  Event Daten
    * Importing VALUE( ET_BAD_CELLS )   TYPE LVC_T_MODI OPTIONAL  Fehlerhafte Zellen
    * Importing VALUE( E_DISPLAY )      TYPE CHAR01     OPTIONAL  Display only
      DATA:
        lt_return_tab TYPE TABLE OF ddshretval,
        lr_dat        TYPE REF TO data,
        lv_tabname    TYPE tabname,
        lv_fieldname  TYPE fieldname,
        lv_field TYPE scrfname.
      FIELD-SYMBOLS:
        <dat> TYPE ANY,
        <tab> TYPE table,
        <rec> TYPE ANY,
        <col> TYPE ANY,
        <tbn> TYPE ANY,
        <ret> TYPE ddshretval,
        <mod> TYPE LINE OF lvc_t_modi,
        <tmd> TYPE lvc_t_modi.
    *  use grid table currently displayed
      ASSIGN:
        mr_tabref->* TO <tab>.
    * position at field where F4 was pressed
      READ TABLE <tab> INDEX es_row_no-row_id ASSIGNING <rec>.
    * get table and field name of value inquestion
      IF e_fieldname = mc_fieldname_value_new.
        ASSIGN COMPONENT:
          'TABNAME'   OF STRUCTURE  <rec> TO <tbn>,
          'FIELDNAME' OF STRUCTURE  <rec> TO <col>.
      ELSEIF e_fieldname = mc_fieldname_value_new2.
        ASSIGN COMPONENT:
          'TABNAME2'   OF STRUCTURE  <rec> TO <tbn>,
          'FIELDNAME2' OF STRUCTURE  <rec> TO <col>.
      ENDIF.
      lv_tabname = <tbn>.
      lv_fieldname = <col>.
    * call default F4
      CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
        EXPORTING
          tabname    = lv_tabname
          fieldname  = lv_fieldname
        TABLES
          return_tab = lt_return_tab
        EXCEPTIONS
          OTHERS     = 5.
      IF sy-subrc = 0.
    * use table refernece in event object
        ASSIGN er_event_data->m_data->* TO <tmd>.
    * loop once and append F4 result to event reference table
        LOOP AT lt_return_tab ASSIGNING <ret>.
          APPEND INITIAL LINE TO <tmd> ASSIGNING <mod>.
          <mod>-row_id              = es_row_no-row_id.
          <mod>-fieldname           = e_fieldname.
          <mod>-value               = <ret>-fieldval.
        ENDLOOP.
        er_event_data->m_event_handled = abap_true.
      ENDIF.
    * if er_event_data->m_event_handled is not set to abap_true, system will handle it.
    * In this context the message 'Keine Eingabehilfe verfügbar' will be displayed
    ENDMETHOD.
    Regards,
    Clemens

  • How to get search help for 2nd  parameter based on the 1st parameter value

    Hi all!
       I have 2 parameters (material no, revision level). I have created a search help for revision level. It has an importing parameter :material no. and one exporting parameter : revision level.When I checked it, it's giving the revision values only for the specified.
    In my report , I have kept these 2 materials in my selection screen.For revision level , I have added the matchcode object which I have created. When I  pressed F4 for revision level, it's giving all the values irrespective of the material no. in the first parameter. How to solve it? Please suggest.

    Hi,
    Try this code filling internal table fields,
    DATA: BEGIN OF values,
            OID TYPE ZCL_OBJECT-OBJECTID,
            ODEC TYPE ZCL_OBJECT-OBJECT_DESC,
           END OF values,
           W_FIELD(10).
    DATA: ZCL_PROJECT-PROJECTID type zcl_project-projectid,
          ZCL_OBJECT-OBJECTID(5).
    DATA: progname TYPE sy-repid,
          dynnum   TYPE sy-dynnr,
          dynpro_values TYPE TABLE OF dynpread,
          field_value LIKE LINE OF dynpro_values,
          values_tab LIKE TABLE OF values.
    CALL SCREEN 100.
    *&      Module  VALUE_PROJECTID  INPUT
          text
    *MODULE VALUE_PROJECTID INPUT.
    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
          EXPORTING
               tabname     = 'ZCL_PROJECT'
               fieldname   = 'PROJECTID'
               dynpprog    = progname
               dynpnr      = dynnum
               dynprofield = 'ZCL_PROJECT-PROJECTID'.
    *ENDMODULE.                 " VALUE_PROJECTID  INPUT
    *&      Module  VALUE_OBJECTID  INPUT
          text
    MODULE VALUE_OBJECTID 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.
    W_FIELD = FIELD_VALUE-FIELDVALUE.
      SELECT  OBJECTID
              OBJECT_DESC
        FROM  ZCL_OBJECT
        INTO  (VALUES-OID,
               VALUES-ODEC)
    WHERE PROJECTID = FIELD_VALUE-FIELDVALUE.
       APPEND VALUES TO VALUES_TAB.
    ENDSELECT.
       CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                retfield    = 'OID'
                dynpprog    = progname
                dynpnr      = dynnum
                dynprofield = 'ZCL_OBJECT-OBJECTID'
                value_org   = 'S'
           TABLES
                value_tab   = values_tab.
    ENDMODULE.                 " VALUE_OBJECTID  INPUT
    *&      Module  INIT  OUTPUT
          text
    MODULE INIT OUTPUT.
      progname = sy-repid.
      dynnum   = sy-dynnr.
      CLEAR: field_value, dynpro_values.
      field_value-fieldname = 'ZCL_PROJECT-PROJECTID'.
      APPEND field_value TO dynpro_values.
      IF SY-UCOMM = 'BACK'.
        LEAVE program.
    ENDIF.
    IF SY-UCOMM = 'ANS'.
       LEAVE  TO SCREEN  '0'.
    ENDIF.
    ENDMODULE.                 " INIT  OUTPUT
    START-OF-SELECTION.
    WRITE: / field_value-fieldvalue,
             W_FIELD.
      LOOP AT VALUES_TAB INTO VALUES.
        WRITE / VALUES.
      ENDLOOP.
      if sy-subrc <> 0.
        WRITE / field_value-fieldvalue.
      endif.
    Plzz reward points if it helps

  • Date field not updated when select on F4 value on editable ALV Grid

    Can some one look into this to see what was wrong.
    I have a report that display fields extracted from a ZTable and display on an ALV Editable Grid.
    The data are displayed as read only mode for these fields:
    Field A -   type char20 and have a search help available.
    Start Date - type dats
    End Date - type dats.
    Field B
    Field C ...
    When user select to add new record,  Field A, Start Date and End Date must be editable, the rest are read only.
    On field A because there is search help available, I have no problem select data on F4 pull down menu and the data is updated on the grid.
    But on field start date and end date, there is F4 menu and when you pull down, it shows the calendar date.  But when I select the date to change, it acts like nothing happens.  I run the debug mode and found out that in function module 'F4IF_FIELD_VALUE_REQUEST', after you select the date field, I got the return code irc = 8 from line 305 of this FM.
    Here is what I did.
    I build field catalog similar like BCALV_EDIT04  (add table type lvc_t_styl to each extracted record to indicate which field will be  editable.
    In the PBO,  I build field catalog and set style as enable for these fields:
    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name = p_struct
        CHANGING
          ct_fieldcat      = p_t_fieldcat.
    LOOP AT p_t_fieldcat INTO ls_fcat.
        CASE   ls_fcat-fieldname.
           when 'Field_A'.
               ls_fcat-ref_table = 'ZTABNAME'.
            ls_fcat-ref_field = 'FIELD_A'.
            ls_fcat-edit = 'X'.
            MODIFY p_t_fieldcat FROM ls_fcat.
       when 'START_DATE' or 'END_DATE'.
        ls_fcat-style = CL_GUI_ALV_GRID=>MC_STYLE_enabled.
             MODIFY p_t_fieldcat FROM ls_fcat.
       endcase.
    Just curious, I copied program BCALV_EDIT_08 to ZBCALV_EDIT08 and make field booking date as editable to test.  When I select to change booking date from F4 menu pull down, the new date is populated to the screen field.  So what was wrong between my program and BCALV_EDIT_08?  Thanks for your help.  I am stuck on this problem for 2 days and could not figure out what was wrong.

    not sure why you use that FM for date filed , you just need in the field catalog make sure that are use a date field of reference , anyway check program BCALV_EDIT_01

  • BAPI and screen checks

    Hello,
    The scenario is like this.
    F-02 is used to post a document. There is a field XREF2 (12 chars) to which a search help is assigned. This field when used in F-02 does not accept other values other than the ones provided by search help.
    Now, when I use BAPI_ACC_GL_POSTING_POST I can assign whatever I want to XREF2, post the document and it will bypass the screen checks storing any value in this field.
    I could take the table used by search help and check the values myself, the problem is it might be changed anytime(a different table might be assigned to search help for example), as well as number of fields with attached search helps may vary.
    So I'm interested whether it is possible to perform screen field checks for the BAPI somewhat automatically ?
    Thanks in advance.

    Well, in F-02 there are additional checks on the fields. A search help which only allows entries from table ZXXXX to be typed in field XREF2. BAPI does not check it and allows to enter values which are not verified against table ZXXXX. Thus the behavior is different - F-02 limits set of allowed entries and BAPI doesn't. I wanted both to behave the same way(limiting entries) but from the first response I believe it can't be done automatically.
    For now I have a partial solution  - using F4IF_FIELD_VALUE_REQUEST to fetch search help entries for field BSEG-XREF2 and validate data before I pass it to BAPI.

  • F4 help for the Date field in Module-Pool program

    Hi,
    I have a requirement wherein the user shud be allowed to choose a date on the calendar using F4 help and after choosing, it shud get displayed as dd.mm.yyyy format in the field. Is there any functional module to implement this.
    Thanks in Advance,
    Saranya.

    Hi,
    Please try the below code in your prgm.
    You have to write the below code in the POV of the required field.
    ***INCLUDE MZDATE_POV_DATEI01 .
    *&      Module  pov_date  INPUT
          text
    module pov_date input.
    DATA: li_ret_tab LIKE ddshretval OCCURS 0 WITH HEADER LINE.
    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
    EXPORTING
    tabname = ' '
    fieldname = ' '
    searchhelp = 'BU_DATE_CHAR'
    TABLES
    return_tab = li_ret_tab
    EXCEPTIONS
    field_not_found = 1
    no_help_for_field = 2
    inconsistent_help = 3
    no_values_found = 4
    OTHERS = 5.
    IF sy-subrc IS INITIAL.
    READ TABLE li_ret_tab INDEX 1.
    IF sy-subrc IS INITIAL.
    wrk_date = li_ret_tab-fieldval. "The required field
    ENDIF.
    ENDIF.
    endmodule.                 " pov_date  INPUT
    Hope it suits ur requirement.
    Reward points if useful.
    Thanks and regards,
    Litta.

  • F4 help for input field

    hi all
    i am developing a z report.input field is customer name (ADRC-NAME1). SAP has not given F4 help on this field.
    please tell mo how to give f4 Help for this field in report.
    regard.
    ulhas

    hi..
    do as below..
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR PR_VERSB.
    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
       EXPORTING
           TABNAME                   = 'MDPB'
           FIELDNAME                 = 'VERSB'
           SEARCHHELP                = 'H_T459V'
           DYNPPROG                  = 'ZPP_SHORT'
           DYNPNR                    = '1000'
           DYNPROFIELD               = 'PR_VERSB'
       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.
    Rahul

  • F4 HELP  for the field

    HI all,
    in the report selection screen i have one field for which F4 HELP  doesnt exits, even in the table for that field F4 HELP is not there but the user requests me to get the F4 HELP for that field in the selection screen .
    please help how to get F4 HELP  for the field
    thanks in advance.

    The following are the options for F4 help
    Code:
    PARAMETERS: p_ccgrp LIKE rkpln-ksgru. "Cost Center Group
    *Input help for Cost Center Group
    AT SELECTION-SCREEN ON VALUE-REQUEST   FOR p_ccgrp.
    TYPES: BEGIN OF ty_ccenter_group,
    setname TYPE setnamenew,
    descript TYPE settext,
    END OF ty_ccenter_group.
    DATA: it_ccenter_group TYPE TABLE OF ty_ccenter_group.
    CLEAR it_ccenter_group.
    SELECT a~setname
    b~descript
    INTO TABLE it_ccenter_group
    FROM setheader AS a INNER JOIN
    setheadert AS b ON
    asubclass EQ bsubclass AND
    asetname EQ bsetname
    WHERE a~setclass EQ '0101' AND
    b~langu EQ sy-langu.
    CALL FUNCTION 
    'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    ret field        =  'SETNAME'
    dynpprog     =  v_repid
    dynpnr         =    SY-DYNR
    dynprofield = 'P_CCGRP'
    value_org    = 'S'
    TABLES
    value_tab   = it_ccenter_group.
    F4IF_FIELD_VALUE_REQUEST:
    This FM is used to display value help or input from ABAP dictionary. We have to pass the name of the structure or table (TABNAME) along with the field name (FIELDNAME). The selection can be returned to the specified screen field if three
    parameters DYNPNR, DYNPPROG, DYNPROFIELD are also specified or to a table if RETRN_TAB is specified.
    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
    EXPORTING
    TABNAME = table/structure
    FIELDNAME = 'field name'
    DYNPPROG = SY-CPROG
    DYNPNR = SY-DYNR
    DYNPROFIELD = 'screen field'
    IMPORTING
    RETURN_TAB = table of type DYNPREAD
    Getting F4 help based on other  field  .
    Suppose  if there  are  2 fields on selection screen  user name and Purchasing Document  and  the case is getting values of  Purchasing Document Number  based on  user name
    Code:
    TYPES:   BEGIN OF ty_match_nast,
                    objky TYPE na_objkey,
                    END OF ty_match_nast.
    Data: it_match_nast   TYPE STANDARD TABLE OF ty_match_nast.
    Data: it_dypr_val   TYPE STANDARD TABLE OF dynpread.
    DATA: wa_dypr_val  TYPE dynpread.
    DATA: it_return TYPE STANDARD TABLE OF ddshretval.
    Case when only username value is entered.
           SELECT objky
            FROM   nast
            INTO  TABLE it_match_nast
             WHERE kappl  = c_ef
             AND   kschl = c_neu
             AND   usnam = wa_dypr_val-fieldvalue.
          ENDIF.
    *Read User name  on  selection screen field value
      CLEAR wa_dypr_val.
      REFRESH it_dypr_val.
      wa_dypr_val-fieldname = 'P_UNAME'.      "User name
      APPEND wa_dypr_val TO it_dypr_val.
    *FM to get the value
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname             = sy-repid
          dynumb             = sy-dynnr
          translate_to_upper = 'X'
        TABLES
          dynpfields         = it_dypr_val_h.
    *Pass the values to f4 table
       CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
          EXPORTING
            retfield     = u2018OBJKY'
            dynpprog    = sy-repid
            dynpnr      = sy-dynnr
            dynprofield = 'P_EBELN'
            value_org   = 'P'
         TABLES
            value_tab   = it_match_nast
            return_tab  = it_return.

  • F4 HELP for standard field..

    i want to put F4 help for standard field FERTH in mm01 and mm02 ...
    is there any way to put F4 help for this field..

    try this
    1. First go to SE11 and create your own search help( if you dont know how to create a search help please feel free to ask me, it is very easy).
    2. Now in your module pool program program go to the layout of your screen.
    3. Now when you see the attributes of this field in the Dict tab you will find the field Search Help. Now here you can specify the name of the search help you created in SE11.
    There is also another mehtod to create the dynamic search help. eg:- in a posted document data get the Document nos related to that company code.
    The sample code is like this:-
    First of all declare the module below in the flow logic of your screen then create it in your main program.
    You declare the module in the PROCESS ON VALUE-REQUEST.
    PROCESS ON VALUE-REQUEST.
    FIELD TXT_DOCNO MODULE VALUE_BELNR.
    You also need to create an internal table where you wil store results of the select query fired below in the module.
    here you will get a F4 help on the filed Document Number(TXT_DOCNO) based on the field Company code (TXT_CODCO)
    MODULE VALUE_BELNR INPUT.
    progname = sy-repid.
    dynnum = sy-dynnr.
    CLEAR: field_value, dynpro_values.
    field_value-fieldname = 'TXT_CODCO'.
    APPEND field_value TO dynpro_values.
    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
    EXPORTING
    tabname = 'BKPF'
    fieldname = 'BUKRS'
    dynpprog = progname
    dynpnr = dynnum
    dynprofield = 'TXT_CODCO'.
    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 BUKRS BELNR
    FROM BKPF
    INTO CORRESPONDING FIELDS OF TABLE it_doc1
    WHERE BUKRS = field_value-fieldvalue.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    retfield = 'BELNR'
    dynpprog = progname
    dynpnr = dynnum
    dynprofield = 'TXT_BELNR'
    value_org = 'S'
    TABLES
    value_tab = it_doc1.
    ENDMODULE. " VALUE_BELNR INPUT

  • How to call elem. Search help on Button click event in WD appilcation

    Hello All,
    i have requirement to call elem. search help on button click event in WD application. currently i am calling FM  F4IF_START_VALUE_REQUEST but getting the short dump as below,
    The following error text was processed in the system X31 : Screen output without connection to user.
    The error occurred on the application server saps_X31_31 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    SYSTEM-EXIT of program SAPLSDH4
    Function: F4_PRESEL_WITH_TABSTRIP of program SAPLSDH4
    Form: F4PROZ_STEP_PRESEL of program SAPLSDSD
    Function: DD_SHLP_SINGLE_STEP of program SAPLSDSD
    Form: F4PROZ_LOOP of program SAPLSDSD
    Form: F4PROZ of program SAPLSDSD
    Function: F4IF_START_VALUE_REQUEST of program SAPLSDHI
    Method: ONACTIONSEARCH_CUSTOMER of program /1BCWDY/50TU5ZEXF3K0IWCWE153==CP
    Method: IF_WDR_VIEW_DELEGATE~WD_INVOKE_EVENT_HANDLER of program /1BCWDY/50TU5ZEXF3K0IWCWE153==CP
    Method: INVOKE_EVENTHANDLER of program CL_WDR_DELEGATING_VIEW========CP
    is there any way to achieve the required behaviour.
    please let me know.
    Regards,
    Chandra

    Hi Friends,
    I have the similar kind of requirement. Upon click on a Button on screen i need to call a search help, and collect one or more selected material numbers.
    The search help is working fine and i am getting the entries with the following code.
    The problem is i am finding extra popup on screen.
    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
    EXPORTING
    tabname         =  space
    fieldname       =  space
    SEARCHHELP      =  'MAT1'
    MULTIPLE_CHOICE =  'X'
    STEPL           =  0
    value           = 'MATNR'
    *dynpprog        =  progname
    *dynpnr          =  dynnum
    *dynprofield     = 'CARRIER'
    CALLBACK_PROGRAM          = 'ZTEST_1_PRA'
    CALLBACK_FORM             = 'F4CALLBACK'
    TABLES
    RETURN_TAB                = RETURN_TAB
    EXCEPTIONS
    FIELD_NOT_FOUND           = 1
    NO_HELP_FOR_FIELD         = 2
    INCONSISTENT_HELP         = 3
    NO_VALUES_FOUND           = 4
    OTHERS                    = 5.

Maybe you are looking for

  • How to get rid of extra plugins tab on Firefox 3.6 startup

    After a no-error crash Firefox 3.6 came back with extra tab. Tried every listed method could find but this tab could not be stopped from coming up when starting the program. Help. Don't want to upgrade!!! Everything was working fine until this. I cha

  • Windows Server 2008 R2: Server unable to authenticate with Domain Controller

    Hello, I was wondering what could be the reason for this error if it is certain that there was no other computer on the network using the same name: This computer could not authenticate with<Domain-controller>, a Windows domain controller for domain

  • Extracting last digits in message mapping

    Hi Is there a standard function for extracting last digits of a field value? Thanks

  • Using a JCheckBox to select all...

    In my program there is a window which contains a panel which has an array of jcheckboxes in it, within another panel on this frame I want to have a single check box that when selected will select all of the checkboxes in the array and when unselected

  • Map jndi name to resource in j2ee1.4b2

    Attempting to deploy jsr94 to j2ee1.4b2. Using j2ee1.3, mapping used j2eeadmin tool: j2eeadmin -addConnectorFactory rules/RuleServiceProvider JSR_94_APP:jsr94-j2ee.rar Can't see what replaces j2eeadmin in 1.4. Is it one of the options for asadmin? Th