Difference between 2 AP Data Sources

Hi guys
We are on ECC6 and BI 7...We have to developed a data model for 6 reports with 0IF_AP_4 Data Source for Procurement...also for one of FI report (Vender Spint) we need to know whether we can use the same data source 0FI_AP_4 or we need to use the 0FI_AP_6 which is already delivered for Vendor Spend report ..But If we want to use AP_6 Data source we need to enhance this Data source with PRCTR as we need it for our reporting requirement..So we didnt find the corresponding table for it ..When we enhanced it with BSEG table, we are unable to populate the PRCTR with the keys in both extractor and DS..
Now In our AP_4 DS we already have PRCTR available (We enhanced it with BSEG)...and all fields are available for vendor Spend Report...But Our concern is Whether AP_6 and AP_4 will produce the same data...?/ Is there any thing we miss if we use AP_4 for Vendor Spend? If we can simply use AP_4 DS for Vendor spend Report..what is the use of AP_6 ..Why SAP Delivered a complete flow from DS to Cube for Standard Vendor Spend report?
Any guidelines please...
Thanks in advance

You are running into a problem casting your character variables into dates. As you can see here, it is not such a good idea to let the database do this for you...
WITH temp AS
SELECT SYSDATE start_date FROM dual
SELECT *
FROM   temp
WHERE START_DATE >= &BEGIN
AND start_date <= &END + 1;
Enter value for begin: '01-dec-07'
old   7: WHERE START_DATE >= &BEGIN
new   7: WHERE START_DATE >= '01-dec-07'
Enter value for end: '01-jan-08'
old   8: AND start_date <= &END + 1
new   8: AND start_date <= '01-jan-08' + 1
AND start_date <= '01-jan-08' + 1
ERROR at line 8:
ORA-00932: inconsistent datatypes: expected DATE got NUMBERBut if you wrap the character strings with to_date()....
WITH temp AS
SELECT SYSDATE start_date FROM dual
SELECT *
FROM   temp
WHERE START_DATE >= to_date(&BEGIN,'DD-MON-YY')
AND start_date <= to_date(&END,'DD-MON-YY') + 1;
Enter value for begin: '01-DEC-07'
old   7: WHERE START_DATE >= to_date(&BEGIN,'DD-MON-YY')
new   7: WHERE START_DATE >= to_date('01-DEC-07','DD-MON-YY')
Enter value for end: '01-JAN-08'
old   8: AND start_date <= to_date(&END,'DD-MON-YY') + 1
new   8: AND start_date <= to_date('01-JAN-08','DD-MON-YY') + 1
START_DAT
18-DEC-07And to be absolutely correct, you should actually use a format mask with a full YYYY and supply a full year with your variables.
Greg

