Select option-high as mandatory

Hi,
I have a requirement where both low and high field of select -option should be mandatory.
Code i have written is :
s_vendor for lfa1-lifnr obligatory.
But only the low field is made obligatory.How to make high field as oblogatory too?
Thanks

hi,
use the following code....
tables : sscrfields.
select-options : s_vendor for lfa1-lifnr.
at selection-screen output.
  loop at screen.
    if screen-name CS 'S_VENDOR'.
      screen-required = 'X'.
      modify screen.
    endif.
  endloop.
at selection-screen.
  if sscrfield-ucomm = 'ONLI'.
    if s_vendor-low is initial or s_vendor-high is initial.
      clear sscrfields.
      message 'Fill in all required fields' type 'E'.
    endif.
  endif
Regards,
Siddarth

Similar Messages

  • Specific default values for select-options high and low

    Hi
    My requirement is in the selection screen i have a select-options field for which i need to give default values as mentioned below.
    Description                              Data Type       Default Value     Mandatory?             Sel Scrn Type     
    Delivery/BOL Date        ekab-bedat                         1st DOM to current day     Y              Range     
    The datatype is ekab-bedat.
    In the low value field ,it should be 1st Date of month(DOM) and in the high value field it should be current day.
    Give me the code for the same asap.

    >
    sreedeep.sreekumar wrote:
    > Dont mistake my intensions. When i tried to write it in the form of a request it showed me that it cannot me posted beacuse the words that i am using (please,kindly) is not following the terms and conditions of the words to be written in the threads
    Sounds quite vague to me.
    >
    sreedeep.sreekumar wrote:
    > I was asking help for this as i am a novice in SAP-ABAP and i couldnt find solutions for it and also i have seen people directly writing codes for the queries.
    Becuase you see people posting pieces of code doesn't mean you can ask for a solution asap. Besides, whether you're new or a veteran in ABAP, what you need can be solved with some very basic knowlegde of ABAP. Just use a bit of common sense.

  • Dynamic variant for select option High value

    Hi ,
    Please help me in creating dynamic variable for a select option date field high value.
    II tried the following method:
    1. Enter the values in the selection screen
    2. Save the variant using the SAVE button
    3. In the next screen for the date variable select the 'Selection variable' checkbox (L) and click on the button 'Selection variable' in the toolbar.
    4. Now you will see this variable in the next screen with 3 types of buttons. Click on the middle button (i.e. D - Dynamic date calculation).
    5. Click on the down arrow button and select the option 'Current Date'.
    5. Save the variant.
    But it is saving the date value in Field LOW of select option( From value).
    I need it in TO field( High value).
    Please help.
    regards,
    Sheeba

    Hi Sheeba
        we can do it other way .. Select the same steps as you have done but after the assigning the value current date to low ..click on the selection option push button at the application bar and choose the 'less than or equal to' option to your select option value and try the same ....
    I guess this would throw you same results as that of the value in the high value button
    Cheers,
    Jacks.

  • Select -options (fields as mandatory) and alv

    Hi all,
    i have 5 fields in select options and alv table , based on selection criteria values will display in alv table. now i want to make 2 fields as mandatory in select-options. without entering values in those two fields it should not allow the values to display iin alv table , it should rise a message..
    (i have not created node for select-options ,i have directly used data type in wddoinit for select-options and for alv table i have created node)
    thanks all

    Hi,
    In wddoinit while creating select options by ADD_SELECTION_FIELD method ,it has a parameter called I_OBLIGATORY. Set it as X and thus the field becomes mandatory.
    Regards
    Karthiheyan M

  • Is there a command for setting the selection option to be mandatory

    hi,
    i have a 4 select-option in my program, and i would set that, either one select option must be fill to execute the program. which mean, at least one field ( any select option) have to be enter, or else it will not run. is there a command to restrict on this?
    please help. thanks

    Check this sample
    TABLES : vbap.
    SELECT-OPTIONS : so_vbeln FOR vbap-vbeln,
                     so_posnr FOR vbap-posnr.
    AT SELECTION-SCREEN.
      IF NOT so_vbeln[] IS INITIAL OR
         NOT so_posnr[] IS INITIAL.
      ELSE.
        MESSAGE e000(ztest_gopi) WITH 'Atleast one shd be filled'.
      ENDIF.
    " OR You can do it this way also
    TABLES : vbap.
    SELECT-OPTIONS : so_vbeln FOR vbap-vbeln,
                     so_posnr FOR vbap-posnr.
    AT SELECTION-SCREEN.
      IF so_vbeln[] IS INITIAL AND
         so_posnr[] IS INITIAL.
        MESSAGE e000(ztest_gopi) WITH 'Atleast one shd be filled'.
      ENDIF.
    Regards
    Gopi

  • Dynamic variant create for select option High value

    Hi ,
    I would like to set a dynamic variant for Date filed in selection screen as lower limit as 01/01/2009 and Last day of previous month as hiher limit. For examplae: Lower limit = 01/01/2009 and higher limit as 02/28/2011.
    Please help me in creating dynamic variant as mentiond above.
    Thanks & Regards,
    Venkat N.

    Hi,
    Thank you for your reply and could you please provide if you have any code.
    Thanks & Regards,
    Venkat N.

  • Select options higher range value not appearing

    Dear Experts,
    Carrid : AA to AZ
    But at runtime i see that low value is AA and high value is null....
    written code in wdoinit and code in button to search values.
    code of wddoinit:
      DATA: LT_RANGE_TABLE TYPE REF TO DATA.
      DATA: LR_COMPONENTCONTROLLER TYPE REF TO IG_COMPONENTCONTROLLER,
                 L_REF_CMP_USAGE TYPE REF TO IF_WD_COMPONENT_USAGE.
      L_REF_CMP_USAGE = WD_THIS->WD_CPUSE_SELECT_OPTIONS( ).
      IF L_REF_CMP_USAGE->HAS_ACTIVE_COMPONENT( ) IS INITIAL.
                 L_REF_CMP_USAGE->CREATE_COMPONENT( ).
      ENDIF.
      WD_THIS->M_WD_SELECT_OPTIONS = WD_THIS->WD_CPIFC_SELECT_OPTIONS( ).
      WD_THIS->M_HANDLER = WD_THIS->M_WD_SELECT_OPTIONS->INIT_SELECTION_SCREEN( ).
      LT_RANGE_TABLE = WD_THIS->M_HANDLER->CREATE_RANGE_TABLE
                                                         ( I_TYPENAME = 'S_CARR_ID' ).
      WD_THIS->M_HANDLER->ADD_SELECTION_FIELD
                                                         ( I_ID = 'S_CARR_ID'   IT_RESULT = LT_RANGE_TABLE ).
    can anyone pls help me to resolve this.
    Regards......
    Sajid
    Edited by: shaik sajid on May 17, 2009 3:39 PM

    got it."should press enter after entering values"..i am new to webdynpro and learning on my own,hope i will be successful...

  • Obligatory mark for select options

    Hi experts,
    I have a requirement where both low and high field of select -option should be mandatory.
    Code i have written is :s_period  for cgpl_project-createdon.
    But only the low field is made obligatory.How to make high field as oblogatory too....
    but if we write abap code manually it will work..
    if s_period is intial..
    error mesg like " date is mandatory''
    but user want that obligatory mark only..how can i acheive this....
    can any body plz help me..
    Regards,
    Praveena..

    Hi,
       Write the below code  in Initialization event...
    Initialization.
    loop at screen.
    if screen-name = 'S_BELNR-HIGH'.
      screen-required = 1.
      modify screen.
    endif.
    endloop.
    Regards,
    Srini.

  • Passing multiple values to select-option low by submit at one go from zpro.

    Hi all,
    I have a requirement pass descrete multiple values form my z-program to to select-option low on selction screen of standard SAP program using SUBMIT statment at one go.At the same time select-option high will be empty.I will be thankful if anybody can help me in this regard.
    Sandeep.

    Hi Check this link...on submitting programs
    http://help.sap.com/saphelp_erp2004/helpdata/en/9f/db9d7535c111d1829f0000e829fbfe/frameset.htm
    here is the code . we are calling the same program....you can call any other program as well.
    REPORT  demo_program_submit_rep1.
    DATA number TYPE i.
    PARAMETERS      paramet(14) TYPE c.
    SELECT-OPTIONS  selecto FOR number.
    The program DEMO_PROGRAM_SUBMIT_REP1 is called by the following program using various parameters:
    REPORT demo_program_submit_sel_screen NO STANDARD PAGE HEADING.
    DATA: int TYPE i,
          rspar TYPE TABLE OF rsparams,
          wa_rspar LIKE LINE OF rspar.
    RANGES seltab FOR int.
    WRITE: 'Select a Selection!',
    SKIP.
    FORMAT HOTSPOT COLOR 5 INVERSE ON.
    WRITE: 'Selection 1',
         / 'Selection 2'.
    AT LINE-SELECTION.
      CASE sy-lilli.
        WHEN 4.
          seltab-sign = 'I'. seltab-option = 'BT'.
          seltab-low  = 1.   seltab-high   = 5.
          APPEND seltab.
          SUBMIT demo_program_submit_rep1 VIA SELECTION-SCREEN
                          WITH paramet eq 'Selection 1'
                          WITH selecto IN seltab
                          WITH selecto ne 3
                          AND RETURN.
        WHEN 5.
          wa_rspar-selname = 'SELECTO'. wa_rspar-kind = 'S'.
          wa_rspar-sign = 'E'. wa_rspar-option = 'BT'.
          wa_rspar-low  = 14.  wa_rspar-high = 17.
          APPEND wa_rspar TO rspar.
          wa_rspar-selname = 'PARAMET'. wa_rspar-kind = 'P'.
          wa_rspar-low  = 'Selection 2'.
          APPEND wa_rspar TO rspar.
          wa_rspar-selname = 'SELECTO'. wa_rspar-kind = 'S'.
          wa_rspar-sign = 'I'. wa_rspar-option = 'GT'.
          wa_rspar-low  = 10.
          APPEND wa_rspar TO rspar.
          SUBMIT demo_program_submit_rep1 VIA SELECTION-SCREEN
                          WITH SELECTION-TABLE rspar
                          AND RETURN.
      ENDCASE.

  • Select options field disable mode

    hi  all .
    i use select-options .
    i want disable entries area(select options high ,low)
    how can i do ?
    Thanks.

    Hi
    i'm talk about WDR_SELECT_OPTIONS    .
    im set variant in select-option  so  i want to  mustn't change  this value
    i'm find this method  UPD_SELECTION_FIELD but
    i don't run it .
    CALL METHOD LR_HELPER->UPD_SELECTION_FIELD
      EXPORTING
    I_ID                      = 'ZKVJID'  
       I_WITHIN_BLOCK            = MC_ID_MAIN_BLOCK
       I_DESCRIPTION             =
       I_IS_AUTO_DESCRIPTION     = ABAP_TRUE
       IT_RESULT                 =
       I_OBLIGATORY              = ABAP_FALSE
       I_COMPLEX_RESTRICTIONS    =
       I_USE_COMPLEX_RESTRICTION = ABAP_FALSE
       I_NO_COMPLEX_RESTRICTIONS = ABAP_FALSE
       I_VALUE_HELP_TYPE         = IF_WD_VALUE_HELP_HANDLER=>CO_PREFIX_NONE
       I_VALUE_HELP_ID           =
       I_VALUE_HELP_MODE         =
       I_HELP_REQUEST_HANDLER    =
       I_LOWER_CASE              =
       I_MEMORY_ID               =
       I_NO_EXTENSION            = ABAP_FALSE
       I_NO_INTERVALS            = ABAP_FALSE
       I_AS_CHECKBOX             = ABAP_FALSE
       I_AS_DROPDOWN             = ABAP_FALSE
       IT_VALUE_SET              =
    I_READ_ONLY               =   ABAP_TRUE
       I_EXPLANATION             =
       I_TOOLTIP                 =

  • Product hierarchy in select-options.

    Hi Everyone,
    I am using Product hierarchy in select-options.When I run the report for the range of 001500015100015102 to 002500025300025302,It works .However, if i enter just 00150 to 00250 and select the Product Hierarchy 3 (2 or 1) level, i am getting  00150 to 00200.  The data for 00250 does not appear.
    Kindly Help on this ASAP.....................
    Thank you.

    Hi Hyma,
    The Select Option (say SO_PRDHA) OPTION would be filled with between BT in your case. My undersatnding of BT is that for Select Option HIGH it will search for all values less than the HIGH and the value which would be EQUAL to the HIGH. So in your case you will get thos values LESS THAN 00250 and the value which would be EQUAL to 00250(Obviously that doesnt exist). Hence the Result.
    If you still want the 00250 to appear then you can append the SELECT OPTION 
    SO_PRDHA in your program with CP Option
    SO_PRDHA-LOW = '00250*'
    SO_PRDHA-OPTION = CP
    SO_PRDHA-SIGN = 'I'.
    APPEND SO_PRDHA.
    Regards
    Saket Sharma
    Reward Points if useful

  • Deactivating the select options (strange)

    Hi all,
    Please tell me how to deactivate the select options
    arrow.In the screen after select options-high there is an arrow to specify ranges etc.I want to deactivate that arrow.Is it possible??
    regards
    chandu

    Use the NO-EXTENSION
    report zrich_0002.
    tables: mara.
    select-options: s_matnr for mara-matnr<b> NO-EXTENSION</b>.
    Regards,
    Rich Heilman

  • Select-options grade out

    I want to gradeout select-options high limit gradeout when i select radiobutton 3
    How to write the logic can any one tell me
    thank you,
    Pradeep Reddy M.

    Hi...
    Check this code.
    TABLE : mara,
                 SSCRFIELDS.
    DATA : V_UCOMM TYPE SSCRFIELDS-UCOMM.
    SELECT-OPTIONS: S_MATNR FOR MARA-MATNR.
    PARAMETERS : R1 RADIOBUTTON GROUP G1 USER-COMMAND RB,
                             R2 RADIOBUTTON GROUP G1,
                             R3 RADIOBUTTON GROUP G1.
    AT SELECTION-SCREEN OUTPUT.
             IF V_UCOMM = 'RB'.
                     IF R3 = 'X'.
                              LOOP AT SCREEN.
                                  IF SCREEN-NAME = 'S_MATNR-HIGH'.
                                      SCREEN-INPUT = 0.
                                      MODIFY SCREEN.
                                  ENDIF.
                              ENDLOOP.
                    ENDIF.
              ENDIF.
    AT SELECTION-SCREEN .
            V_UCOMM = SSCRFIELDS-UCOMM.
    try the above code. you will find the solution.
    <b>Reward if Helpful</b>

  • Select-option default values

    Hi,
    I have date as select-option.
    I am required to
    default current date minus one day to current date .simply my select-option-low = sy-datum-1,
    select-option-high = sy-datum should be defaulted.
    How to do this...?
    thanks

    HI,
    Please refer the code below:
    tables: bsis.
    select-options : so_date for bsis-budat.
    at selection-screen output.
    so_date-low = sy-datum-1.
    so_date-high = sy-datum.
    append so_date.
    Thanks,
    Sriram Ponna.

  • How to make Select Options Mandatory?

    Hi Guys,
                  Can anybnody tell me how to Declare  Selection Options for some of them mandatory.
    Select-Options : v_PurOrg for EKKO-EKORG default '2000',
                             v_GRDate for Sy-Datum ,
                             v_GRPrd  for MSEG-GJAHR.
             In these i have to make v_PurOrg Manadatory.
    Thanks,
    Gopi.

    Hi Gopi,
    In order to make select-options mandatory we add OBLIGATORY in the statement like the below.
    Selection-Screen.
    Select-Options : v_PurOrg for EKKO-EKORG default '2000' OBLIGATORY.
    In this case, only the first option will have the default value of 2000.But if you want both the options low and high of select-options, means you have to add the below code in your program in the initialization event.
    Initialization.
    v_PurOrg-low    =   1000. 
    v_PurOrg-high    =   2000. 
    append v_PurOrg.
    Hope this helps.
    Please reward if useful.
    Thanks,
    Srinivasa

