Capture lost focus for a screen field !!

I was more into Visual basic programming so the event name "Lost focus" !!
Basically i want to validate a field after the user enters a value in that and before he moves to the next field.
how to do that ? if the value entered is wrong I will display a message using MESSAGE IXXX(FF) with ".....".
whats the event to be captured and where ? how do i code it ?
thks

If it is module Pool program then you can use the FIELD Fieldname module Modulename under PAI event.
in side the module you can raise the error message.
If it is report programming then you can use AT SELECTION-SCREEN ON <PARMETER>.
and raise the error message.

Similar Messages

  • Default value for selection screen field

    Hi all,
      I am using LDB PNPCE. I want to give default value for field Personnel area on selection screen.
    How can I do it?
    Thanks
    Rahul

    Hi Rahul,
    In the INITIALIZATION event we can set the default values for selection screen fields.
    INITIALIZATION.
    loop at screen.
    if screen-name = 'S_MATNR-LOW'.
    CLEAR S_MATNR.
    s_matnr-low = '1234'.
    s_matnr-option = 'EQ'.
    s_matnr-sign = 'I'.
    append s_matnr.
    CLEAR S_MATNR.
    s_matnr-high = '5678'.
    s_matnr-option = 'EQ'.
    s_matnr-sign = 'I'.
    append s_matnr
    clear s_matnr.
    endif.
    endloop.
    Hope it helps.
    Mark if useful
    Regards,
    Saumya

  • How to get the screen groups for the screen field which are on selectionscn

    hiiii Experts,
                   How to know the screen groups for the screen field which are on selection screen.
    Thanks and regards,
    kasyap

         NAME                                             PNPABKRS-LOW
            GROUP1                                             SEL
            GROUP2                                             DBS
            GROUP3                                             LOW
            GROUP4                                             180
    to get this use this:
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        if screen-name CS 'ABKRS'.
          BREAK-POINT.
        endif.
      ENDLOOP.

  • Multiple Selection For Selections screen field

    Hi Friends ,
    Can any body tell me how to create multiple selection for a field in selection screen and how to capture all those values of that fields in program for database selction. Suppose i am having document number EBELN from EKKO exists in selectio screen . how to create multiple selection for that and how to use all those values given to EBELN to get data from EKKO.
    Kumar.

    hi,
    select-options is one type of parameters where u can give multiple values in ranges or single as a input. when u use select-options then system will create a selection screen for u and u give multiple values as
    ex:
    select-options: s_ebeln for ekko-ebeln.
    internally system creates a internal for s_ebeln which has for attributes
    1. low --- starting value if  range is used
      2. high -
    ending value
    3. sign -
    operator used for validating field
    4. option -
    to exclude given range of values or single value or to include.
    for this u can assign default values in INITIALIZATION event as
    INITIALIZATION.
    s_ebeln -low = '1'.
    s_ebeln- high = '100-100'.
    s_ebeln-sign = 'BT'.
    s_ebeln-option = 'I' // include
                             'E' // exclude.
    if helpful reward some points.
    with regards,
    Suresh Aluri.

  • Need some help in creating Search Help for standard screen/field

    I need some help in adding a search-help to a standard screen-field.
    Transaction Code - PP01,
    Plan Version - Current Plan (PLVAR = '01'),
    Object Type - Position ( OTYPE = 'S'),
    Click on Infotype Name - Object ( Infotype 1000) and Create.
    I need to add search help to fields Object Abbr (P1000-SHORT) / Object Name (P1000-STEXT).
    I want to create one custom table with fields, Position Abb, Position Name, Job. Position Abb should be Primary Key. And when object type is Position (S), I should be able to press F4 for Object Abb/Object Name fields and should return Position Abbr and Position Name.
    I specify again, I have to add a new search help to standard screen/field and not to enhance it.
    This is HR specific transaction. If someone has done similar thing with some other transation, please let me know.
    There is no existing search help for these fields. If sm1 ever tried or has an idea how to add new search help to a standard screen/field.
    It's urgent.
    Thanks in advace. Suitable answers will be rewarded

    Hi Pradeep,
    Please have a look into the below site which might be useful
    Enhancing a Standard Search Help
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/daeda0d7-0701-0010-8caa-
    edc983384237
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee93446011d189700000e8322d00/frameset.htm
    A search help exit is a function module for making the input help process described by the search help more flexible than possible with the standard version.
    This function module must have the same interface as function module F4IF_SHLP_EXIT_EXAMPLE. The search help exit may also have further optional parameters (in particular any EXPORTING parameters).
    A search help exit is called at certain timepoints in the input help process.
    Note: The source text and long documentation of the above-specified function module (including the long documentation about the parameters) contain information about using search help exits.
    Function modules are provided in the function library for operations that are frequently executed in search help exits. The names of these function modules begin with the prefix F4UT_. These function modules can either be used directly as search help exits or used within other search help exits. You can find precise instructions for use in the long documentation for the corresponding function module.
    During the input help process, a number of timepoints are defined that each define the beginning of an important operation of the input help process.
    If the input help process is defined with a search help having a search help exit, this search help exit is called at each of these timepoints. If required, the search help exit can also influence the process and even determine that the process should be continued at a different timepoint.
    timepoints
    The following timepoints are defined:
    1. SELONE
    Call before selecting an elementary search help. The possible elementary search helps are already in SHLP_TAB. This timepoint can be used in a search help exit of a collective search help to restrict the selection possibilities for the elementary search helps.
    Entries that are deleted from SHLP_TAB in this step are not offered in the elementary search help selection. If there is only one entry remaining in SHLP_TAB, the dialog box for selecting elementary search helps is skipped. You may not change the next timepoint.
    The timepoint is not accessed again if another elementary search help is to be selected during the dialog.
    2. PRESEL1
    After selecting an elementary search help. Table INTERFACE has not yet been copied to table SELOPT at this timepoint in the definition of the search help (type SHLP_DESCR_T). This means that you can still influence the attachment of the search help to the screen here. (Table INTERFACE contains the information about how the search help parameters are related to the screen fields).
    3. PRESEL
    Before sending the dialog box for restricting values. This timepoint is suitable for predefining the value restriction or for completely suppressing or copying the dialog.
    4. SELECT
    Before selecting the values. If you do not want the default selection, you should copy this timepoint with a search help exit. DISP should be set as the next timepoint.
    5. DISP
    Before displaying the hit list. This timepoint is suitable for restricting the values to be displayed, e.g. depending on authorizations.
    6. RETURN (usually as return value for the next timepoint)
    The RETURN timepoint should be returned as the next step if a single hit was selected in a search help exit.
    It can make sense to change the F4 flow at this timepoint if control of the process sequence of the Transaction should depend on the selected value (typical example: setting SET/GET parameters). However, you should note that the process will then depend on whether a value was entered manually or with an input help.
    7. RETTOP
    You only go to this timepoint if the input help is controlled by a collective search help. It directly follows the timepoint RETURN. The search help exit of the collective search help, however, is called at timepoint RETTOP.
    8. EXIT (only for return as next timepoint)
    The EXIT timepoint should be returned as the next step if the user had the opportunity to terminate the dialog within the search help exit.
    9. CREATE
    The CREATE timepoint is only accessed if the user selects the function "Create new values". This function is only available if field CUSTTAB of the control string CALLCONTROL was given a value not equal to SPACE earlier on.
    The name of the (customizing) table to be maintained is normally entered there. The next step returned after CREATE should be SELECT so that the newly entered value can be selected and then displayed.
    10. APP1, APP2, APP3
    If further pushbuttons are introduced in the hit list with function module F4UT_LIST_EXIT, these timepoints are introduced. They are accessed when the user presses the corresponding pushbutton.
    Note: If the F4 help is controlled by a collective search help, the search help exit of the collective search help is called at timepoints SELONE and RETTOP. (RETTOP only if the user selects a value.) At all other timepoints the search help exit of the selected elementary search help is called.
    If the F4 help is controlled by an elementary search help, timepoint RETTOP is not executed. The search help exit of the elementary search help is called at timepoint SELONE (at the
    F4IF_SHLP_EXIT_EXAMPLE
    This module has been created as an example for the interface and design of Search help exits in Search help.
    All the interface parameters defined here are mandatory for a function module to be used as a search help exit, because the calling program does not know which parameters are actually used internally.
    A search help exit is called repeatedly in connection with several
    events during the F4 process. The relevant step of the process is passed on in the CALLCONTROL step. If the module is intended to perform only a few modifications before the step, CALLCONTROL-STEP should remain unchanged.
    However, if the step is performed completely by the module, the following step must be returned in CALLCONTROL-STEP.
    The module must react with an immediate EXIT to all steps that it does not know or does not want to handle.
    Hope this info will help you.
    ***Reward points if found useful
    Regards,
    Naresh

  • Problem with Save functionality for a Screen - Field

    Hi Experts,
    I  have included a custom field with list box option to an infotype. The new filed  displays the values based on the values selected in the standard field which has a list box option.
    Now if we enter the transaction in change mode and change the standard field value without pressing ENTER and click SAVE button, it gets saved with an improper value in the custom field. The reason being the custom field values with drop down list is retreived only after we press enter (POV is triggered) after selecting a standard field.
    Options tried:
    I have included an error message (in PAI)  to stop the values being saved, but the screen beomes disabled.
    I have done my validation only on the custom field as there is no other possibility to validate any other fields on the screen (all are standard). Here the error message pops up and the field is in the enable mode, but it does not retrieve the possible values for the custom field based on my earlier selection for the standard field.( Because as POV does not get triggered in this case)
    Ex.  Std field value = USA
           Custom field   =  United States of America
    I changed the value in Standard field to = UK and click SAVE - It get saved
    Now how to stop it from SAVING and let it know that there is an error in the custom field and it needs to select the right value from the list ie - United Kingdom.
    Lakshmi

    Perhaps a solution is to save the code value, not the text for the code, and only display the text.  In this way, the database would have UK and when you re-entered the screen, a PBO module could obtain the text for UK for display.
    Or, if you must store the text value instead of the code (seems redundant...you can look up the text anytime), an enhancement to the save to database logic to obtain the correct value from the current value of the code and save that to the database....

  • F4 help for the screen fields in module pool program

    Hi All,
      I have a requirement that, i want to provide F4 help for the 2 fields in module pool program. the fields are document number and fiscal year from rbkp table.
    i could provide search help for two fields.
    but how to select matching fiscal year for that document number.
    problem: i am getting fiscal year as first four digits of document number.
    please help me to solve this problem.
    Thanks & Regards,
    Namratha.V

    Hi,
       If your requirement is after selecting the document no from f4 help then the corresponding year should be updated in the document year field then use FM --> DYNP_VALUES_UPDATE
    In  this function module pass the screen no program & field for which u want to update value

  • F4 hep for selection screen field

    Hello ,
    Im trying to create custom f4 help for Parameter ekbe-belnr by using below code. It displaying  F4 values for EKBE-belnr. But when i select any value in F4 hlep , its not displaying in Selection Field. How can i reflect selected value in to selection field.
    REPORT YMP.
    Parameter: p_belnr type ekbe-belnr.
    types: begin of tys_itab,
    belnr type ekbe-belnr,
    end of tys_itab.
    data: itab type table of tys_itab.
    at selection-screen on value-request for p_belnr.
    select belnr from bkpf into table itab .
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    DDIC_STRUCTURE =
    retfield = 'BELNR'
    PVALKEY = ' '
    DYNPPROG = Sy-repid
    DYNPNR = SY-DYNNR
    DYNPROFIELD = ' '
    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 =
    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.
    Thanks for ur time and help
    sanjana

    hi,
    <b>F4IF_INT_TABLE_VALUE_REQUEST</b>
           This FM is used to dsiplay values stored in an internal table as input
    help.This FM is used to program our own custom help if no such input help
    exists in ABAP dictionary for a particular field. The parameter VALUE_TAB is used to pass the internal table containing input values.The parameter RETFIELD
    is used to specify the internal table field whose value will be returned to the screen field or RETURN_TAB.
           If DYNPNR,DYNPPROG and DYNPROFIELD are specified than the user selection is passed to the screen field specified in the DYNPROFIELD. If RETURN_TAB is specified the selectionis returned in a table.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                RETFIELD           = field from int table whose value will be returned
                DYNPPROG        = SY-CPROG
                DYNPNR             = SY-DYNNR
                DYNPROFIELD    = 'screen field'
                VALUE_ORG       = 'S'
           TABLES
                VALUE_TAB        = internal table whose values will be shown.
                RETURN_TAB      = internal table of type DDSHRETVAL 
           EXCEPTIONS
                parameter_error    = 1
                no_values_found   = 2
                others                  = 3.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
           retfield = 'BELNR'   " or belnr
           DYNPPROG = Sy-repid   " or SY-CPROG
           DYNPNR = SY-DYNNR
           DYNPROFIELD    = 'p_belnr'
           VALUE_ORG = 'S'
    tables
           value_tab = itab
    regards,
    Ashok Reddy

  • How to put Mandatory option for selection screen fields in ABAP Queries

    Hi Experts
    Can anyone tell me how to put mandatory option for the selection screen fields in ABAP Queries.
    Manually I had written code in the At Selection Screen  option in infoset to display error message if that field is blank.
    But I need to display the selection fields with the tick mark (obligatory mark).
    How to do this?
    Appropriate answers will be awarded

    Hi
    For parameter option
    parameters : p_kunnr type kna1-kunnr  obligatory.
    For select option
    select-options: s_date for vbak-erdat obligatory.
    Plz rewards points ,
    Regards ,
    Ganesh.

  • Possible entries for selection screen field

    Hi,
    I have created a custom DDIC table Z_TAB which contains 3 fields of type char. The table contains about 100 rows of data. I want that at the selection screen, for each selection field a list of entries in the table should appear. E.g. Data rows:
    Field1       Field2      Field3
    aaaaa       bbbbb      ccccc
    bbbbb       bbbbb      ccccc
    ccccc       bbbbb      ccccc
    (contd.)    (contd.)    (contd.)
    Now at the selection screen:
    Field1 _________
    Field2 _________
    Field3 _________
    It is required that at selection screen:
    Field1 should give the option of entries: aaaaa, bbbbb, ccccc, ...
    Field2 should give the option of entries: bbbbb, ...
    Field3 should give the option of entries: ccccc, ...
    and so on, like for the standard DDIC tables.
    How can this be achieved? Help is appreciated.
    Regards

    Hi,
    AT selection-screen output even you read the records of the table into internal table and then At selection-screen on value request event you
    use function module F4IF_FIELD_INT_TABLE_VALUE_REQUEST
    (dont exacty remember the FM sorry but will be of similar kind)
    and populate value for that functional module for each field in the even
    ON VALUE REQUEST FOR PARTICULAR field by reading that record from first to the FIRST FIELD and from second record to second Field and from Third to the THIRD FIELD..
    Hope this would solve your problem
    Regards
    Narin Nandivada.

  • Assign search help for a screen field in standard program?

    Hi All,
    Is there any other way to assign search help to a standard SAP screen field? (to be precise i want to assign search help to Recipient field in table control of components tab in transaction IW32/IW31)
    I know we can do this by assigning search help through screen painter (by changing standard program, which is my last option).
    Any advice/help will be greatly appreciated.

    Hi,
    I think you will find solution in below <b>threads</b>:
    Re: Search Help for standard field
    How to assign a search help
    Search help for Standard SAP field
    <b>Reward if helpful</b>
    Rgds,

  • Search help for selection screen field

    Hi ,
    steps for creating search help for a key field in selection screen..
    tables is a userdefined from which the field is taken..
    thxs,
    vind

    hi,
    c this.
    REPORT ZXYZ_0002 .
    data: dynfields type table of dynpread with header line.
    data: return type table of ddshretval with header line.
    selection-screen begin of block b1 with frame title text-001 .
    selection-screen begin of line.
    PARAMETERS: P_BUKRS type T001-BUKRS.
    selection-screen comment 30(20) BUTXT for field p_bukrs.
    selection-screen end of line.
    selection-screen end of block b1.
    at selection-screen output.
    if butxt is initial.
       select single butxt into butxt
             from t001
            where bukrs = p_bukrs.
    endif.
    at selection-screen on value-request for p_bukrs.
      call function 'F4IF_FIELD_VALUE_REQUEST'
           exporting
                tabname           = 'T001'
                fieldname         = 'BUKRS'
                dynpprog          = sy-cprog
                dynpnr            = sy-dynnr
                dynprofield       = 'P_BUKRS'
           tables
                return_tab        = return
           exceptions
                field_not_found   = 1
                no_help_for_field = 2
                inconsistent_help = 3
                no_values_found   = 4
                others            = 5.
      read table return with key fieldname = 'P_BUKRS'.
    Add it back to the dynpro.
      dynfields-fieldname = return-retfield.
      dynfields-fieldvalue =  return-fieldval.
      append dynfields.
    Get the company code from db and add to dynpro
      data: xt001 type t001.
      clear xt001.
      select single * into xt001
             from t001
            where bukrs = return-fieldval.
      dynfields-fieldname = 'BUTXT'.
      dynfields-fieldvalue = xt001-butxt.
      append dynfields.
    Update the dynpro values.
      call function 'DYNP_VALUES_UPDATE'
           exporting
                dyname     = sy-cprog
                dynumb     = sy-dynnr
           tables
                dynpfields = dynfields
           exceptions
                others     = 8.
    start-of-selection.
    rgsds
    anver
    if hlped mark points

  • I want the table fields name for the screen fields of transactions lm59

    Hi all
      I am enhancing transactions LM58,LM59and  LM 60
      But in that transactions underthe lable of storage bin , there are 3 input fields . I want to know the exact table fields for those 3 input screen fields .

    Ravi,
    OK.
    You can look to tables EKPO, EKKO for PO-related fields.
    Look to SE84 under   ABAP Dictionary > Fields > Table Fields   - This is search tool for existing names.  Or can create custom Y-   and  Z- fields, data elements, domains to meet your needs.
    Please reward points.

  • Adding search help (F4) for a screen field in standard screen of VA02

    Dear Gurus,
    I need to add a Search Help (F4) to a Standard Screen Field VBAK-VSNMR_V in the standard Screen of VA01/Va02.....Can anyone please guide me how it can be done.
    Regards
    Sajid
    Edited by: shaik sajid on Feb 2, 2009 8:38 AM

    Hi shaik,
    Refer to the following useful link:
    Search help enhancement in VA01
    Hope this will help you...

  • How to find the database table for this screen field

    hi in XD02
    There is a scrren field customer
    name1 (firt line under name)
    and email id fields
    i wnat to know where the data stores goes w hen user eners in this screen i mean in which table and how to find it
    for kunnr name1 i suppose it goes to kna1 but how to find it?
    and f or email id whre it gots which table
    regards
    Arora

    Hi,
    when you press F1 it will give the necessary information
    but some times it may give the structure names also
    those structures are being used by the back end module pool
    programm
    so every time we can get the exact information about the
    data type or length
    but not sure that every time we get the exact database table name
    and field name
    according to me, if i dont know where some field are getting stored in
    database ( if the field name and table is structure )
    then i will ask my functional consultant ...
    thanks & regards,
    Venkatesh

Maybe you are looking for

  • Stale data error while deleting a record

    Hi My design of this development is as follow... 1. Search Page in which users give some search criteria and results will be displayed in the results region on the same page. For each results record I have two buttons like 'Update' and 'Delete' so th

  • Disabling Acrobat as default PDF viewer.

    I used Customizer to genrate MST but it does not works in qb mode. It works in UI mode . Please help as I want to deploy in my organization in qb mode. Thanks.

  • Connect to LCD HDTV

    Hey all I have a mini-dvi - dvi, dvi - HDMI with my MacBook. I got it connected, but it wouldn't show my whole screen. I went into system preferences and started changing some options and then my TV screen just went blank, saying that I needed to che

  • Question about backing up Portal LDAP

    I have a question I want to migrate my production Portal Profile Server(LDAP) to a test development enviroment And all i need is my ldap.ldif file... Has any one tried this?

  • Can't save location for Trash at Server Settings (IMAP setting).

    Hi, I'd like to set a folder (one under an account name) to move messages to when deleting messages with IMAP. I can't select Trash under an account name at Server Settings. I can only select Trash under "Inbox" under the account name. I find that th