Query Report to Include manually Reconciled Documents

Hi All,
I have a query report and its showing the right data.
What changes can be made so that it displays the invoices which were reconciled and the payments/credit notes with which these were reconciled?
Declare @datefrom as datetime DECLARE @dateto as datetime
Select @datefrom = T0.DocDate FROM OINV T0 Where T0.DocDate = '[%0]' Select @datefrom = '[%0]' 
Select @dateto = T0.DocDate FROM OINV T0 Where T0.DocDate = '[%1]' Select @dateto = '[%1]'
SELECT distinct T0.CardName,T4.U_Location,T4.U_Distance,T5.CreditLine as 'Credit Limit',
(T5.[CreditLine]-(T5.[Balance]+
  isnull((Select TOP 1 Doctotal from ORIn where cardcode = T5.Cardcode and NumAtCard like 'Security%'),0)+
  isnull((Select TOP 1 Doctotal from ORCT inner join NNM1 on ORCT.Series = NNM1.Series
  where cardcode = T5.Cardcode and NNM1.SeriesName like 'Deposit%'),0))
) as 'Available Credit Limit',
(T5.[Balance]+ isnull((Select TOP 1 Doctotal from ORCT inner join NNM1 on ORCT.Series = NNM1.Series
  where cardcode = T5.Cardcode and NNM1.SeriesName like 'Deposit%'),0)+
  isnull((Select TOP 1 Doctotal from ORIn where cardcode = T5.Cardcode and NumAtCard like 'Security%'),0))as 'Account Balance',
T1.DocNum as 'Incoming Payment Number ', T1.DocDate as 'Payment date', T1.DocDueDate as 'Payment Due Date',t6.SeriesName,
T6.Beginstr as 'Prefix',
RIGHT(T0.DocNum, 6) as 'AR Invoice Number',T0.NumAtCard as 'Reference', T0.DocDate as 'Posting Date',
T0.DocTotal as 'AR Invoice Total', DATEDIFF(dd,T0.DocDate,T1.DocDate) as 'Payment Days from the date of Invoice',
T1.TrsfrSum as 'Payment By Transfer',
T1.CashSum as 'Payment by Cash',
T1.CheckSum as 'Payment by Check',
T2.CheckNum as 'Cheque Number'
FROM OINV T0
LEFT JOIN ORCT T1 ON T0.ReceiptNum = T1.DocEntry
LEFT JOIN RCT1 T2 ON T1.DocNum = T2.DocNum
Left Join OSLP T3 ON T3.SlpCode= T0.SlpCode
LEFT JOIN CRD1 T4 on T0.CardCode= T4.CardCode
LEFT JOIN OCRD T5 on T4.CardCode = T5.CardCode
LEFT JOIN NNM1 T6 on T0.Series = T6.Series
where T1.Docnum is not null and T4.U_Location is not null
and (T0.Doctotal- T0.PaidToDate) = '0.00'
Thanks,
Joseph

Hi Tom
You can just write the processes yourself. Although trickier this can give you a lot more control over row processing.
APEX_APPLICATION.G_F01, F02 etc are global variables in the apex_application package that are defined as arrays.
These are regularly used in tabular forms to reference values within them. The normal ordering would be column 1 = G_F01, column 2 = G_F02 etc etc. Although you can change these and even assign more than one column to an array.
The example
FOR i IN 1..APEX_APPLICATION.G_F01.COUNT LOOP
INSERT INTO my_table VALUES(:P1_EMPID , APEX_APPLICATION.G_F01(i));
END LOOP;Is saying - for the number of values in the array G_F01 (probably column 1) loop insert into the table the value of the associated value in the array. So first time through i=1 - so the first value in the array (probably row 1 in column 1), next time i=2 so the second value in the array is used (probably row 2 in column 1) and so on...
When you've created a manual tabular form (what I would call what you've done) you have created the items using the APEX_ITEM package in your query. The first parameter for this is p_idx which defines which global array to hold it in.
Cheers
Ben

