cancel
Showing results for 
Search instead for 
Did you mean: 

Encrypted Stored Procedures

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member218051
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi Peter,

yes, i'm going to undestand what Sales Analysis Report does and I wish to create a custom report.
I think that the sample script could be useful.

Kind Regards
Claudio

Former Member
0 Kudos

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

KennedyT21
Active Contributor
0 Kudos

Hi Claudio Calabresi..

Not Possible I think...

Regards

Kennedy