Last date of invoice in report

Advertisement
Dear experts,
could you help me with inserting right column" last date of document" in this query?
Thank you in advance,
jonmar7
SELECT DISTINCT T0.[CardCode], T0.[CardName], T2.[SlpName], T4.[ItmsGrpNam], 
(SELECT TOP 1 T1.DocDate AS 'Last DocDate'
FROM OINV T1
ORDER BY T1.DocDate DESC )
, T3.[Discount] FROM [dbo].[OCRD]  T0 INNER JOIN OINV T1 ON T0.CardCode = T1.CardCode INNER JOIN OSLP T2 ON T0.SlpCode = T2.SlpCode INNER JOIN OSPG T3 ON T0.CardCode = T3.CardCode, OITB T4 WHERE T4.[ItmsGrpCod] = T3.[ObjKey] AND T2.[SlpName] =[%0] order by T0.[CardCode], T4.[ItmsGrpNam]
Advertisement

Replay

Hi,
Try:
SELECT T0.CardCode, T0.CardName, T2.SlpName, T4.ItmsGrpNam, MAX(T1.DocDate),T3.Discount
FROM dbo.OCRD T0
INNER JOIN OINV T1 ON T0.CardCode = T1.CardCode
INNER JOIN OSLP T2 ON T0.SlpCode = T2.SlpCode
INNER JOIN OSPG T3 ON T0.CardCode = T3.CardCode
INNER JOIN OITB T4 ON T4.ItmsGrpCod = T3.ObjKey
WHERE T2.SlpName =[%0\]
GROUP BY T0.CardCode, T0.CardName, T2.SlpName, T4.ItmsGrpNam, T3.Discount
order by T0.CardCode, T4.ItmsGrpNam
Thanks,
Gordon

Invoice Print Report Add. Layout needs to be displayed after Last Page

Hi, I am working on Invoice Print Report multiple layout Customization with RDF as Query model and created RTF using BI Publisher DEsktop and have requirement of Repeating Header on all pages, Print Page Total on all pages and Grand Total, Total Paya

How to hide the Last date Update in the Excution of a report

Dear All, When we execute a query in EP, the Out Result will contain the following Options 1) Save As 2) Open 3) Export Excel 4) Information 5 ) Comments 6) Filters 7) Settings 8) Last data update Can anyone plese tell me how to give the authorisatio

Need to convert AP Invoice Aging Report in Excel format

Hi, Need to convert AP Invoice Aging Report in excel format..there was an existing Invoice Aging report in AP and that was in paper format. That we need to convert to rtf template.. There was an other concurrent program called 'Invoice Aging Report (

Last Date on which stock Qty was zero

Dear Gurus, LIS structure S032 can tell us the date of last GR,Cons., Iss. & movement date. is there any field which tell us the last date on which stock qty was zero ? Regards, FRDear Bijay Pradhan, Thank you so much for your response, actualy we ar

What is the formula to bring the current last date from period hierarchy

Hi, Iam working on Hyperion financial Reporting.i have created a grid with 2 dimensions(entity and period).My requirement is that the current last date of the period hierarchy should be displayed automatically in the header when the report is run.wha

How to  obtain last date of accounting period mmyyyy

how to  obtain last date of accounting period mmyyyy. for ex: 31 st is the last date then output should be mm/31/yy.hi use this .... REPORT  ZTESTS. data: date1(4),       date2(2),       date3(2),       date type sy-datum,       output(8). parameters

The last digit of invoice vbeln is getting  truncated  in the file

Hi Experts, I'm facing problem in both quality and production,the last digit of invoice vbeln is getting  truncated  in the file when i do export-> local file ->spread sheet.I'm having an alv report using grid display alv is getting display.when out

Show records corresponding to last date of last 3 months

Experts, I have a list of records in my logical table like this. All I need to do is create an analysis that will show the records corresponding to last date of the last 3 months. Assuming current month is July. The report must show only the highligh

Variable last date of previous month/last date of current month

Hello Experts, I am facing an issue while designing a query. Requirement is like this. Report will be run on monthly basis.so on execution of report, it should prompt for month/year. now on report there are two columns for which I have to get data on

How to get last date of the week

hi, how to get last date of the week like FM WEEK_GET_FIRST_DAY gives the date of the first day of the week i need the date of the last day of the week.. thnxdata : p_week type KWEEK, p_Date type SYDATUM. p_week = <incoming value in week of year> CA

Linking tables for the data coming in KE30 report

Hi Gurus, I am working on a rpeort of KE30. I want to know the linking tables for the data coming in KE30 report please. I found from SDN that CE* tabbles are linking tables. But thery are so many. How would I figure out which table sening data to my

Last Data packet for the data load.

Hi All, How to find the last data packet loaded to target for the data load in SAP BI? In the Table? Thank you, AdhviHi Adhvirao, When u r loading the data from ECC go to monitor ---> details ---> check the data pacaket which are failed double click

HOW DO I SEE THE LAST DATE I BACKED UP ON ICLOUD

How can I see the last date that icloud was backed up?Go to Settings>iCloud>Storage & Backup and look at the very bottom under Back Up Now.Read other 2 answers

Min,Max for a time Range and Sum of Records for the last date/time

Hi All, I have a table with the following structure/data: create table  Events   (                                     [EventID]        int                   NOT NULL,                                     [Title]             nvarchar(200)  NOT NULL,  

Unable to change data source of any report

Hello there, I am using the Crystal Reports Eclipse plugin. I added a datasource to Eclipse 3.3 which connects to a Oracle database using JDBC. Now I want to change the data source of a report. I get a popup window which displays the old data source

Last Date for customer transaction

Is there a SAP field which stores the last date for a customer transaction. Thanks.yes there is a field which stores the last date for a customer transaction Regards PS: Be clear in your question.Read other 2 answers

Writing and including our own customer data source to Crystal Report Design

Hi, I need to create a Crystal Report based on a locally stored XML and schema. I can do this but the issue Iu2019m facing is that some tags used in the schema and the format is not supported by Crystal. So my plan is to write a database driver which

Using Web Service as Data source (Pluggable Data Source) in Oracle Reports

Anyone using Webservice as a pluggable data source in oracle 10g reports.(Report builder version:10.1.2.0.2)? We need to be able to use web service as one of the data source to create reports.Tried the following and ran into issues: Imported the wspd

Data discrepancy between Webi Report and same Query fired on SQL Server 2k5

Hi , We are facing an issue in BO XI R2. We need to run a Webi report in which negative values for forecasting data for year 2011 and 2012 should be displayed. When we are running this report for negative values, we are getting message u2018There is