Maybe you are looking for

  • I want to constantly display my bookmarks in V6.0.2 on left side of screen

    I just upgraded to FF v6.0.2 and love the new look, however I would like to display my bookmarks on the left side of the screen such as I was able to do in 3.6. I know how to display them by clicking on the button top right. Using Win 7 64 bit on Asu

  • IPhoto slideshow to iDVD gives poor movie quality

    Hello, I would like to take an iPhoto 08 slideshow and turn it into a DVD disc. iPhoto's feature: "Share > Send to iDVD" is really great, except that it converts my slideshow to a compressed QuickTime .mov file. I really, really do not like what the

  • Enhanced OM infotypes

    Hi! I have enhanced infotype 1007 putting 2 checkboxes.But I m not able to get the value of these fields in the User Exit of the infotype.I have already used the method cl_hr_pnnnn_type_cast=>wplog_to_pnnnn.In the structure,i can see the enhanced fie

  • No able to create TO in background with transaction LB10

    Scenario: 1) LP21 to create Repleninshment TRs for fix bin 2) LB10 to convert the TRs to TOs Situation: When I click on create TO in foreground, following by F6 (stock removal background) it follows my search strategy and it works. BUT when I select

  • OPA project to be deployed as Mobile Application

    Hello, We have developed a project, which is working fine on tomcat server. We would like to deploy the same on mobile. Our project is based on Java platform. Can any body help us with detail steps which needs to be performed so that it can be used o