cancel
Showing results for 
Search instead for 
Did you mean: 

Running User Reports

Former Member
0 Kudos

Hello Everyone

I have a doubt regarding the user created reports.I can create simple reports using Query Generator.What i want is to mimic the report frontend like "Item List" and its report.For that i'm using a user screen to capture all the values and pass it to a query.Now the actual problem starts? How can i show the results of the query in a window similiar to that of Item List report result window.

Hope i'm clear in explaining my problem.

Welcoming any suggestions

Raghu

Edited by: Raghu Ram on Jul 25, 2008 10:49 AM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI Raghu

Sorry wrong post. You want to use the selection window, or a report layout to format?

For layout see the following link, I have described how to create subtotals and totals in a user report like sap does at

[ ]

Regards,

J.

Edited by: Janos Nagy on Jul 25, 2008 11:05 AM

Former Member
0 Kudos

Hi Jan

I want to use selection window and the resultant report window.is there any object exposed for it.Here is what i'm attempting to do.

I have a couple of User Screens.I want to give a report(not print layout) similiar to that of in Purchase Analysis.So for that i have screen designed to act as Selection Window.Based on the selected parameters,i get and pass the values to a query.The result set from this query should be shown in a matrix window.

For more Please goto


Purchase->Purchasing Reports->Purchase Analysis

fill in some values(or not) and when you click ok it shows you a report window filled with values based on your selection.This is what i want to do with User Data.

I sincerely hope i'm clear this time around.

Raghu

PS:I saw your link and mine is more or less equal to her question except that i dont need totals and subtotals ie atleast for now,my aim is to create a report and dispaly as per SAP Reports.

I want to trigger a query to query generator and execute it from my user form

Edited by: Raghu Ram on Jul 25, 2008 1:25 PM

Edited by: Raghu Ram on Jul 25, 2008 1:40 PM

Former Member
0 Kudos

HI,

The solution is not easy but i have at least now understood.

Do the following: it works for 10 parameters

in the module:


Public m_sParamArray(10) As String
Public m_bBockEvent as Boolean

when you press the ok button to fill up the user query fill the m_sParamArray() with the parameters in

the exact sequence of your query in the query manager. You must have to find your menu id in the system info


' ok button pressed
SBO_Application.ActivateMenuItem("YOURMENUIDOFYOURQUERY")

When the query params appear, we fill it out automatically from m_sParamArray, it is in the itemevent of sbo application.


    Private Sub SBO_Application_ItemEvent1(ByVal FormUID As String, ByRef pVal As 
SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent

        If m_bBockEvent Then Exit Sub

        Select Case pVal.FormTypeEx
            Case "4000"
                If (pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_LOAD And pVal.BeforeAction = False) Then
                    Dim otmpform As SAPbouiCOM.Form = SBO_Application.Forms.GetForm(pVal.FormTypeEx, pVal.FormTypeCount)
                    'otmpform.Visible = False
                    For lCounter As Integer = 0 To 10
                        If (m_sParamArray(lCounter) <> "") Then
                            Dim sItemUID As String = CStr(3 + (lCounter * 4))
                            sItemUID = Left("1000000", 7 - Len(sItemUID)) & sItemUID
                            m_bBockEvent = True
                            otmpform.Items.Item(sItemUID).Click(SAPbouiCOM.BoCellClickType.ct_Regular)
                            otmpform.Items.Item(sItemUID).Specific.String = m_sParamArray(lCounter)
                            m_sParamArray(lCounter) = ""
                        Else
                            If (lCounter = 0) Then Exit Select
                        End If
                    Next lCounter
                    otmpform.Items.Item("1").Click()
                    m_bBockEvent = False
                End If
        End Select
    End Sub

This works also for printing....

[ ]

Regards,

J.

Edited by: Janos Nagy on Jul 25, 2008 2:53 PM

Answers (0)