Regarding dates and selection screen

Hi all,
In my selection screen i have 2 date fields(ranges). I have a requirement wherein i have to allow user to select only one date i.e. let the date fields be date1 and date2 when the user enters date1 he should not be allowed to enter date2 and when the user enters date2 then he should not be allowed to enter date1.
when user enters date1 and tries to enter date2 then a message should be displayed.
pls urgent requirement and points are gauranteed.
Regards,
Ravi

try this code
slect-options : sdate1 for mkpf-budat,
                      sdate2 for mkpf-budat.
parameters : rdate1 radiobutton group rb1 user-command date default 'X',
                   rdate1 radiobutton group rb1.
at selection-screen output.
if rdate1 = 'X'.
loop at screen.
if screen-name = sdate2-low or screen-name = sdate2-high.
screen-input = '0'.
modify screen.
elseif rdate2 = 'X'.
loop at screen.
if screen-name = sdate1-low or screen-name = sdate1-high.
screen-input = '0'.
modify screen.
endif.
at selection-screen.
if rdate1 = 'X'.
clear sdate2[].
elseif rdate2 = 'X'.
clear sdate1[].
endif.
START-OF-SELECTION.
regards
shiba dutta

Similar Messages

  • Regarding reports and selection screens

    Hi,
    I have to call one report program from anthoer report program . But the ohter report
    program has a selection with radio buttons and check boxes and parameters.
    we have to fill that selection screen from this program with the data
    and we have to skip that screen.
      How we have to do this ?

    Hi
    I believe you need to skip the selection screen of the report you call... please chk out the code below for the same
    *-- Company Code
      IF NOT us_bukrs[] IS INITIAL.
        LOOP AT us_bukrs INTO ls_bukrs.
          ls_rspar_line-selname = 'S_BUKRS'.
          ls_rspar_line-kind    = 'S'.
          ls_rspar_line-sign    = ls_bukrs-sign.
          ls_rspar_line-option  = ls_bukrs-option.
          ls_rspar_line-low     = ls_bukrs-low.
          IF NOT ls_bukrs-high IS INITIAL.
            ls_rspar_line-high     = ls_bukrs-high.
          ENDIF.
          APPEND ls_rspar_line TO lt_rspar_tab.
          CLEAR: ls_rspar_line,
                 ls_bukrs.
        ENDLOOP.            " us_bukrs
      ENDIF.                " us_bukrs
    *-- Business Entity of SU
      IF NOT us_swenr[] IS INITIAL.
        LOOP AT us_swenr INTO ls_swenr.
          ls_rspar_line-selname = 'S_SWENR'.
          ls_rspar_line-kind    = 'S'.
          ls_rspar_line-sign    = ls_swenr-sign.
          ls_rspar_line-option  = ls_swenr-option.
          ls_rspar_line-low     = ls_swenr-low.
          IF NOT ls_swenr-high IS INITIAL.
            ls_rspar_line-high     = ls_swenr-high.
          ENDIF.
          APPEND ls_rspar_line TO lt_rspar_tab.
          CLEAR: ls_rspar_line,
                 ls_swenr.
        ENDLOOP.            " us_swenr
      ENDIF.                " us_swenr
    *-- Get the Total costs from the report zrfreexposting_cc
      SUBMIT zreexposting_cc
             USING SELECTION-SCREEN '1000'
             WITH SELECTION-TABLE lt_rspar_tab
             WITH p_begin EQ uv_fdate
             WITH p_end EQ uv_tdate
             AND RETURN.
    Santosh

  • Include and selection screen

    Hi Experts ,
         i have a problem regarding include and selection screen.
    i have an include program , in which i have  defined my selection screen. and this include has been called in many program .
      but problem is that i have to maintain selection text and text element for every program .
    is there any way ....that i have a single selection text and text element for every program ...in which that include called .
    Thanks and Regards
    Priyank Dixit

    Hi again,
    1. I tried the same thing - include bdcrecx1
       and it only provides radiobuttons, parameters and checkboxes.
       The labels/text elements are totally empty.
    PS: Only after we GOTO--->Text Elements
         and again activate them, (by ticking the 'dictionary checkbox or entering some appropriate text);
    do they appear properly in the selection screen.
    regards,
    amit m.

  • Regarding button in selection screen

    Hi all,
    A query...
    After clicking the button on the screen, when i press the execute button it should give a display saying the corresponding button i clicked....
    But its not working out frnds...
    tables sscrfields.
    data flag.
    parameters test.
    selection-screen pushbutton /20(10) but1 user-command cli1.
    selection-screen pushbutton /20(10) text-020 user-command cli2.
    initialization.
    but1 = 'Button 1'.
    At selection-screen.
    if sscrfields-ucomm = 'cli1'.
    flag = '1'.
    elseif sscrfields-ucomm = 'cli2'.
    flag = '2'.
    endif.
    start-of-selection.
    if flag = '1'.
    write :/'Button 1 was clicked'.
    elseif flag = '2'.
    write :/'Button 2 was clicked'.
    endif.
    Thanking u all.
    regards,
    suraj

    Hi,
    <b>CHECK THIS CODE now it's working</b>
    data flag.
    selection-screen pushbutton /20(10) but1 user-command CLI1.
    selection-screen pushbutton /20(10) but2 user-command CLI2.
    initialization.
    but1 = 'Button 1'.
    but2 = 'Button 2'.
    At selection-screen.
    <b>if sy-ucomm = 'CLI1'.</b>
    flag = '1'.
    <b>elseif sy-ucomm = 'CLI2'.</b>
    flag = '2'.
    endif.
    start-of-selection.
    if flag = '1'.
    write :/'Button 1 was clicked'.
    elseif flag = '2'.
    write :/'Button 2 was clicked'.
    endif.
    Regards,
    Priyanka.

  • HOW TO PASS THE DATA FROM SELECTION SCREEN TO STANDARD TRANSACTION?

    HI,
    HOW TO PASS THE DATA FROM SELECTION SCREEN TO STANDARD TRANSACTION?
    thanks,
    samba.

    By selection screen, what do you mean?   There is no selection screen in WDA as there was in classic dynpro. Do you mean you are using the Select-Options reusable component?  Are you wanting to call a standard transaction via ITS - SAPGUI for HTML?  Please provide more details to your question.

  • How do I maintain data and selection in a SWF after AutoDetach() is called?

    To date, the behaviour of my Flex panel has been based on the old CS4 sample, which stroked boxes using a thickness value specified in a combobox. Now I need to change the behaviour, but I'm not sure how to go about it.
    At the moment the SWF file is loaded on an xxxxUIPanelSelectionObserver::AutoAttach() and unloaded on the AutoDetach(). I also have code in these functions that attaches to and from subjects in the model plug-in. xxxxUIPanelSelectionObserver is derived from ActiveSelectionObserver.
    When the user collapses/minimizes the UI panel (for example into the sidebar on the RHS), AutoDetach() gets called and consequently the SWF file is unloaded and detaches observers from subjects. Consequently any data I passed to the SWF and any selections made are lost. When the user expands the UI panel, AutoAttach is called, the SWF is reloaded and observers are reattached to subjects.
    This is no good for me. When I collapse the panel I need the SWF to remain loaded and for it to be updated when any changes occur to subjects in the model plug-in.
    One approach would be to do a one time only SWF load/observer attach in xxxxUIPanelSelectionObserver::AutoAttach() and remove code from AutoDetach. But this doesn't sound safe to me and likely to lead to a boss/resource leak somewhere down the line.
    Another would be to store all data and selection information in the C++ UI plug-in and pass that into the SWF when it gets reloaded. But this means duplication of information (especially the selection information).
    The other way would be to alter when AutoAttach() and AutoDetach() get called - ideally I don't want AutoDetach to occur until the application closes. But I have no idea how that could be done.
    Any ideas on how to resolve this would be appreciated.
    Thanks in advance,
    APMABC

    I've spotted two functions - AttachToSelectionSubject() and DetachFromSelectionSubject(). They take ISubject* as an argument.
    Given the desciptions, it sounds like it allows the developer to have more control over when AutoAttach and AutoDetach get called, but as there are no examples of them in use, I'm not sure how tio exploit them.

  • Program using BAPI and selection screens

    program to compare two infoobjects using BAPI and selection screen in ABAP

    BAPI-step by step procedure
    http://www.sapgenie.com/abap/bapi/example.htm
    list of all BAPI's
    http://www.planetsap.com/LIST_ALL_BAPIs.htm

  • Cannot get pass the "Setting date and time" screen

    Hi, I am faced with a very serious problem... someone please help!
    I bought home an Apple TV (2nd generation) for my parent overseas, but when I switched on - it got stuck on "Setting date and time" screen and cannot continue. Pressing "menu" button (or hold on for many seconds) does not work at all! I am stuck in that screen. Restart the Apple TV does not helped.
    I thought it is the issue of the remote control (maybe "menu" key has failed), so I bought another one (the aluminum model) and the same issue persists! I tested the remote control on Mac (boot up and press menu key, using Better Touch Tool... both shows the menu key is working).
    What shall I do? Thanks!

    is it connected to the internet either wired or wirelessly

  • HT200197 my apple tv won't pass the setting date and time screen?

    why won't my apple tv pass the setting date and time screen?

    That indicates a network issue.
    Check the DNS settings, they should be set to automatic.

  • Regarding radio button and selection screen

    hi
    i have a requirement to grey out one particular select option , if any one of 4 radio button is selected. (total 5 radio buttons ) . 
    how do i proceed .
    SELECTION-SCREEN BEGIN OF BLOCK blk WITH FRAME.
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE  text-001.
    SELECT-OPTIONS: p_year  for  s021-spmon obligatory,
                    p_kunag  FOR vbrk-kunag  ,
                    p_matnr  FOR vbrp-matnr  ,
                    p_augru  FOR vbrp-augru_auft  ,
                    p_vbeln  FOR vbrk-vbeln  .
    SELECTION-SCREEN END OF BLOCK blk1.
    SELECTION-SCREEN BEGIN OF BLOCK blk2 WITH FRAME TITLE  text-002.
    PARAMETERS: nrw RADIOBUTTON GROUP g1 default 'X'user-command check,
                mwd RADIOBUTTON GROUP g1user-command check,
                rws RADIOBUTTON GROUP g1user-command check,
                edu RADIOBUTTON GROUP g1user command check
                standard RADIOBUTTON GROUP g1 .
    SELECTION-SCREEN END OF BLOCK blk2.
    SELECTION-SCREEN END OF BLOCK blk.
    i know we need to use at-selection screen output.
    but how do i set ONLY that particular select option , to no input.

    Hi ,
    Use like This
    User Dynamic Selection
    at selection-screen output.
      select single * from t000md.
      loop at screen.
        case screen-group1.
          when 'REL'.
            if not  p_old is initial.
              screen-input = '0'.
              screen-required = '0'.
              screen-invisible = '1'.
            endif.
            modify screen.
          when 'BEL'.
            if not p_new is initial.
              screen-input = '0'.
              screen-required = '0'.
              screen-invisible = '1'.
            endif.
            modify screen.
          when 'ARB'.
            if  p_new is initial.
              screen-input = '0'.
              screen-required = '0'.
              screen-invisible = '1'.
            endif.
            modify screen.
          when 'MTA'.
            if  p_new is initial.
              screen-input = '0'.
              screen-required = '0'.
              screen-invisible = '1'.
            endif.
            modify screen.
        endcase.
      endloop.
    Reward Points if it is useful
    Thanks
    Seshu

  • Validating the Program Run Date on selection screen

    Hi ,
    REGUH-LAUFD field has to be validate on selection screen parameter, for this filed no check table available in REGUH.
    Finally date should be validate through any table as per my concern.
    Could please anyone tell me that which table i have to go for validate the above field.
    Regards,
    sud

    >
    sudsap wrote:
    > Hi ,
    >
    > REGUH-LAUFD field has to be validate on selection screen parameter, for this filed no check table available in REGUH.
    >
    > Finally date should be validate through any table as per my concern.
    >
    > Could please anyone tell me that which table i have to go for validate the above field.
    >
    >
    > Regards,
    > sud
    REGUH-LAUFD is the date that the payment run has created. There is no such foreign key check for this date. If you want, you create your own table and do your checks but not advisable.
    What is your requirement anyway?

  • Abap objects and selection screen

    Hello everybody,
    I am interested in your ways of implementing selection-screens in the style of ABAP Objects.
    In earlier times (when I used to implement ABAP objects in a procedural way) I just put the selection-screen commands in an include or a form routine of my ABAP report. So it was possible to run the report in background.
    Now I read something about selection-screens/dynpros and "separation of concerns" in the book "ABAP Objects" written by Keller. He advises using function groups to encapsulate presentation from logical matters. (Selection-screen commands are in an automatically generated include now). I implemented this way. (ABAP report with a local class, which has a main method, where function module of the function group is called). It works, but i see no chance to run my report in background now.. but I need to run the report in background.
    Does anybody know a solution without deleting function group?
    What do you think is the best way of using selection-screen-commands and ABAP Objects, especially regarding running in background?
    Thx for your advise in advance.
    Kind regards,
    Anne

    Hi Naimesh,
    thx for explanation. I am not sure, if I understood everything in the right way.
    Where do you write the code for building the selection-screen? (PARAMETERS, SELECT-OPTIONS etc.)
    If you write these commands in a class method, you will get a syntax error ( because it's forbidden per definition of ABAP objects). So, am I right assuming that you put the coding just at the beginning of the ABAP report ? And after START-OF-SELECTION-event you start the processing... ?
    Furthermore, I don't really understand why you create an separate class for ALV. I found your "SAP abap help"-blog, where you explained the concept of MVC ((By the way, well done!), but you didn't mention an "ALV class" there..
    Mh.. another question - have you ever combined MVC with object services?
    At the moment I'm working on a software project where I use object services. I created 2 persistent classes via SE24 and one local class in my ABAP Report.
    I don't really see possibility to implement MVC in this project without change very much of coding and class structure...
    In my opinion the M (data&business logic) are my existing global classes and my local class is kind of Controller class?!
    Thx in advance,
    Anne

  • Displaying Data Using Selection-screen in Module Pool

    Hi All,
    Currently I'm working on a module pool program.In that i'm having two screens 9000 and 9001.
    I want to select a bookrefno using a selection screen and display header & table control data in 9001 screen when the bookrefno is validated.
    can anyone help me sending sample code regarding this
    Regards
    Ravi S

    Hi Ravi
    Place "bookrefno." field on screen 9000.
    Use validations on that particular field by using chain-endchain.
    in PAI of 9000
    case sy-ucomm
    when 'display'
    call screen 9001
    write select statment to display data i.e header & table control in 9001 .
    hope this would solve your problem.
    reward points, if its helpful.
    Thanks
    RK Nimma

  • Default date on selection-screen.

    Hi ABAPers,
    My requirement is that, i have one period(date) select-option in my selection screen.
    Now the problem was basing on the month the first and last date of that particular month should be initialised.
    For Ex:- present month was may, so in selection screen the date should be,
    PERIOD    05/01/2007    TO   05/31/2007
    Can any one send me the code for that.
    Thanks in Advance.
    Regards,
    Ramana Prasad. T

    Hi,
    you can use this code just copy paste and run
    SELECT-OPTIONS: s_date FOR sy-datum OBLIGATORY.
                                   DATA: l_date TYPE sy-datum.
                                   INITIALIZATION.
                                     s_date-sign   = 'I'.
                                     s_date-option = 'EQ'.
                                     s_date-low  = sy-datum.
                                     s_date-low+6(2) = '01'.
                                     s_date-sign   = 'I'.
                                     s_date-option = 'EQ'.
                                     s_date-high = sy-datum - l_date+6(2)  .
                                     s_date-high4(2) =  s_date-high4(2).
                                     CASE sy-datum+4(2).
                                       WHEN '1' OR '3' OR '5' OR '7' OR '8' OR '10' OR '12'.
                                         s_date-high+6(2) = '31'.
                                       WHEN '4' OR '6' OR  '9' OR  '11'.
                                         s_date-high+6(2) = '30'.
                                       WHEN '2' .
                                         s_date-high+6(2) = '28'.
                                     ENDCASE.
                                     APPEND s_date.
    regards ,
    Sudha.
    reward points if useful.

  • PNP and Selection Screen 900 and Authorization

    We have used the combination of logical db PNP with selection screen 900 to write a few custom payroll reports.  We noticed right away that this combination seems to ignore HR authorizations.  Meaning, someone could read payroll results for employees they are not authorized to see.  We had to add our own authorization checks.
    Am I missing something or is something wrong with the 900 selection screen?

    Hi Kenneth,
    The 900 selection screen is for evaluation of Payroll Results. The system checks whether the user who started the evaluation has the correct authorization for this evaluation. Since the data retrieval is from the Payroll Results and not Master data the regular Authorization checks might not be relevant here. Even if the User has no authorization to view the Employee's Master data, he/she might still be able to view the Payroll results via this selection screen if he /she has the evaluation authorization. You are probably right in having to put in your own authorization checks. I hope I am not wrong.
    Regards,
    Suresh Datti
    Message was edited by: Suresh Datti

Maybe you are looking for

  • ITunes will no longer play nor add to the library any mp3 files which I have created by conversion from a wav file.

    I am running iTunes 10 on XP Pro and it will no longer play those mp3 files which I have created by conversion from wav files.  I tried to delete some from the library and then re-add them but iTunes will not add them back to the library. Can anyone

  • Can't connect to network drive in Homehub.

    Hi, I want to connect to a USB stick plugged into the back of my BT Homehub so I can use it to wirelessly back up my mac with TM. I have plugged it in, but when trying to map the drive, I get 'This file server is available on your computer. Access th

  • How to change icons in new iPhone version?

    Hello everybody I do not like these "japanese cartoons" like new icons - do not object to all those who will surely "love" them - simply : how can I change mine? (once it was simply in Apple softwares...) best Orietta

  • Throwable: java.lang.NoSuchMethodError: setDisableModuleLevelStartStop

    Hi All, Environment: Weblogic:9.1mp1 beajrockit :1.5.0_12 Linux AS4 When trying to stop the application through console getting the following error. Error message from admin log: <Aug 10, 2009 1:54:04 PM EDT> <Error> <Console> <BEA-240003> <Console e

  • Formatting Error in Fireworks 8

    This is possibly the craziest bug I have ever reported on any software. That's saying quite a bit, as I have been programming for 22 years and have seen some real zingers. It appears that if you type a word into a text box in Fireworks 8 that has the