Value Help for a field from custom table in BSP

Please let me know, the procedure to create value help for a field from a custom table in BSP using HTMLB.
Thanks

hi prodigy,
check this code using drop down list.
<b>layout for first page</b> 
<htmlb:dropdownListBox id                = "ddlist"
                              table             = "<%=t_mara%>"
                              nameOfKeyColumn   = "matnr"
                              nameOfValueColumn = "matnr"></htmlb:dropdownListBox>
<b>event Oninitialization event of first page</b>
SELECT MATNR UP TO 10 ROWS
  INTO TABLE T_MARA
  FROM MARA.
<b> event Oninputprocessing event</b>
**Load the manager class
CLASS CL_HTMLB_MANAGER DEFINITION LOAD.
DATA: V_EVENT TYPE REF TO CL_HTMLB_EVENT.
DATA: DATA TYPE REF TO OBJECT.
DATA: V_DATA TYPE REF TO CL_HTMLB_DROPDOWNLISTBOX.
CALL METHOD CL_HTMLB_MANAGER=>GET_EVENT
  EXPORTING
    REQUEST               = RUNTIME->SERVER->REQUEST
  RECEIVING
    EVENT                 = V_EVENT
IF V_EVENT->NAME = 'button' AND
   V_EVENT->EVENT_TYPE = 'click'.
