cancel
Showing results for 
Search instead for 
Did you mean: 

BW User Exit - Code in function of the query name

Former Member
0 Kudos

Hi,

I would like to create an user exit code which execute a algorithm different in function of the query executed. do you know in which variable is store the technical name of the query.

CASE query

WHEN 'Z_ZAPO_001'.

V1 = 1

WHEN 'Z_ZAPO_002'.

V1 = 2 WHEN '10' OR '11' OR '12'.

ENDCASE.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

the field is

I_S_RKB1D-COMPID

Heike

Former Member
0 Kudos

Hellow. I am maintaining bw user exit for reporting authorization. In debug mode i seen that field I_S_RKB1D-COMPID is emphty. How can i knew the report technical name?

Former Member
0 Kudos

Yaroslav,

I_S_RKB1D-COMPID will never be filled for authorization user-exits (I_STEP = 0). Don't ask my why, I once raised this question to OSS and they replied it was never foreseen to work with authorization user-exits. God knows why, it's very unlogical and it wouldn't cost them a lot of work to get it working...

I could solve this problem by applying a little trick. In our queries we included a user-exit keydate variable. This will push the user-exit first in I_STEP = 1 mode where I_S_RKB1D-COMPID is filled. Then save the query name by exporting it to the ABAP-memory. Afterwards, the user exit with code for I_STEP = 0 will be processed and then you can import the query name from the ABAP memory.

I agree it sounds a little bit tricky but there is no better option I'm affraid.

Answers (0)