Using User parameters in Query variables
I need to set a Profit Center variable value in a Query based on a User Parameter value (su01 transaction -> Parameters tab). How can I get the values of User parameters in Queries and which Parameter ID should be selected (in su01) for Profit Centers?
Thanks in advance,
the username is hidden in table SYST. So you have to use the following select:
DATA: lh_parva type XUVALUE.
select single PARVA from usr05 into lh_parva
where BNAME = sy-uname
and PARID = 'PRC'.
Parameter ID '/BI0/OABCPRC_TYP' is used for CO-ABC: Business process type, so ID '/BI0/OPROFIT_CTR' would fit to your requirements much better. And of course ID PRC as I've already mentioned.