DATA ?= CL_HTMLB_MANAGER=>GET_DATA( REQUEST =
                                      RUNTIME->SERVER->REQUEST
                                      NAME     = 'inputField'
                                      ID       = 'matnr'
    V_DATA ?= DATA.
IF V_DATA IS NOT INITIAL.
     V_MATNR = V_DATA->SELECTION.
ENDIF.
NAVIGATION->SET_PARAMETER( NAME = 'v_matnr' VALUE = V_MATNR ).
NAVIGATION->GOTO_PAGE( 'detail.htm' ).
ENDIF.
<b>in the onInitialization event for detail page</b>SELECT MATNR
       ERSDA
       ERNAM
       LAEDA
       AENAM
       VPSTA
       PSTAT
       LVORM
       MTART
  FROM MARA
  INTO TABLE T_MARA
WHERE MATNR = V_MATNR.

Similar Messages

  • Need help for record deletion from custom table

    Hi friends
    I have to write a custom program which will be generic to delete any table record with date field.
    This program needs to be generic (should be able to delete records from any custom table) in nature with selection screen parameters as:
    Table Name and Number of Days prior to which records are deleted, both mandatory.
    Program Flow:
    1.     From number of days calculate date before which records are deleted, ( current date u2013 no. of days = past date).
    2.     Custom table have date field, delete records prior to that date.
    3.     Program may be scheduled for background job, put default values for both fields. No. of days should not be less than 60.
    4.     Classical Report output with number of records deleted.
    My query is how will I know the name of the Date field so that I can write a DELETE query.
    If I use 'DDIF_FIELDINFO_GET' it gives me all field names but how to filter out?
    with regards
    samikhya

    Hi
    I have added  field on the selection screen as p_fieldname and got the F4 help for it , so that the user will get the field name run time as per the table name.
    Now I am facing problem while writing the DELETE query.
    I wrote like
    DELETE (fp_tab)
    where (fp_fieldname) LE date
    It is not working. I also tried with taking a string to concatenate fp_fieldname, LE and date to l_string
    when I write like this:
    DELETE (fp_tab)
    where (l_string) , sy-subrc is getting 4 and no records are getting deleted.
    I do not understand where the dynamic Delete is failing??
    with reagards
    Samikhya

  • Drop down in the selection for the field from the table

    Hi.
    i want to put the drop down for the field from the table fo which i dont know the number of entries for the field zregion1 of the table zbwcntry.
    please tell me how to use the function module and what could be the line of codes.
    the drop down is for the select option on the slection screen of the classical report.
    please help .

    HI,
    Check below code..it may help you.
    REPORT Zbunu .
    TYPES :BEGIN OF STR ,
           MATNR TYPE MATNR ,
           END OF STR .
    DATA : ITAB TYPE TABLE OF STR WITH HEADER LINE,
           VAR TYPE MARA-MATNR .
    PARAMETERS : S_MATNR TYPE MATNR ,
                  P_MATNR TYPE MATNR.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_MATNR .
    SELECT MATNR FROM MARA INTO
    CORRESPONDING FIELDS OF TABLE ITAB UP TO 1000 ROWS.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
      EXPORTING
      DDIC_STRUCTURE         = ' '
        retfield               = 'MATNR'
      PVALKEY                = ' '
       DYNPPROG               = SY-CPROG
       DYNPNR                 = SY-DYNNR
       DYNPROFIELD            = 'S_MATNR'
      STEPL                  = 0
      WINDOW_TITLE           =
      VALUE                  = ' '
       VALUE_ORG              = 'S'
      MULTIPLE_CHOICE        = ' '
      DISPLAY                = 'X'
      CALLBACK_PROGRAM       = ' '
      CALLBACK_FORM          = ' '
      tables
        value_tab              = ITAB
      FIELD_TAB              =
      RETURN_TAB             =
      DYNPFLD_MAPPING        =
    EXCEPTIONS
       PARAMETER_ERROR        = 1
       NO_VALUES_FOUND        = 2
       OTHERS                 = 3
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Regards
    Ansumesh

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

  • Some fields from R/3 have automatic value help for input field on WD

    Hello,
    we have imported a Model from RFC/JCo (ABAP) with several fields. One of them is "IWAER" of SimpleType Iwaer and "Built-In-Type" string in J2EE. Though the enumeration of this type is empty, WebDynpro mystically generates a value help if the type is assignet to an ImputField. On the ABAP-side component type is IWAER with data type CUKY and in domain WAERS which has a value table TCURC (instead of fixed values in a value range).
    Where/why does WD find out that this is a currency-field and where do the values in the value selector come from?
    Best regards,
    Manuel

    Hi,
    at least for the ModelData-Connection (BAPI-Call) there is no data being transferred besides one value for each field.
    I don't know if the MetaData-Connection of JCo is able to get more information (e.g. key-value-pairs for the domain or type the field belongs to,..) than just the structure of the interface.
    -> Where and how do these EVS-values come from without doing something?
    Best regards,
    Manuel

  • Automated value generation for key field in db table

    Hi All
    I have created a table in SE11 and i want to autogenerate a value for the keyfield when the user adds a new record to the table. the keyfield is of type numc. this field represents a document id hence i do not want the user to physically enter in an id. Is it possible to achieve this without any additional coding. I am using a WDA app together with an adobe form to allow user to input data.
    Thanks in advance
    Regards
    Thashin Naicker

    There is one more method to do that.
    Write a query to fetch all the records from the table into any temporary internal table.
      Then, do a looping in that table & increment one temporary variable inside a loop.
    after this add first value of your primary field  to this temporary variable..
    Ex.: To add one more record with an increment to a primary key field  is shown below:
    DATA: TEMP type I.
    TEMP = 1.
    SELECT * FROM <TABLENAME> INTO TEMP_TABLE.
        ENDSELECT.
    LOOP AT TEMP_TABLE.
          TEMP = TEMP + 1.
        ENDLOOP.
    <Tablename>-<fieldname> = TEMP_TABLE-<fieldname> + TEMP.
    Note: temp is a temporay variable and temp_table is a temporary table.

  • More than one check table for a field in custom table

    I created a custom table , with some fields in that , and for a field i given a check table , in that same field i want another check table because for  some data i need to refer another table . whether it is possible.....

    Hi,
    If you need to perform the checks while using a maintenance view, you can do this with modification events. e.g. just implement a form that triggers your custom checks in a "before save" event... (SE55->Environment->Event)
    Kr,
    Manu.

  • Dynamic value help for a table field to fill two fields, how to?

    Hi all gurus,
    In SRM 7 I defined a dynamic value help for a single field (ZZ_PROLE_R3) of my header custom table.
    That's the code from WDDOMODIFYVIEW in the webdynpro /SAPSRM/WDC_DODC_CT, view V_DODC_CT:
    DATA: lo_tabnode        TYPE REF TO IF_WD_CONTEXT_NODE.
          DATA: lo_tabnode_info   TYPE REF TO IF_WD_CONTEXT_NODE_INFO.
          DATA: tab_value         TYPE WDR_CONTEXT_ATTR_VALUE_LIST,
                wa_value          TYPE WDR_CONTEXT_ATTR_VALUE.
          lo_tabnode = wd_context->GET_CHILD_NODE( name = 'THCUS' ). "the custom table node
          lo_tabnode_info = lo_tabnode->get_node_info( ).
          wd_this->GET_VALHELP_ZZ_PROLE_R3( EXPORTING iv_guid = lv_guid
                                            IMPORTING ZZ_PROLE_R3_VALHELP = tab_value ). "this method returns the dyn value table
          lo_tabnode_info->set_attribute_value_set( name = 'ZZ_PROLE_R3'
                                                     value_set = tab_value ).
    The method GET_VALHELP_ZZ_PROLE_R3 dynamically builds the value help table tab_value; such table is made up by two fields:
    value : contains the value of the field
    text   : contains a description of the value
    The above solution works; now I'd like to enhance it. The custom table THCUS contains also a field called ZZ_PROLE_R3_DESC, which represents the description of ZZ_PROLE_R3. It is, exactly, the TEXT field in tab_value.
    So I'd like to do as follows:
    - the user clicks on the search help for ZZ_PROLE_R3 field of the table;
    - the above described value help appears;
    - after the selection, both ZZ_PROLE_R3 and ZZ_PROLE_R3_DESC are filled with the selected couple value - text chosen from the value help.
    Could anyone help me achieving such a behaviour?
    Again, a little request... when I open the above value help dialog box, the window itself has a label "Floorplan Manager application for OIF.." that obviously I'd like to redefine (e.g. "Role selection value help"). Is there any way to do that?
    Thanks in advance

    Chris Paine wrote:
    It seems to me - given that your code is in wddomodifyview that you are trying to have different dropdowns per row
    - I'm not sure where you are populating lv_guid - but I'd guess it is an attribute of the row selected? If it isn't then I can't see any reason that you would do this code in wddomodifyview and not wddoinit.
    Hi Chris and thanks for your help,
    lv_guid is the GUID of the document's header; I need to pass it to the method that populates my value help table because the values in it are derived from some fields on the document. (the situation actually is more complex; there's an RFC call on the backend for which the document is intended for to retrieve the data that populate the value help...).
    I'm quite unexperienced on webdynpro and terminology; if dropdown menus are fixed selection option that appears on a field, I guess this is not my case. I did a pair of screenshot to provide an idea of what the solution by now is, and what "I would like to have":
    [Pre-selection (F4 icon on the field in table)|http://imagebin.ca/view/npIsaqF.html]
    [Value Help popup for the field ZZ_PROLE_R3|http://imagebin.ca/view/8fZUh3T.html]
    [Result by now |http://imagebin.ca/view/3PaqdvE.html]
    [Result I'd like to have.|http://imagebin.ca/view/dExR0J.html]
    Chris Paine wrote:
    However - by your comment on the "value help dialog box" I am guessing you are using an input field? If this is the case then I would strongly suggest that you change/enhance the structure of the context node THCUS (btw, better coding practise to refer to it as wd_this->wdctx_thcus when using the get child node construct) so that you refer to an actual SAP ddic search help, if you then associate in the structure the value and text fields then populating the text field should happen automatically. Also you'd have the nice side effect that your value help dialog would be named after the associated ddic search help.
    Thanks for the code suggestion, I'll apply that. For what concerns the context node THCUS... It is, by standard, a node which I can't explictly find in the context for the view V_DODC_CT. The problem is that ZZ_PROLE_R3 and the corresponding description field ZZ_PROLE_R3_DESC of the table must be filled with data retrieved dynamically @ runtime from the backend. So I guess I can't populate a val help referring to a dictionary table/field; I'd rather do as follows:
    - retrieve what's the target backend for the document (to do so, I have to process the document .. that's why the header guid passed to my method);
    - RFC call to a custom method that extracts possible values for the specific backend;
    - bind the ammissible values to the value help.
    Chris Paine wrote:
    I realise that this is rather a lot - so if you have any specific question please do respond - hopefully I or someone else will be able to clarify.
    Thanks again for your help; additional info as well as code examples would be highly appreciated

  • Search help for screen field.

    Hi all,
    I had created a dataelement(ZZ_XXXXX) usig domain (LAND1). this LAND1 has a value table.
    I have created a field on database table. Now when i add this field on screen, I am not getting F4 help for this field.
    Can anyone suggest me how to F4 help for this field from the value table.
    Thanks in advance.
    regards,
    NarsiReddy.

    Hi Narsi,
    Make the field as a key field in table or
    Create Search Help.
    Regards,
    Venkat.

  • Search help for a field in table control based on another field value

    Hi,
    I want to attach the Search help for a field in table control based on another field value.
    Please help me asap.
    Will be highly rewarded

    HI,..
      Check these links
    search help in table control
    Re: How to create Search Help for a field in Table control !!
    How to create Search Help for a field in Table control !!
    F4 Help In Table Control
    Control table F4 help
    Problem in F4 help in screen field
    check this code
    DATA: BEGIN OF it_value4 OCCURS 0,
             TEXTCODE  LIKE  ZXX-TEXTCODE,
             TEXTDESC  LIKE  ZXX-TEXTDESC,
           END OF it_value4.
      progname = sy-repid.
      dynnum   = sy-dynnr.
             SELECT TEXTCODE TEXTDESC
               FROM  xxxx
               INTO CORRESPONDING FIELDS OF TABLE<b> it_value4</b>
              WHERE  LOSS_CODE =<b> IT_VALUE1 .</b>
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield    = 'TEXTCODE'
          dynpprog    = progname
          dynpnr      = dynnum
          dynprofield = 'ITVALUE-TEXTCODE'  "-->UR  4 th filed value in screen
          value_org   = 'S'
        TABLES
          value_tab   = it_value4.
    endmodule.
    Message was edited by:
            veereshbabu ponnada

  • Create search helps for fields of custom tables

    Hi,
    Could any one please provide me the step by step process to create search helps for fields in custom tables?
    Thanks in advance,
    Nobin.

    Hello Nobin
    There is basically no difference between a search help for standard vs. customer tables.
    An important choise is the selection method for your search help:
    Either you use your custom table, a view or a search help user-exit if you need to implement very specific requirements.
    Assuming that you can use your DB table as selection method the further implementation of the search help is quite straightforward:
    (1) Define the parameters you would like to have a selection criteria (SPos = SPos) and which should appear on the result list (= LPos).
    (2) Define the parameters that can be used as input for the selection (flag IMP) and are returned by the search help (flag EXP)
    Regards
      Uwe

  • Module pool F4-Help problem for a field in custom Infotype(HR).

    Dear Gurus,
    I have created a custom Infotype and fields are like
    P9015-NAM01.
    P9015-NAM02.
    P9015-NAM03.
    all are fields for name.
    I want F4 help for these fields with values same as  Family Members-First name  given in 21 Infotype .
    for all 3 fields same f4 help values.
    But when i see in the screen for first field the values are populating as selected but for second field the selected value is not picking..
    DATA: BEGIN OF it_val1 OCCURS 7,
        nam01 LIKE p9015-nam01,
        rel01 LIKE p9015-rel01,
       END OF it_val1.
      SELECT *  FROM t591s INTO TABLE it_t591s WHERE
         sprsl = 'EN' AND
         infty = '0021'.
    *SUBTY
    *STEXT
      SELECT * FROM pa0021 INTO wa_21 WHERE pernr = p9015-pernr .
        READ TABLE it_t591s WITH KEY subty = wa_21-famsa.
        it_val1-rel01 = it_t591s-stext.
       CONCATENATE wa_21-favor wa_21-fanam INTO it_val-nname SEPARATED BY space.
        it_val1-nam01 = wa_21-favor.
        APPEND it_val1.
        CLEAR : it_val1, it_t591s.
      ENDSELECT.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
        DDIC_STRUCTURE         = ' '
          retfield               = 'NAM01'
        PVALKEY                = ' '
         dynpprog               = sy-cprog
         dynpnr                 = sy-dynnr
        dynprofield            = 'P9015-NAM01'
        STEPL                  = 0
        WINDOW_TITLE           =
        VALUE                  = ' '
         value_org              = 'S'
         multiple_choice        = ' '
         display                = 'F'
        CALLBACK_PROGRAM       = ' '
        CALLBACK_FORM          = ' '
        MARK_TAB               =
      IMPORTING
        USER_RESET             =
        TABLES
          value_tab              = it_val1[]
         field_tab              = t_fields[]
         return_tab             = t_return[]
         DYNPFLD_MAPPING        = t_DYNPFLD_MAPPING
      EXCEPTIONS
        PARAMETER_ERROR        = 1
        NO_VALUES_FOUND        = 2
        OTHERS                 = 3
    In the same way i am calling for P9015-NAM02. & P9015-NAM03.
    Is there any wrong in calling this FM...kindly help.....

    Write the FM inside,
    at selection-screen on value-request for <nam1>.
    It seems that you are calling the funtion module for only first field. Repeat it for other two fields also-
    at selection-screen on value-request for <nam2>
    call FM.
    at selection-screen on value-request for <nam3>
    call FM.
    Sumit

  • 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

  • F4 help for parameter field - no values defined in the database

    Hi,
    In the Selection screen, I have two fields,
    One is for getting input for the month
    Other one is for year
    These two are created by using parameter statement
    and it is not referring to any data base table fields.
    parameters : p_bumon type bumon.
    parameters : p_bdatj type bdatj.
    At the selection screen i need input help for the month and year separately.
    I cant use the function module becos no values r fetch from the tables.
    or else to get the input help, can u please just me some predefined type declarations so that i can get by default the F4 help for this
    or any other table which have the value range for only for the month and year.
    Just it is created and the input values is passed to the function module and to calculate the number of days for that particular month and year.
    i need this very urgently
    Please suggest me in this , whether it is possible
    Thanks

    hi,
         There is a event called
    At selection-screen PROCESS ON VALUE-REQUEST for.......
    In your case it can be  :-
    At selection-screen PROCESS ON VALUE-REQUEST for  p_bumon .
    < Block 1>
    At selection-screen PROCESS ON VALUE-REQUEST for p_bdatj .
    < Block 2>
    In the block u can write the code.......
    say for month u can write
    parameters : p_month(2) type c.
    Eg for month
    At selection-screen PROCESS ON VALUE-REQUEST for P_MONTH.
    data : begin of int_month occurs 0,
    month(2) type c,
    end of ont_month.
    INT_MONTH-MONTH = '01'.
    append INT_MONTH.
    INT_MONTH-MONTH = '02'.
    append INT_MONTH.
    INT_MONTH-MONTH = '03'.
    append INT_MONTH.
    INT_MONTH-MONTH = '11'.
    append INT_MONTH.
    INT_MONTH-MONTH = '12'.
    append INT_MONTH.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    RETFIELD = 'MONTH' “ Int tab field name
    DYNPPROG = < program name>
    DYNPNR = SY-DYNNR
    DYNPROFIELD = 'P_MONTH' “ Field wer u need F4 help
    VALUE_ORG = 'S'
    WINDOW_TITLE = ‘Any description’
    TABLES
    VALUE_TAB = INT_MONTH. “ Internal table name
    please reward points if useful.... and mark it answered.....
    thank you.

Maybe you are looking for