Skip to Content
author's profile photo Former Member
Former Member

Encrypted Stored Procedures

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Nov 14, 2012 at 04:42 PM

    Hi Claudio Calabresi..

    Not Possible I think...

    Regards

    Kennedy

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 15, 2012 at 10:37 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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

  • Posted on Nov 23, 2012 at 11:39 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.