Query for Datasource problem

I have made an database based xfl function as:
declare function tns:add_months($da as xs:dateTime,$val as xs:int) as xs:dateTime? external;
and when i am calling this function in an Data sService is is giving me this error:
The function is defined for the following datasources: [null]

i am using a Database based xfl function for incorporating add_months function of sql:
declare function tns:add_months($date as xs:dateTime,$value as xs:int) as xs:dateTime? external;
This was working fine when i called it in another funcition where clause(see attacment for it's query plan-CorrectQueryPlan.xml)
But after changing the JNDI name when i am using it in the same function where clause i am getting this error:
Unable to generate SQL for XQuery expression: Cannot generate SQL for the user-defined function {lib:ShipmentsDataServices/XqueryLibrary/Test}add_months for datasource pg.dtmg101DS. The function is defined for the following datasources: [null]
see attacment for it's query plan-Error.xml)
I have also trie to create a new Database based xfl and trie to use it in a where clause of some other data Service then also it is showing me the same above error.
please help me solving this.
thanx
Anand

Similar Messages

  • How to place nulls has last rows.Find query for below problem

    I have a table..MyTable(value number(10))
    select * from Mytable;
    value
    12
    null
    13
    null
    11
    null
    This is the table i have and the records i have...... and i need output like this
    value
    12
    13
    11
    null
    null
    null ..............>ike this i need output for this i use this query i.e
    Query-->select value from mytable where value is not null
    union all
    select value from mytable where value is null
    ------------>and this query gives only one column result i need multiple results like below: i have table with 2 columns like below
    MyTable2(value1 number(10),value2 number(10))
    select * fromMyTable2
    value1 value2
    111 null
    null 201
    112 null
    null 200
    110 null
    this is the table i have......... and i need output like below
    value1 value2
    111 201
    112 200
    110 null
    null null
    null null
    NOTE:: If we use ORDER BY table records order must change, i don't want to change any order....please what is the query for that

    I'm not able to find any sense in your request but it can be done:
    select value1, value2
    from (select value1, rownum rn from
             (select value1 from mytable where value1 is not null
               union all
              select value1 from mytable where value1 is null)
            ) a,
           (select value2, rownum rn from
             (select value2 from mytable where value2 is not null
               union all
              select value2 from mytable where value2 is null)
            ) b
    where a.rn = b.rn;You should study some book about relational databases to understand frst of all what a record is, and then that records in a table are not ordered.
    Max

  • Pls help me in writing a query for my problem !

    I have to find out the amount(LAmt) for members who lie btw diff age groups, below are the table structures:
    table1
    DOB ID
    12/24/1986 F125
    06/05/1988 F223
    05/04/1987 F589
    07/07/2001 F856
    table2
    LAmt ID LDate
    $56 F125 01/01/2011
    $45 F223 08/22/2005
    $87 F589 09/24/2004
    $87 F856 10/10/2000
    $87 F587 09/09/2002
    Query:
    1) I have to find the age group for the members who lie between 1 to 5 & 6 to 10 and so on, Also find the the no. of days since they have been registered(Using LDate-Current Date) , also the LAmt for those members.

    Hi,
    836810 wrote:
    SELECT -- To calculate Listed Amount of members btw age group 0 to 4
    COUNT(DateOfBirth) as Nopresent,
    DATEDIFF (yyyy,DateOfBirth,GETDATE()) as age,
    SUM(RPTInvHosp.AccountListAmount) as ListedAmt,
    COUNT(DateOfBirth) * SUM(RPTInvHosp.AccountListAmount) as [Calc]
    FROM RPTInv1st,RPTInvHosp
    WHERE
    DATEDIFF (yyyy,DateOfBirth,GETDATE()) >= 0 and
    DATEDIFF (yyyy,DateOfBirth,GETDATE()) < 5 and
    RPTInv1st.PASDebtorID=RPTInvHosp.PASDebtorID
    Group by DATEDIFF (yyyy,DateOfBirth,GETDATE())
    I want to get members btw the particular age group JOIN with the no of days they have been opened an account & their amount.In Oracle, use double-quotes (or nothing) instead of square brackets around aliases:
    COUNT(DateOfBirth) * SUM(RPTInvHosp.AccountListAmount)  as "Calc"The double-quotes are only necessary if you want the alias not to conform to the normal naming conventions; they are optional around normal names, such as CALC.
    There are no built-in functions called GETDATE or DATEDIFF in Oracle.
    In Oracle, SYSDATE returns the current DATE (on the database server).
    There's nothing very convenient in Oracle for getting the difference between two DATEs in units of a year. The best way is to use MONTHS_BETWEEN to get the difference in months, and then divide that number by 12, like this:
    WHERE     FLOOR ( MONTHS_BETWEEN ( SYSDATE
                                , DateOfBirth
               / 12
               )          BETWEEN     0
                         AND     4Do you need help about how to do a join?
    It's not at all clear what you want here.
    Whenever you have a question, post CREATE TABLE and INSERT statements for your sample data, and post the exact results you want from that data. Explain, with specific examples, how you get those results from that data.
    Always say what version of Oracle (or other software) you're using.

  • Query for the Problem of setting up agent and scheduling a scenario

    I have setup a agent called AGENT_SCHEDULER.I can start this agent from the windows service,but when I go to Topology manager and say test Test Connection I don't get any response. My ODI hangs up and I have to manually kill
    from the task Manager. Why is this happening?
    But when I start from the command prompt using agentscheduler "-port=20910" "-name=AGENT_SCHEDULER" "-v=5 its gets started and tehn when I go to topology Manager and test connection ,it says agent test successful.
    But in the windows service it is not started though. Is this correctly behaving?
    After that when I schedule a Package Scenario and give status "active " and execution on "startup",I able to save. At this I presume the schedule must have started and ran the process. But then when I Go to Operator,it gives me error UNPARSEABLE DATE "0" and the opens up and doesn't show me anything.
    what is this error unparseable date "0"?
    I have set my ODIPARAMS with corect master and work repository and encoded ODI_SECU_ENCODED_PASS with the latest one generated?because every time I generate I get a different one.I am using java version "1.5.0_05".
    Also I have a requirement that I schedule my package after every 30 mins? What I found that we can schedule hourly?How will I be able to achieve this?

    Hi user768175
    Ref Note 783671.1 In Iassets Security by Cost Center is not Working, The Symptoms is as below :
    In iAssets, users with "Enforce Security by Cost Center" are able to see assets from different cost centers then the one where they are restricted, when using Advance Search button.
    But I still not work when using Advance Search button....
    Anyway, do u know how to setup the Cost Center/Department for employee in the HRMS module? Is't correct as below?
    I tried to set in HRMS (HRMS Manager) -> People -> Enter and Maintain --> select user--> Assignment -> Purchase Order Information -> input value in Set of Books and Default Expense Account field
    Many thanks for your help...
    SamCH

  • Give me Sql Query for this problem?.  Please Help Me........

    This is my exact requirements
    My PNO table formart is
    PNO PDate PCount
    P001 08/27/05 20
    P001 08/29/05 10
    P002 08/27/05 20
    P003 08/28/05 20
    P003 08/28/05 20
    I want to display the total (PCount) PNumber for this week.
    PNo Sat (27th) Sun(28th) Mon(29th) .........Fri(2/09/2005)
    P001 20 0 10 0
    P002 20 30 0 0
    P003 0 40 0 0
    or at least i want to display, i mean if there is no record for P003 on starturday, it will display 0.
    PNo Sat (27th)
    P001 20
    P002 20
    P003 0
    first iam getting distinct PNo for this week, and check whether these number occurs on saturday if occur then display count otherwise display 0
    Millons of thanks in advance...
    Message was edited by:
    user448874

    EZECASH@ORCL> select * from pno_table;
    PNO  PDATE         PCOUNT
    P001 27-AUG-05         20
    P001 29-AUG-05         10
    P002 27-AUG-05         20
    P003 28-AUG-05         20
    P003 28-AUG-05         20
    P001 02-SEP-05         10
    P001 03-SEP-05         15
    P002 03-SEP-05         10
    P002 04-SEP-05         10
    9 rows selected.
    EZECASH@ORCL> select next_day(trunc(sysdate)-7,'sat') d1,next_day(trunc(sysdate)-7,'sat')+1 d2,next_day(trunc(sysdate)-7,'sat')+2 d3,
      2    next_day(trunc(sysdate)-7,'sat')+3 d4,next_day(trunc(sysdate)-7,'sat')+4 d5,next_day(trunc(sysdate)-7,'sat')+5 d6,
      3    next_day(trunc(sysdate)-7,'sat')+6 d7
      4  from dual
      5  /
    D1        D2        D3        D4        D5        D6        D7
    27-AUG-05 28-AUG-05 29-AUG-05 30-AUG-05 31-AUG-05 01-SEP-05 02-SEP-05
    EZECASH@ORCL> select pno,sum(decode(trunc(pdate),d1,pcount,0)) day1Sum, sum(decode(trunc(pdate),d2,pcount,0)) day2Sum,
      2  sum(decode(trunc(pdate),d3,pcount,0)) day3Sum,sum(decode(trunc(pdate),d4,pcount,0)) day4Sum,
      3  sum(decode(trunc(pdate),d5,pcount,0)) day5Sum,sum(decode(trunc(pdate),d6,pcount,0)) day6Sum,
      4  sum(decode(trunc(pdate),d7,pcount,0)) day7Sum
      5  from  pno_table,
      6  (select next_day(trunc(sysdate)-7,'sat') d1,next_day(trunc(sysdate)-7,'sat')+1 d2,next_day(trunc(sysdate)-7,'sat')+2 d3,
      7    next_day(trunc(sysdate)-7,'sat')+3 d4,next_day(trunc(sysdate)-7,'sat')+4 d5,next_day(trunc(sysdate)-7,'sat')+5 d6,
      8    next_day(trunc(sysdate)-7,'sat')+6 d7
      9  from dual) w
    10  where pdate >= next_day(trunc(sysdate)-7,'sat')
    11  group by pno
    12  /
    PNO     DAY1SUM    DAY2SUM    DAY3SUM    DAY4SUM    DAY5SUM    DAY6SUM    DAY7SUM
    P001         20          0         10          0          0          0         10
    P002         20          0          0          0          0          0          0
    P003          0         40          0          0          0          0          0
    EZECASH@ORCL>

  • Suggest a good query for my problem

    Joining two tables .......
    1. CREATE TABLE STUDENT
    IDNO NUMBER,
    NAME VARCHAR2(30 BYTE),
    AGE NUMBER,
    CLASS NUMBER
    2. CREATE TABLE CLASS_ST
    CLASS NUMBER,
    CLASS_NAME VARCHAR2(20 BYTE)
    1. joining two table and find minimum age of student in each class.
    2. return name,age,class_name
    Edited by: joel on Oct 10, 2011 3:57 AM

    Joel,
    How does this relate to Oracle Forms? You should always post questions in the appropriate forum. In this case, you should have posted your question in the PL/SQL forum.
    For reference, you might want to take a look at the following as well:
    Oracle Forums FAQ
    10 Commandments for the OTN Forums Member
    How to ask questions the smart way
    Craig...

  • Problem with query for Oracle

    Hello Experts,
    I'm tryng to develop my first application for EP (v7 SP12) with NWDS (without NWDI).
    This application has to read and write data in the EP DB (oracle v10).
    I'm using:
    <u>a Dictionary Project</u> (define the DB Tables)
    <u>a Java Project</u> (define class as DAO, DBManager etc)
    <u>a Library Project</u>
    <u>an EJB Project</u>
    <u>an EAR Project</u>
    With these projects I can deploy a <u>webService</u> in my EP server.
    BUT I have some problem with a query that I'm tryng to sent to my DB through a DAO Class called by my WebService.
    The query is simple and correct but it does not work...
    This is the error message returned (the query id in bold)
    (column names: GIORNO, NOMEDITTA, NOMEAREA, NOMESETTORE)
    <i>HTTP/1.1 500 Internal Server Error
    Connection: close
    Server: SAP J2EE Engine/7.00
    Content-Type: text/xml; charset=UTF-8
    Date: Fri, 21 Sep 2007 14:29:57 GMT
    Set-Cookie: <value is hidden>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Client</faultcode><faultstring>java.sql.SQLException: com.sap.sql.log.OpenSQLException: The SQL statement <b>"SELECT NOMESETTORE, MIN(? - "GIORNO") AS GIORNI FROM SRS_DATEINFORTUNI WHERE NOMEDITTA = ? AND NOMEAREA= ? GROUP BY NOMESETTORE ORDER BY NOMESETTORE"</b> <u>contains the syntax error[s]: - 1:25 - the arithmetic expression >>? - "GIORNO"<< contains a host variable (parameter marker)</u></faultstring><detail><ns1:getGiorniSettori_com.akhela.giorniSenzaInfortuni.ejb.exception.GiorniSenzaInfortuniException xmlns:ns1='urn:GiorniSenzaInfortuniWSWsd/GiorniSenzaInfortuniWSVi'></ns1:getGiorniSettori_com.akhela.giorniSenzaInfortuni.ejb.exception.GiorniSenzaInfortuniException></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope></i>
    The variable '?' is the today date, the difference <b>"(?-GIORNO)"</b> is an int..
    Moreover in my DAO class the query is <b>"SELECT NOMESETTORE, MIN(? - GIORNO) AS GIORNI FROM SRS_DATEINFORTUNI WHERE NOMEDITTA = ? AND NOMEAREA= ? GROUP BY NOMESETTORE ORDER BY NOMESETTORE</b>", instead in the error message is reported <b>MIN(? - "GIORNO")</b>...
    We have tryed also with alternative query, for example we used <b>"MIN(SYSDATA - GIORNO)"</b> but <b>SYSDATA</b> was interpreted as column name and  not found....
    Any help???
    Best Regards

    Hi, I found something about the Host Variable (http://help.sap.com/saphelp_nw70/helpdata/en/ed/dbf8b7823b084f80a6eb7ad43bdbb9/content.htm), there explain that if you want to use an host variable you have to put ':' as prefix..
    My problem is that <u>I need to extract the minimum of the subtraction between two dates:</u>
    Query <b>MIN(? - GIORNO)</b> --> <i>Error: the arithmetic expression >>? - "GIORNO"<< contains a host variable (parameter marker)</i>
    So I tried to use the ':' as indicated in the manual..
    <b>MIN:(? - GIORNO)</b> --> - <i>SQL syntax error: the token ":" was not expected here
                   - expecting LPAREN, found ':'</i>
    <b>MIN(:(? - GIORNO))</b> --> <i>- 1:25 - Open SQL syntax error: :PARAMETER not allowed
                   - 1:26 - SQL syntax error: the token "(" was not expected here
                   - 1:26 - expecting ID, found '('</i>
    Then I tried to avoid the MIN() function and I tried to do just the subtraction:
    <b>? - GIORNO</b> --><i> - 1:21 - the arithmetic expression >>? - "GIORNO"<< contains a host variable (parameter marker)</i>
    <b>:(? - GIORNO)</b> --> <i>- 1:21 - Open SQL syntax error: :PARAMETER not allowed
                - 1:22 - SQL syntax error: the token "(" was not expected here
                - 1:22 - expecting ID, found '('</i>
    <b>'2007-09-24' - GIORNO</b> --> <i>- 1:34 - SQL syntax error: first argument of operator "-" must be a number, date/time or interval
                     - 1:43 - SQL syntax error: arguments of operator "-" do not have correct types
                     - 1:43 - SQL syntax error: derived columns in SELECT list with AS must be values</i>
    <b>GIORNO - GIORNO</b> --> <i>- 1:21 - the group by list and the select list are inconsistent: the column >>"GIORNO"<< is neither grouped nor aggregated
                  - 1:30 - the group by list and the select list are inconsistent: the column >>"GIORNO"<< is neither grouped nor aggregated</i>
    Why these parts of query are not accepted???
    I don't understand why... I hope you can help me.
    Best Regards
    Alessandro

  • Problem writing a sql query for a select list based on a static LOV

    Hi,
    I have the following table...
    VALIDATIONS
    ID          Number     (PK)
    APP_ID          Number     
    REQUESTED     Date          
    APPROVED     Date          
    VALID_TIL     Date
    DEPT_ID          Number     (FK)
    I have a search form with the following field item variables...
    P11_DEPT_ID (select list based on dynamic LOV from depts table)
    P11_VALID (select list based on static Yes/No LOV)
    A report on the columns of the Validations table is shown based on the values in the search form. So far, my sql query for the report is...
    SELECT v.APP_ID,
    v.REQUESTED,
    v.APPROVED,
    v.VALID_TIL,
    d.DEPT
    FROM DEPTS d, VALIDATIONS v
    WHERE d.DEPT_ID = v.DEPT_ID(+)
    AND (d.DEPT_ID = :P11_DEPT_ID OR :P11_DEPT_ID = -1)
    This query works so far. My problem is that I don't know how to do a search based on the P11_VALID item - if 'yes' is selected, then the VALID_TIL date is still valid. If 'no' is selected then the VALID_TIL date has passed.
    Can anyone help me to extend my query to include this situation?
    Thanks.

    Hello !
    Let's have a look at my example:create table test
    id        number
    ,valid_til date
    insert into test values( 1, sysdate-3 );
    insert into test values( 2, sysdate-2 );
    insert into test values( 3, sysdate-1 );
    insert into test values( 4, sysdate );
    insert into test values( 5, sysdate+1 );
    insert into test values( 6, sysdate+2 );
    commit;
    select * from test;
    def til=yes
    select *
      from test
      where decode(sign(trunc(valid_til)-trunc(sysdate)),1,1,0,1,-1)
           =decode('&til','yes',1,-1);
    def til=no
    select *                                                                               
      from test                                                                            
      where decode(sign(trunc(valid_til)-trunc(sysdate)),1,1,0,1,-1)
           =decode('&til','yes',1,-1);  
    drop table test;  It's working fine, I've tested it.
    The above changes to my first idea I did because of time portion of the DATE datatype in Oracle and therefore the wrong result for today.
    For understandings:
    1.) TRUNC removes the time part of DATE
    2.) The difference of to date-values is the number of days between.
    3.) SIGN is the mathematical function and gives -1,0 or +1 according to an negative, zero or positiv argument.
    4.) DECODE is like an IF.
    Inspect your LOV for the returning values. According to my example they shoul be 'yes' and 'no'. If your values are different, you may have to modify the DECODE.
    Good luck,
    Heinz

  • BW Query as datasource for generic extractor...

    Hi,
    I want to use a BW Query as DataSource for a generic extractor, the objective is fill an InfoCube from the result of that query. It is possible? If can it be done, how?
    Thanks.
    Enrique.

    Hi Enrique,
    You can achieve this with the APD. See this for more info:
    http://help.sap.com/saphelp_nw04/helpdata/en/e3/e60138fede083de10000009b38f8cf/frameset.htm
    Hope this helps...

  • How to solve the problem "cannot create a datasink for **(datasource)"

    There is a forums that can send and receive RTP streams, and it can play on the client. Now I want to save it. I write the code according to the jmf2_0-guide, how ever it always throws the exception "cannot create a datasink for **(datasource)". The datasource is the RTP stream received from the server. Is there anything wrong with the data source or anything else?
    here is the code:
    public synchronized void update( ReceiveStreamEvent evt){
    if(evt instanceof NewReceiveStreamEvent){
    try{
    stream = ((NewReceiveStreamEvent)evt).getReceiveStream();
    DataSource ds = stream.getDataSource();
    MediaLocator f = new MediaLocator("file://foo.au");
    Manager.createDataSink(ds, f);
    RTPControl ctl = (RTPControl)ds.getControl("javax.media.rtp.RTPControl");
    if (ctl != null) {
         System.err.println(" - Recevied new RTP stream: " + ctl.getFormat());
         } else {
         System.err.println(" - Recevied new RTP stream");
         if (participant == null) {
         System.err.println(" The sender of this stream had yet to be identified.");
         } else {
         System.err.println(" The stream comes from: " + participant.getCNAME());
         // create a player by passing datasource to the Media Manager
         Player p = javax.media.Manager.createPlayer(ds);
         if (p == null) {
         return;
         p.addControllerListener(this);
         p.realize();
         PlayerWindow pw = new PlayerWindow(p, stream);
         playerWindows.addElement(pw);
         // Notify intialize() that a new stream had arrived.
         synchronized (dataSync) {
         dataReceived = true;
         dataSync.notifyAll();
         } catch (Exception e) {
         System.err.println("NewReceiveStreamEvent exception " + e.getMessage());
         return;
    Does any one know how to solve this problem? How to save or how to create a datasink? Please help! Thank you!!

    The complete error message:
    NewReceiveStreamEvent exception Cannot find a DataSink for: com.sun.media.protocol.rtp.DataSource@4741d6

  • A script that will query for the last successful backup to tape across all protected datasources

    I've searched trying to locate an existing script for this and come up empty so far but essentially what I am trying to do is have a script I can run that will query for the latest backup to tape that succeeded for each data source across all of the protection
    groups then output that time/date for each to a file.
    I'm extremely new to scripting so I am unsure of how to go about getting started with this so any help would be greatly appreciated!

    this should work
    foreach ($DS in $DSList)
    $RP=$DS | Get-RecoveryPoint | where {$_.Location -eq "Media"} | Sort-Object -Property Backuptime -Descending | select -First 1 | select *
    $Tape=Get-DPMTape -DPMLibrary $Library | where {$_.ID -eq $Rp.RecoverySourceLocations.MediaMapList.MediaId}
    $obj = New-Object -TypeName PSObject
    $obj | Add-Member Noteproperty -Name DatasourceName -value $DS.Name
    $obj | Add-Member Noteproperty -Name Sourcecomputer -value $DS.Computer
    $obj | Add-Member Noteproperty -Name BackupTime -value $RP.BackupTime
    #$obj | Add-Member Noteproperty -Name Location -value $Tape.Location.tostring()
    #$obj | Add-Member Noteproperty -Name Medialabel -value $Tape.Medialabel
    #$obj | Add-Member Noteproperty -Name Barcode -value $Tape.Barcode.Value
    $Array+=$obj
    Seidl Michael | http://www.techguy.at | twitter.com/techguyat |
    facebook.com/techguyat |
    youtube.com/techguyat

  • What will be the query for the below stated problem..??

    Dear Sir
    I want that in Incoming payment after selecting a Customer when we right click and select payment means under checks tab the bank details of that customer should be there i.e. According to Bank Code its Branch and Account no be shown with the help of a query. If anyone knows the query for this please let me know...

    Hello jyotasna ,
    Let me try explain
    SAP Process :-
    When you make incoming payment with Cheque or bank then this is not complete sale cycle.
    Bank Offset Account      Debit
    Customer Account          Credit
    You should make deposit(Banking>Incoming Payment>Deposit) for which you have made incoming payment.and here we put all info for bank account
    Bank Account  Debit
    Bank Offset account Credit
    Why :-
    Suppose your client said that he deposit your cheque in bank in this date but due same bake issue or cheque issue the same cheque deposited in next day.
    In this senario if i made this entry in SAP then we need to modify it  based on Bank Reconciliation Statement(BRS)
    We also have bank reconciliation set for same
    Is there any confusion ?
    Thanks
    Manvendra Singh Niranjan
    Edited by: Manvendra Singh Niranjan on Jul 13, 2011 1:10 PM

  • Error while creating a query for my custom infotype

    Hi,
    I have created a custom infotype with fields currency amount and currency field .
    While I am creating a query for it its giving an error
    Message no. AQ_AD_HOC221 Error when generating the report(see long text )
    I tried to execute the standard program RPUMS40CCI but still I am facing same error .
    I have also maintained table T777i for my infotype but still problem exists.
    Please help.
    P

    Hi
    Check in PM01

  • Return Code - Query for Multiple Rows as XML

    Hi,
    I'm executing an MSSQL stored procedure through the "Query for Multiple Rows as XML" activity in LiveCycle ES. I do this through a call statement such as this:
    { call MyStoredProc(?) }
    This works great, the stored procedure always returns a record set (with or without records). I use this activity rather than "Call Stored Procedure" because I can transform the record set into XML right away within this activity. Unfortunately any exception arising from invoking this stored procedure cannot be handled within the workflow as this activity does not have an exception handler (lightning bolt). In an attempt to handle at least some exceptions we have decided to use try/catches within the stored procedures and return different error codes. Now the problem I am faced with is that there is no way to retrieve the returned code within any of the SQL activities. We don't want to have to write an execute script for each of these SQL calls. Is there any way to do this? Seems like I'm 95% there.
    Thanks
    Nic

    Thanks for the offer, unfortunately we would need something certified by Adobe.
    Nic

  • SAP Query for AR Aging Report

    Hello Gurus-
    I am trying to build a query for Aging report, and would like to include something like this:
    Customer-Reference-Payment terms-Due date-Current-31-60days-61-90days-91-120days-over120days-toatal amount.
    I have an infoset which includes BSID, KNA1, KNB1. I have maintained local fields:
    Due Date  =     Baseline date + cash discount days
    Statement Date = My input date.
    Current    = Condition (DUEDTE >= STATDTE - 30) formula (Amount)
    31 - 60 Days = Condition (DUEDTE >= STATDTE - 60 AND DUEDTE < STATDTE - 30) formula (Amount)
    61 - 90 Days = similar to above
    91 - 120 Days = similar to above
    Amount  = - 1 * (If Debit credit indicator = "H" then "Amount in local currency") otherwise "Amt in Loc.Cur"
    Over 120 Days = similar to above
    When I enter a statement date of today it works hunky dory...it all looks good...my current column looks good and do the rest. When i want to run this query as of couple of months ago (if today is 12/19/08 and i wanted to run my aging report for 10/31/08) it should give me aging as of my statement date 10/31/08 but it does not. It calculates the total amount as of today. I know because of local field "Amount" where i gave amount in local currency, but how would I tell that it should pick up amount in local currency till the statement date?
    Any input in this regards is highly helpful.
    Thanks,
    RNarayan

    Hi Ram,
    On your aging report you want to see invoices which are still not paid (or still open) as of a certain date. This date is "key date". You need to define a variable for key date (which is normally system date if you run today) but it could be a past date.
    So key date is let us say Oct 31st (X) and the system date is Dec 19th. When you run the report as of Oct 31st all invoices that are posted prior to Oct 31st (posting date less than X) and are still in BSID will show on your report. There is no issue here.
    Let us say an invoice was created on Oct 25th (Y) and was paid on Nov 15th (Z). The clearing date is Z. That means if you run the aging report today this invoice will not show.
    But you want to run the report on Oct 31st. This means X is greater than Y but is less than Z.
    Clearing date and posting date are part of BSAD. Report run date is the user input and is a variable.
    With the above concept and with the help of an ABAP programmer you should be able to solve the problem.
    Regards
    Sharabh

Maybe you are looking for

  • Yahoo Toolbar? WTF?

    Dear Sun Developers, I understand that you seek for opportunities to make money. Since Java is free, you may feel that making money by integrating the Yahoo Toolbar into Java is a good idea. But it is not. Just in case you didn't see the reasons, let

  • Flex with Exlipse Helios

    I used these instructions: http://www.seanhsmith.com/2010/03/29/flex-for-free-setting-up-the-flex-4-sdk-with-eclipse- ide/ to get started with Flex SDK. I do not get any intellisence. I could run some small mxml scripts. Any one else working this way

  • Doubt in using DBMS_AW.Execute

    Hi, Can some tell me how I can get the results back from the OLAP engine to the pl/sql engine after executing a particular command using "DBMS_AW.Execute" I have a variable in one AW. I just want to fetch the value of that variable and use it in pl/s

  • Airtunes not working

    The airtunes went away on my windows XP. I have an linksys wireless router WRT54G. Linksys costumer service is telling me I need set up the port forwarding and port tracking. What port number does the airpot express use?

  • SS7 over IP , What are the mostly used Solutions ?

    Hi I am completely new to the world of Telephone and Voice. If you guys could tell me what are the uses of SS7 over IP? In real world where do we use SS7 over IP. Where to get some study materials on that? thanks guys