Ageing queries

Hi
What are the standard queries vendor and customer ageing in BI?
Can anyone let me know the technical name of
Vendor ageing query and
custome ageing query
Regards
annie

HI Annie,
Check out this link
http://help.sap.com/saphelp_nw2004s/helpdata/en/ee/cd143c5db89b00e10000000a114084/frameset.htm.
Under customer and vendor analysis section, you can find what is delivered by SAP to support the aging functionality. However, most of time, you have clone and customize according to your requirement.  These good starting point.
Hope, it helps.
Thanks
Viswa

Similar Messages

  • Customer Aging Report query

    Kindly help me with a query to generate a customer aging covering;
    1. Invoices
    2. Credit Memos
    3. Payments
    4. Manual Journal Entries
    I have tried one of the aging queries posted in the forum, but the results are incorrect for some customers.
    Thanks in advance,
    Avinash

    Give this a try.
    Ken Worst
    -- SAP B1 Customer Receivables Aging - By Due Date
    -- Version 10022008
    select OCRD.cardcode 'Customer Code',OCRD.cardname 'Customer Name',
    SUM(case when syscred <> 0 then syscred * - 1
    else sysdeb
    end) "Balance Due",
    ISNULL(SUM(CASE when DATEDIFF(dd,JDT1.DueDate,current_timestamp) < 0
    then
         case
              when JDT1.BalDueCred <> 0 then JDT1.BalDueCred * - 1
              else JDT1.BalDueDeb
         end
    end),0.00) "Future Remit",
    ISNULL(SUM(CASE when (DATEDIFF(dd,JDT1.DueDate,current_timestamp) >= 0
    and datediff(dd,JDT1.DueDate,current_timestamp)< 30)
    then
         case
              when JDT1.BalDueCred <> 0 then JDT1.BalDueCred * - 1
              else JDT1.BalDueDeb
         end
    end),0.00) "0-30 days",
    ISNULL(SUM(CASE when (datediff(dd,JDT1.DueDate,current_timestamp) >= 30
    and datediff(dd,JDT1.DueDate,current_timestamp)< 60)
    then
         case
              when JDT1.BalDueCred <> 0 then JDT1.BalDueCred * - 1
              else JDT1.BalDueDeb
         end
    end),0.00) "31 to 60 days",
    ISNULL(SUM(CASE when (datediff(dd,JDT1.DueDate,current_timestamp) >= 60
    and datediff(dd,JDT1.DueDate,current_timestamp)< 90)
    then
         case
              when JDT1.BalDueCred <> 0 then JDT1.BalDueCred * - 1
              else JDT1.BalDueDeb
         end
    end),0.00) "61 to 90 days",
    ISNULL(SUM(CASE when (datediff(dd,JDT1.DueDate,current_timestamp) >= 90
    and datediff(dd,JDT1.DueDate,current_timestamp) < 120)
    then
         case
              when JDT1.BalDueCred <> 0 then JDT1.BalDueCred * - 1
              else JDT1.BalDueDeb
         end
    end),0.00) "91 to 120 days",
    ISNULL(SUM(CASE when DATEDIFF(dd,JDT1.DueDate,current_timestamp) >= 120
    then
         case
              when BalDueCred <> 0 then BalDueCred * - 1
              else BalDueDeb
         end
    end),0.00) "120+ days"
    from JDT1,OCRD
    WHERE JDT1.shortname = OCRD.cardcode and OCRD.cardtype = 'c'
    GROUP BY OCRD.cardcode, OCRD.cardname
    --Filters Out Zero Balances
    HAVING SUM(case when syscred <> 0 then syscred * - 1
    else sysdeb
    end) > 0 OR SUM(case when syscred <> 0 then syscred * - 1
    else sysdeb
    end) < 0
    ORDER BY OCRD.CARDCODE

  • Aging buckets in a query

    Hi gurus,
    I am creating an A/R aging queries to age open items in 30days buckets( 0-30days, 31-60days,61-90 days and 91days+).My logic for each buckets is below ..
    eg -- 31-60days bucket (Key fig)-  Item status- Open
                                                     Posting date - <= posting date(Variable)
                                                     Net due date - btw -31 to -60 days, using offsets
                                                                           on the key due date variable
                                  (2nd Key fig)- Posting date- <= Posting date(variable)
                                                      Net due date - btw -31 to -60 days, using offsets
                                                                           on the key due date variable
                                                      Clearing date-- > Clearing date
    Then for the 31-60 days bucket, I now add both key figures together.
    The logic is working fine but I just found out that there are a few plants that the buckets are not aging the data correctly like it is in R/3 because some of the customers make partial payment and in R/3 they are moved from an aging bucket to a current one after the partial payment has been made,but BW is looking at the original invoice posting date and not recognising the date that the partial payment was made.
    How do I make BW to recognise the partial payment date when a partial payment has been made for the aging instead of the original posting date?
    I hope this was not too confusing.
    Thanks

    Hi Kartikey,
    Thanks for the  response. I am not calculating the subtotals at the in the query definition and the sub totals are based on the info object 0customer's setting in the query designer to suppress the result rows. In RSRT also I am unable to get the sub totals.
    If I remove the calculations (aging buckets) and display direct key figure in the columns, I am able to get the sub totals.
    Is there any specific reason why the sub totals can not be calculated if the columns are calculated key figures/new formula.
    Can any one let me know how to fix the sub totals.
    Thanks

  • Open sale order aging report

    Need a report on open order aging.  The open order means not delivered or partially delivered. Further with days range since its open or not fully delievered i.e. > 15 days or 15-30 days and so on.
    The standard transactions Va05 and VL10c can provide the list but dont provide any aging info.
    Kindly help in this.
    thanks
    anu

    Dear Anu
    1. First in VA05 you can use Variants and get the report as desired by you,create one variant and use Filter along with greater then, less then (all are in selection option icon)
    This way you can create three variants.
    But limitation is dates has to be manually changed in variants each time.
    2. Try this Tcodes
    S_ALR_87014387 Display Document Flow
    S_ALR_87014392 Display Document Flow
    This reports will give you document flow run report with ticking checkbox for sales order,delivery and goods isse then after getting the list expand all (Shift+F12)
    you will get the quantities for sales order, and what is delivered and what is issued.
    3. As such if you want exactly the report you can take help of ABAP to create the ALV
    4. Report or create Queries in SQVI , or else create MCSI report
    Regards
    Jitesh

  • Slow performance since going to Mavericks on aging iMac

    hi & thanks in advance: Wondering if my newly sluggish performance, SPODs etc since upgrading to Mavs (10.9.2) from 10.6.8  =  its time to upgrade my machine (late '07 iMac i think). I'd just install more RAM but seems my 4gig is its ceiling? Activity Monitor shows that now even just running one or 2 apps at a time is pushing things. Ran the nifty EtreCheck (see below).
    I'm a Veetle watcher, wondering if their ancient 1.0 mac plugin is no good w/Mavs?
    Here's what's happening:
    - iPhoto now SPODs for about 30 secs after launch, but then all's well once that stops. (btw when I go offline/disconnect the modem's firewire to test run apps, there's no SPOD-ing.)
    - GBand 10, all's fine except when playing live e.guitar getting intermittent glitches in its audio (old Tascam FireOne firewire I/O, no way to update its driver since they abandoned the FireOne ages ago.)
    - VERY slow app launches all around, especially after first morning start up. Chrome pages loading 5x slower than before on 10.6.8; some streaming slow downs, esp. on Netflix which takes Silverlight like a minute now to load up a show;
    - Activity Monitor: I'm at like 3.5-3.9 of my 4G with just a coupla apps running at a time.
    Here's what I've tried so far:
    - Disk Utility repair permissions
    - reset PRAM (before reading here that's not a good idea anymore)
    - did a full Time Machine restore (    "                 "               " )
    - disabled all but one start up item, a Native Instruments helper type app I wasn't sure about
    - cleared some caches, can't remember which (per a 10-star user here on improving performance)
    - Deleted tons of old/unneeded apps and files, my boot drive now less than half full.
    - uninstalled several third-party plugins
    - thinned out my iPhoto library extensively, still the same SPOD after launch; then reindexed the thumbnails.
    - Sophos Anti-Virus Mac Home, turned off all realtime updating/scanning (left its web page/content realtime filter on though)
    Here's my EtreCheck info, & again thanks in advance for anyone's help here!!!
    Hardware Information:
              iMac (24-inch, Early 2008)
              iMac - model: iMac8,1
              1 3.06 GHz Intel Core 2 Duo CPU: 2 cores
              4 GB RAM
    Video Information:
              NVIDIA GeForce 8800 GS - VRAM: 512 MB
    System Software:
              OS X 10.9.2 (13C64) - Uptime: 0 days 8:11:55
    Disk Information:
              ST3500418ASQ disk0 : (500.11 GB)
                        EFI (disk0s1) <not mounted>: 209.7 MB
                        Untitled (disk0s2) / [Startup]: 499.25 GB (311 GB free)
                        Recovery HD (disk0s3) <not mounted>: 650 MB
    USB Information:
              Apple Inc. Built-in iSight
              Apple Inc. BRCM2046 Hub
                        Apple Inc. Bluetooth USB Host Controller
              TigerJet Network, Inc. USB Internet Phone by TigerJet 7.2 MB
                        disk1s0 (disk1s0) <not mounted>: 6.2 MB
                        disk1s0s1 (disk1s0s1) <not mounted>: 32 KB
                        magicJack (disk1s0s2) <not mounted>: 588 KB
              Mitsumi Electric Apple Optical USB Mouse
              Apple Computer, Inc. IR Receiver
    FireWire Information:
    Thunderbolt Information:
    Kernel Extensions:
              com.Logitech.Control Center.HID Driver          (3.4.0 - SDK 10.0)
              com.speedbit.driver.vadriver          (1.0.5)
              com.sophos.nke.swi          (9.0.53 - SDK 10.8)
              com.sophos.kext.sav          (9.0.53 - SDK 10.7)
    Launch Daemons:
              [System] com.adobe.fpsaud.plist 3rd-Party support link
              [System] com.sophos.autoupdate.plist 3rd-Party support link
              [System] com.sophos.configuration.plist 3rd-Party support link
              [System] com.sophos.intercheck.plist 3rd-Party support link
              [System] com.sophos.notification.plist 3rd-Party support link
              [System] com.sophos.scan.plist 3rd-Party support link
              [System] com.sophos.sxld.plist 3rd-Party support link
              [System] com.sophos.webd.plist 3rd-Party support link
    Launch Agents:
              [System] com.Logitech.Control Center.Daemon.plist 3rd-Party support link
              [System] com.sophos.uiserver.plist 3rd-Party support link
              [System] com.speedbit.va.plist 3rd-Party support link
    User Launch Agents:
              [not loaded] [email protected]
              [not loaded] com.google.keystone.agent.plist 3rd-Party support link
              [not loaded] com.mlbam.nexdef.core.NexdefLoader.plist 3rd-Party support link
              [not loaded] com.swarmcast.mlbnexdefautobahn.plist 3rd-Party support link
    User Login Items:
              NIHardwareAgent
    Internet Plug-ins:
              Flip4Mac WMV Plugin: Version: 2.3.8.1 3rd-Party support link
              FlashPlayer-10.6: Version: 12.0.0.77 - SDK 10.6 3rd-Party support link
              iPhotoPhotocast: Version: 7.0
              Flash Player: Version: 12.0.0.77 - SDK 10.6 3rd-Party support link
              Default Browser: Version: 537 - SDK 10.9
              QuickTime Plugin: Version: 7.7.3
              Unity Web Player: Version: UnityPlayer version 4.2.1f4 - SDK 10.6 3rd-Party support link
              Silverlight: Version: 5.1.30214.0 - SDK 10.6 3rd-Party support link
              DirectorShockwave: Version: 11.6.1r629 3rd-Party support link
              JavaAppletPlugin: Version: 14.9.0 - SDK 10.7 Outdated! Update
    Safari Extensions:
              AdBlock: Version: 2.6.18
              Ambient Aurea: Version: 1.0.0.21
              Turn Off the Lights: Version: 2.3.0.5
    Audio Plug-ins:
              BluetoothAudioPlugIn: Version: 1.0 - SDK 10.9
              AirPlay: Version: 2.0 - SDK 10.9
              AppleAVBAudio: Version: 203.2 - SDK 10.9
              iSightAudio: Version: 7.7.3 - SDK 10.9
    iTunes Plug-ins:
              Quartz Composer Visualizer: Version: 1.4 - SDK 10.9
    3rd Party Preference Panes:
              Flash Player  3rd-Party support link
              Flip4Mac WMV  3rd-Party support link
              Logitech Control Center  3rd-Party support link
              Native Instruments USB Audio  3rd-Party support link
              Video Accelerator  3rd-Party support link
    Old Applications:
              Wondershare Helper Compact:          Version: 2.2.5.6 - SDK 10.5 3rd-Party support link
                        /Users/[redacted]/Library/Application Support/Helper/Wondershare Helper Compact.app
              SLLauncher:          Version: 1.0 - SDK 10.5 3rd-Party support link
                        /Library/Application Support/Microsoft/Silverlight/OutOfBrowser/SLLauncher.app
              /Applications/Line6
                        Line 6 License Manager:          Version: 1.06 - SDK 10.4 3rd-Party support link
                        POD Farm 2:          Version: 2.55 - SDK 10.5 3rd-Party support link
              LinPlug Icons:          Version: 3.1 - SDK 10.5 3rd-Party support link
                        /Library/Application Support/LinPlug/Icons/3.1/LinPlug Icons.app
              /Applications/Utilities
                        LCC Connection Utility:          Version: 3.4.0 - SDK 10.0 3rd-Party support link
                        LCC Uninstaller:          Version: 3.4.0 - SDK 10.0 3rd-Party support link
              MemServerUI:          Version: 1.1 - SDK 10.5 3rd-Party support link
                        /Library/Application Support/Native Instruments/Kontakt 5/kxm/MemServerUI.app
              /Library/Application Support/Logitech.localized/Logitech Control Center.localized
                        Logitech Device Manager:          Version: 3.4.0 - SDK 10.0 3rd-Party support link
                        Logitech Control Center Daemon:          Version: 3.4.0 - SDK 10.0 3rd-Party support link
                        LCC Pilot:          Version: 1.0.0 - SDK 10.0 3rd-Party support link
              MemServerUI:          Version: 1.1 - SDK 10.5 3rd-Party support link
                        /Library/Application Support/Native Instruments/Kontakt 4/kxm/MemServerUI.app
              POD Farm 2:          Version: 2.55 - SDK 10.5 3rd-Party support link
              AmpliTube 3:          Version: 3.10 - SDK 10.5 3rd-Party support link
              FlashbackChecker:          Version: 1.0 - SDK 10.5 3rd-Party support link
    Time Machine:
              Skip System Files: NO
              Auto backup: YES
              Volumes being backed up:
                        Untitled: Disk size: 464.96 GB Disk used: 175.32 GB
              Destinations:
                        My Passport [Local] (Last used)
                        Total size: 297.31 GB
                        Total number of backups: 1
                        Oldest backup: 2014-03-13 04:09:30 +0000
                        Last backup: 2014-03-13 04:09:30 +0000
                        Size of backup disk: Too small
                                  Backup size 297.31 GB < (Disk used 175.32 GB X 3)
              Time Machine details may not be accurate.
              All volumes being backed up may not be listed.
    Top Processes by CPU:
                   3%          mj_dev
                   2%          Google Chrome
                   2%          WindowServer
                   1%          SophosWebIntelligence
                   1%          coreaudiod
    Top Processes by Memory:
              147 MB          MLBNexDefAutobahn
              139 MB          Google Chrome
              135 MB          com.apple.IconServicesAgent
              82 MB          SophosScanD
              61 MB          Finder
    Virtual Memory Information:
              402 MB          Free RAM
              1.75 GB          Active RAM
              1.18 GB          Inactive RAM
              516 MB          Wired RAM
              12.38 GB          Page-ins
              31 MB          Page-outs

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Click the Clear Display icon in the toolbar. Then try the action that you're having trouble with again. Select any messages that appear in the Console window. Copy them to the Clipboard by pressing the key combination command-C. Paste into a reply to this message (command-V).
    When posting a log extract, be selective. In most cases, a few dozen lines are more than enough.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some private information, such as your name, may appear in the log. Anonymize before posting.

  • Reconciled amounts appears in vendor aging report

    Dear all,
    When we take report for reconciled transactions,reconciled amounts appears in
    aging days(Suppose we have ap invoice in 0-30 days and payments made in 30-60 days it's
    already reconciled)
    Why it is showing in reconciled aging report ?
    Jeyakanthan

    Dear,
    would like to recommend you to refer to the following note: 1228363-Business Partner Balance does not match journal entries。
    In any SAP Business One version lower than 2007, 2 separate
    reconciliation engines were employed. One reconciliation engine worked
    on the marketing document level, where partial reconciliation was
    supported & the other worked on the journal entry level, where only
    complete reconciliation was supported.
    This duality led in some instances to reconciliation inconsistencies
    which were initially highlighted with SAP Business One version 2004
    patch level 29, where the red message 'Business Partner balance does not
    match journal entries' was displayed when running the ageing report by
    sales documents & inconsistencies were detected.
    In the year end closing guides (available for download from the
    Documentation Resource Centre) SAP have always recommended to run the
    ageing reports by journal posting.
    In 2006, SAP published note 752261, now retired, documenting the system
    behaviour & offering a series of 'Select' queries to aid in
    reconciliation inconsistency analysis. These queries were an excellent
    tool but now SAP can offer a faster, better & more accurate solution.
    In SAP Business One 2007 A & B the reconciliation engines have been
    unified & partial reconciliation on journal entry level is now fully
    supported. Any database that is upgraded from a lower version undergoes
    a complex series of reconciliation upgrade algorithms, where any
    reconciliation inconsistency is identified & a reconciliation upgrade
    (RU) journal entry is automatically created. This RU journal does not
    document any accounting transaction, but simply creates an update in the
    'Balance Due' column, thus notionally re-openeing previously
    inconsistently reconciled transactions.
    These RU journals are then available for internal reconciliation.
    Please consult the 2007 Internal Reconciliation Upgrade(IRU)Landing
    Page:
    Channel Partner Portal -> Solutions -> SAP Business One -> Hot Topics ->
    SAP Business One 2007 Information Center -> New Single Reconciliation
    Engine- A single engine reconciles the difference and eliminates the
    previous reconciliation issue. More
    Click on 'More' to be directed to the IRU Landing Page.
    Here you will find 'How-to-Guides' in all supported languages, links to
    Expert Training Sessions & links to other pertinent information.
    You will also find available for download 2007 A & B upgrade simulation
    tools. SAP recommends to subject a database that is planned to be
    upgraded
    This upgrade simulation tool employs all internal reconciliation upgrade
    algorithms & the application will display in the 'Internal
    Reconciliation Upgrade Audit Trail Report' if a database is affected by
    inconcistencies.
    Hence, if the message 'Business Partner Balance does not match Journal
    Entries' is encountered, proceed as follows:
    Option 1:
    Upgrade database to SAP Business One 2007 & internally reconcile any RU
    journals.
    Option 2:
    Go to the IRU landing page & download the 'IRU pre-upgrade tool' either
    for version 2007A or 2007B, depending on your localisation. Follow the
    installation instructions & after successful installation & simulated
    upgarde of the database, analyse any inconsistencies appearing with the
    help of the How-to-guide. Should a type of inconsistency not have a drop
    down arrow & be described as 'Balancing upgrade journal transaction',
    the comapny accountant may decide to write it off, should the amount be
    insignificant or, if the amount is not insignificant, please log a
    support ticket with the component:
    SBO-ADM-UT-IAT
    Step by step detailed instructions including screenshots of how to
    install the sim-tool & what it does can be found on this wiki page:
    https://wiki.sdn.sap.com/wiki/display/B1/BPaccountBalancedoesnot+matc
    chJournalEntries
    Thanks & Regards
    Apple

  • Stock Aging Query/Report

    Dear all,
    We are on SAP B1 2007 PL42 and using Moving average as our cost valuation method.
    It doesn't have an inbuilt stock aging report, I have searched through the forum but none of the queries arebshowing the correct aging of stocks. Could anyone have a query/report/addon for stock aging?
    Kind Regards,
    Asif

    Hi,
    Try this one,with warehouse code as input parameter
    select b.code, b.name, b.Wh, b.Bal, b.Val,
    isnull(case when b.days <30 then b.bal end,0)'0-30 Days' ,
    isnull(case when b.days between 30 and 60 then b.bal end,0) '30-60 Days',
    isnull(case when b.days between 60 and 90 then b.bal end,0) '60-90 Days',
    isnull(case when b.days between 90 and 120 then b.bal end,0) '90-120 Days',
    isnull(case when b.days between 120 and 150 then b.bal end,0) '120-150 Days',
    isnull(case when b.days between 150 and 180 then b.bal end,0) '150-180 Days',
    isnull(case when b.days >180 then b.bal end,0) 'Above 180 Days'
    from (
    select a.code,a.name,a.wh,a.bal,a.val,datediff(dd,dt,getdate())'days'
    from (
    select max(t0.itemcode)'Code',max(t0.Dscription)'Name',
    max(t0.Warehouse)'Wh',
    sum(t0.inqty-t0.outqty)'Bal',sum(t0.transvalue)'Val',max(t0.docdate)'dt'
    from oinm t0 inner join oitm t1 on t0.itemcode=t1.itemcode
    where t0.warehouse='[%1]'
    group by t0.itemcode
    )a
    )b order by code

  • Need to join two queries A/R statemet and Activity report

    I have two  separate queries that need to be one. I have an A/R statement where I want to add notes next to each invoice. Currently these are two separate reports. How can I link the activity Report to the A/R Statement. Below are the two separate reports. I am not sure how to join the files. A/R Aging Report Declare @d datetime set @d /*Select 1 from jdt1 t where t.duedate*/=[%1] select * from ( SELECT T1.CardCode, T1.CardName, T0.RefDate, T0.Ref1 'Document Number',     CASE  WHEN T0.TransType=13 THEN 'Invoice'           WHEN T0.TransType=14 THEN 'Credit Note'           WHEN T0.TransType=30 THEN 'Journal'           WHEN T0.TransType=24 THEN 'Receipt'           END AS 'Document Type',     T0.DueDate, (T0.Debit- T0.Credit) 'Balance'     ,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,@d)=0 and DateDiff(day, T0.DueDate,@d)30 and DateDiff(day, T0.DueDate,@d)60 and DateDiff(day, T0.DueDate,@d)90 and DateDiff(day, T0.DueDate,@d)=121),0) '121+ Days' FROM JDT1 T0 INNER JOIN OCRD T1 ON T0.ShortName = T1.CardCode WHERE  T1.CardType = 'C' ) sub Activity Report SELECT T1.[ClgCode],T2.[U_NAME], T4.[Name] as Status, T0.[CardCode], T0.[CardName], T0.[DocNum], T0.[U_AIS_DVIInvName] as 'SF Invoice Name', (T0.U_AIS_DVISFSO) as 'SO#', T0.[DocDate],T0.Taxdate as 'Month Of Service',T0.[U_AIS_DVIOpptyNm],T0.[U_AIS_DVIAdvNm],T0.[U_AIS_DVIManNm],T0.[U_AIS_DVIAcctNm], T0.[DocTotal], T0.[DocStatus],  T1.[Recontact],  T1.[Details], T1.[Notes], T1.[CntctType], T3.[Name] FROM OINV T0 left join OCLG T1 on t0.docentry = t1.docentry and  T0.[ObjType]  =  T1.[DocType] left outer JOIN OUSR T2 ON T1.UserSign = T2.USERID left outer join OCLT T3 ON T1.CntctType = T3.Code left outer join OCLS T4 ON  T1.CntctSbjct = T4.Code where T1.[CntctType] =6 or T1.[CntctType] =7

    This is what I have so far.. it finally produced results but I notice the amount on the Activity + Aging does not match what is on the Aging and that seems to be what the issue is... that was my check to know the report is working. Basically the report should show the aging + any activity associated with the open invoice. The amount on the report is lower than the aging.. I am attaching the aging query  and the aging with activity Query. It looks like something is not joining correctly as the amounts do not match on the balance. Aging Report Declare @d datetime set @d /*Select 1 from jdt1 t where t.duedate*/=[%1] select * from ( SELECT T1.CardCode, T1.CardName, T0.RefDate, T0.Ref1 'Document Number',     CASE  WHEN T0.TransType=13 THEN 'Invoice'           WHEN T0.TransType=14 THEN 'Credit Note'           WHEN T0.TransType=30 THEN 'Journal'           WHEN T0.TransType=24 THEN 'Receipt'           END AS 'Document Type',     T0.DueDate, (T0.Debit- T0.Credit) 'Balance'     ,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,@d)=0 and DateDiff(day, T0.DueDate,@d)30 and DateDiff(day, T0.DueDate,@d)60 and DateDiff(day, T0.DueDate,@d)90 and DateDiff(day, T0.DueDate,@d)=121),0) '121+ Days' FROM JDT1 T0 INNER JOIN OCRD T1 ON T0.ShortName = T1.CardCode WHERE  T1.CardType = 'C' ) sub Activity + Aging Declare @d datetime set @d /*Select 1 from jdt1 t where t.duedate*/=[%1] select * from ( SELECT T1.CardCode, T1.CardName, T0.RefDate, T0.Ref1 'Document Number',     CASE  WHEN T0.TransType=13 THEN 'Invoice'           WHEN T0.TransType=14 THEN 'Credit Note'           WHEN T0.TransType=30 THEN 'Journal'           WHEN T0.TransType=24 THEN 'Receipt'           END AS 'Document Type',     T0.DueDate, (T0.Debit- T0.Credit) 'Balance'     ,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,@d)=0 and DateDiff(day, T0.DueDate,@d)30 and DateDiff(day, T0.DueDate,@d)60 and DateDiff(day, T0.DueDate,@d)90 and DateDiff(day, T0.DueDate,@d)=121),0) '121+ Days', T6.[FirstName] as 'AP Contact First Name', T6.[LastName] as 'AP Contact Last Name' , T6.[E_MailL], T6.[Notes1] as ' AP Supervisor', T2.[ClgCode],T7.[U_NAME], T4.[Name] as Status, T5.[DocNum], T5.[U_AIS_DVIInvName] as 'SF Invoice Name', (T5.U_AIS_DVISFSO) as 'SO#', T5.[DocDate],T5.Taxdate as 'Month Of Service',T5.[U_AIS_DVIOpptyNm],T5.[U_AIS_DVIAdvNm],T5.[U_AIS_DVIManNm],T5.[U_AIS_DVIAcctNm], T5.[DocTotal], T5.[DocStatus],  T2.[Recontact],  T2.[Details], T2.[Notes], T2.[CntctType], T3.[Name] FROM JDT1 T0 INNER JOIN OCRD T1 ON T0.ShortName = T1.CardCode INNER JOIN OCLG T2 ON T1.CardCode = T2.CardCode INNER JOIN OCLT T3 ON T2.CntctType = T3.Code INNER JOIN OCLS T4 ON T2.CntctSbjct = T4.Code INNER JOIN OINV T5 ON t5.docentry = t2.docentry and  T5.[ObjType]  =  T2.[DocType] left outer join OCPR T6 ON T2.CntctCode = T6.CntctCode left outer JOIN OUSR T7 ON T2.UserSign = T7.USERID WHERE  T1.CardType = 'C' and (T2.[CntctType] =6 or T2.[CntctType] =7) ) sub

  • Receivables Aging v2005A

    When we print an accounts receivable aging, the detailed aging report includes all invoices and the related payments that have not been reconciled as of the report run date. It does not seem to be possible in SAP B1 2005A to reconcile any payment that includes a partial payment. This makes the report very confusing. Combined with the lack of invoice dates, this makes the report useless for us.
    I attempted to create a simple query and a Crystal report that will at least give us this information as of the current date without columns for number of days past due, but have not been able to get all the relevant data included. Invoices and Credit Memos are no problem, but I can't figure out how to combine Journal Entries and Payments on Account correctly.
    I have found a few queries posted in these forums that promised to work, but they really don't (either they work for a different version of B1 or have syntax or logic issues).
    We really need a detailed receivables aging report that we can run as of any prior date that gives us Document Date, Document Number, and Document Open Balance and the total must match the G/L Control Account as of the selected date.
    We've been searching for a way to get the information needed for months. If anyone can help, PLEASE reply. Thank you.

    Hi
    Can you please specify the link you have found .usually the common error on those reports are missing brackets and It can be fixed easily .
    2nd - Are you using Sql 2000 or 2005 .If you are using 2005, most of the reports works .
    Hope this helps
    Bishal

  • Inventory aging report,  plz help me its very urgent

    Hi experts,
    i have a problem in reporting, yesterday i got requirement form uesrs for Inventory Aging report,
    the report fields Contains
    1) Plant
    2) Meterial
    3) Stock as on date( closing stock) with both  fields Quantity & value fields
    4) Average Useage in 6 months  with both fields Quantity & Value
    5) Month on Hand in units
    6)Inventory Aging  30 days with Units and quantity
                               60 days with Units and quantity
                               90 days with Units and Quantity
                               120 days
                                150days
                                 180 days
                                  270 days
                                   365 + days
    we are using bw 3.5 version
    note:  we are u using standard Business Content Cube ( 0IC_C03)  with is coming fron standard Business content DataSources 2Lis_03_BX, 2Lis_03_BF, 2Lis_03_UM
    please suggest me to make this report, please send process in clearly.
    i will assign full points
    Advance thanks,
    Sudheer

    hello Sudheer,
    I remember once creating an Inventory aging document whcih had somwhat the same requirment of going back 6weeks and the other was like 18 weeks from the current week.Do you have cubes regarding the diffrent types of orders, like Planned order, Purchase order, production order and purchase requistion or a multi on top of it.If so then create  query on top of this multiprovider like Inventory aging 30days, inventory aging 60days etc.then  in that query create a variable on calweek (Single value,mandatory and customer exit), this variable should be able to get the current week (depending on when your table was loaded in R3 and if you can get that info thru rfc in BI), this is so that you can determine current week and then specify variable off set in diffrent queries with diffrent requirements of going back, ex: -4 (for 4 weeks ie 1 month) etc, or just create your variable on calmonth and then you need to set an offset just one month back ex -1.
    Create APDs and then load the data in transactional DSOs.Excecute the APD one at a time into the diffrent cubes .Create a multiprovider if you want on top of it.
    Hope this can get you started....
    Krrish

  • Confused on syntax-combine two queries

    I have two queries that I'm trying to combine, but can't figure out how to combine them ... successfully!?! The first query is pretty simple in that I'm looking at several fields from two different tables, no big deal.
    The second query calculates the years, months, days between two dates that are used in the first query. I'm stumped on how to combine the queries so that they place nice with each other and return results.
    Here's the first query ...
    select
    RTRIM(RTRIM(vpi.LastName) + ', ' + RTRIM(ISNULL(vpi.FirstName,''))) Employee,
    convert(varchar,vpi.FromEffectiveDate,101) PositionStart,      
    convert(varchar,vpi.ToEffectiveDate,101) PositionChange,
    convert(varchar,vpi.PositionStartDate,101) PositionStartDate,
    vpi.PositionReason, vpi.PositionCode, vpc.PositionCodeDescription
    from vhrl_positioninfo vpi
    inner join position_codes vpc on vpi.PositionCode = vpc.PositionCode
    Here's the second query ...
    select
    [Age] = convert(varchar, [Years]) + ' Years ' +
              convert(varchar, [Months]) + ' Months ' +
              convert(varchar, [Days]) + ' Days',     *
    from
         select
              [Years] = case     when BirthDayThisYear <= Today
                        then datediff(year, BirthYearStart, CurrYearStart)
                        else datediff(year, BirthYearStart, CurrYearStart) - 1
                        end,
              [Months]= case     when BirthDayThisYear <= Today
                        then datediff(month, BirthDayThisYear, Today)
                        else datediff(month, BirthDayThisYear, Today) + 12
                        end,
              [Days]= case     when BirthDayThisMonth <= Today
                        then datediff(day, BirthDayThisMonth, Today)
                        else datediff(day, dateadd(month, -1, BirthDayThisMonth), Today)
                        end,
              Birth = convert(varchar(10) ,Birth, 121),
              Today = convert(varchar(10), Today, 121)
         from
              select     BirthDayThisYear =
                   case     when     day(dateadd(year, datediff(year, BirthYearStart, CurrYearStart), Birth)) <> day(Birth)
                        then     dateadd(day, 1, dateadd(year, datediff(year, BirthYearStart, CurrYearStart), Birth))
                        else     dateadd(year, datediff(year, BirthYearStart, CurrYearStart), Birth)
                        end,
                   BirthDayThisMonth =
                   case      when      day(dateadd(month, datediff(month, BirthMonthStart, CurrMonthStart), Birth)) <> day(Birth)
                        then     dateadd(day, 1, dateadd(month, datediff(month, BirthMonthStart, CurrMonthStart), Birth))
                        else     dateadd(month, datediff(month, BirthMonthStart, CurrMonthStart), Birth)
                        end,
              from
                   select     BirthYearStart = dateadd(year, datediff(year, 0, Birth), 0),
                        CurrYearStart = dateadd(year, datediff(year, 0, Today), 0),
                        BirthMonthStart = dateadd(month, datediff(month, 0, Birth), 0),
                        CurrMonthStart = dateadd(month, datediff(month, 0, Today), 0),
                   from          
                        select birth = convert(datetime, fromeffectivedate) ,
                        Today = case when convert(datetime, toeffectivedate) = '3000-01-01'
                                       THEN convert(datetime, convert(int,getdate()))
    else vpi.toeffectivedate
    end
         from vHRL_PositionInfo vpi inner join position_codes vpc
                        on vpi.PositionCode = vpc.PositionCode
                   ) aaaa
              ) aaa
         ) aa
    )a
    Here's the sample data ...
    vpi table ...
    LastName FirstName FromEffectDate ToEffectDate PosStartDate PosReason PosCode
    Doe John 2001-10-15 3000-01-01 10-15-2001 Transfer OperPack
    Smith Tom 1994-11-28 2001-10-14 1994-11-28 New Hire OperDC
    vpc table ...
    PosCode PosDescription
    OperPack Pack Line Operator
    OperDC Descaler Operator
    This is what the results should look like ...
    John, Doe 2001-10-15 3000-01-01 10-15-2001 Transfer OperPack Pack Line Operator 6 Years 11 Months 16 Days
    John, Doe 1994-11-28 2001-10-14 1994-11-28 New Hire OperDC Descaler Operator 6 Years 6 Months 19 Days
    I know the date calculation piece adds 5 additional fields to the end, but they are not needed for the final report. Any help would be greatly appreciated! Thank you! Jena

    Your query suggests you're not using Oracle. Please post in your relevant database forum.

  • AR Aging - Need to change 7 bucket to 5 bucket - Report Builder

    Is there anyone out there who might be able to help me? We've recently implemented Oracle Applications 11.5.10 and I have to use report builder to change the Accounts Receiveable Aging (7 bucket) to a 5 bucket report. I'm not a big Oracle Reports guy, but I've stumbled through making some changes in various other reports. But this one is just plain nasty! :)
    I was thinking that I could simply add buckets 6 & 7 to bucket 5, then just hide or delete the 6 & 7 buckets. But I'm not sure where to even start. Any help with this would GUARANTEE a Christmas or other holiday card this year! :)
    I really want to keep this simple as possible, so any help would be very....helpful. :)
    Thanks again!
    Steve

    Well, as an update, I was able to do 90% of what I needed to, but I still have one problem remaining. Hopefully someone will help, because this part is hurting my head. :)
    I was able to move things around, combine a couple of buckets, and convert this to a 5 bucket report. The only thing left to do is add two flex-fields (attribute11 and attribute12). The problem is, unless I'm looking in the wrong place, the SELECT statement is being built dynamically and I need these two fields from "ra_customer_trx_all_mrc_v" or "ra_customer_trx_all". Does ANYONE have any experience or knowledge about this? I've added fields to queries before and then been able to add them to a report, but this is the first I've come across that builds the query dynamically...
    Thanks to anyone who can help!
    Steve

  • FI-AR Aging Report

    Hi Friends,
    I am working on FI-AR Aging report on 0FIAR_C03 Cube. My BI objects for calculations are:
    0DEB_CRE_DC (KeyFigure)
    0NETDUEDATE (Char)
    When user execute the query, he has to key-in few variables:
    Type-In date (default is today’s date)
    Aging Basket (user configurable 0-30 days, 31-60 days, etc.)
    Calculation needed:
    Current Due Amount = 0DEB_CRE_DC, whenType-In date is greater or equal to Net Due Date
    Past Due Amount = 0DEB_CRE_DC, when Type-In date is less than Net Due Date
    Current and Past Due Amount should be displayed on Aging colums (0-30days, 31-60 days, etc)
    If anyone has done similar queries please help.
    Thank you and regards,
    ~S

    Hi Andor,
    Thank you for quick answer. I understand your explanation well. In fact, I have somewhat different requirements. I have only one date variable (user key-in date, i.e. 0P_KEYDT). I have Aging Basket (YGARCAG1, YGARCAG2, etc. user can input data such as 20 days aging, 60 days aging, 110 days aging etc.)
    0P_KEYDT could be Greater, equal or Less than 0NETDUEDATE.
    If 0P_KEYDT is greater than 0NETDUEDATE, then it is called Past Due Period
    If 0P_KEYDT is less than 0NETDUEDATE, then it is called Current Due Period.
    I have to prepare Account Receivable amount for each customer for each period (i.e. Past Due Period, and Current Due Period, for each Aging Basket Variable (such as "YGARCAG1", "YGARCAG1 to YGARCAG2", "YGARCAG31 to YGARCAG4", etc.)
    It is a complex report.
    =======================
    Another question:
    Can I have two selection variables (range) for 0NETDUEDATE.
    I want to use following two conditions together for 0NETDUEDATE:
    (a)  Between YGARCAG1 and 0PKEYDT+1
    (b)  Greater Than Equal to 0P_KEYDT
    If I SAP BEx allows, two selections for a data, then I think, my query can be built.
    Regards,
    ~S

  • Customer Receivables Aging Crystal Report

    Hi,
    We're about to move up to Business One 8.8 and creating crystal reports that we require, with the help of the SAP sample report pack.
    We need a Customer Receivables Aging Report but the one that is in this pack makes use of PLD_ITEMS field, which is making it really difficult for me to move things around. What tables and joins will I need to create this in crystal getting the data directly from the database ?
    Thanks

    Hi,
    Welcome you to the forum. For this report, many tables are needed. Core tables are OJDT and JDT1.
    You may check within forum to find many queries for this regarding.
    Thanks,
    Gordon

  • Ageing Analysis - Key date

    Dear Experts,
    When I am Executing Ageing Analysis u2013 Customer outstanding report (On InfoCube 0FIAR_C03), If I give Key date 31.7.2009, it is showing correct result for grand total balances = Sum of the totals of balances of ( 0 days + 1-30days + 31-60 days etc).
    But when  I use the key date for the same query say 4.8.2009, the totals of balances & sum of the totals of balances of ( 0 days + 1-30days + 31-60 days etc) not matching.
    In the report for some documents no values are coming in the ageing part, even its balances are there in the balances.
    Could you please help?
    Thanks,
    Nav

    Hello,
    Key date is for time dependent master data values only.
    Do you have any time dependent master data in the queries??
    Also,it will show only those values which are valid on this date....that is the only those values of master data from the cube will be read which have validity period for this date.
    So its quite possible that many master data values have there validity period ending on 31st July and therefore there are new values for them and based on that its picking up different value from the cube
    so values at 4th August need not match with the key date value for 31st July.
    The good Idea could be to see the values of time dependent char which you are using in the query  and its values for both the key dates and then verify the difference.
    This could explain why the values are not read from cube even if they are there beecause the master data values in those records does not fall in the validity date which you have given.
    Regards
    Ajeet

Maybe you are looking for