cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic input values for a scheduled AO report?

quilton
Explorer
0 Kudos

Hello fellow SAP users,

Someone asked about dynamic input values in a scheduled WEBI report, and someone else replied that it is not possible.

"You cannot currently schedule a report with dynamic values"

https://answers.sap.com/questions/13666964/webi-report-for-dynamic-input-parameter.html

My question is: How about for AO reports?

Is it also correct that we cannot have dynamic input values?

In our case, we have a month and year field.

If possible, we would like to have it set automatically every month based on the calendar or based on some special rules.

Thank you

Quin

View Entire Topic
appel_solar_dk
Active Participant

Hi Quin

Dont trust all you read on the internet 😉

It is possible to schedule in Webi and AFO using dynamic values if you can control the dynamics in the underlying BW query. The trick is to make prompts in your BW query that is filled using a customer exit if it's filled with eg # or another special value (could be "fill me in"). In the abap code you would have something like (copyed from our CMOD) this where we have a variable "I0CALMO7" for 0calmonth that will be filled with current month if its # or 000000

Remark the usage of e_check_again as described here

WHEN 'I0CALMO7'.
IF i_step = 1. " set default value = current month
CLEAR: L_S_RANGE.
ZT_DTH = sy-datum.
L_S_RANGE-LOW = ZT_DTH(6).
L_S_RANGE-SIGN = 'I'. "Include
L_S_RANGE-OPT = 'EQ'. "Equal

APPEND L_S_RANGE TO E_T_RANGE.
e_check_again = 'X'.
endif.
if i_step = 2.
* if original value = # then fill with sy-datum
read table i_t_var_range into loc_var_range with key vnam = 'I0CALMO7'.
if sy-subrc = 0 and ( loc_var_range-low = '#' or loc_var_range-low = '000000' ).
CLEAR: L_S_RANGE.
ZT_DTH = sy-datum.
L_S_RANGE-LOW = ZT_DTH(6).
L_S_RANGE-SIGN = 'I'. "Include
L_S_RANGE-OPT = 'EQ'. "Equal
APPEND L_S_RANGE TO E_T_RANGE.
else.
CLEAR: L_S_RANGE.
L_S_RANGE-LOW = loc_var_range-low.
L_S_RANGE-SIGN = 'I'. "Include
L_S_RANGE-OPT = 'EQ'. "Equal
APPEND L_S_RANGE TO E_T_RANGE.
endif.
endif.

With kind regards

Kristian

quilton
Explorer
0 Kudos

Hello Kristian,

Thank you for your information!

It is very true that we should not trust everything we read on the Internet. After posting the question in the SAP community, I also checked with someone internally. Though they said not possible, they also qualified it by saying that it can be done in the BW queries. I think it is probably the same as you have described. However, only they can make that change.

Best regards!

Quin