Problem We had an problem in one of our assignments to schedule the BOBJ reports with Dynamic Dates.


For example – If the report need to be scheduled daily/weekly/Monthly then we have to change the date parameter of the report accordingly based on the system date..


Solution –

1. We created the Formula variable say TEST_FV as manual Entry in BEx Query.

2. We created the customer exit variable on our date variable say TEST_DATE

3. In the customer exit we then read the Formula variable and apply the below cases:


When  TEST_DATE.
     

        

       
read table i_t_var_range into loc_var_range with
                                  
key vnam =’TEST_FV’.
        

        
case loc_var_rangelow.


          
when 1.    This is for daily scheduling.
             l_date_low
= sydatum 1.
             l_date_high
= sydatum 1.
             l_s_range
opt   = ‘EQ’.


          
when 2.   This is for Weekly Scheduling.


             l_date_low
= sydatum 7.
             l_date_high
= sydatum 1.
             l_s_range
opt   = ‘BT’.


          
when 3.  This is for scheduling the report on Current Month to date


             l_date_low
(6) = sydatum(6).
             l_date_low+6
(2) = ’01’.
             l_date_high
= sydatum 1.
             l_s_range
opt   = ‘BT’.


          
when 4. This is for scheduling the report on previous Month to date


             l_date_low
(6) = sydatum(6).
             l_date_low+6
(2) = ’01’.

             l_date_high = l_date_low 1.
             l_date_low
(6) = l_date_high(6).
             l_date_low+6
(2) = ’01’.
             l_s_range
opt   = ‘BT’\

Append l_s_range into e_t_range.


4.        Go to BI launch Pad

5.         Open the Documents and schedule the respective WeBi report.

6.         Schedule the webi report as normally we do.

7.      But in this case, in the prompt section we have to specify our variants like below:


Capture.JPG



As,we can see in the screenshot, we put 1 in the Input variable for date which is our formula variable TEST_FV. As we set 1, the report will schedule daily based on the system date and give the output accordingly.

This is the logic we built to schedule the BOBJ reports based on the system date.

To report this post you need to login first.

5 Comments

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

  1. Priya K

    Hi Abhimanyu,

       

        Thanks for sharing. Please give me the input for the below scenario.

    I have webi report and data provider is BEX, I have a prompt called fiscal year and this should be inputted by the user while viewing the report. I am planning to schedule this report on monthly basis.

    When its start scheduling Period will be should changed automatically with current period if its having different period. How to achieve this?

    (0) 

Leave a Reply