on 11-14-2012 4:25 PM
Hi experts,
how can I read the content of an Encrypted Stored Procedures?
I want to understand what the Sales Analysis standard report does.
I already tried with SQL Server Profiler setting all the TSQL and SP events detail options but I got only queries releted to Blanket Agreement, Activities, UD tables/fields and encripted output as "-- Encrypted text".
Thank you very much.
Claudio Calabresi
hello Claudio,
We do have a custom sales analysis report wherein we are comparing the sales quantities and values for two different periods. Based on the quantities , values and pending sales orders we arrive at profit margin. Plus s a summary we also print year to date growth.
Do let me know if i can help you.
Thanking you
Malhaar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Claudio
You cannot edit or view encrypted stored procedures in Microsoft SQL. There are 12 SP's currently for sales analysis and each one handles a different selection criteria. If you need to know which fields or tables the reports are based on then I can assist you with this.
Are you looking at replicating this report by writing your own custom report? If so I can send you a sample script to help you.
Kind regards
Peter Juby
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Claudio
Just scratching through all my DB's to find all the different types I have written. The most important part of the sales analysis is the base cost and SAP uses the GrossBuyPr for all analysis reports. The second most important is to always include reversal (opposite entries) for example Invoice less Credit Note, Delivery less Return, etc. Let me know if the below helps and if you need help with anything more specific.
Here is an example of a sales rep analysis:
SELECT T1.[SlpName], T0.[DocNum], T0.[DocDate], T0.[DocDueDate], T0.[CardCode], T0.[CardName], T0.[NumAtCard], T0.[DocTotal], T0.[GrosProfit], T2.ItemCode, T2.Dscription, T2.Quantity,
T2.Price AS [Sales Price], T2.GrossBuyPr as [Cost Price], (T2.Price - T2.GrossBuyPr) AS [Gross Profit]
FROM OINV T0 INNER JOIN OSLP T1 ON T0.SlpCode = T1.SlpCode INNER JOIN INV1 T2 ON T0.DocEntry = T2.DocEntry
WHERE T0.[DocType] = 'I' and T0.[DocDate] >= '[%0]' AND T0.[DocDate] <= '[%1]' and T1.[SlpName] = '[%2]'
UNION ALL
SELECT T1.[SlpName], T0.[DocNum], T0.[DocDate], T0.[DocDueDate], T0.[CardCode], T0.[CardName], T0.[NumAtCard], -T0.[DocTotal], -T0.[GrosProfit], T2.ItemCode, T2.Dscription, -T2.Quantity,
T2.Price AS [Sales Price], T2.GrossBuyPr as [Cost Price], (T2.Price - T2.GrossBuyPr) AS [Gross Profit]
FROM ORIN T0 INNER JOIN OSLP T1 ON T0.SlpCode = T1.SlpCode INNER JOIN RIN1 T2 ON T0.DocEntry = T2.DocEntry
WHERE T0.[DocType] = 'I' and T0.[DocDate] >= '[%0]' AND T0.[DocDate] <= '[%1]' and T1.[SlpName] = '[%2]'
Kind regards
Peter Juby
Hi Claudio Calabresi..
Not Possible I think...
Regards
Kennedy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.