Hi,
I need to populate a variable with default values based on the username that is executing the report.
The code sample is below and it works perfectly when running the query on RSRT.
However, when running in BEx, the default values are not filled in the variable. What I have found is that when I set the variable to be NOT input ready, then it works, but unfortunately our requirement is to have the variable as input ready.
Has anyone else experienced this before, or have any ideas on how I can solve this?
" CLEAR ZIND.
SELECT * FROM /BIC/PZRCC_AUTH
INTO table it_sender_rec
WHERE OBJVERS = 'A' AND /BIC/ZRCC_AUTH = SY-UNAME.
IF SY-SUBRC EQ 0.
LOOP AT it_sender_rec INTO wa_sender_rec.
SELECT SINGLE /BIC/Z_PKZKS1 "Added sc_wd2
INTO ZIND "Added sc_wd2
FROM /BI0/MCOSTCENTER "Added sc_wd2
WHERE "Added sc_wd2
COSTCENTER = wa_sender_rec-/BIC/ZACTPLAN AND "Added sc_wd2
OBJVERS = 'A'. "Added sc_wd2
IF ZIND NE 'X'. "Added sc_wd2
l_s_range-low = wa_sender_rec-/BIC/ZACTPLAN.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
APPEND L_S_RANGE TO E_T_RANGE.
ELSE. "Added sc_wd2
CONTINUE. "Added sc_wd2
ENDIF.
ENDLOOP. "Added sc_wd2
ENDIF."
Thank you
Werner