Supplier Audit Bank report

I am building a report which contains the supplier,bank and account details along with the changes made to Bank and Account details (Previous Value and New Value).
For this I have created a Materialized view (for holding previous data) and a view (To hold present data) and written a query to fetch supplier details , change details and also a flag which displays 'Y' if there are any changes happen to Bank site or Account details else it is 'N' by joining these two views.
The problem coming with the query if a supplier contains more than one bank accounts. its comparing the first account with the second account and treating it as a changed record and thus making the flag as 'Y' even though the record is not changed.
EX:
Data in Materialized View:
Supplier_No Branch Account_Number
1 B1 N1
2 B2 N2
3 B2 N3
4 B3 N4
Data in the View :
Supplier_No Branch Account_Number
1 B1 N11
2 B2 N2
3 B2 N3
4 B3 N4
here Account Number for supplier 1 is changed to N11 from N1, so I need to set the flag as 'Y' for this record and display the old and new account value. But it also updating the flag as 'Y' for the Supplier 2 as it is having two accounts and the first account in the MATERIALIZED VIEW compared to second account in the VIEW and treated it as a UPDATED account. Please help me out how to get this done. I have pasted the query which I was used to do this.
SELECT v.supplier_number
, v.supplier_name
, v.site_name
, v.bank_name bank_name_curr
, mv.bank_name bank_name_prev
, DECODE(v.bank_name, mv.bank_name, 'N', 'Y') bank_name_changed
, v.bank_number bank_number_curr
, mv.bank_number bank_number_prev
, DECODE(v.bank_number, mv.bank_number, 'N', 'Y') bank_number_changed
, v.branch_name branch_name_curr
, mv.branch_name branch_name_prev
, DECODE(v.branch_name, mv.branch_name, 'N', 'Y') branch_name_changed
, v.branch_number branch_number_curr
, mv.branch_number branch_number_prev
, DECODE(v.branch_number, mv.branch_number, 'N', 'Y') branch_number_changed
, v.account_name bank_account_name_curr
, mv.account_name bank_account_name_prev
, DECODE(v.account_name, mv.account_name, 'N', 'Y') bank_account_name_changed
, v.account_number account_number_curr
, mv.account_number account_number_prev
, DECODE(v.account_number, mv.account_number, 'N', 'Y') account_number_changed
, v.account_level bank_account_level_curr
, mv.account_level bank_account_level_prev
, DECODE(v.account_level, mv.account_level, 'N', 'Y') bank_account_level_changed
, v.status status_curr
, mv.status status_prev
, DECODE(v.status, mv.status, 'N', 'Y') status_changed
FROM XXOM_APBANKAUDITNEW_V v
, XXOM_APBANKAUDITNEW_MV mv
WHERE 1=1
AND NOT(v.bank_name = NVL(mv.bank_name, v.bank_name)
AND v.bank_number = NVL(mv.bank_number, v.bank_number)
AND v.branch_name = NVL(mv.branch_name, v.branch_name)
AND v.branch_number = NVL(mv.branch_number, v.branch_number)
AND v.account_name = NVL(mv.account_name, v.account_name)
AND v.account_number = NVL(mv.account_number, v.account_number)
--AND v.bank_account_type = NVL(mv.bank_account_type, v.bank_account_type)
AND v.account_level = NVL(mv.account_level,v.account_level)
AND v.status = NVL(mv.status,v.status)
--AND v.inactive_date     = NVL(mv.inactive_date, v.inactive_date+1)
-- AND mv.supplier_number IS NOT NULL
--AND v.epa_link = mv.epa_link(+)
--AND v.vendor_site_address = mv.vendor_site_address(+)
AND v.site_name = mv.site_name(+)
AND v.supplier_number = mv.supplier_number(+)
AND v.supplier_number in('123AAA','23456BB','AAAA003')
ORDER BY 1, 2, 3, 4, 5;
Edited by: 940677 on Mar 22, 2013 1:00 PM

Hi Prasad,
Is this an custom report or standard report.
in case you want to count the vendor names having same name in then better check it at PO_VENDORS
select VENDOR_NAME from po_vendors
having count(VENDOR_NAME)>1
group by VENDOR_NAME
Thanks,
Ajit

Similar Messages

  • How to create an audit trail report in SAPB12007

    Hello,
    I been looking for some ways to make an Audit Trail Report for our System Audit. Could anyone help me with this?
    I would like to generate a report that will list all the BP and ITem master data. the date its created and modified and if its modified what are the old values and the modified values.
    I browse the table ACRD for the BP history. how every it could be read as a report. So I was wondering if anyone knows what table should I look at if I am to get the old and new value of a modified transaction. Pls. note that I wanted to create a report.
    Thank you very much
    cat

    Here are the queries that I use for my audits internally. The first one is for customer changes. And the second one to control pricing.
    Query Name: Business Partner History Log
    Author: Vincent Motte                  
    Version: 1.0                          
    History:
    /SELECT FROM ACRD T1/
    DECLARE @DATE AS DATETIME
    /* WHERE */
    SET @DATE = /* T1.UpdateDate */ getdate()-30
    SELECT
    CASE
                    WHEN (SELECT ISNULL(T10.BankCode,0) FROM ACRD T10 WHERE T10.CardCode=T0.CardCode AND T10.LogInstanc=T0.LogInstanc-1)<>ISNULL(T0.BankCode,0)
                                    Then  'Bank details modified'
                     WHEN (SELECT ISNULL(T10.DflAccount,0) FROM ACRD T10 WHERE T10.CardCode=T0.CardCode AND T10.LogInstanc=T0.LogInstanc-1)<>ISNULL(T0.DflAccount,0)
                                    Then  'Bank  details modified'
                     WHEN (SELECT ISNULL(T10.DflBranch,0) FROM ACRD T10 WHERE T10.CardCode=T0.CardCode AND T10.LogInstanc=T0.LogInstanc-1)<>ISNULL(T0.DflBranch,0)
                                    Then  'Bank  details modified'
                    WHEN (SELECT COUNT(T10.CardCode) FROM ACRD T10 WHERE T10.CardCode=T0.CardCode and T10.LogInstanc<T0.LogInstanc)<=0
                                    Then 'Creation'
                    else ''
    END 'Alert',
    T0.UpdateDate 'Update Date', T1.[U_NAME] 'User',T0.CardCode, T0.CardName
    , T0.[CreditLine], T0.[DebtLine],
    T0.[Discount], T0.[VatStatus], T0.[LicTradNum], T0.[ListNum] 'Price List', T0.[DflAccount], T0.[DflBranch], T0.[BankCode],
    T0.[validFor], T0.[frozenFor], T0.[VatGroup], T0.[Deleted], T0.[PymCode], T0.[BlockDunn],
    T0.[WTCode]
    FROM ACRD T0 , OUSR T1 WHERE
    T1.INTERNAL_K=T0.UserSign AND T0.UpdateDate>=@DATE
    Query Name: Price Change log
    Description: extracts the price modification for each item in SBO for the past 30 days
    Version 1.0
    Author: Vincent Motte
    History:
    Select
    --T0.UserSign,
    T1.itemcode 'Item Code',
    T0.Price [Previous],
    T1.Price [Current],
    T2.ListName 'Price List',
    T0.Factor[Old Factor] ,
    T0.factor [New Factor],
    /* select the update date for the log instance(determined by the where condition )*/
    (Select distinct T3.Updatedate from aitm T3 where T3.itemcode= T0.itemcode and (T3.loginstanc +1)= T0.loginstanc ) 'Update Date',
    T0.loginstanc 'Instance',
    T2.listName 'Price List',
    /Select the base price list for the item's price list from the price list table/
    (Select T4.base_num from opln T4 where T4.listnum = T1.pricelist and T4.listnum = T0.pricelist) [Base PriceList ]
    --t0.Currency,
    --T1.CURRENCY
    From
    ait1 T0 inner join
    itm1 T1 on T0.pricelist = T1.pricelist and T0.itemcode = T1.itemcode
    Inner Join opln T2 on T1.pricelist = T2.listnum
    where
    /* Condition 1: Select all the items + their price change where the price has been changed and the base price list equals the price list itself. It counts the Log Instance from the item in
    the price list and substract one to get the last entry where the price was changed. The loginstance coutn ignores a count of 1
    T0.loginstanc =
    ((Select count (a.Loginstanc) from ait1 a where a.itemcode = T0.itemcode and a.pricelist = T0.pricelist group by a.itemcode having count(a.Loginstanc) > '1' ) -1)
    and
    /* Cater for prices in target price lists which may have been manually changed. */
    (T1.ovrwritten='y'and T0.Price <> T1.Price)
    or (T0.Price <> T1.Price and T2.base_num = T1.pricelist and T2.base_num = T1.pricelist
    and T2.base_Num = T2.listnum )
    Cater for cases where a currency change but not a price change may happen
    OR T0.CURRENCY <> T1.CURRENCY
    or
    Condition 2: Select all price changes where the price may have changed due to the price of the parent price lsit changing.
    As this type of price chnage is not recorded in the AIT1 the second log instance condition details that the base price list
    from opln does not equal the actual price list in ait1 or itm1.
    T0.loginstanc =
    (Select top 1 c.loginstanc from ait1 c where c.itemcode = T0.itemcode and c.pricelist = T0.pricelist and c.loginstanc <> '1' order by c.loginstanc desc)
    and T2.base_num <> T1.pricelist and T2.base_num <> T1.pricelist
    and T2.base_Num <> T2.listnum
    and
    caters for a change in the factors or prices in target price lists which may have been manually changed.
    ((T0.Factor <> T1.factor)
    or (T1.ovrwritten='y'and T0.Price <> T1.Price)
    or T0.price <> T1.price
    Cater for cases where a currency change but not a price change may happen
    OR T0.CURRENCY <> T1.CURRENCY
    and (T0.Price >= 0 or T1.Price >=0) and ((T0.Price <> T1.Price) or ((T0.Price <>
    (Select distinct b.pricelist from itm1 b right outer join OPLN T4 on b.pricelist= T4.listnum and b.pricelist <> T4.base_Num where b.pricelist = T1.pricelist and b.itemcode =T1.itemcode)))
    and (Select distinct T3.Updatedate from aitm T3 where T3.itemcode= T0.itemcode and (T3.loginstanc +1)= T0.loginstanc ) >getdate()-30

  • ISE 1.2 - Posture Detail Assessment - enforcement audit mode report not show status for non-compliant

    ISE 1.2 - Posture Detail Assessment - enforcement audit mode report not show status for non-compliant.
    - For old version 1.1.4 it can be reported for non-compliant, How can I generate report for this? 
    Thanks
    Kosin Usuwanthim

    It used to be in there (id 226635 is the last one with it); should I clean it up a bit and put it back with a bit more of a disclaimer?

  • Apps Report Error(Supplier Payment History Report)

    Hi team,
    APXPPHIS module: Supplier Payment History
    Iam getting below error and unable get report Output.
    Current NLS_LANG and NLS_NUMERIC_CHARACTERS Environment Variables are :
    American_America.WE8MSWIN1252
    Enter Password:
    MSG-00001: After SRWINIT
    ORA-24324: service handle not initialized
    ==> SELECT V . vendor_name C_VENDOR_NAME , upper ( V . vendor_name ) C_SORT_VENDOR_NAME , V . segment1 C_VENDOR_NUMBER , VS . vendor_site_code C_VENDOR_SITE_CODE , decode ( VS . address_line1 , null , '' , VS . address_REP-0069: Internal error
    REP-57054: In-process job terminated:Terminated with error:
    REP-300: service handle not initialized
    ==> SELECT V . vendor_name C_VENDOR_NAME , upper ( V . vendor_name ) C_SORT_VENDOR_NAME , V . segment1 C_VENDOR_NUMBER , VS . vendor_site_code C_VENDOR_SITE_CODE , decode ( VS . address_line1 , null , '' , VS . address_Report Builder: Release 10.1.2.3.0 - Production on Wed Oct 2 16:30:25 2013
    Thanks & Regards
    San

    San,
    Please see (Supplier Payment History Report Completing With Error (Doc ID 1409467.1)).
    Thanks,
    Hussein

  • Audit Log Report not display and error is "Report Contents No data"

    Dear All,
    i have reuired the audit log report but when i am click the Site Action->Site Setting->Audit log reports->Run a custom report-> select the day and option and click ok the i have received the error
    Please help me please check below screen shot

    Can you please confirm that you have configured events to audit?
    Configure
    audit settings for a site collection
    Here is step by step how to configure audit setting.
    http://anthony-verschraegen.blogspot.ca/2013/04/sharepoint-2013-configuring-audit.html
    Amit

  • Issue with Audit Log report in SharePoint 2010

    I have enabled REPORTING feature at site collection level and configured the site collection audit settings. I tried to generated Audit log reports, most of the time it keeps on processing as shown in fig.It
    keeps on processing, never comes to report generated successful message. how to overcome this issue?

    i'm facing same issue, even when i tried to generate report for limited limited period(5 days) for a particular event(ex: delete or restore items (or) edit items).
    I think, the below reference may guide you solve your issue
    http://sharepoint.stackexchange.com/questions/17151/how-often-should-the-auditing-log-be-cleared-to-not-affect-performance
    Sekar - Our life is short, so help others to grow
    Whenever you see a reply and if you think is helpful, click "Vote As Helpful"! And whenever
    you see a reply being an answer to the question of the thread, click "Mark As Answer

  • Supplier Wise Aging Report As of Date

    Hi,
    We are on 12.1.3
    I have wrote a query to find the Supplier Wise Aging Report .But it is not working for back date i.e if we applied Amount 1000  today, in report patameter if a pass the value from to yesterday date - report should display sum of all aging. If we gave till today.. the value should be 1000 less
    My Query:
    SELECT   yy.vendor_name, yy.vendor_id vendor_num, yy.segment1,
             yy.SUM remaining_advance_amount, yy.less30, yy.greater30,
             yy.greater60, yy.greater90, yy.greater120
    --         (SELECT COUNT (1)
    --            FROM ap_invoices_all aia
    --           WHERE aia.cancelled_date IS NULL
    --             AND aia.vendor_id = yy.vendor_id
    --             AND TRUNC (aia.invoice_date) BETWEEN :p_from_date AND :p_to_date
    --             AND aia.amount_paid <> aia.invoice_amount) out_stnd_bill,
    --         (SELECT SUM (NVL (apd.prepay_amount_remaining, 0))
    --            FROM ap_invoices_all aib,
    --                 ap_invoice_distributions_all apd
    --           WHERE aib.cancelled_date IS NULL
    --             AND aib.vendor_id = yy.vendor_id
    --             AND aib.invoice_id = apd.invoice_id
    --             AND apd.reversal_flag = 'N'
    --             AND TRUNC (aib.invoice_date) BETWEEN :p_from_date AND :p_to_date
    --             AND aib.invoice_type_lookup_code = 'PREPAYMENT') on_ac_amount
    FROM     (SELECT   xx.vendor_name, xx.vendor_id, xx.segment1,
                       SUM (NVL (xx.less_30, 0)) less30,
                       SUM (NVL (xx.greater_30, 0)) greater30,
                       SUM (NVL (xx.greater_60, 0)) greater60,
                       SUM (NVL (xx.greater_90, 0)) greater90,
                       SUM (NVL (xx.greater_120, 0)) greater120,
                       (  SUM (NVL (xx.less_30, 0))
                        + SUM (NVL (xx.greater_30, 0))
                        + SUM (NVL (xx.greater_60, 0))
                        + SUM (NVL (xx.greater_90, 0))
                        + SUM (NVL (xx.greater_120, 0))
                       ) SUM
                  FROM (SELECT   c.vendor_name, c.vendor_id, c.segment1,
                                 (CASE
                                     WHEN ((SYSDATE) - TRUNC (b.invoice_date) <=
                                                                                30
                                        THEN NVL ((  NVL (b.invoice_amount, 0)
                                                   - NVL (b.prepay_amount_applied,
                                                          0
                                                  0
                                     ELSE 0
                                  END
                                 ) less_30,
                                 (CASE
                                     WHEN ((SYSDATE) - TRUNC (b.invoice_date)
                                              BETWEEN 31
                                                  AND 60
                                        THEN NVL ((  NVL (b.invoice_amount, 0)
                                                   - NVL (b.prepay_amount_applied,
                                                          0
                                                  0
                                     ELSE 0
                                  END
                                 ) greater_30,
                                 (CASE
                                     WHEN ((SYSDATE) - TRUNC (b.invoice_date)
                                              BETWEEN 61
                                                  AND 90
                                        THEN NVL ((  NVL (b.invoice_amount, 0)
                                                   - NVL (b.prepay_amount_applied,
                                                          0
                                                  0
                                     ELSE 0
                                  END
                                 ) greater_60,
                                 (CASE
                                     WHEN ((SYSDATE) - TRUNC (b.invoice_date)
                                              BETWEEN 91
                                                  AND 120
                                        THEN NVL ((  NVL (b.invoice_amount, 0)
                                                   - NVL (b.prepay_amount_applied,
                                                          0
                                                  0
                                     ELSE 0
                                  END
                                 ) greater_90,
                                 (CASE
                                     WHEN ((SYSDATE) - TRUNC (b.invoice_date) >
                                                                               120
                                        THEN NVL ((  NVL (b.invoice_amount, 0)
                                                   - NVL (b.prepay_amount_applied,
                                                          0
                                                  0
                                     ELSE 0
                                  END
                                 ) greater_120
                            FROM ap_payment_schedules_all a,
                                 ap_invoices_v b,
                                 po_vendors c
                           WHERE a.invoice_id = b.invoice_id
                             AND b.vendor_id = c.vendor_id
                             AND b.invoice_type_lookup_code = 'PREPAYMENT'
                             -- AND a.amount_remaining <> 0
                             AND TRUNC (b.invoice_date) BETWEEN :p_from_date
                                                            AND :p_to_date
                             AND b.cancelled_date IS NULL
                        --AND c.segment1 = 837
                        ORDER BY c.vendor_name) xx
              GROUP BY xx.vendor_name, xx.vendor_id, xx.segment1) yy
    ORDER BY yy.vendor_name;

    Hi Octavio,
    As per this note 1290116.1.
    There is no replacement for this table
    Thanks
    Vishwa

  • Bank Report through DME

    Hi All,
    Can we take bank report through DME in ALV format
    to get
    1. Employee name
    2. Bank account no
    3. Payment amount
    SK

    Praneth,
    thanks for the reply:
    Yes DME not in our scope, This report is required before the payment goes to bank.
    Is there any standerd report to fetch :
    1. Employee name
    2. Bank account no
    3. Payment amount(from RT
    curently we are using custom bank report .
    will this Program HNZLBTD0 helpful (i cant execute tehi bcz DME config is not there)
    Tcode - PC00_M99_CDTA if we configure DME can we extact an ALV output of above equrmnt (its isjust for standerd bank report functionality , but not to transfer payment details to bank)
    SK

  • Usage Report and Audit Log report showing different totals

    I am trying to understand the differences displayed in two similar reports. The first report is an 'Audit Log' Report and it is displaying the number of Resource Account creations over a time period. The second report is a Usage Report using the exact same criteria (objectType = Resource Account and Action = Create). The totals I get back are VASTLY different. Can anyone explain? Is this a known bug?

    Hi,
    In any report we don't show the storage policies information. In Cost report if the storage policies have different rate factors then we will show the split for the storage information. But in usage report , rate factors will not be applicable as we don''t show the cost details. Hope this clarifies your question. Please let us know if you need more information.
    Thanks,
    Lakshmi

  • Audit Log Report generating an "Out of Memory" error message.

    Greetings. We are a new IDM customer. We are running IDM 6.0 with an Oracle database. We are now getting the following error message when we run the IDM Audit Log Report for Today's Activities:
    "java.lang.OutOfMemoryError".
    How do we increase the memory setting for reporting? Thanks.

    Hi,
    I am also getting the same error. I have netbeans with tomcat andi modified the setting the netbeans.conf to
    netbeans_default_options="-J-Xms32m -J-Xmx750m -J-XX:PermSize=32m -J-XX:MaxPermSize=750m -J-Xverify:none -J-Dapple.laf.useScreenMenuBar=true"
    i have 896MB of RAM. However, the error is still showing up? Any ideas on how to resolve this?
    Thanks,

  • Audit Log Reports

    Hi
    I have configured site collection audit settings but not able to get old data about users activities on portal using this feature.
    i have created it last dec 10th 2014 and whenever i run audit log reports, it generates report for only from dec 10th to 12th.
    i am not able to get six month old users activities details using this feature on share point online.
    can you please help me out here if possible?
    Thanks a lot !!!

    Hi,
    Its not possible using Javascript/Jquery or client side
    http://www.codeguru.com/csharp/csharp/cs_network/database/article.php/c15335/Auditing-in-SharePoint-2007.htm
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • Audit Log Reports in SharePoint 2007

    Hello, 
    Is it possible to run 'Audit Log Reports' using JavaScript/Jquery in SharePoint 2007?
    Thanks

    Hi,
    Its not possible using Javascript/Jquery or client side
    http://www.codeguru.com/csharp/csharp/cs_network/database/article.php/c15335/Auditing-in-SharePoint-2007.htm
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • BI 4.1 auditing sample reports in WebI format ?

    Hi!
    Is it possible to get auditing sample reports in WebI format instead of Crystal format (like in previous versions of BO) ?
    When Crystal is not used by a custommer, it's a pity to install and run Crystal servers & client just for auditing reports, isn't it ?
    Regards,
    Stéphane.

    Tilak,
         All the information you need on the Audit Database can be found within the different Admin Guide and the sample UNX w/ Crystal Enterprise reports provided.
    http://help.sap.com/businessobject/product_guides/boexir4/en/xi4_bip_admin_en.pdf
    - Section 20
    http://help.sap.com/businessobject/product_guides/sbo41/en/sbo41sp4_bip_admin_en.pdf
    - Section 21
    Sample Auditing Universe and Reports for SAP BusinessObjects_4_x
    You can very easily reverse engineer the Crystal Enterprise Reports and create starter WebI reports and beyond.
    Regards,
    Ajay

  • Banking Reports not accessible by Lim. Financial License in SAP B1 8.81 PL 0

    Dear All,
    I am using SAP B1 8.81 PL 00 (Indian localization). When I log in with a Limited Financial License user , the Banking Reports cannot be accessed. It gives a message : 'You cannot open window with your current license'.
    Also I cannot locate the 'Bank Reconciliation Statement' under Banking Reports->External Reconciliation.
    Kindly suggest.
    Regards,
    William

    Hi William fernandes..
    In 8.81 Pl 00 It might be bug which might me corrected in the later version
    check with the link for the license functionality
    http://www.cornerstone1.com/SAP/SAP_Business_One_User_Types.html
    Hope Helpful
    Regards
    Kennedy

  • Audit Trail Report Ignores Parameters From/To Date on EBS 12.0.6

    Hi All,
    One of our customers is not able to filter the data in "Audit Trail Report" based on date parameters.
    Is there any patch for this..
    EBS Version is 12.0.6
    I have found a note but it is related to 11i.
    Audit Trail Report Ignores Parameters Transacted By, From/To Date (Doc ID 364304.1)
    Any help is greatly appreciated..
    Best Regards
    gt1942

    I don't see any patch available for 12.0.x and this issue should be fixed in this release.
    Please log a SR for this issue.
    Thanks,
    Hussein

Maybe you are looking for

  • Can I write data into DSO directly ( by editing it)

    Hi Gurus, Here I have an issue where I was asked to create an object in BI7 where I can enter data directly into that object regularly i.e day to day basis.  Is it possible if yes please give me the navigations and links if available to fix my issue.

  • Apple's Alpha Transitions and Color Looks. How to Install and Use?

    A few months ago I downloaded the Alpha Transitions and Color Looks from the FCS3 website. I have just re-discovered the .dmgs on one of my hard drives but my memory is a complete blank! I cannot remember whether I used them or installed them but see

  • Sync BPM , SOAP

    Hello, I've got another problem and hope someone could give me a hint, because reading some blogs concerning BPM and trying to adapt the things to my problem did not really help me. The last days I created a sync process that gets information via htt

  • Locking issues with transaction-isolation levels

              I believe that my program is suffering from some sort of deadlock, and I was hoping           for some feedback.           I am helping to develop a trading system           using EJBs, Oracle 9i, and Bea Weblogic 7.0. The system provides a

  • How to use inbuilt cam on my Mac air , while using yahoo messenger. it doesnt seem to work

    My web cam cam does not work while chatting on yahoo messenger. cam icon is shown but it is inactive, please advice me , what to do..