Similar Messages

  • Difference between Realtime Data Acqisition and Direct Data Access ?

    Hi experts,
    What is RDA and DDA and whrere these two are used ?
    What is the Difference between Realtime Data Acqisition and Direct Data Access?
    Please explain me in a detail manner, i will assign points for ur valuable answers..............

    Hi,
    Eventhough the aim of the two methods are to report on the latest data, there is a difference in both.
    In Realtime Data Acqisition you are loading the data into BW and then reporting on that data from BW Infoproviders.
    http://help.sap.com/saphelp_nw04s/helpdata/en/52/777e403566c65de10000000a155106/content.htm
    I think you are refering to Virtual providers by the term Direct Data Access. In  Direct Data Access you are not loading data into BW. Data is residing in R/3 itself. Your reports will fetch data from R/3 directly. The data is called during execution of a query in the source system.
    http://help.sap.com/saphelp_nw04s/helpdata/en/23/c0234239f75733e10000000a155106/frameset.htm
    http://help.sap.com/saphelp_nw70/helpdata/EN/13/3e34429692b76be10000000a155106/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/da/5909392a430303e10000000a114084/frameset.htm
    Hope this helps.
    Thanks,
    JituK

  • Calculate the difference between two dates

    I would like to calculate the difference between two dates in PL/SQL and return the result as a number of days expressed as an integer value.

    Denes,
    A fair point, I should really have posted this on the SQL forum (I'm new to the forum as well as PL/SQL) but thanks for responding anyway. It does raise a question as to how to implement this in ApEx though.
    I have created the function and am calling it as shown below from the source window of a form. The source type is 'PL/SQL expression or function' and the expression in the source window of the form is:
    calc_date_difference (:p26_c_payment, :p26_c_rec)
    The two parameters being passed are of type date but I'm not sure how to handle the ruturned number and populate the form in ApEx with this value.
    Is it possible to do it this way or am I taking completely the wrong approach?
    Regards
    Sandy
    This is not ApEx related but SQL related:
    CREATE OR REPLACE FUNCTION calc_date_difference (
    p_date_1   VARCHAR2,
    p_date_2   VARCHAR2
    RETURN NUMBER
    v_difference   NUMBER;
    v_sql_err      VARCHAR2 (4000);
    BEGIN
    v_difference := TRUNC (TO_DATE (p_date_1)) - TRUNC
    (TO_DATE (p_date_2));
    RETURN v_difference;
    CEPTION
    WHEN OTHERS
    THEN
    v_sql_err := SQLERRM || CHR (10) || CHR (10) ||
    SQLCODE;
    ND calc_date_difference;and
    SQL> SELECT calc_date_difference ('23.01.2007',
    '20.01.2007') diff
    2    FROM DUAL;
    DIFF
    3
    Denes Kubicek                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • What is the difference between delivery date and actual goods issue date?

    Hi ,
    Can you please tell me the difference between Delivery date and Actual goods issue date ?
    Delivery data can be be greater than goods issue date?
    Thanks,
    Ajay

    Hi Ajay,
                  Delivery date means its the original date on which the delivery should be done.Actual goods Issue date is the date on which goods to be delivered according to the purchase order.There can be delay in the delivery so we maintain 2 objects.
    Yes delivery date can be greater than Goods Issue date.
    Hope this clears
    Regards
    Karthik

  • As to the data type of the data type of the difference between two date type of datas

    Hi,
    I have a question about the data type of the difference between two date type of datas.
    There are two date type of datas as:
    SSHIPMENTS.RECEIVEDATETIME
    SSHIPMENTS.PROMISEDATETIME
    I try to use the following SQL Script in Oracle SQL*Plus as:
    SELECT CASE
    WHEN (SSHIPMENTS.RECEIVEDATETIME - SSHIPMENTS.PROMISEDATETIME) < '000 01:00:00.000' THEN 'OnTime'
    WHEN (SSHIPMENTS.RECEIVEDATETIME - SSHIPMENTS.PROMISEDATETIME) < '000 01:30:00.000' THEN '60-89 Minutes'
    ELSE '3+ Hours'
    END
    FROM SSHIPMENTS;
    The error message of "Invalid Number" for the '000 01:30:00.000' happens.
    I don't know if the data type of the interval is wrong.
    Many Thanks,
    Cathy

    SELECT CASE
    WHEN (to_char(SSHIPMENTS.RECEIVEDATETIME,'hhmiss') - to_char(SSHIPMENTS.PROMISEDATETIME,'hh24miss')) < '010000' THEN 'OnTime'
    WHEN (to_char(SSHIPMENTS.RECEIVEDATETIME,'hhmiss') - to_char(SSHIPMENTS.PROMISEDATETIME,'hh24miss'))< '000 01:30:00.000' THEN '60-89 Minutes'
    ELSE '3+ Hours'
    END
    FROM SSHIPMENTS;
    just try it out..

  • Difference between Invoice Date, GL Date and Accounting Date Oracle AP

    Hello,
    I have a question that might help a lot of people too later.
    I tried to run these queries
    select aia.INVOICE_ID
    from AP_INVOICES_ALL aia, AP_INVOICE_DISTRIBUTIONS_ALL aida
    where aia.INVOICE_ID = aida.INVOICE_ID
    and aia.INVOICE_DATE <> aida.ACCOUNTING_DATE
    select aia.INVOICE_ID
    from AP_INVOICES_ALL aia, AP_INVOICE_DISTRIBUTIONS_ALL aida
    where aia.INVOICE_ID = aida.INVOICE_ID
    and aia.GL_DATE <> aida.ACCOUNTING_DATE
    I can see that there are lot of results for these queries, where the Invoice Date is not equal to the Accounting date and the GL_Date of an invoice is not equal to the accounting date in the distributions table.
    So, what is the difference between these dates.
    And if I had to take the Invoice Accounting document entry date, which date do i have to take for these invoices in AP
    Thanks
    Bob

    Hi
    Let me try to explain this with an example.
    Suppose I buy some stationary from a vendor and he provides me with a detailed invoice of the goods puchased.
    In this case the invoice will always have a date printed on it and this date should ideally be entered in the invoice date at AP_INVOICES_ALL level.
    Now suppose the invoice happens to be received by me in february and for some reason I could not capture the invoice in my books in february and made a provision for the liabilities and close the books.
    However in march i want to book the invoice say on 10th of march in my books and pay the vendor the amount payable.(I Have to reverse the already provided liability in march to reverse the accounting effect).
    In this case my book entry date of invoice is the accounting date i.e. 10 March.
    In case of oracle, the accounting is maintained so that the invoice header hits the liability account while the invoice distribution hits the charge account(expense account so to say). And to gain more flexibility oracle provides date in both header and distributions to provide an option of booking liability and charge on different dates..
    As per the 11i checks there is no check on any of these dates except that accounting date at header and ditribution level must be in an open AP and GL period.
    Thanks
    MAV.

  • Difference between doc date,posting date and invoice date

    hi bw guys
    can someone give a brief on the difference between doc date,posting date and invoice date.and the invidual definitions
    thank you

    Hi,
    Posting Date: Date which is used when entering the document in Financial Accounting or Controlling. The posting date can differ from both the entry date and the doc date.
    Document Date: The document date is the date on which the original document was issued. Ex: Inv date, Bill date etc.,
    Invoice Date : Usually the date when goods are shipped. Payment dates are set relative to the invoice date.
    -Vikram

  • Difference between 2 Dates

    hi..Experts
    Req: In OBIEE,Difference between Start date and end date. Result should be in hh:mm:ss fromat
    I Tried with
    TIMESTAMPDIFF(SQL_TSI_SECOND, " Closed Date", "Scheduled Start Date")
    it gives me No.of Seconds.
    in Data format tab, custom= [FMT:Timestamp] then i am getting in hh:mm:ss tt fromat and the difference is incorrect
    i need format in hh:mm:ss
    Please give suggession......

    Hi User,
    Try this one
    Cast(TimeStampDiff(SQL_TSI_MINUTE,LAST_UPD,CUR RENT_TIME STAMP(0))/1440 as VARCHAR(10)) || ':' ||
    Cast(Mod(TimeStampDiff(SQL_TSI_MINUTE,LAST_UPD ,CURRENT_ TIMESTAMP(0))/60,60) as VARCHAR(2)) || ':' ||
    Cast(Mod(TimeStampDiff(SQL_TSI_MINUTE,LAST_UPD ,CURRENT_ TIMESTAMP(0)),60) as VARCHAR(2))
    Please note that the output of the Desired Format will be in VARCHAR.
    Thanks
    Don

  • Difference between Posting Date & Baseline date in MIRO

    HI,
    What is the difference between Posting Date & Baseline date in MIRO?
    Regards
    Chandan
    Edited by: Chandan H N on Dec 14, 2009 11:11 AM

    Dear,
    Posting Date:
    Posting Date in the Document
    Date which is used when entering the document in Financial Accounting or Controlling.
    Use
    The fiscal year and the period for which an update of the accounts specified in the document or cost elements is made, are derived from the posting date.
    When entering documents, the system checks whether the posting date entered is allowed by means of the posting period permitted.
    Note
    The posting date can differ from both the entry date (day of entry into the system) and the document date (day of creation of the original document).
    Baseline Date
    Baseline Date for Due Date Calculation
    Date to which the periods for the cash discount deadline and the due date for net payment refer. This is the case for line items in open item accounts.
    For line items in G/L accounts, the item is due immediately on this date because there are no cash discount specifications.
    Procedure
    During document entry for open item accounts, the date may be defaulted. For this, a terms of payment key must have been specified in the customer's/vendor's master record for which a default value is requested in the document.
    The proposed date can be overwritten.
    If the cash discount rates (and days) have not been entered, the baseline date for payment is the same as the due date.
    Regards
    Utsav

  • Differences between using Data Pump to back up database and using RMAN ?

    what are differences between using Data Pump to back up database and using RMAN ? what is CONS and PROS ?
    Thanks

    Search for Database backup in
    http://docs.oracle.com/cd/B28359_01/server.111/b28318/backrec.htm#i1007289
    In short
    RMAN -> Physical backup.(copies of physical database files)
    Datapump -> Logical backup.(logical data such as tables,procedures)
    Docs for RMAN--
    http://docs.oracle.com/cd/B28359_01/backup.111/b28270/rcmcncpt.htm#
    Docs for Datapump
    http://docs.oracle.com/cd/B19306_01/server.102/b14215/dp_overview.htm
    Edited by: Sunny kichloo on Jul 5, 2012 6:55 AM

  • How to build a difference between to dates

    Hi @All,
    Hope you can help me :) ..
    I'd like to build the "difference" between two dates (e.g. date of the invoice and date of the payment receipt). As the result I expect an Integer.
    I tried several functions and operations, but still get the error code: [nQSError: 22023] An arithmetic operation is being carried out on a non-numeric type.
    I also tried to cast the date format into an Integer or double, but I still get an error ...
    Here is my code:
    CASE WHEN "2_Forderungsstruktur_Fälligkeiten".DIM_DATUM_FAELLIGKEIT.DDAT_DATUM_DE < 0
    THEN NULL
    ELSE
    "2_Forderungsstruktur_Fälligkeiten".DIM_DATUM.DDAT_DATUM_DE - "2_Forderungsstruktur_Fälligkeiten".DIM_DATUM_FAELLIGKEIT.DDAT_DATUM_DE
    END
    Hope you guys have some good ideas to solve these problem :)
    best regards
    Matt

    hi,
    TIMESTAMPDIFF(SQL_TSI_MONTH,"Dim - Time"."Date",CURRENT_DATE)
    "Dim - Time"."Date"--->Column1
    Current_date--->Column2
    thanks,
    saichand

  • Calculating the difference between to dates.

    All,
    I've a requirement where I need to calculate difference between to dates. If the given date is less than the current date, it should return '0'(zero) other wise should return 1. How can i do this?
    Regards,
    Venky

    SQL> select decode(sign(sysdate-to_date('01/02/2008','DD/MM/YYYY')),1,0,1) as datecomp
      2  from dual;
      DATECOMP
             0
    SQL> ed
    Wrote file afiedt.buf
      1  select decode(sign(sysdate-to_date('01/12/2008','DD/MM/YYYY')),1,0,1) as datecomp
      2* from dual
    SQL> /
      DATECOMP
             1
    SQL> ed
    Wrote file afiedt.buf
      1  select decode(sign(sysdate-to_date('11/11/2008','DD/MM/YYYY')),1,0,1) as datecomp
      2* from dual
    SQL> /
      DATECOMP
             0
    SQL>Edited by: BluShadow on Nov 11, 2008 1:27 PM
    couple of further examples.

  • Get Date Difference between 2 date values as days

    Hi,
    How to get the difference between 2 dates in number of days format. Say if i need the difference between 2012-08-23 and 2012-08-20 as 3
    Please help..

    Hi,
    You can do it in XSLT since the dates are in ISO 8601 format...
    http://www.w3.org/TR/NOTE-datetime
    Here is a sample XSLT...
    <xsl:stylesheet  version="2.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:fn="http://www.w3.org/2005/xpath-functions">
    <xsl:template match="/">
    <xsl:variable name="date1" select="xs:dateTime(/root/date1)"/>
    <xsl:variable name="date2" select="xs:dateTime(/root/date2)"/>
    <xsl:value-of select="fn:days-from-duration($date2 - $date1)"/>
    </xsl:template>
    </xsl:stylesheet>The above XSLT will result *4* for the following input...
    <root>
    <date1>2012-01-11T00:00:00.000-05:00</date1>
    <date2>2012-01-15T00:00:00.000-05:00</date2>
    </root>You can test this example here...
    http://xslttest.appspot.com/
    Hope this helps...
    Cheers,
    Vlad
    It is considered good etiquette to reward answerers with points (as "helpful" - 5 pts - or "correct" - 10pts)
    https://forums.oracle.com/forums/ann.jspa?annID=893

  • Date difference between two dates

    hi All,
    i have to right a stored proc to find the difference between two dates. 
    for example of i give
    startdate as 4/1/2015 and enddate 14/1/2015
    i should get 1 year , 10 days and 0 months .
    i have tried the DateDiff function but it does not calculate the leap year.
    please help.

    DECLARE @from datetime
    DECLARE @to   datetime
    SET @from = '20150104  8:00'
    SET @to   = '20150114  10:30'
    SELECT DATEDIFF(minute,@from, @to) % 60 as Minutes
    SELECT (DATEDIFF(minute,@from, @to) / 60) % 24 as Hours
    SELECT DATEDIFF(minute,@from, @to) / (60 * 24) as Days
    SELECT DATEDIFF(month,@from, @to) as Months
    SELECT DATEDIFF(year,@from, @to) as Year
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Difference between two date in bex query

    Hi all,
    I need to do a difference between two date using formula variable processing type customer exit beaucause I must use factory calendar in the formula.
    How can I do it?
    Can you give me an example of the routine?
    Thanks a lot
    Gianmarco

    Hi,
    You can still use the same code to copy it and customize as per your need. All you need to do is to subract the dates using the class: CL_ABAP_TSTMP after converting to timestamp and resulting seconds you convert back to days....Please get help from the developers to do this...
    Also, ensure that you write back this difference value to your variable so you get it on the reports for your calculations...
    Cheers,
    Emmanuel.

  • Difference between two dates

    Hi
    I have two date fields in the ODS..Both are characterists
    1. Requested delivery date
    2. Actual shipment end date.
    I would like to create a calculated KF  field for the difference between two dates in a query.
    How can I accomplish it?
    Regards

    You have to make Expiration data as nav attribute and create a formula variable then only this date can be used in calculations.
    refer this How to...for the same
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/72f4a790-0201-0010-5b89-a42a32223ffc
    later you can try to calculate difference between dates!
    Re: calculating the difference between two dates
    Please search in forum with 'difference between two dates'.You will find lots of good posts on this issue!
    hope this helps
    Regards

