Skip to Content

     There has always been requirement wherein webi reports in BO are scheduled to run periodically for dynamic prompt values.

For e.g. We have reports which are scheduled to run monthly with cal.year month input as last month.

(P.S.  This document considers only universe based on bex queries for using this method.)

This obviously is easily achieved by using customer exit variables in BI. However, the only issue in using such variables is that there is no prompt for such variables in BO reports. Due to which such reports can by default be executed only for the values that are passed in the variables from the exit.

      But, many a time we have requirements wherein we want a report to by default get executed for the dynamic value passed through the variable when it is scheduled on periodic basis and also have a prompt option so that user can execute it for any value he/she requires. Since, there is no such option in BO ( as of now atleast ) to have a prompt with default values, and after looking out for a work around everywhere and failing to find any thing which could suffice such a requirement, I have found a work around which has helped to overcome this difficulty.

    

       To explain the method used, I would take a simple scenario where every month a BO report which is based on a bex query is scheduled to execute for last month i.e. Cal.year month(0calmonth) is the input for the query and the report should get executed by default for last month.

The idea is, whenever  ‘# ‘(not assigned ) value is passed to the query, the query would by default pick last month as value for the 0calmonth characteristic. However, if there is any other value passed as input other than  ” #” then the input value is to be considered as value for 0calmonth. To achieve this we would require two variables :

1. Manual Input variable (Based on 0Calmonth). 2. Customer exit variable (Based on 0Calmonth).

CV_CMON.jpgCV_MONDEF.png

Here, the manual input variable (i.e. CV_CMON) would contain the value which would be provided as input in the query

and the customer exit variable (i.e. CV_MONDEF) would be filled in exit with the desired value at I_Step = “2” (Call after variable entry ).

Below is the screenshot of the logic used to fill the variable CV_MONDEF.

EXIT.png

Next, while creating the query on which the universe would be built, restrict the 0calmonth characteristic to both the variables.

As shown in below screenshot.

Bexquery.png

On execution of query as shown in below screenshots, if ” #”  value is entered in variable CV_CMON then CV_MONDEF is filled with last month value

whereas if any other value is provided as input then CV_MONDEF is filled with value which is provided as input.

Defl_Input.pngDefl_Op.png

Input.pngOutput.png

So as shown in the screenshots above, based on the input, the variable is restricted to the desired value and hence the desired output is achieved.

Now, using this a publication of the Webi report in BO can be created and scheduled with the Cal.year month as “#”.

Webi.png

So this way the report will be scheduled to run monthly based on the default value of last month and also at the same time

if user wants to change the cal.year month and execute the report the same can be done. Both the things can be achieved with the same webi report.

Hope this helps.

To report this post you need to login first.

15 Comments

You must be Logged on to comment or reply to a post.

  1. ASHUTOSH SINGH

    Hello Sujitha,

    I applied the same logic for my WEBi report. Everything works fine.

    I just have one issue that when we remove ‘#’ from the WEBi prompt screen. How to get it back ?

    Below is the screen with ‘#’ value .

    WEBi.png

    Now i removed the ‘#’ value from the prompt screen.

    WEBi1.png

    ISSUE : how to get the ‘#’ value back for the Fiscal year period ?

    Regards,

    Ashutosh Singh

    (0) 
    1. Sujitha Gowda Post author

      Hi Ashutosh,

      As per my understanding the “#” value should be there in the list of values for the prompt.

      Please check and let me know.

      Regards,

      Sujitha

      (0) 
      1. ASHUTOSH SINGH

        Hey Sujitha,

        Yea even i thought so that i will find it in WEBi prompt. But i couldn’t find. The least value that i could see is “001.2002”.

        I am thinking that this might be a setting issue with FISCPER infoobject.

        I think in the below highlighted portion it should be “values in the master data table”.

        FISCPER.PNG

        Regards,

        Ashutosh Singh

        (0) 
    2. Sateesh Kumar

      HI Ashuthosh,

      If you are using Universe , then extent your fiscal period prompt syntax by adding “free”. With this you can enter values for prompt selection.

      (0) 
        1. Sujitha Gowda Post author

          Hi Ashutosh,

          Yes, I suppose since in your infoprovider there is no # value for the characteristic that is why it is not appearing, so you would have to change the setting.

          Regards,

          Sujitha

          (0) 
  2. Vinitha Sajesh

    Hi Sujitha,

    We have a similar requirement in our BO reports, where both default value along with prompt is required.

    we are trying to follow the same here, but facing difficulty in coding part. Will it be posiible to post/ send the full code used for the user variable.

    vivija.cet@gmail.com

    Vinitha.

    (0) 
  3. chris lynn

    Is it possible to schedule a Webi report based on another input, i.e. expose a time in which a process was finished (this can be obtained via a SQL call, etc). The issue is that if a user schedules a report for 9PM but a process to move data, etc has not completed then that forces them to keep re-freshing the report hoping that the process is complete. Thank you.

    (0) 
  4. Oscar Olivares Pous

    Hi Sujitha,

    Why you say “Since, there is no such option in BO (as of now at least ) to have a prompt with default values” ?

    Is it possible to do the same on the publications without create a BW variable on new version? Can you explain me that? I expected on 4.1 be able to create a variable in BO to do exactly what you are exposing and seems to be wrong. See my discussion.

    Thank you

    (0) 
  5. Karthik K

    HI,

    As per the above document i gone thru.I am creating WEBI reports on BICS connectivity But the same is not working when Report runs on any of the particular date.in Webi it is not allowing me to choose ‘#’ value where as it is applicable for Calyear & Month.In this case we gone through a constant date ‘01.01.1990’ if the condition works it will execute the code and will bring the current date data.if user wants to run for any of the history data he can run.

    (Consider the comments just as addins )

    Thank you.

    (0) 
  6. Rahul P

    Hi,

    I have same requirement to calculate Prior Day using 0CALDAY which is in InfoProvider.

    Here user don’t enter any value but we have to calculate prior day value for the respective 0CALDAY value for all the days dynamically and use it for restricting to calculate Qty Prior Day column in report.

    Can you please help to write code, please find the sample code below?

    Example code:

    when ‘ZVAR_PDAY’.

    IF I_STEP = 2.

    READ TABLE I_T_VAR_RANGE INTO LOC_VAR_RANGE
    WITH KEY VNAM = ‘ZVAR_PDAY’
    IOBJNM
    = ‘0CALDAY’.

    IF SYSUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *
    Clear l_s_rangelow.
    ELSE.

    PRIOR_DAY = LOC_VAR_RANGELOW.
    ENDIF.

    l_s_rangelow = PRIOR_DAY.
    l_s_range
    sign = ‘I’.
    l_s_range
    opt = ‘EQ’.

    APPEND L_S_RANGE TO E_T_RANGE.

    ENDIF.


    Thanks,

    Rahul

    (0) 
  7. Uladzislau Pralat

    Hi Sujitha,

    I would simplify your logic eliminating #.

    If report is run online and user populates External Month variable then its value is copied to Internal Month variable

    Elseif report is scheduled or online user did not populate External Month variable, then Internal Month variable is set to whatever default value should be.

     

    Regards, Uladzislau

    (0) 

Leave a Reply