To find if a date lies between a range

Hi Experts,
I have a custom table with fields Terms, Valid from date, Valid to date.
ex:
TextID1 Valid from 1.1.2007 till 31.06.2007
TextID2 Valid from 1.1.2007 till 31.12.2007
so on and so forth,
Now if the user inputes a date like 12.10.2007, i need to pick up TextID2, how do i achieve it? ( i need to find if it lies within a range)
all help is appreciated and rewarded!!
cheers,
K

data : V_DATE type date.
" HERE U CAN USE TABLE FIELD ENISTEAD OF V_DATE." 
ranges: TextID1 FOR V_DATE,           
            TextID2 FOR V_DATE.              
    TextID1-sign = 'I'.
    TextID1-option = 'BT'.
    TextID1-low = '01/01/2007'.
    TextID1-high = '31/06/2007'.
    append TextID1.
    TextID2-sign = 'I'.
    TextID2-option = 'BT'.
    TextID2-low = '01/01/2007'.
    TextID2-high = '31.12.2007'.
    append TextID2.
    IF '12.10.2007' IN TextID1.
    WRITE: 'BC1'.
     ELSE.
     WRITE: 'BC2'.
    ENDIF.
USE THIS CODE  AND MAKE CHANGES ACCORDING UR DESIER OUTPUT
Edited by: anil chaudhary on Sep 1, 2008 8:15 AM

