cancel
Showing results for 
Search instead for 
Did you mean: 

Using User parameters in Query variables

Former Member
0 Kudos

Hi Experts,

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,

Dezso

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Dezso,

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.

Regards

Nicola

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Nicola,

Thanks the fast reply

I've found Parameter ID /BI0/OABCPRC_TYP and /BI0/OABCPRC_TYP__. Which is the best for me?

When I do the select in the ABAP code how can I determine the 'username'. Or if I write BNAME = username, will the value of the username contain the name of the user who is running the query?

Thanks and Regards.

Dezso

Former Member
0 Kudos

Hi Dezso,

you could use Parameter-ID 'PRC' in the user settings. To get this entry, create a variable (customer exit) for your query and do a select table USR05 with BNAME = username and PARID = 'PRC' in your variable exit coding.

Hope that helps!

Regards

Nicola