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

Reporting Agent Bex WorkBooks


Can we Schedule Bex Workbooks to run and print using Reporting Agent. IF we can please can anyone explain the steps to do it.

Thanks in advance

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Mar 10, 2005 at 02:18 PM

    Hi Siva Didi you get any answer? I've got the same problem ... thank you!

    ciao Paola

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 10, 2005 at 04:13 PM

    Using BW 3.0 B reporting agent you will not be able to schedule the workbooks only templates are possible. You can do this using the BW 3.5 Information Broadcasting Workbook pre-calculation service.

    The attached 3.5 documenatation explains the various steps involved in this.


    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Siva,

      If you ask the question with slightly different words, you will get a different answer.

      You asked if you can print precalculated workbooks using BW 3.0B. The answer from the experts is "no".

      If you ask "can I schedule queries to execute and automatically print results using BW 3.0B?", the answer is "yes". The query executes, not the workbook. I will try to find the exact reference and post it.

      This is standard functionality.

      - Pete

  • Posted on Mar 31, 2005 at 07:52 AM

    Hi Siva,

    of course you need BW 3.5 to use the Broadcaster.

    BUT it is possible to schedule BEx Workbooks in BW3.0.

    The Reporting Agent cannot be used in BW 3.0 to precalculate workbooks. You need to use the scheduler from Windows together with some VB script. It is not perfect but it works. But this way is not supported by SAP and there are slso some conditions.



    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Iaroussi,

      My solution is posted below. I am not including ALL of the code because you might not want it all, so I am including only two part of it:

      1) schedules the time to start the log-in and gets the user's password (note that I store this in system memory so that the userid and password are NOT in the code and cannot be accessed by anyone else)

      2) does the log-in

      Here is the first part:

      Sub ScheduleTasks(myTime As String)

      'ensure that the Analyzer add-in is loaded

      If Not BExIsLoaded Then


      If Not BExIsLoaded Then Exit Sub

      End If

      'get user name

      myName = API_NetUserID 'uses a Win32API call

      'store user name in system memory

      Application.ExecuteExcel4Macro "SET.NAME(""myName"",""" & myName & """)"

      'prompt for BW logon password

      prompt = "Start Key"

      returnVal = InputBox(prompt, Title, "********")

      'store password in system memory

      On Error Resume Next

      Application.ExecuteExcel4Macro "SET.NAME(""Key"",""" & returnVal & """)"

      If Err.Number <> 0 Then

      MsgBox "Response was not valid.", vbCritical, "Start Key Error"

      Exit Sub

      End If

      'depending on which button called this routine, we will

      'initiate logon 10 seconds from now; or, give user opportunity to

      'choose another time

      If myTime = "wait" Then

      'choose another time

      Call ShowFormSelectTime


      'initiate logon 2 seconds from now

      Application.OnTime Now + TimeValue("00:00:02"), "zAAAtestLogIn"

      End If

      End Sub

      Here is the second part:

      Sub zAAALogIn()

      Dim myConnection As Object, ws As Worksheet

      'start log

      lastRow = Range("A65000").End(xlUp).Row


      Set ws = Sheet1

      ws.Range("A" & lastRow + 2) = "I came to life at " & Time

      'read logon values

      myName = Application.ExecuteExcel4Macro("myName")

      myKey = Application.ExecuteExcel4Macro("Key")

      'log in to BW server

      Set myConnection = Run("SAPBEX.XLA!SAPBEXgetConnection")

      With myConnection ' call the connection

      ' Set parameters for logon

      .client = "100"

      .user = myName

      .Password = myKey

      .language = "EN"

      .systemnumber = "0"

      .System = "your system goes here"

      .applicationserver = "your server goes here"

      .usesaplogonini = False 'important for automatic connection

      .Logon 0, True ' This will prevent dialog from appearing

      If .IsConnected <> 1 Then

      'connection failed

      ws.Range("A" & lastRow + 3) = "Connection failed " & Time

      'if we've already tried 10 times, then quit

      If ws.Range("A1") >= 10 Then Exit Sub

      ws.Range("A1") = ws.Range("A1") + 1

      'otherwise, try again in 15 minutes


      'I've commented this out for now ... if user gave wrong

      'password, this would lock them out!!

      ' Application.OnTime Now + TimeValue("00:15:00"), "zAAAtestLogIn"


      Exit Sub


      'use this code to log on manually if automatic logon failed

      'not using this right now

      .Logon 0, False

      If .IsConnected <> 1 Then Exit Sub



      ws.Range("A" & lastRow + 3) = "Initiating connection " & Time

      Application.OnTime Now + TimeValue("00:00:05"), "InitConnection"

      End If

      End With

      Call RoutineThatOpensWorkbooksToBeRefreshed

      End Sub

  • author's profile photo Former Member
    Former Member
    Posted on Mar 31, 2005 at 05:25 PM

    Thanks a lot for sharing your views on this topic guys.we are trying to upgrade our BW to 3.5. hey Kai can you explain me about the functionality you implimented to print the precalcualted workbooks directly. also is it possible to execute the work books in background. waiting for your reply



    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Siva,

      first of all i would like to explain myself. Before i joined Camelot as Senior consultant i was part of the SAP AG BW core Development team. I was responsible for the Workbook precalculation and implemented all required features.

      In General, in SAP BW 3.5 is a Class called cl_rsr_prec_server. This is a instance class which is used to precalculate workbooks. Together with the Consulting Team of SAP we implemented a BSP Application and Server Framework to create complex briefing books, which means you can select a couple of workbooks which should be combined together. You can select Variable Values in one Web Variablescreen for all workbooks. Afterwards you can schedule these settings. Afterwards this will be executed as Batch job, and if selected it can be printed. It is also possible to convert this briefing book to pdf and put it into the favorites.

      SAP Consulting is offering this solution as consulting solution.

      I've implemented a comand framework in the precalculation server which can process a lot of commands(print, save etc.)

      please do not hesitate to contact me if you have further questions.

      best regards,

      Kai wachter

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.