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.

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 fill internal table with selection screen field.

    Hi all,
    i am new to sap . pls tell me how to fill internal table with selection screen field.

    Hi,
    Please see the example below:-
    I have used both select-options and parameter on the selection-screen.
    Understand the same.
    * type declaration
    TYPES: BEGIN OF t_matnr,
            matnr TYPE matnr,
           END OF t_matnr,
           BEGIN OF t_vbeln,
             vbeln TYPE vbeln,
           END OF t_vbeln.
    * internal table declaration
    DATA : it_mara  TYPE STANDARD TABLE OF t_matnr,
           it_vbeln TYPE STANDARD TABLE OF t_vbeln.
    * workarea declaration
    DATA : wa_mara  TYPE t_matnr,
           wa_vbeln TYPE t_vbeln.
    * selection-screen field
    SELECTION-SCREEN: BEGIN OF BLOCK b1.
    PARAMETERS : p_matnr TYPE matnr.
    SELECT-OPTIONS : s_vbeln FOR wa_vbeln-vbeln.
    SELECTION-SCREEN: END OF BLOCK b1.
    START-OF-SELECTION.
    * I am adding parameter value to my internal table
      wa_mara-matnr = p_matnr.
      APPEND wa_mara TO it_mara.
    * I am adding select-options value to an internal table
      LOOP AT s_vbeln.
        wa_vbeln-vbeln =  s_vbeln-low.
        APPEND  wa_vbeln TO  it_vbeln.
      ENDLOOP.
    Regards,
    Ankur Parab

  • How to set default variant for selection screen

    Hi,
    I want to make one variant as default for selection screen for one user.
    For eg., take COOIS. For the selection screen, i have 3 variants. But i want one variant to be default. Thsi is not for all users. Thsi is for particular user.
    I am not seeing any way to do this. please help me..
    Thanks
    Srini

    Hi,
    If you are using Z program then you can ask your developer to get Variant name Runtime from Parameter ID.
    This means you decide a Parameter ID name : ZVAR in your Z program and ask your developer to load variant each time your Z program loads.
    Now, second step will be using SU01 transaction you can set value of ZVAR in Parameters tab for the user. This value will be the variant which you created for this user.
    This will solve your problem and you can make n number of variants and assign it to different users.
    Regards,
    Arpit

  • Selection Screen Validation In ABAP Queries

    Hello all,
      I have created a selection screen field in the Infoset by EXTRAS --> Create Field.
      Now i want the values entered in this field at the selection screen to be available
      at the event Record Processing.
      The values entered at the selection screen are getting stored in some system generated varaible
      SP** .i am not able to read from this field.
      Please let me know ur inputs.
      Regards,
      Najam

    Hi,
    Try declaring some global variable in the data delclaration event, and pass the values these variable at selection screen, and use them wherever required.
    Regards,
    Santhosh.

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

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

  • 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

  • Varient for selection screen in Webdynpro ABAP

    Dear Experts,
    We all know that in abap editor selection screen we can save the selection criteria in form of 'Variants'.
    I need to something similar in webdynpro. And I was requested not to use the database tables for saving the data.
    Is it possible? If Yes then please let me know.
    Thanks Supriyo

    POWL - Power Work List
    Isn't POWL - "Personal Object Work List" ? Although often interchangeable referred to as "Power Lists".
    However, if Thomas says "Power Work List" I think we're going to have new variant out there to search on!
    NB the POWL is very "Powerful" (sic) in this respect as you can even add your own OVS to the selection criteria. Unfortunately I have found that the POWL selections and selection process are perceived as less than obvious by end users. So much so that where we are looking at pure reporting functionality we are instead looking to BW to provide a web reporting interface.
    For some reason (perhaps they've been using SAP backend reports too long) users seem to want to do their selection and then see the results - unless it's in the form of a dashboard - in which case they are happy to drill down into the results. It is like they don't trust the system to have used the correct selection criteria.

  • 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

  • How to put search help for shopping cart fields.

    Hello Gurus,
    I need to put search help for some of the fields in shopping cart. Pls let me know do we have any standard way with out abap work. pls suggest me how to proceed.
    Thanks,
    kamal

    Check out the field and do a mapping od the same in se11, ie field and the table from which you want to search

  • To add Language selection option on Selection Screen

    Hi All,
    I have one Report Writer Report.
    In that Report I have created Basic Sets, Single sets and Multi Sets for G/L Account.
    I need to output this Report in two different language.
    1) Engish
    2) Chinese
    But I need to put the option on Selection Screen for Language Selection (whether English or Chinese).
    How to add this option on Selection Screen. Please Guide me soon.
    Regards,
    Rishi

    Hi Ashok,
    But when I hev created the sets, I have given the description of G/L Accounts in English. But when I will run the Report using Cinese as Logon language, how output will come in Chinese.
    1) Is there a need to maintain /L Accounts in Chinese language.
    2) or Shall i create the sets by giving description for G/L Accounts in Chinese If Yes then how to hadndle at run time..
    please guide I am new to Report writer.
    Regards,
    Rishi

  • Folder or File path when f4 option on selection screen is clicked

    can any one please let me know if there is a function module which can fetch folder name form the directory path when f4 option of selection screen field is selected. Currently I am able to get the file name using FM F4_DXFILENAME_4_DYNP but the requirment is like I have to select either folder name or the file name depending on user selection.

    HI
    use the following
    FORM GETFILE.
      CALL FUNCTION 'WS_FILENAME_GET'
       EXPORTING
        DEF_FILENAME           = ' '
         DEF_PATH               = '.'
        MASK                   = ' '
        MODE                   = ' '
        TITLE                  = ' '
       IMPORTING
         FILENAME               = TXT_FILE
        RC                     =
      EXCEPTIONS
        INV_WINSYS             = 1
        NO_BATCH               = 2
        SELECTION_CANCEL       = 3
        SELECTION_ERROR        = 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.
    <b>TMP_GUI_DIRECTORY_LIST_FILES</b>
    Retrieve all of the files and subdirectories on the Presentation Server (PC) for a given directory.
    Example:
    data:  lc_directory         like bdschko16-target_dir value 'C:\TEMP\',
           lc_filter(20)        type c default '.'.
           li_file_count        type i,
           li_dir_count         type i,
           ltab_dir_table       like sdokpath occurs 0 with header line,
           ltab_file_file_table like sdokpath occurs 0 with header line.
    call function 'TMP_GUI_DIRECTORY_LIST_FILES'
      exporting
        directory        = lc_directory
        filter           = lc_filter  importing
        file_count       = li_file_count
        dir_count        = li_dir_count
      tables
        file_table       = ltab_file_table
        dir_table        = ltab_dir_table
      exceptions
        cntl_error       = 1
        others           = 2.
    regards vijay

  • Truncation of selection screen field in reports

    Hi,
    Is there any way to avoid truncation of selection screen fields in ABAP reports? For eg, I declare:
    SELECT-OPTIONS: s_test FOR ztest-test_field NO INTERVALS
    The length of this field in the table is 30 chars. However, on displaying the field via selection screen, this gets truncated to around 18 or so. How do I avoid this as I need to display the full length of the field?

    Hi,
    Try this
    Tables : makt.
    select-options maknr for makt-maktx.
    now go to the screen painter of your program in change mode and move the Help buttons first to the Right each. now increasethe length of the Matnr Field length so that they are equal to 40 Char. in your program you have handle the length now if you want to restrict to 18 otherwise it will be ok
    if they don't fit you need incease the Size of the Screen Visible area both in the Screen Painter as well as in the
    Screen Attributes
    You also get an Information Message just ignore that.
    Just open your program in SE80 if you can't go to the screen painter in SE38. the other way just keep this program in Display mode and execute then take F1 help , take Technical Information and double click on the Screen number now go to the Screen Layout and go to Change mode here.
    Regards,
    Shirisha

  • Selection screen fields order in report painter report..

    hi experts,
    i have a  problem with selection screen fields order in report painter report.
    Actually in report painter report selection screen order is different compare to report writer report selection screen.
    how should i get the same selection screen fields order For  Report painter  report compare to Report Writer report ?
    For example, Report Writer selection screen order is:
      ledger:
      company code:
      period:
      current fiscal year:
      previous fiscal yer:
      previous quarter end period:
    where as Report Painter selection screen order is:
      ledger:
      previous fis year:
      current fis year:
      company code:
      period:
      previous quarter end period:
    please help me regarding with this.
    Thanks and Regards,
      NAGARJUNA.

    hi nagarjun,
    Go to Sq01, select the query and goto to change mode.go to the next screens till u reach Selection fields. Here u enter the NO field in the sequence which u want ot appear in the selection screen and it is done. Save and execute.
    Ex:
    Selection fields No
    Exclude Cancelled Lots 5
    Material number 1
    Plant 2
    Material type 3
    Inspection Lot Origin 4
    Regards,
    Lokesh

Maybe you are looking for