Maybe you are looking for

  • Missing Hard drive space. Gigs. storage

    I believe this has nothing to do with my Macbook but to do with the OS? and once I delete files? I have a new purchased computer. It has 250 gigs... once I upload all the software it has 230 gigs... now.. thats where it should always stay if I add no

  • How to match the BI Inventory Management reports with MB5B?

    Hi All, In BI we have two reports which shows the Quantity, Value and count of the valuated GI and GR movements happened in the inventory at a material-plant level for a given day. Both the reports are built on the cube 0IC_C03(Material Stocks/Moveme

  • Sending mail to approver in BRF Workflow

    Dear all, We use a BRF Workflwo for the approval process in SRM 7.0. Could you please indicate me how we have to configure the system  for sending a mail to the approver, when he has to confirm the Shopping-Cart? The approving - part is in place and

  • Plot showing problem with graph

    Hi everybody! Now I've come to dead end with my vi. I don't know why my vi doesn't show the trend line anymore. The previous version I did show the line, but now I've tried many things but the line wouldn't show up. The idea is that graph shows max,

  • Pdf cannot be exported

    i keep getting this error when in safari when it does not appear that the pdf is protected in any way. it happens when i run a save as. for instance this page http://workgroups.clemson.edu/AAH0503_ANIMATED_ARCH/linked%20docs/Bio-logic%20of %20Archite