Similar Messages

  • Including MANDT field in ABAP Query Report as output field

    Hi All,
    I need to display the client(MANDT) field in the ABAP Query Report as an output field.
    But in SQ01 where we select the fields to be displayed as output in query , this field is not visible.
    I later checked in the Infoset. Even in the infoset the field MANDT is greyed out and all other fields are active.
    Can someone tell me how to include the field MANDT in the output of the ABAP Query Report.

    self resolved

  • Automating ADHOC query reports to generate Emails

    Hi Experts
    Hope you guys are doing fine.
    I have a requirement where we need to automate the ADHOC query reports to trigger emails with the Excel attachment of the report to a set of users.
    To explain in detail,we have some adhoc queries which are run manually on monthly basis(by our functional guys).Once the output report is generated,they used to download them into Excel document and send that to a set of users as an email attachment.
    Now we are planning to automate the entire process,so that these query reports once set to run on monthly basis should trigger emails to set of users with the excel attachment.
    Now,i am looking for solution on how to proceed on this.Since the program behind the query(which starts with AQ*) is not be a modifiable program,i can write any custom code here.Alternately,i planned to set a background job which runs the query and then use a  custom pgm which reads the spool no for the pgm and then to read the data from the spool into an internal table and then use a FM to send the internal table data as an email attachment.But wasn't sure of what FM's to use to read the spool no. and data from the spool.
    Is there any alternate way to work on this or any suggestions on my assumed process would be really appreciated.
    Thanks

    Ok, here's what you do:
    - Go to T/C: SQ01 and find your query
    - From the menu at the top select Query>More functions>Display Report Name (copy the report name)
    - Go to Transaction SO23 and create a new shared distribution list - give it a name and title, click the dropdown on folder and click the create folder button, give the folder a name and save/green tick.
    - Click on the Dist. list content tab and enter all the external email addresses that the report should go to ( the recipient type should be internet address or via internet or something like that)
    - Go to Transaction SM36 and click on the Job wizard button, go through the wizard entering the program name we copied earlier. In the print parameters section make sure it is set to print immediately, then on the spool list recipients button select the dropdown box, select distributions lists and find the one you created earlier. Define the variants, periods, time etc etc
    - When the job runs it will process the output via SAPConnect (transaction SCOT) you will be able to see the status of the emails by going to transaction SCOT and selecting the menu option Utilities>Overview send requests.
    Job Done, Chillax
    PS: remember the output type of the query in SQ01 needs to be set to excel or whatever you require otherwise a PDF/html attachment will be created in the email.
    PPS: If SAPConnect is not set up in your system speak to your basis guy to set it up - If you don't have any basis resource, it is really easy to set up, plenty of guides around.

  • Customer Aging Report to Include Credit Memos

    Hi,
    I need a customer aging report that will also include credit memos.  This is not available with the system report, but when I write a query it will not reference the customer's account but only the documents in the system.  How do I create an A/R aging report that includes credit memos off of the account balance?
    Thanks!
    Emily

    Hi, Emily,
    I have made such a Crystal report; actually I have 2 versions;
    one is purely made in Crystal report:  if your credit memos are copied from AR Invoice totally.
    another is made with stored procedure and Crystal report, that includes AR Invoice Credit memo, and internal reconciliation.
    Which one you need?
    Suppose you need the former one, it's easier:  just link tables: OINV - INV1 - RIN1;
    The join keys: OINV to INV1 is 'Docentry';   INV1 to RIN1 is "inv1.docentry = rin1.baseentry and inv1.linenum  = rin1.baseline". and also "Rin1.basetype = '13' and inv1.targettype = '14'.
    Hope this helps.
    ~Michelle

  • SAP QUERY report for vendor line items

    Hi
    I have created a SAP QUERY report for vendor line items with fields vendor no.,vendor name,amount,company code and period.But there is one line item i donot know from wher system is getting it picked with is not in that vedor account,when i compare with fbl1n.I checked the document number too...the same doc number is twice in my query report.One with correct amount and another with wrong one.How do i chk.Where did i go wrong in creating query.I used logical database KDF.
    Please advise.

    i chked...how do we get the amount displayed in query...it just displays amount no debit credit symbol... i have selected BSEG-DMBTR field but no -/+ sign,how is it done in query,please suggest.

  • Profit Center Report not include the Invoices entry

    Hi Expert,
    I want the report of my profit center which will show profit centre details including the dimension.
    I have run the following report but not fulfill the requirements
    1.The u201CProfit centre reportu201D in this report only u201CJEu201D is comes in report & Invoices post for the u201CProfit centre(Dimension1, Dimension2,Dimension3) u201Cis not included in that report.
    2.The u201CGeneral ledgeru201D report it will give the details of invoices but ,it is not showing the  Dim1,Dim2,Dim3 in the available column of report.
    Plese help me on this.Sap version 8.8 patch 15.

    Hi,
    You can create your own report by Crystal Report or query report.
    Thanks,
    Gordon

  • SCCM 2012 Query report for specific software installed.

    I have Reporting point installed and it seems to be working as I was able to run OS reports.
    Here's what I would like to do.
    1. I need a query/report to show us all the machines that do not have Microsoft Forefront Endpoint Protection installed.
    2. I also need a query/report showing what machines still have Sophos AV installed.
    Any help is greatly appreciated it.
    Thanks,
    Voev

    I was not able to use the Reporting to get computers without FEP installed. So I did a workaround.
    Create Device Collection for computers with FEP installed
    1. Device Collections => Create Device Collection =>name it "Computers with FEP installed=> Query Rule Properties => Edit Query Statement => Criteria tab => Add the following statements
    Criterion Type: Simple value
    Where: Installed Software - ARPDisplay Name
    Operator: is equal to
    Value: System Center 2012 Endpoint Protection          (as appeared in Add/remove program name)
    Create Device Collection for computers without FEP installed
    1. Device Collections => Create Device Collection => Name "Computers without FEP Installed" => Query Rule Properties => Add Rule => Include Collections => Tick "All Systems" => OK =>  then you need to add
    the Exclude by => Add Rule => Exclude Collections => Tick " Computers with FEP Installed => OK
    So in my "All Systems" Collection has 1000 members
    Computers with FEP Installed collection has 900 members
    Computers without FEP Installed collection has 100 members
    Add the with FEP installed & without FEP installed collections together is equal to 1000 members of the All Systems.

  • UDF Value is not coming in the query report

    Hi all,
    i have designed query report based on AR Invoice which has some UDF .
    all udf have FMS applied and all these udf has values.
    when i run report some times udf values are coming in the report and somtimes not even if udf contains values.
    if i open perticular invoice and again update that udf and again run report now udf value will come in the report.
    every time i need to manualy update the udf even if that udf contain value.
    how to avoide this problem.
    Pls suggest solution.
    Regards,
    Chetan

    Hi Chetan,
    Try this,
    -> Open the require document(module).
    Assign this procedure and then ADD the document
    and Run the Query Report.
    1. Goto the UDF and Click (ShiftAltF2).
    2. Select the SEARCH BY SAVED QUERY.
    3. Assign the FMS Query in UDF.
    4. Select the AUTO REFRESH WHEN FIELD CHENGES.
    5. Select the Auto Refresh Field (for example CardCode (or) Remarks).
    6. Check the Display Saved Values.
    OR
    -> Open the require document(module).
    1. Goto the UDF and Click (ShiftAltF2).
    2. When will you add the document at that time
    you can Click the SHIFT + F2 and than ADD the document.
    and than Run the Query Report.
    Regards,
    Madhan.

  • Setting a Default Value in SQL Query Report

    Hello:
    We are using a SQL Query Report to provide a mass update to a table. We are using the apex.collection and having it display a number of records in a SQL Query Report for mass update. We have 14 columns in the report, for which the first 11 are populated via the collection. The remaining 3 are open for input but the individual making the updates. We've were able to provide a default value for 2 of the remaining 3 columns using a named LOV's - however the fourth column we would like to default a sysdate - but we are not successful.
    We've attempted many things but none seem to work, including adding that column to the collection and assigning it a default sysdate value. We've also tried changing the settings in the report attributes --> Tabular Form Elements by setting the Display as to: Datepicker, Default type to PL/SQL Expression and setting the default to sysdate. We've also tried caputuring a date on the previous page and loading it onto the report page and trying to default the date column to a page item default.
    I'd appreciate any help.
    Thanks
    FYI - we are using version 3.2

    use as default
    to_char(sysdate, 'dd/mm/yyy') where the format is your application or item date format

  • Set Page item value when paging through an sql query report

    I have a report that includes a checkbox to indicate which rows a process is to be run on. I have a "Select All" button that sets a value to check all boxes in the report, and deselect button to turn that feature off. The page only renders one of the buttons at a time depanding on the value. If the "Select All" is turned on, I would like to set the value to "OFF" when a user goes to another page of the report.
    For example:
    A user enters the page and the report is rendered. The rows returned are greater than what is displayed. The paging options for the report are shown. 1-15 16-30 etc. It is currently showing the first 15 rows of the report.
    The user clicks the select all button, and all checkboxes are now checked. Currently it will remain this way until the deselect button is clicked.
    When the user clicks the report paging, I would like to set the value of the Select All item to off.
    Does anyone know how to do this at this point?

    Hi,
    Try Scott's suggestion in Re: How to get query from region "PL/SQL function body returning string query"?
    Andy

  • Can't select any value in radio to query report.

    Dear Support,
    About BI-BASE-B version is 1000.7.40.2.20.20130621014800 in portal,when we select value in radio to query report which lend to white screen,so i think that may be issue.But if i set manual value to query report,it is fine.So Connection is  available for system NBPCLNT800  in portal.
    error msg:
    #2.#2014 03 30 20:16:38:377#+0800#Error#/Applications/BI#
    #BW-BEX-ET-WJR#sap.com/com.sap.ip.bi.base#C000C0A8183501B60000000300007621#118639550000000004#sap.com/com.sap.ip.bi.web.portal.integration#com.sap.ip.bi.base.portal.connection.Localization#SYSADM#26##100FCD4DB80411E39272000007124BBE#113b773bb80511e3c097000007124bbe#113b773bb80511e3c097000007124bbe#0#Thread[HTTP Worker [@847096065],5,Dedicated_Application_Thread]#Plain##
    BI exception with class "ConnectionException" and message "Connection is not available for system NBPCLNT800". See default trace for log ID "null".#
    Thanks

    Hello Tom,
    could you please close this thread properly, so that others can find the solution, too? Please have a look at the blog How to close a discussion and why if you're unsure on how to do that. Thank you!
    Regards,
    Steffi.

  • SSRS Reports getting error in XML document (1, 6110).

    Hi,
    SCCM 2012 R2  Query reports opening error it shows below errors few reports only open properly.
    Stack Trace:
       at Microsoft.Reporting.WinForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.ProxyMethodInvocation.Execute[TReturn](RSExecutionConnection connection, ProxyMethod`1 initialMethod, ProxyMethod`1 retryMethod)
       at Microsoft.Reporting.WinForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.LoadReport(String Report, String HistoryID)
       at Microsoft.Reporting.WinForms.ServerReport.EnsureExecutionSession()
       at Microsoft.Reporting.WinForms.ServerReport.SetParameters(IEnumerable`1 parameters)
       at Microsoft.ConfigurationManagement.AdminConsole.SrsReporting.ReportViewerWindowsForms.SetParameterValues_DoWork(Object sender, DoWorkEventArgs e)
    System.InvalidOperationException
    There is an error in XML document (1, 6648).
    Stack Trace:
       at Microsoft.Reporting.WinForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.ProxyMethodInvocation.Execute[TReturn](RSExecutionConnection connection, ProxyMethod`1 initialMethod, ProxyMethod`1 retryMethod)
       at Microsoft.Reporting.WinForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.LoadReport(String Report, String HistoryID)
       at Microsoft.Reporting.WinForms.ServerReport.EnsureExecutionSession()
       at Microsoft.Reporting.WinForms.ServerReport.SetParameters(IEnumerable`1 parameters)
       at Microsoft.ConfigurationManagement.AdminConsole.SrsReporting.ReportViewerWindowsForms.SetParameterValues_DoWork(Object sender, DoWorkEventArgs e)
    System.Xml.XmlException
    '', hexadecimal value 0x1F, is an invalid character. Line 1, position 6648.
    Stack Trace:
       at Microsoft.Reporting.WinForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.ProxyMethodInvocation.Execute[TReturn](RSExecutionConnection connection, ProxyMethod`1 initialMethod, ProxyMethod`1 retryMethod)
       at Microsoft.Reporting.WinForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.LoadReport(String Report, String HistoryID)
       at Microsoft.Reporting.WinForms.ServerReport.EnsureExecutionSession()
       at Microsoft.Reporting.WinForms.ServerReport.SetParameters(IEnumerable`1 parameters)
       at Microsoft.ConfigurationManagement.AdminConsole.SrsReporting.ReportViewerWindowsForms.SetParameterValues_DoWork(Object sender, DoWorkEventArgs e)
    Kiran

    This has already been discussed and solved, please use the search funtion:
    http://social.technet.microsoft.com/Forums/en-US/home?category=systemcenter2012configurationmanager&sort=relevancedesc&brandIgnore=True&searchTerm=There+is+an+error+in+XML+document+
    Torsten Meringer | http://www.mssccmfaq.de

  • Error running a query and creating a query report.

    Hi all
    I have a problem with a query when I'm running it or trying to create a report for it.
    23/09/2009  11:47:31: 1). [Microsoft][SQL Native Client][SQL Server]Arithmetic overflow error converting expression to data type datetime.
    'Document' (RDOC) -- Run query
    23/09/2009  11:01:58: 1). [Microsoft][SQL Native Client][SQL Server]Invalid object name 'CSHS.T0'.
    2). [Microsoft][SQL Native Client][SQL Server]Statement 'Received Alerts' (OAIB) (s) could not be prepared. - create a query report
    This happened on a Windows Server 2003 OS , when I ran the same query on local pc on xp it ran fine on both scenarios.
    Please help
    Bongani Dlamini

    select SlpName, ItmsGrpNam, sum(LineTotal) as 'Total Sales Minus Returns'
    from
    SELECT T4.SlpName, T3.ItmsGrpNam, T0.LineTotal FROM dbo.INV1 T0 INNER JOIN dbo.OINV T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T0.ItemCode = T2.ItemCode INNER JOIN OITB T3 ON T2.ItmsGrpCod = T3.ItmsGrpCod INNER JOIN OSLP T4 ON T0.SlpCode = T4.SlpCode WHERE T1.DocDate >=[%0] and T1.DoCdate<=[%1]
    UNION
    SELECT T4.SlpName, T3.ItmsGrpNam, (T0.LineTotal * -1) AS 'LineTotal'
    FROM dbo.RIN1 T0 INNER JOIN dbo.ORIN T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T0.ItemCode = T2.ItemCode INNER JOIN OITB T3 ON T2.ItmsGrpCod = T3.ItmsGrpCod INNER JOIN OSLP T4 ON T0.SlpCode = T4.SlpCode WHERE T1.DocDate >=[%0] and T1.DoCdate<=[%1 ]
    ) InvoicesMinusReturnsDerivedTable
    group by slpname, ItmsGrpNam

  • Alignment and restriction of Custom field in SAP query report

    Hi Experts,
    I have one custom field in query report(SQ01) called Amount in local currency which is calculated based on Amount in document currecy * exchange rate.
    But this field values are coming in left alignment instead of right alignment so how i should get in right alignment and second issue is how i can restrict field value to only 2 decimals.
    I tried the below link "http://media.techtarget.com/searchSAP/downloads/SAP_Query_C7.pdf" but the steps they mentioned are not appearing in SQ01 for example in that link they mentioned to click Basic List option for advanced steps but when i click i goes directly to field list with field groups on left pane
    Please provide solution for this.
    Thanks&Regards,
    narasimha

    Hello narasimha,
    In the Infoset when you create the additional field, enter an existing SAP table field that has type CURR in the parameter labeled LIKE Reference.  For example you can enter BSAK-DMBTR as a value. When you select the additional field in the query, the currency will also show.
    Kind Regards,
    Rae Ellen Woytowiez
    Edited by: Rae Ellen Woytowiez on Apr 25, 2011 11:27 PM

  • Webi report part(include Opendoc Link) ondesktop did not work in BI Widgets

    My customer followed <BI Widgets User Guide>(XI3.1) to create a webi report part(include Opendoc Link) onto desktop.
    Page 26:
    To convert Report Part into a Widget ,drag and drop the Report Part from the Web Intelligence Viewer onto the desktop.
    As a widget, the Report Part will include the following BI Widgets features:
    - Automatic refresh
    - User controlled size and positioning
    - Saved display and data context state
    - Optional setting as the top application window
    - Full XI R3 security
    - Web Intelligence opendoc links to detailed reports.
    But it can not be clicked(hyperlink did not work).
    My customer follow the SAP Note 1244968 to create again, it still can not be clicked.
    For I can't reproduce this issue, could you tell me what's it probably related to?
    SAP Note 1244968:
    Symptom
    Trying to use Hyperlinks in a BI Widget created from a WebIntelligence
    report
    Environment
    XIR3
    Workflow
    1. Login in Webintelligence
    2. Create on efashion a Webintelligence report with the
    objects:Year,Sales Revenue
    3. In the Edit panel add a column to the table and insert the
    variable :=If([State]="DC"; HTMLEncode("http://uk.yahoo.com"); "")
    4. In the Properties Display/Display/Read cell content as Hyperlink
    5. Run the report and save it
    6. Open the Webintelligence report with HTML view and click on the
    hyperlink you are redirected to the Yahoo website
    7. Log in BI Widget
    8. Right click on the right inside icon of BI Widget and click on
    Document List Explorer
    9. Find the Webintelligence report and double click on it
    10. Click on the table and drag and drop it to your desktop
    11. The BI Widget gets created
    12. Click on the column containing the Hyperlink:nothing happens.
    Cause
    There is no functionality of using Hyperlinks in a BI Widget created
    from a Webintelligence report
    Resolution
    Enhancement Request ADAPT01119581 has been created
    Environment details:
    Srerver Environment: OS Version: RedHatEnterpriseLinuxES4.0 update5
    Client Environment: OS Version: WindowsXP
    Browser: IE6
    JRE Version: 1.6.003_
    Web & Application Server: Tomcat 5.5.20
    Database character: AL32UTF8, JA16SJIS
    Connection: native, ODBC, OLEDB
    NLS LANG: Japanese Japan.JA16SJIS

    Hi Soniya,
    These are the steps:
    1. Log in into infoview
    2. Change the preferences (Click in the Preference button in the main tool bar), in the WebIntelligence section change the Select a default view format: to Interactive.
    3. Click OK
    4. Open the report where you want to add the hyperlink
    5. Right click in the column or cell to add the hyperlink
    6. Click Hypelink > New
    7. You will see the Create Hypelink window, click Browse the select which report do you want to link
    8. Fill in the parameter, prompts, etc.
    and that's it, hope it's clear now. If you have any question let me know.

Maybe you are looking for

  • Dynamic table in Webdynpro Java

    Hi Colleagues, I need to develop a table dynamically in webdynpro(Java), the table should not contain scrollbar, header, lines and border...Actual requirement is to group 12 elements in the from of a table could anyone please help me here? Thanks & R

  • Blocking spam from a comment-section

    I want to include something in my code to avoid spam in my sql-driven comments-section of my website. I posted this already in another thread but since it was marked as solved, nobody responded to my question. I tried to use the following method sugg

  • Find multiple tags in PE 4.0

    I am using Photoshop Elements 4.0 in Windows XP pro to organize a large collection of photos. It's working great, with one exception. I have tagged all 3000+ photos by location, event, people present and a couple of other classes of tags. I am trying

  • Microsoft Office - Student & Teacher Edition - Limit to number of Installs?

    The Student and Teacher Edition of Microsoft Office Mac 2004 for Mac says "Includes 3 Installs" on the box and includes 3 different software keys. Does that mean that each key can only be used once? For example, if I wipe my hard drive clean and rein

  • Create multi IDOCs from one message

    Hello , I receive one XMl message and I want to split it in several IDOCs. <ORDERS> <PO>1<PO/><POdata>........<> <PO>2<PO/>.... </ORDERS> to <ORDERS>   <IDOC>     ...for PO 1 <ORDERS> <ORDERS>   <IDOC>     ...for PO 2 <ORDERS> I think, I read a threa