Similar Messages

  • To check a date lies within in a range

    hi,
    i need a fm to check whether a date lies within a range ( eq 30.04.2007) it lies between 16.04.2007 and 30.04.2004 (inclusive).

    hi,
    Use the statement..
    data : l_date type sy-datum value '20070430'
    data : l_date1 type sy-datum value '20070416'
    data : l_date2 type sy-datum value '20070430'
    IF l_date BETWEEN l_date1 AND l_date2.
    * Do the required Processing
    ENDIF.
    OR
    Build the range
    RANGES : R_date for sy-datum.
    r_date-sign = 'I'.
    r_date-option = 'BT'.
    r_date-low =  l_date1 .
    r_date-high = l_date2.
    append r_date.
    IF l_date IN r_date.
    * Do the required Processing
    endif.

  • How to find particular date lies in between two given dates

    hi,
    i have a problem. i have to find if particular day lies in between two given dates.
    example two dates are joindate and expirydate.
    1.joindate is 1/03/2007
    expdate is 1/03/2008
    now i have to find if 29 feb is in between this joindate and expirydate.
    if any1 has ny idea please reply asap.
    thanks.

    The Date class has a before() and after() method you can use to compare Date objects.

  • How can I set the data binding between Web Dynpro & Database table

    Dear friend,
    I am a beginner of Web Dynpro. I want to develop my simple project like these:
    1. Create my own database table via Dictionary Project such as TAB_USER and have 3 fields: USER_ID, USER_NAME, USER_POSITION and I have already deployed & archived it.
    2. Create my own Web Dynpro Project, and create the input fields as User ID, User name, User position and icon 'Save' on the selection screen and I have deployed it already.
    For the process, I want to input data at the screen and save the data in the table, please give me the guide line like these:
    1. How can I set the data binding between Web Dynpro and Database table ?
    2.  Are there any nescessary steps that I will concern for this case?
    Sorry if my question is simple, I had try  to find solution myself, but it not found
    Thanks in advances,
    SeMs

    Hi,
    You can write your own connection class for establishing the connection with DB.
    Ex:
    public class  ConnectionClass {
    static Connection con = null;
    public static Connection getConnection() {
    try{
    Context ctx = new InitialContext();
    DataSource ds = (DataSource) ctx.lookup("jdbc/TSPAGE");
    con = ds.getConnection();
    return con;
    }catch(Exception e){
    return null;
    You can place the above class file in src folder and you can use this class in webdynpro.
    You can have another UserInfo class for reading and writing the data into the DB .
    Regards, Anilkumar
    PS : Refer
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/java/simple java bean generator for database.pdf
    Message was edited by: Anilkumar Vippagunta

  • Data mapping between sybase and xml

    I want to make a data mapping between sybase relational data result set and xml.
    I am using the function ForXmlTree for this purpose, I have the entire documentation about the synatx and usage of it, but i need to know what support does JAVA have for it.
    What files need to be installed .
    This is an example of using the function
    java jcs.xmlutil.ForXmlTree �i forxmltree-spec [-o output-script-file] \
    [-x output-document-file  -S server-name]
    does anyone know where can i find the jcs.xmlutil package. If so let me know.
    Thanks in advance
    Sandeep

    PRPS-PSPNR = AFVU-PROJN.
    also you can use this fm.
    BAPI_PROJECT_GETINFO

  • Calculation date deference between two rows in same column and in same table

    mytable
    accountno
    tdate
    1001
    01/01/2014
    1002
    01/01/2014
    1003
    01/01/2014
    1004
    01/01/2014
    1005
    01/01/2014
    1001
    01/02/2014
    1002
    01/02/2014
    1003
    01/02/2014
    1004
    01/02/2014
    1005
    01/02/2014
    1001
    01/03/2014
    1002
    01/03/2014
    1003
    01/03/2014
    1004
    01/03/2014
    1005
    01/03/2014
    1001
    01/04/2014
    1002
    01/04/2014
    1003
    01/04/2014
    1004
    01/04/2014
    1005
    01/04/2014
    This is my table. I want find out account wise date deference between first date to second date, second date to third date, third date to fourth date, fourth date to fifth date........... Could you please provide me the solution with any SQL, VB or MS access
    query!

    In SQL 2012/2014:
    SELECT accountno, tdate,
           datediff(DAY, LAG(tdate) OVER (PARTITION BY accountno ORDER BY tdate), tdate)
    FROM   tbl
    ORDER  BY account, tdate
    In SQL 2005/2008:
    ; WITH CTE AS (
        SELECT accountno, tdate,
               rowno = row_number OVER (PARTITION BY accountno ORDER BY tdate)
        FROM   tbl
    SELECT a.accoounno, a.tdate, datediff(DAY, b.tdate, atdate)
    FROM   CTE A
    LEFT   JOIN CTE B ON b.accountno = a.accountno
                     AND b.rowno     = a.rowno - 1
    ORDER  BY a.accountno, a.tdate
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Date difference between Requsition apporval and Po approval in Oracle apps

    My requirement is that l need to get the number of date difference between requisition apporval date(requisition) and po approval date (purchase) excluding holidays how to do it ?
    Thanks in advance..

    One PO could be generated from multiple requisitions. In that case, which requisition would you like to consider?
    One requisition could be converted into multiple POs. In that case, which PO would you like to consider?
    Assuming, there is a one-to-one relationship between your POs and requisitions:
    Link a PO to the corresponding requisition by joining po_distributions_all.req_distribution_id with po_req_distributions_all.requisition_id
    Once you have found the 2 records, get the approved_date from po_headers_all and po_requisition_headers_all
    Then go to bom_calendar_dates for those dates and find the difference between seq_num. That is what you are looking for.
    Sandeep Gandhi

  • Share Data Source between multiple report projects in Microsoft SQL Server 2012 Reporting Services

    I have a reports solution in 2012 which contains multiple report projects one each for target deployment folder and we use TFS 2012 for report deployment.
    We have a template project which has a bunch of template reports and all the datasources used in different reports.
    When I develop a report, I cannot "Preview" in TFS but, for deploy this used to work fine util the reports solution was in TFS 2010 & Visual Studio 2008 R2. Since we moved to TFS 2012 & SSRS 2012 not being able to deploy till I create all
    the necessary datasources for each project and now all the developers complaining that they cannot develop reports in TFS itself as they cannot preview (this problem was existing previously) and now not being able to deploy as it errors for each report "Could
    not find specified rds file". I tried messing around with the .rptproj file DataSources tag that did not help either by modifying it like below.
    <DataSources>
    <ProjectItem>
    <Name>DB.rds</Name>
    <FullPath>Template\Data Source\DB.rds</FullPath>
    </ProjectItem>
    </DataSources>
    Is there a way I could share a Data Source between multiple projects in Microsoft SQL Server 2012 Reporting Services?
    Thanks in advance.............
    Ione

    Hi ione721,
    According to your description, you want to create a shared data source which works for multiple projects. Right?
    In Reporting Services, A shared data source is a set of data source connection properties that can be referenced by multiple reports, models, and data-driven subscriptions that run on a Reporting Services report server. It must be within one project.
    We can't specify one data source working for multple projects. In this scenario, we suggest you put those reports into one project. Otherwise you can only create one data source for each project.
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • To find whether a date is b/n a date range.

    Hi All,
             I want to find  whether the system date  falls between from_date and to_date fields of a table.  Pls help me.
    Thank you,
    praveena

    one option is
    <b>CSCP_PARA1_GET_PERIODS
    I_DATUV                         01.02.2005
    I_DATUB                         31.12.2010
    I_TIMEUNIT                      D
    Tables                          Value
    ET_DATES                           0 Entries
                     Result:           2,161 Entries</b>
    after that check this table with current date.
    Regards
    Prabhu

  • Find date columns outside the range

    I have a start and end dates and I have to check mark the record if the ship date is outside my start and end date range. To find out whether my ship date is within the range I can use between but to check to see the outside of the range I am having trouble.
    Any one have any idea.
    Thanks in advance.

    What's the opposite of BETWEEN? Not between.
    not between :start_date and :end_date

  • Finding the manufacture date on an access point via software

    I'd like to determine the manufacture date of our access points because we plan on converting to LWAPP? Can someone tell me the what CLI command to use and which field has the answer. thanks.

    Hi Thomas,
    Not sure about finding the Manufacture date (maybe you are trying to find out about the presence of a MIC certificate) but we did go through this coversion from Autonomous to Lightweight on our infrastructure last summer.In this process we did convert about 70 1121's and 1231's to LWAPP and it worked very well. Here are some relevant docs;
    Upgrading Autonomous Cisco Aironet Access Points to Lightweight Mode
    From this excellent doc;
    http://www.cisco.com/en/US/products/hw/wireless/ps430/prod_technical_reference09186a00804fc3dc.html
    The following Cisco Aironet access points have the ability to operate as autonomous access points or lightweight access points:
    Cisco Aironet 1240 AG Series Access Points
    Cisco Aironet 1230 AG Series Access Points
    Cisco Aironet 1200 Series Access Points that contain 802.11g (AIR-MP21G-x-K9) and/or second-generation 802.11a radios (AIR-RM21A-x-K9 or AIR-RM22A-x-K9)
    Cisco Aironet 1130 AG Series Access Points
    Cisco Aironet 1100 Series Access Points that contain 802.11g radios (AIR-AP1121G-x-K9)
    Cisco Aironet 1300 Series Access Points/Bridges (AIR-BR1310G-x-K9 or AIR-BR1310G-x-K9-R).
    From this doc;
    http://www.cisco.com/en/US/products/ps6521/prod_bulletin0900aecd80321a2c.html
    Guidelines and Tools for Migrating to the Cisco Unified Wireless Network
    http://www.cisco.com/en/US/netsol/ns340/ns394/ns348/ns337/networking_solutions_white_paper0900aecd804f1a23.shtml
    Self-Signed Certificate Manual Addition to the Controller for LWAPP-Converted APs
    LWAPP secures the control communication between the AP and the WLC by means of a secure key distribution. The secure key distribution requires already provisioned X.509 digital certificates on both the LAP and the WLC. Factory-installed certificates are referenced with the term "MIC", which is an acronym for Manufacturing Installed Certificate. Aironet APs that shipped before July 18, 2005, do not have MICs. So these APs create an SSC when they are converted to operate in lightweight mode. Controllers are programmed to accept SSCs for the authentication of specific APs.
    http://www.cisco.com/en/US/products/ps6521/products_configuration_example09186a00806a426c.shtml
    LWAPP Upgrade Tool Troubleshoot Tips
    http://www.cisco.com/en/US/tech/tk722/tk809/technologies_tech_note09186a008072d9a1.shtml
    Also, 5 points for Eric! For all your great work here lately.
    Hope this helps!
    Rob

  • Code to find if system date is within 01 /2007 to 12/2007 and 01/08 to12/08

    Hi , I have a simple requirement at BMW Orders to Cash Area to split up the data loads for "Orders Cube" on yearly basis. like "Orders Cube 2007" and "Orders Cube 2008" and previous year Cube "Orders Cube 2006 . I want to know the abap Code that i write in abap process type or if you can let me know how can i check using IF else functionality in Process chain.
    I want to do the following
    Check if LOad Date (SYSDATE) lies between TOO9B - BDATJ (20007) & TOO9B - POPER (01 TO 12)
    Then use DTP to load the the "2007 order cube"
    Else
    Check if LOad Date (SYSDATE) lies between TOO9B - BDATJ (20008) & TOO9B - POPER (01 TO 12)
    Then use DTP to load the the "2008 order cube"
    Please help me with logic or any standard functionaility that can resolve the above
    Then use DTP to load the the "2007 order cube"
    I just come up with the below code but if you can correct it to put in the format of process chain abap code it will be helpful.
    Thanks
    soniya
    RANGES: IT_TCODE FOR TOO9B - BDATJ
    IT_TCODE-SIGN = 'I'
    IT_TCODE-OPTION = 'EQ'
    IT_TCODE-LOW = ''2007"
    APPEND IT_TCODE.
    IT_TCODE-SIGN = 'I'
    IT_TCODE-OPTION = 'EQ'
    IT_TCODE-LOW = '01'
    APPEND IT_TCODE.
    IT_TCODE-SIGN = 'I'
    IT_TCODE-OPTION = 'EQ'
    IT_TCODE-LOW = '12
    APPEND IT_TCODE.

    HI,
    check this..
    <b>data: date like sy-datum.
    data year(4) type c.
    data typ type i.
    date = sy-datum.
    year = date+0(4).
    typ = year MOD 2.
    if typ = 1.
    *ur code for odd years
    write : 'ODD'.
    else.
    *ur code for even years
    write 'even'.
    endif.</b>
    given data = '20080101'. for even years and check the result.
    Regards
    SAB

  • Who worked with ICS' Model 4896 GPIB? I can not count the data from the module. Can prompt as it to make. It is desirable with examples (data read-out from the module and data transmission between channels. It is in advance grateful.

    I can not count the data from the module. Can prompt as it to make. It is desirable with examples (data read-out from the module and data transmission between channels. It is in advance grateful.

    Hello. Most of the engineers in developer exchange are more familiar
    with NI products. Contacting ICS for technical support is a better
    course of action.

  • I can not find (see) the Data Control Accordion

    Hello all,
    I cannot find (see) the Data Control Accordion, I just installed the Jdeveloper 11g (Oracle JDeveloper 11g (11.1.1.2.0) - November 2009) from this link http://www.oracle.com/technology/software/products/jdev/htdocs/soft11.html
    I started a new ADF BC application, but I cannot find the data control accordion to drag and drop the components I created in the application model. Is there anything I must do after installation (post installation), is there any libraries need to be installed? Please, I need a help to create my application, I’m totally stuck, many thanks for any help.
    Kind regards,
    Nabil

    Shay Shmeltzer wrote:
    Can you post an image of your screen so we can see how it looks like?
    If you delete the JDeveloper\system11.1.1.2.36.55.36 directory - does your IDE get back to the right way of displaying the data control?Hello,
    Many thanks for your reply, kindly find attached screenshots for the two installation of Jdeveloper 11g I have (release 1 & 2), it shows clearly that the “Data Control” is available for release 1, but not available for release 2, even we are talking about the same application!
    Regarding the “JDeveloper\system11.1.1.2.36.55.36”, I’m not sure if I have it (attached a list of directories installed), I was not able to find it under my installation directory, therefore I can’t answer your question, but please advise if it could be the reason, how I may have it, do you think there is something wrong with the installation? I noticed that some persons having the same problem before me, so what was wrong, and how they solve it? I appreciate any help please, many thanks.
    Regards,
    Nabil
    P.S. regarding the attached files, sorry I don't know how to attach files to my reply (you may email me at [email protected] so I can send you the screenshots through email, if you please), any help regarding that too will be appreciated.
    Directory     Location
    o.adf-faces-query-and-lov-dt.11.1.1.2.36.55.36     E:\Oracle11MW\Middleware\jdeveloper\jdev\unit-tests\system11.0.0.0.0
    o.adfdt.swingcore.11.1.1.2.36.55.36     E:\Oracle11MW\Middleware\jdeveloper\jdev\unit-tests\system11.0.0.0.0
    o.adfm.11.1.1.2.36.55.36
    o.adfm.11.1.1.2.36.55.36
    o.BC4J.11.1.1.2.36.55.36
    o.bm.11.1.1.2.36.55.36
    o.css.11.1.1.2.36.55.36
    o.diagram.javadoc.11.1.1.2.36.55.36
    o.dynamic.faces.11.1.1.2.36.55.36
    o.ide.11.1.1.2.36.55.36
    o.j2ee.11.1.1.2.36.55.36
    o.jdeveloper.11.1.1.2.36.55.36
    o.jdeveloper.esdk.11.1.1.2.36.55.36
    o.struts.11.1.1.2.36.55.36
    o.struts.adf.11.1.1.2.36.55.36
    o.xsqldt-ide.11.1.1.2.36.55.36

  • Data reconciliation between R/3 and the BW Systems

    How do we do data reconciliation between R/3 and the BW system for the following areas?
    Purchasing
    Controlling:
    Project System:
    COPA
    SD
    AP
    Trgards,
    Tony G

    Tony
    Have you looked these documents??
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/biw/how%20to%20validate%20infocube%20data%20by%20comparing%20it%20with%20psa%20data
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/7a5ee147-0501-0010-0a9d-f7abcba36b14
    Re: BW v. R/3 data reconciliation
    Hope this helps
    Thanks
    Sat

Maybe you are looking for