Purchasing Report into BW help
hi experts,
I have requirement from client to provide the below details in the BW Report.
Quantity (e.g. order, delivered, invoiced) Value of (e.g. order, delivered, invoiced). Beside the Value of the material (Gross Price, PB00) we must also be able to see other conditions as e.g. Freight, FRC1, as is gives us the real cost of the Material.
The main purpose it to be able to see -
- Which material at what quantity have we purchased from which vendor, within a period.
- At which price (cost).
- What is the structure of the prices - gross, freight, duty ect.
can you plz provide me the standard Datasource to extract into BW?
regards
venuscm
as you are not provided with any lay out first prepare a sample report
rows
material
free char
0PLANT
0CALMONTH
0VENDOR
columns
order quantity
delivered quantity
invoiced quantity
order value
delivered value
invoiced value.
show it to your client do changes as he suggests
You are already having almost all the fields ,and these you are getting from transactions.
one more question
where are the conditions maintained? you want the conditions to be displayed beside the value of material or in the separate column?
Similar Messages
-
Purchasing Report Errors - Please Help
Hey everyone!
I am an SAP newb so bear with me please. I am having issues with a the Purchasing report on our system.
The report takes parameters determining the time period for which the report is to be run, ex: from Jan 1 2008 - Aug 1 2008.
The values returned by the report are:
Item code
Vendor
Item Name
Purch Unit
Available units
Units on Order (how many are currently dedicated to an already placed order)
Purchase Factor
Purchase Price
Purchase Currency
Avg Price
Price
Stock Value
MonthToDate Sales (calculates total sales for item within time period)
Average Sales (calculates the average sale for item within time period)
Sales Factor
Month on Order
Month on Stock
The Problems are occuring with: Month to Date Sales and Average Sales. As well as Month on Order and Month on Stock, however these are secondary.
The report in SAP is as follows:
BEGIN
declare @FrmWhs varchar(8),
@ToWhs varchar(8),
@WhsLst varchar(254),
@GroupCode int,
@FrmItm varchar(20),
@ToItm varchar(20),
@MthAgo int,
@GroupName varchar(20),
@HistStart varchar(6),
@HistEnd varchar(6),
@ShowInactive varchar(1)
SELECT @FrmWhs = T0.U_FrmWhs,
@ToWhs = T0.U_ToWhs,
@WhsLst = T0.U_WhsLst,
@GroupCode = T1.ItmsGrpCod,
@FrmItm = T0.U_FrmItm,
@ToItm = T0.U_ToItm,
@MthAgo = T0.U_MthAgo,
@HistStart = T0.U_Hist1,
@HistEnd = T0.U_Hist2,
@ShowInactive = T0.U_Inact
FROM dbo.@XXPURCH T0, dbo.OITB T1
WHERE T0.U_FrmWhs = '%0'
AND T0.U_ToWhs = '%1'
AND T0.U_WhsLst = '%2'
AND T1.ItmsGrpNam = '%3'
AND T1.Locked = 'X'
AND T0.U_FrmItm = '%4'
AND T0.U_ToItm = '%5'
AND T0.U_MthAgo = %6
AND T0.U_Hist1 = '%7'
AND T0.U_Hist2 = '%8'
AND T0.U_Inact = '%9'
SET @GroupName = '%3'
IF @GroupName = ''
SET @GroupCode = 0
ELSE
SELECT @GroupCode = T2.ItmsGrpCod
FROM dbo.OITB T2
WHERE T2.ItmsGrpNam = @GroupName
SET @FrmWhs = '%0'
SET @ToWhs = '%1'
SET @WhsLst = '%2'
SET @FrmItm = '%4'
SET @ToItm = '%5'
SET @MthAgo = %6
SET @HistStart = '%7'
SET @HistEnd = '%8'
SET @ShowInactive = '%9'
exec dbo.xxPurchReport @FrmWhs,@ToWhs,@WhsLst,@GroupCode,@FrmItm,@ToItm,@MthAgo,@HistStart,@HistEnd,@ShowInactive
I do not fully understand how the SQL query (the stored procedure) dbo.xxPurchasing Report calculates these numbers. If it is helpful, I could post the SQL query in its entirety or in part.
Thank you very much for your willingness to help. It is quite frustrating for me and it is so great to have knowledgeable people here to help
-HarrisonThanks. That makes sense.
I am not a database guy, but from my limited knowledge, so here is the query in its entirety:
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
ALTER proc xxPurchReport (
@FromWhs varchar(8) = null,
@ToWhs varchar(8) = null,
@WhsList varchar(255) = null,
@GroupCode int = null,
@FromItem varchar(20) = null,
@ToItem varchar(20) = null,
@MonthsAgo int = 1,
@HistStart varchar(6) = null,
@HistEnd varchar(6) = null,
@ShowInactive char(1) = 'Y')
AS
begin
set NOCOUNT ON
DECLARE @StartDate datetime,
@EndDate datetime,
@Today datetime,
@Periods int
CREATE TABLE #tempwhs(WhsCode varchar(8))
if @WhsList is null or LTRIM(RTRIM(@WhsList)) = ''
BEGIN
if @FromWhs is null
set @FromWhs = ''
if @ToWhs is null or LTRIM(RTRIM(@ToWhs)) = ''
set @ToWhs = 'ZZZZZZZZ'
insert into #tempwhs
select WhsCode
from OWHS
where WhsCode between @FromWhs and @ToWhs
END
ELSE
BEGIN
set @WhsList = ',' + @WhsList + ','
insert into #tempwhs
select WhsCode
from OWHS
where charindex(',' + WhsCode + ',',@WhsList) > 0
END
if @GroupCode = 0
set @GroupCode = null
if @FromItem is null
set @FromItem = ''
if @ToItem is null or LTRIM(RTRIM(@ToItem)) = ''
set @ToItem = 'ZZZZZZZZZZZZZZZZZZZZ'
if @MonthsAgo is null
set @MonthsAgo = 0
if @MonthsAgo > 0
set @MonthsAgo = @MonthsAgo * -1
select @StartDate = dateadd(mm,@MonthsAgo,cast(cast(year(getdate()) as varchar(4)) + right(cast(month(getdate()) + 100 as varchar(3)),2) + '01' as datetime)),
@EndDate = dateadd(mi,-1,dateadd(mm,@MonthsAgo,dateadd(mm,1,cast(cast(year(getdate()) as varchar(4)) + right(cast(month(getdate()) + 100 as varchar(3)),2) + '01' as datetime)))),
@Today = cast(convert(varchar(8),getdate(),112) as datetime)
if isnull(@HistStart,'') = '' or isnull(@HistEnd,'') = ''
select @HistEnd = left(convert(varchar(8),@StartDate - 1,112),6),
@HistStart = left(convert(varchar(8),dateadd(yyyy,-1,@StartDate),112),6)
select @Periods = count(distinct period)
from XXSalesHistory
where period between @HistStart and @HistEnd
select itemcode,whscode,cast(round(cast(sum(totsale) as decimal(12,5)) / @Periods,2) as decimal(12,5)) as AvgSale,
cast(round(cast(sum(totqty) as decimal(12,5)) / @Periods,0) as int) as AvgQty
into #tmpavg
from XXSalesHistory
where period between @HistStart and @HistEnd
group by itemcode,whscode
order by 1
Select ItmGrp.ItmsGrpNam,lines.ItemCode,lines.WhsCode,
items.CardCode as DefaultVendor,items.ItemName,
whs.OnHand,items.SalUnitMsr as SaleUnit,items.BuyUnitMsr as PurchUnit,whs.IsCommited,
(whs.OnHand - whs.IsCommited) as Available,whs.OnOrder,items.PurFactor2,
isnull(purprc.Price,0) as PurchasePrice,
isnull(purprc.Currency,'USD') as PurchCurrency,
cast(whs.OnHand / (CASE WHEN items.PurFactor2 = 0 THEN 1 ELSE items.PurFactor2 END) as decimal(16,2)) as CS,
whs.AvgPrice,prc.Price,isnull(prc.Currency,'USD') as Currency,isnull(whs.StockValue,0) as StockValue,
cast(sum(case lines.usebaseun
when 'Y' then Lines.OpenCreQty
else ( Lines.OpenCreQty * Items.NumInSale) end) as integer) as MtdSales,
isnull(hst.AvgQty,0) as AvgSales,items.SalFactor2
into #temprpt
From OINV Main,
INV1 Lines,
OITM Items,
OITB ItmGrp,
OITW whs
left outer join #tmpavg hst
on hst.ItemCode = whs.ItemCode and hst.WhsCode = whs.WhsCode,
ITM1 prc,
ITM1 purprc
Where Main.DocDate between @StartDate and @EndDate
And Main.Instance = 0
And Main.Canceled = 'N'
and Main.DocEntry = Lines.DocEntry and lines.LineTotal <> 0
and lines.ItemCode between @FromItem and @ToItem
and lines.whscode collate database_default in (select WhsCode from #tempwhs)
and Items.ItemCode = Lines.ItemCode
and items.PrchseItem = 'Y'
and (@ShowInactive = 'Y' or Items.frozenfor = 'N')
and ItmGrp.ItmsGrpCod = Items.ItmsGrpCod
and ItmGrp.ItmsGrpCod = isnull(@GroupCode,ItmGrp.ItmsGrpCod)
and whs.ItemCode = lines.ItemCode and whs.WhsCode = lines.WhsCode
and prc.ItemCode = items.Itemcode
and prc.PriceList = (CASE WHEN whs.whscode = '02' THEN 6 else 2 END)
and purprc.ItemCode = items.Itemcode
and purprc.PriceList = (CASE WHEN whs.whscode = '02' THEN 10 else 1 END)
Group BY
ItmGrp.ItmsGrpNam,lines.ItemCode,lines.WhsCode,
items.CardCode,items.ItemName,
whs.OnHand,items.SalUnitMsr,items.BuyUnitMsr,whs.IsCommited,whs.OnOrder,items.PurFactor2,purprc.Price,isnull(purprc.Currency,'USD'),
cast(whs.OnHand / (CASE WHEN items.PurFactor2 = 0 THEN 1 ELSE items.PurFactor2 END) as decimal(16,2)),
whs.AvgPrice,prc.Price,prc.Currency,isnull(whs.StockValue,0),hst.AvgQty,items.SalFactor2
union
select grp.ItmsGrpNam,itm.ItemCode,whs.WhsCode,itm.CardCode as DefaultVendor,
itm.ItemName,whs.OnHand,itm.SalUnitMsr as SaleUnit,itm.BuyUnitMsr as PurchUnit,
whs.IsCommited,
(whs.OnHand - whs.IsCommited) as Available,whs.OnOrder,itm.PurFactor2,purprc.Price,
isnull(purprc.Currency,'USD') as PurchCurrency,
cast(whs.OnHand / (CASE WHEN itm.PurFactor2 = 0 THEN 1 ELSE itm.PurFactor2 END) as decimal(16,2)) as CS,
whs.AvgPrice,prc.Price,isnull(prc.Currency,'USD') as Currency,isnull(whs.StockValue,0) as StockValue,0,
isnull(hst.AvgQty,0) as AvgSales,itm.SalFactor2
from OITM itm,
OITB grp,
OITW whs
left join(INV1 lines inner join OINV main
on lines.DocEntry = main.DocEntry and lines.LineTotal <> 0
and main.Canceled = 'N' and main.instance = 0
and Main.DocDate Between @StartDate and @EndDate)
on whs.ItemCode = lines.ItemCode and whs.WhsCode = lines.WhsCode
left outer join #tmpavg hst on hst.ItemCode = whs.ItemCode and hst.WhsCode = whs.WhsCode,
ITM1 prc,
ITM1 purprc
where itm.ItemCode between @FromItem and @ToItem
and itm.PrchseItem = 'Y'
and (@ShowInactive = 'Y' or itm.frozenfor = 'N')
and grp.ItmsGrpCod = itm.ItmsGrpCod
and grp.ItmsGrpCod = isnull(@GroupCode,grp.ItmsGrpCod)
and whs.ItemCode = itm.ItemCode
and whs.WhsCode collate database_default in (select WhsCode from #tempwhs)
and main.DocEntry is null
and prc.ItemCode = itm.Itemcode
and prc.PriceList = (CASE WHEN whs.whscode = '02' THEN 6 else 2 END)
and purprc.ItemCode = itm.Itemcode
and purprc.PriceList = (CASE WHEN whs.whscode = '02' THEN 10 else 1 END)
group by grp.ItmsGrpNam,itm.ItemCode,whs.WhsCode,itm.CardCode,
itm.ItemName,whs.OnHand,itm.SalUnitMsr,itm.BuyUnitMsr,whs.IsCommited,whs.OnOrder,itm.PurFactor2,itm.LastPurPrc,purprc.Price,purprc.Currency,
cast(whs.OnHand / (CASE WHEN itm.PurFactor2 = 0 THEN 1 ELSE itm.PurFactor2 END) as decimal(16,2)),
whs.AvgPrice,prc.Price,prc.Currency,isnull(whs.StockValue,0),hst.AvgQty,itm.SalFactor2
select r.*,
cast((CASE WHEN r.OnOrder = 0
THEN 0
ELSE (CASE WHEN r.AvgSales = 0
THEN (CASE WHEN r.MtdSales = 0 THEN 999 ELSE r.OnOrder / r.MtdSales END)
ELSE r.OnOrder / r.AvgSales
END)
END) as decimal(9,1)) as MonthsOnOrder,
cast((CASE WHEN r.Available <= 0 THEN 0
ELSE (CASE WHEN r.AvgSales <= 0 THEN 999
ELSE r.Available / r.AvgSales END) END) as decimal(9,1)) as MonthsInStock
from #temprpt r
order by 1,2,3
end
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
I hope that is not too overwhelming, it is for me so any help you have to offer is truly appreciated. I am not trained in SAP but they have no one else. Thanks alot everyone! -
Running Discoverer reports into portal using SSO portal login - help
Hi,
I am trying to run disco reports into oracle portal using discoverer portlet providers -list of worksheet. What I want to achieve is as follows
1) login to portal using SSO userid /pwd - Done
2) Enable discoverer for SSO - Done
*3) Use discoverer list of worksheets to show reports into portal but want to filter the list of worksheet to currently logged in portal user. This so that users looged in only sees the reports to which they have access in discoverer - Need Help*
*4) Once user runs this report then I want to filter the discoverer data based on users login or portal group - Help*
Can someone please help with issue no 3/4 urgently.
Mant thanks
GaneshHi Michael,
Assuming I have created the private connections using CAPI I still have my doubts as follows
Do I have to then login as each portal user and add the list of worksheet portlet for each user and selecting
"check the box called Display a different list of worksheets by allowing users to customize database connection and then check Show a default list of worksheets using connection, changing the connection to user's connection."
Considering we have 500+ users this will be huge cumbersom task for me.
Also when I tried to do this before loggin as each portal user when I logged in as second portal user I could see the list of worksheet portalet added by the first user which means I have to edit it but even that was not possible because it would not let me edit as only the page own whi created the portlet was allowed to edit (that is the first user)
OR
Do you have to give portal user permission to edit the page so that they can log on themselve to add the list of worksheet portlet on the page by selecting their private connection and selecting
"check the box called Display a different list of worksheets by allowing users to customize database connection and then check Show a default list of worksheets using connection, changing the connection to user's connection."
Finally I know someone has made it work using URL links and it works as follows
1) Map the portal and disco user into a table
2) Create disco private connections
3) when portal user loggs in and click on "Show my discoverer report" it then runs a PL/SQL package which in turn identifies the private connection details and creates a URL out of it as follows
[http://portal.ccm.ac.uk/discoverer/app/partialConnect?password=IRTIMUDV123_=qplus=VDUMITRI=browser_selected=connect=RELATIONAL=QPRIS=viewer]
clicking on this link open discoverer with private list of workbook/worksheet.
Please advise which way should I follow.
Thanks
Ganesh -
<Moderator Message: Please search the forums as well as the [help|http:help.sap.com]. This question has been asked already a lot of times>
Hi Experts,
Can anyone explain me the steps in creating a Purchase Report in BI 7.x.
I m using the following datasources.
1. 2LIS_02_HDR
2. 2LIS_02_ITM
I am stuck at consolidating the data from difference datasources into a single InfoProvider.
Can anyone explain me the steps involved in BI 7.x for data extraction and consolidating it to a single Infoprovider (Cube/DSO).
Thanks
Kumar
Edited by: Siegfried Szameitat on Jun 24, 2009 12:29 PMHi,
while there is always a new requirement, one needs to discuss with the functional consultants and find out which tables are being used which may fulfill the scenario. We also need to identify the list of characteristic and Keyfigues the client wants to analyze.
Also SAP Help is a good source to find more of a standard stream lined objects. Need to analyze if standard objects satisfy the requirement or customization is required.
Please perform the steps as Rama has suggested...
thank you -
Creation of report with the help of report painter
Dear Experts,
I need report painter material, if any body have pls farward to me.
my intension to create controlling report with the help of report painter.
I am ready to award full points.
Thanks in advance
Regards
avudaiappan
Moderator - Please read this:
/thread/931177 [original link is broken]
Thread lockedHello Chinasammy,
Report Painter allows you to create reports using data from SAP application components, which you can adapt to meet your individual requirements.
Many of your reporting requirements can already be met by using the standard reports provided by various SAP application components. If these SAP standard reports do not meet your reporting needs, Report Painter enables you to define your specific reports quickly and easily.
When executing a Report Painter report, it is displayed by the system in Report Writer format. You thus have access to the same functions as for Report Writer reports defined in the same way, and can combine Report Painter and Report Writer reports together in a report group.
Report Painter uses a graphical report structure, which forms the basis for your report definition and displays the rows and columns as they appear in the final report output.
To facilitate report definition, you can use many of the standard reporting objects provided by SAP (such as libraries, row/column models, and standard layouts) in your own specific reports. When you define a Report Painter report you can use groups (sets). You can also enter characteristic values directly.
Advantages of Report Painter include:
Flexible and simple report definition
Report definition without using sets
Direct layout control: The rows and columns are displayed in the report definition as they appear in the final report output, making test runs unnecessary.
=============================================
Below mentioned is the process for creating reports using Report Painter as a tool.
Selecting and maintaining a library for your report: As the transfer structure to Report Painter you use a report table, which is defaulted by SAP and can not be maintained. This table contains characteristics, key figures and predefined columns. In a library, you collect the characteristics, key figures, and predefined columns from the report table, which you need for your Report Painter reports.
When you define a Report Painter report, you assign it to a library. Reports assigned to one library can only use the characteristics, key figures, and predefined columns selected for that library.
When you create or maintain a library, the Position field determines the sequence in which the characteristics, key figures or (predefined) key figures appear in the Report Painter selection lists when you define a report. This allows you to position the objects that you use regularly in your reports at the beginning of the selection lists. If you do not make an entry in the Position field, you will not be able to use this object in Report Painter reports.
You can use either the standard SAP libraries for your reports or define your own.
(ii) Selecting or maintaining a standard layout for your report: Standard layouts determine report layout features and the format of your report data.If the SAP standard layouts do not meet your reporting requirements, you can create a new standard layout or change an existing one.
(iii) Defining row and column models: A model is a one-dimensional, predefined reporting structure that you can insert in either the rows or columns of your report.If you often use the same or similar row or column definitions in your reports, it is recommended that you create row or column models.
You must define the row and/or column models that you want to include in your report definition before you define the report.
You can also use the standard column models supplied by SAP.
(iv) Defining the report: Defining a Report Painter report involves the following steps.
(a) Define the report columns: You define the report columns using the characteristics, key figures, and predefined columns selected for the library that the report uses. Alternatively, you can use a column model for column definition. Column models are predefined column structures which you insert into your entire column definition, instead of defining each individual column.
(b) Define the report rows: You define the report rows using the characteristics selected for the library selected for the report.
Alternatively, you can use a row model for your row definition. Row models serve the same purpose as column models, but are used to define a report row.
Edit and format the report rows and columns in line with your requirements. (For example, you can hide rows or columns, define the column width or define colors for your report rows).
(iii)Define general data selection criteria for the selection of your report data: Selection criteria are the characteristics used to select data for the entire report. You cannot enter characteristics as data selection criteria if they are already being used in the report rows or columns.
(iv) Assigning the report to a report group: Once you have defined a report, you must assign it to a report group. A report group can contain one or more reports from the same library. However, reports that share the same data will select data more quickly and improve processing time.
Hopw this helps you. Please let me know if you need anything more and assign points.
Rgds
Manish -
Download of a report into the PDF is not giving me all the Columns
Hi all,
I have a report in BI publisher with 10 columns .But when i try to download that report into PDF FORMAT, then i am able to see only 3 columns in a single page but i can see the remaining columsn in next page .
ACTUAL REPORT :
a b c d e f g h i j k l
NAME 1 2 3 4 5 6 7 8 9 0 1 2
So when i download this Report into PDF i am getting like this
page 1 :
a b c
NAME 1 2 3
Page 2 :
d e f
NAME: 4 5 6
page 3:
g h i
NAME: 7 8 9
page 4:
j k l
NAME: 0 1 2
I am getting PDF output like this .
I am supposed to get all these values in a single page right ..
Can any one help me with this.
Edited by: Xavier on Aug 15, 2011 11:35 AM
Edited by: Xavier on Aug 15, 2011 11:40 AMYes, BI Pub,
I am using a pivot table in the RTF Template .So i need to change the table properties in the RTF template RI8
Thanks
Xavier
Edited by: Xavier on Aug 15, 2011 12:58 PM -
How to copy existing query report into new query report in SQ00
Hi Experts,
Hi Experts,
I want to add fields "company code" "'region" to existing query report AQZZ/SAPQUERY/FKF1============
(list of vendor address) for this i done as following:
1.In SQ01 go to "EDIT->other user group" and i selected user group as /SAPQUERY/FK
2.I typed F1 in query field and click change button
3.I clicked next screen button and entered into "change query f1: select fields screen".here i clicked "basic list" button and searched company code checkbox and saved it as result company code is appearing in the standard report"AQZZ/SAPQUERY/FKF1============"
but unfortunately there is no region field(LFA1-REGIO) for this i think i should copy the existing query report into new query report(Ex:Z_LIST_OF_VEND) which should be 14 characters.please tell me briefly how to do this because this is first time i am using SQ00.
one more issue is when i selected "edit-otheruser group" and choosing /SAPQUERY/FK i am getting only infoset "/SAPQUERY/FIKD" but i should need Info set: "/SAPQUERY/FIDD" please tell me how to add the previous one into user group.i think if i got /SAPQUERY/FIDD into usergroup /SAPQUERY/FK i can add region also into Query report as i mentioned above by going SQ01 ...............................
please help regarding this which should be very beneficiary to my carrier.
Regards,
nareshHi Experts ,
I solved issue by changing infoset in SQ02 by means of assigning field to field group and changed the query in SQ00.
Regards,
naresh. -
CR2008 Purchasing Report needed
Hi
Has anyone created a Purchasing report in Crystal Reports 2008 based on AP Invoices and AP Credit Notes. I have created a WPA (Weekly Purchase Analysis) report but based off AP Invoice table (OPCH & PCH1), now the company is wanting to have Credit Notes added to this report.
I have created a UDF called WPA on the OPCH form which is a Mandatory field so when running the WPA Report you can run it by WPA # and Project to get your results (Parameter), now how will I acheive this by adding the AP Credit Note fields ORPC & RPC1 to the report so if I create x2 Invoice's (different suppliers) for say WPA # 1010 and I Credit one, on the WPA Report I will want to see Invoice 1 (NumCard = 1) = R100, Invoice 2 (NumCard = 2) = 100, Credit Note 1 (NumCard = 2) = -100, Total = 100.
Any suggestions or ideas will be most helpful.
Regards
Kurt WaltersHi Kurt,
That is possible using "Shared Variable".
Check this link: [Sub-report data in report|Sub-report data in report].
1.Initialize a shared variable in Report.
2.Pass the Credit memo value to the 'Shared variable' in Sub-report
3.Now create a formula in Report like
Sub-total = {Invoice total} - {SharedVariable}
In order to know more about shared variable, post a separate question in [SAP Crystal Reports Design - Forum|SAP Crystal Reports;.
Hope this helps.
Regards,
Bala -
To convert a crystal report into word(*.doc) format
Dear members,
I have designed and generated a report using crystal as tool,but
i want to convert this report into Microsoft word format(*.doc).
Can anybody please help me in this regard?
Thanks and regards,
Venkatesh.RHi
Simple way is to you use Cristal Reports Designer: you can use CR Report convertion function.
File/Export/Export Report... choose Word Document (rtf) modificable what can be opened with Word and saved how Word Document (.doc).
Other way:
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Dim CrxReport As New CrystalDecisions.CrystalReports.Engine.ReportDocument
CrxReport.ExportToDisk(CrystalDecisions.[Shared].ExportFormatType.RichText, _
"c:\open_me_with_word.rtf")
HTH
Regards
Sierdna S.
Edited by: Sierdna S on Sep 24, 2008 12:49 PM -
How to subscribe the report into one excel multiple sheets in ssrs
Hi Team,
I have a requirement where i pull my report in one excel with multiple sheets,
1.I have a Emp_Report where i could subscribe my report into excel format,but here i want to subscribe this into multiple sheets in one excel form.
2.Is it possible to subscribe the two reports in one excel with mulitiple sheets.i need this also.
please guide me hw we can achive me ,so that i can start working on that .
am using sql server 2008R2 sql server edition.
pls help me out for thisHi Ychinnari,
According to your description, you want to perform subscription for one report or two reports into multiple sheets within a Excel file.
In Reporting Services, when we add a page break within the report, those pages will be exported into separated sheets in Excel.
For first requirement, subscribe one report into multiple sheets in one Excel file. We can add a page break within a group, then the report will display on multiple sheets when subscribe into Excel format.
For second requirement, subscribe one report into multiple sheets in one Excel file. You can add one report as a subreport into the main report, then add pagebreak between main report and subreport.
If you have any question, please feel free to ask.
Best regards,
Qiuyun Yu
Qiuyun Yu
TechNet Community Support -
Error when saving Crystal Report into BOE
Hi there,
I'm having problem on saving rpt (with parameter) into BOE.
My rpt is working fine in Crystal Report 2008.
I've tried to Add Crystal Report using Save As, and returned error:
Error Message: Failed to read data from report file: abc.rpt.
Reason: Failed to read parameter object.
However, it working fine when I add crystal report (no parameter) using Save As.
Would appreciate is there anyone can help on this error.
Many thanks!Hi Yann,
As you have created a dynamic parameter in the Crystal Reports, the error message occurs because the user or group who created the LOV does not have the appropriate rights in Business View Manager.If you have installed Business Objects Enterprise on the same machine, then please try the following workaround:
1. Log on to Business View Manager as administrator.
2. Click View > Repository Explorer.
3. Right-click Dynamic Cascading Prompts. Click Edit Rights.
4. Click the appropriate user or group receiving the error.
5. Click the Granted option for the right to View, Edit & Set Security rights.
6. Click OK. Close Business View Manager.
Now try to save the report into Enterprise and see the results.
Regards
Arun Sasi -
How export report into excel sheet automatically using SSRS 2010?
Hi,
I have created many reports using SQL Server Data Tool 2010 and at my work, we are using active batch to ran reports every month.
Now question is, my boss want me to set up reports such a way that when active batch is ran, reports should be exported into excel sheet automatically with the default values given for parameters at some specific folder location. How can I export report
into excel sheet automatically when active batch is executed?
Please help me on this. Thanks for the help in advance.
VickyCheck this:
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = 'C:/test.xls'
filetype = 'ASC'
write_field_separator = 'X'
TABLES
data_tab = t_output
Regards. -
Hi Experts,
I have written a classical report with write statements and when i am downloading in excel the format is mismatching and now i want to convert into PDF format.
How to convert into PDF format from Classical report ?
YusufHi yusuf,
please find the below report,,
please make two include programs before executing it,
there codes are pasted below,
INCLUDE zimpr_data_declaration.
INCLUDE zimpr_performs_wrap.
REPORT zimpr_word_wrap NO STANDARD PAGE HEADING LINE-SIZE 115..
INCLUDE for DATA DECLARATION *
INCLUDE zimpr_data_declaration.
INCLUDE for all performs. *
INCLUDE zimpr_performs_wrap.
TOP-OF-PAGE--
TOP-OF-PAGE.
PERFORM f_top_page. "TOP OF THE REPORT PAGE,I.E. HEADER.
START-OF-SELECTION.
SET PF-STATUS 'SEL_SCREEN'. "PF-STATUS OF THE SELECTION SCREEN.
PERFORM f_data_retrieval. "PERFORM FOR ALL SELECT STATEMENTS.
PERFORM f_report_display. "REPORT DISPLAY,WRITE STATEMENTS.
--Define the actions to be performed for pf-status-----
AT USER-COMMAND.
wf_ok_code = sy-ucomm.
wf_save_ok = wf_ok_code.
CLEAR wf_ok_code.
CASE wf_save_ok.
WHEN 'PDF'. "WHEN PDF ICON IS CLICKED,REPORT WILL CONVERT INTO PDF.
loc_repid = sy-repid. "PROGRAM NAME
--THIS FM SETS THE PARAMETERS FOR LAYOUT OF PDF OUTPUT--
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
layout = loc_paart "LANDSCAPE LAYOUT
line_size = loc_linsz "CHARACTER WIDTH OF REPORT
no_dialog = 'X'
user = sy-uname "USERNAME
IMPORTING
out_parameters = loc_print_parms "OUTPUT PARAMETERS WILL BE COLLECTED HERE.
valid = loc_valid
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4.
--FOR GENERATING THE SPOOL NUMBER--
NEW-PAGE PRINT ON NO DIALOG PARAMETERS loc_print_parms. " This allocates the spool no
"to the screen without the dialog screen.
PERFORM f_top_page.
PERFORM f_report_display.
NEW-PAGE PRINT OFF. "This marks the end of the screen for which the spool no was generated.
wf_id = sy-spono. " This assign the spool no of the screen to the variable.
--PERFORM FOR GETTING THE PDF OUTPUT--
PERFORM f_pdf_display.
--PERFORM FOR DOWLOADING FILE TO A LOCAL DISK--
PERFORM f_download_local.
WHEN 'BACK'.
LEAVE PROGRAM.
ENDCASE.
include data declaration----
*& Include ZIMPR_DATA_DECLARATION
TYPE-POOLS : shlp.
DATA : wf_ordert TYPE aufk-auart. "ORDER TYPE
DATA : wf_order TYPE aufk-aufnr. "ORDER NUMBER
DATA : wf_bdate TYPE afko-gstrp. "BASIC START DATE
DATA : wf_status(4) TYPE c ."rihea-i_astatin. "STATUS
DATA : wf_objnr TYPE jest-objnr VALUE 'OR%'. "Object number
DATA : wf_aufnr TYPE aufk-aufnr.
DATA : wf_name TYPE thead-tdname. "NAME TO PASS IN FM READ_TEXT
DATA : wf_date1(12) TYPE c. "DATE
DATA : wf_i1(3) TYPE n,wc_i1(3) TYPE n VALUE '1'. "COUNTERS FOR REPORT DISPLAY
DATA : wf_i2(3) TYPE n,wc_i2(3) TYPE n VALUE '1'.
DATA : wf_kopf TYPE tdid VALUE 'KOPF',wf_aufk TYPE tdobject VALUE 'AUFK'.
DATA : wf_save_ok TYPE sy-ucomm ,wf_ok_code TYPE sy-ucomm.
DATA: wf_id TYPE tsp01-rqident , " For storing Spool request number
wf_bytes TYPE i . " For storing the bytes of data to be converted to PDF.
DATA : wf_langu(2) TYPE c VALUE 'EN'.
DATA: wf_pripar TYPE pri_params, " Structure for Passing Print Parameters
wf_rcpar TYPE arc_params. " ImageLink structure
DATA : wf_statu TYPE dfies-fieldname VALUE 'STATUS',
wf_field TYPE help_info-dynprofld VALUE 'S_STATUS'.
&--SELECTION SCREEN--
SELECTION-SCREEN BEGIN OF BLOCK b_1 WITH FRAME TITLE text-000.
SELECTION-SCREEN SKIP 1.
SELECT-OPTIONS: s_ordert FOR wf_ordert . "ORDER TYPE
SELECT-OPTIONS: s_order FOR wf_order OBLIGATORY. "ORDER NUMBER
SELECT-OPTIONS: s_bdate FOR wf_bdate. "BASIC START DATE
SELECT-OPTIONS: s_status FOR wf_status matchcode object zei_sys . "SYSTEM STATUS
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN END OF BLOCK b_1.
*--INTERNAL TABLES--
TYPES : BEGIN OF ty_aufk,
aufnr TYPE aufk-aufnr, "OREDR NUMBER
auart TYPE aufk-auart, "ORDER TYPE
objnr TYPE aufk-objnr, "OBJECT NUMBER
ktext type aufk-ktext, "SHORT TEXT
gstrp TYPE afko-gstrp, "BASIC START DATE
END OF ty_aufk.
TYPES : BEGIN OF ty_tj02t,
objnr TYPE aufk-objnr, "OBJECT NUMBER
txt04 TYPE tj02t-txt04, "STATUS
istat TYPE tj02t-istat, "Object status
spras TYPE tj02t-spras, "LANGUAGE KEY
END OF ty_tj02t.
TYPES : BEGIN OF ty_temp,
objnr TYPE aufk-objnr,
status(300) TYPE c,
END OF ty_temp.
TYPES : BEGIN OF ty_wrap,
line(54) TYPE c, "LONG TEXT
END OF ty_wrap.
TYPES : BEGIN OF ty_wrap2,
line(25) TYPE c, "STATUS
END OF ty_wrap2.
TYPES : BEGIN OF ty_f4,
txt04 TYPE tj02t-txt04,
txt30 TYPE tj02t-txt30,
END OF ty_f4.
types : begin of ty_sta,
istat type tj02t-istat,
objnr type jest-objnr,
end of ty_sta.
data : int_sta type table of ty_sta with header line.
DATA : int_f4 TYPE TABLE OF ty_f4 WITH HEADER LINE.
DATA: int_pdf TYPE TABLE OF tline WITH HEADER LINE. "TABLE FOR PDF CONVERSION
DATA: int_wrap TYPE TABLE OF ty_wrap WITH HEADER LINE. "TABLE FOR LONGTEXT
DATA: int_wrap2 TYPE TABLE OF ty_wrap2 WITH HEADER LINE. "TABLE FOR STATUS
DATA: int_temp TYPE TABLE OF ty_temp WITH HEADER LINE. "Table for concatenation of system status.
DATA: int_aufk TYPE TABLE OF ty_aufk WITH HEADER LINE.
DATA: int_tj02t TYPE TABLE OF ty_tj02t WITH HEADER LINE.
DATA: int_tline TYPE STANDARD TABLE OF tline WITH HEADER LINE. "TABLE FOR READ_TEXT.
DATA : int_fld TYPE TABLE OF dfies ,wa_fld LIKE LINE OF int_fld. " Field Type for FM for F4 help
DATA :int_return TYPE TABLE OF ddshretval WITH HEADER LINE .
DATA:
loc_print_parms LIKE pri_params, "PRINT PARAMETERS
loc_valid(1) TYPE c,
loc_file type SDOK_CHTRD,
loc_bytecount TYPE i, "NUMBER OF BYTES TRANSFERRED
loc_length TYPE i, "LINE-LENGTH
loc_rqident LIKE tsp01-rqident, "SPOOL NUMBER
loc_rq2name(12) TYPE c.
DATA: loc_filename LIKE rlgrap-filename. "FILENAME
DATA:loc_repid LIKE sy-repid, " Report to execute
loc_linsz LIKE sy-linsz VALUE 115, " Line size
loc_paart LIKE sy-paart VALUE 'X_65_132'. " Paper Format
Include ZIMPR_PERFORMS_WRAP----
*& Include ZIMPR_PERFORMS_WRAP
*& Form f_top_page
top-of the page
--> p1 text
<-- p2 text
FORM f_top_page .
*--HEADER--
FORMAT COLOR 1 .
WRITE : text-010.
FORMAT COLOR 1 OFF.
WRITE : / text-011,sy-datum NO-GAP.
WRITE : / text-012,sy-uzeit NO-GAP,90 text-013,101 sy-uname.
ULINE .
FORMAT COLOR 1 INTENSIFIED OFF .
WRITE : 1 sy-vline, "HEADINGS
2 text-014 NO-GAP,
7 sy-vline,
8 text-015 NO-GAP,
20 sy-vline,
21 text-016 NO-GAP,
76 sy-vline,
77 text-017 NO-GAP,
88 sy-vline,
89 text-018 NO-GAP,
115 sy-vline.
WRITE : /1 sy-vline,
2 text-019 NO-GAP,7 sy-vline,
20 sy-vline,76 sy-vline,77 text-020 NO-GAP,88 sy-vline,115 sy-vline.
ULINE.
FORMAT COLOR 1 OFF.
ENDFORM. " f_top_page
*& Form f_data_retrieval
select statements
--> p1 text
<-- p2 text
FORM f_data_retrieval .
SELECTING ORDER TYPE,ORDER NO.,OBJECT NO. AND BASIC START DATE
SELECT p~aufnr
p~auart
p~objnr
p~ktext
r~gstrp
FROM ( aufk AS p INNER JOIN afko AS r ON raufnr = paufnr )
INTO TABLE int_aufk
WHERE p~aufnr IN s_order AND
p~auart IN s_ordert AND
r~gstrp IN s_bdate AND
p~objnr LIKE wf_objnr.
IF sy-subrc <> 0.
MESSAGE s101(zipm). "no values found for selection criteria.
STOP.
ENDIF.
SORT int_aufk BY aufnr.
DELETE ADJACENT DUPLICATES FROM int_aufk.
SELECT q~istat
p~objnr
FROM ( jest AS p INNER JOIN tj02t AS q ON pstat = qistat )
INTO TABLE int_sta
FOR ALL ENTRIES IN int_aufk
WHERE p~objnr = int_aufk-objnr
AND q~txt04 IN s_status and
q~spras = wf_langu and
p~inact = ''.
IF sy-subrc <> 0.
MESSAGE s101(zipm). "no values found for selection criteria.
STOP.
ENDIF.
SORT int_sta BY objnr.
DELETE ADJACENT DUPLICATES FROM int_sta.
*--SELECTING OBJECT NO.,STATUS AND LANGUAGE--
IF int_sta[] IS NOT INITIAL.
SELECT p~objnr
q~txt04
q~istat
q~spras
FROM ( jest AS p INNER JOIN tj02t AS q ON pstat = qistat )
INTO TABLE int_tj02t
FOR ALL ENTRIES IN int_sta
WHERE p~inact = '' AND
p~objnr = int_sta-objnr AND
q~spras = wf_langu AND
q~txt04 IN s_status AND
p~objnr LIKE wf_objnr.
IF sy-subrc <> 0.
MESSAGE s101(zipm). "no values found for selection criteria.
STOP.
ENDIF.
ENDIF.
ENDFORM. " f_data_retrieval
*& Form f_report_display
report display
--> p1 text
<-- p2 text
FORM f_report_display .
LOOP AT int_tj02t. "concatenating the status into a internal table
AT NEW objnr.
CLEAR int_temp-status.
ENDAT.
CONCATENATE int_temp-status int_tj02t-txt04 INTO int_temp-status SEPARATED BY space.
AT END OF objnr.
int_temp-objnr = int_tj02t-objnr. "key field.
APPEND int_temp.
CLEAR int_temp.
ENDAT.
CLEAR int_tj02t.
ENDLOOP.
LOOP AT int_aufk.
CONCATENATE sy-mandt int_aufk-aufnr INTO wf_name . "concatenating client number and order number
*--THIS FM CAPTURES THE LONG TEXT AND STORES IT IN INTERNAL TABLE--
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = wf_kopf "TEXT ID
language = sy-langu "LANGUAGE
name = wf_name "TEXT NAME
object = wf_aufk "TEXT OBJECT
TABLES
lines = int_tline "LINES OF LONG TEXT.
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
IF sy-subrc <> 0.
int_tline-tdline = int_aufk-ktext.
APPEND int_tline.
CLEAR :int_tline.
ENDIF.
LOOP AT int_tline.
*--THIS FM WRAPS THE LONG TEXT INTO 54 CHARACTERS EACH--
CALL FUNCTION 'RKD_WORD_WRAP'
EXPORTING
textline = int_tline-tdline "LONG TEXT LINE
outputlen = 54 "OUTPUT LENGTH
TABLES
out_lines = int_wrap "INTERNAL TABLE
EXCEPTIONS
outputlen_too_large = 1
OTHERS = 2.
IF sy-subrc <> 0.
CLEAR :int_tline.
ENDIF.
ENDLOOP.
*-- THIS FM WRAPS THE STATUS INTO 25 CHARACTERS EACH--
READ TABLE int_temp WITH KEY objnr = int_aufk-objnr.
CALL FUNCTION 'RKD_WORD_WRAP'
EXPORTING
textline = int_temp-status
outputlen = 25
TABLES
out_lines = int_wrap2
EXCEPTIONS
outputlen_too_large = 1
OTHERS = 2.
IF sy-subrc <> 0.
CONTINUE.
ENDIF.
IF NOT int_wrap2[] IS INITIAL.
ULINE AT (115).
ENDIF.
DESCRIBE TABLE int_wrap LINES wf_i2. "COUNTING THE NO. OF LINES FOR TABLE INT_WRAP
DESCRIBE TABLE int_wrap2 LINES wf_i1. "COUNTING THE NO. OF LINES FOR TABLE INT_WRAP2
WHILE ( wc_i1 LE wf_i1 OR wc_i2 LE wf_i2 ).
IF ( wc_i2 LE wf_i2 ).
READ TABLE int_wrap INDEX wc_i2 . "READING THE INTERNAL TABLE INT_WRAP WITH INDEX
wc_i2 = wc_i2 + 1.
ENDIF.
IF ( wc_i1 LE wf_i1 ).
READ TABLE int_wrap2 INDEX wc_i1 . "READING THE INTERNAL TABLE INT_WRAP2 WITH INDEX
wc_i1 = wc_i1 + 1.
ENDIF.
*--THIS FM CONVERTS THE DATE FROM SYSTEM FORMAT TO OUTPUT FORMAT--
CALL FUNCTION 'CONVERSION_EXIT_SDATE_OUTPUT'
EXPORTING
input = int_aufk-gstrp
IMPORTING
output = wf_date1.
IF NOT int_wrap2[] IS INITIAL .
*--REPORT DISPLAY--
WRITE : /1 sy-vline, 2 int_aufk-auart COLOR = 4 INTENSIFIED OFF NO-GAP ,
7 sy-vline ,8 int_aufk-aufnr COLOR = 4 INTENSIFIED OFF NO-GAP,
20 sy-vline,21 int_wrap-line,
76 sy-vline ,77 wf_date1 ,
88 sy-vline ,89 int_wrap2-line,
115 sy-vline.
*--CLEARING THE VARIABLES--
wf_date1 = ''.
CLEAR: int_aufk,int_temp,int_wrap2-line,int_wrap-line.
ENDIF.
ENDWHILE.
wc_i1 = 1.
wc_i2 = 1.
CLEAR :int_wrap,int_wrap2.
REFRESH : int_wrap,int_wrap2,int_tline.
ENDLOOP.
ULINE AT (115).
ENDFORM. " f_report_display
*& Form F_PDF_DISPLAY
pdf conversion
--> p1 text
<-- p2 text
FORM f_pdf_display .
*--THIS FM CONVERTS THE SPOOL REQUEST INTO PDF REPORT--
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = wf_id "SPOOL NUMBER
no_dialog = space
pdf_destination = 'X'
IMPORTING
pdf_bytecount = loc_bytecount "NUMBER OF BYTES TRANSFERRED
TABLES
pdf = int_pdf "TABLE FOR PDF REPORT
EXCEPTIONS
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
OTHERS = 12.
ENDFORM. " F_PDF_DISPLAY
*& Form f_download_local
download to local system
--> p1 text
<-- p2 text
FORM f_download_local .
---------------------THIS FM DOWNLOADS THE PDF REPORT INTO LOCAL MACHINE
data loc_ret TYPE iwerrormsg.
CALL FUNCTION 'IW_C_GET_SAPWORKDIR'
IMPORTING
SAPWORKDIR = loc_file
ERROR_MSG = loc_ret
loc_filename = loc_file.
if loc_ret is initial.
concatenate loc_filename '\work order header long text_ ' sy-timlo '.pdf' into loc_filename.
endif.
CALL FUNCTION 'DOWNLOAD'
EXPORTING
bin_filesize = loc_bytecount "NO. OF BYTES
filename = loc_filename "DEFAULT FILE NAME
filetype = 'BIN'
IMPORTING
act_filename = loc_filename
TABLES
data_tab = int_pdf.
ENDFORM. " f_download_local
if you have any doubts,,
please revert
Regards,
Talwinder -
Hi Gurus,
Is there any std report which will display the values right from PR upto MIRO. In other words i need a purchase register report. Pls help
Thanks & regards
Kumarhi,
As PR is internal document, so its not possible to see from PR..but from PO to IR you can trace...
Check the table EKBE
or
Use the transaction " Aggregate PO history" ME87..
or
Use the PO history tab placed in the PO item details...
Regards
Priyanka.P -
Hi ,
0vtype is used to differentiate a keyfigure with respect to its value type like actual value and planned value.
But what is the use of 0vtype as a filter in Purchasing Reports where there are no planned values and why is it always 10 - does it mean that its always actual value?
Thanks,
JBHi JB,
I think in case of Controlling module, we have to specify 0VTYPE in query level , as in r/3 we define budget, planning figures for a period/fiscal year.
And for purchasing it should be actuals only.
Hope that helps.
Regards
Kapadia
***Assigning points is the way to say thanks in SDN.***
Maybe you are looking for
-
How do I convert a Jpeg file to a PDF file
How do I convert a jpeg file to a pdf file?
-
Inserting a tab delimited file
Hi there, I am inserting data into a database from text files. I can easily do this in sql with csv files but I need to be able to do it with tab delimited files. I know you can do this from the built in Oracle tool (I am using express edition) but I
-
Hi Frnds, I need to write 3 ZBAPIs to list (1)all supply source and their text (2)all vendors and their text,(3)materials and their text by calling some std Fm in the source code. IF you know any STD BAPI/ RFC FM/ FM to get those datails, please pro
-
Problem with radeon driver and Xorg
Hoping someone can help with this problem. I would like to try and use the open source ati driver over the proprietary fglrx driver, however when I use this driver and I try to test my Xorg configuration it enters into X without any problems (mouse c
-
Brush Options in Flash CS3 not showing up
Hello. I'm using Flash CS3 and I'm not able to see all of the options for the Brush tool. I don't have the pressure-sensitive option or the tilt option. Is there something I need to download or click on to get these options? I'm not sure why I don't