Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Queries and Tcode

Former Member
0 Likes
1,063

Hi ,

Query 'X' uses an infoset 'Y' .The report program generated by the query has two Tcodes. I am doing an sy-tcode authorization check in INITIALIZATION of the infoset. How can I cpature the actual Sy-tcode of the report program in the debugging mode? Plz help me with some FM or process which will do this task for me.

Thanks and Regards,

Sinu Mathew.

8 REPLIES 8
Read only

GauthamV
Active Contributor
0 Likes
982

Use this FM.

RSAQ_DECODE_REPORT_NAME.

Read only

Former Member
0 Likes
982

This is to get the generated report name. I already have this in hand. I need to find the TCODE which is running this query.

Read only

matt
Active Contributor
0 Likes
982

What value does sy-tcode have in the debugger and why isn't it useful for your purposes?

matt

Read only

Former Member
0 Likes
982

Sy-tcode is displaying the Infoset transaction code 'SQ02' and not the report tcode.

Regards,

Sinu.

Read only

Former Member
0 Likes
982

I want to perform authorization check on the Tcode.

If the sy-tcode eq 'X1'

perform auth-check for tcode X1.

elseif sy-tcode eq 'X2'

perform auth-check for tcode X2.

endif.

Hope you understood my requirement.

Regards,

Sinu.

Read only

brad_bohn
Active Contributor
0 Likes
982

Hmmmm...if the transaction were defined like a query transaction should be, you should get 'START_REPORT' as the SY-TCODE value, not SQ02. Why does that need to be checked in the infoset? Wouldn't you already have an S_TCODE check performed against the user profile when the user executes the transaction?

Read only

Former Member
0 Likes
982

Report program has two tcodes associated with it, So I need to verify which Tcode is actually executing the query transaction in the infoset.This is how my coding will go in the infoset's Initialization.

*If tcode1 then perform auth_check1.*

*else perform auth_check2.*

Kindly help if you are familiar with these concepts.

Regards,

Sinu.

Read only

matt
Active Contributor
0 Likes
982

Yes, we understand what you are trying to achieve and we are well aware of the concepts involved, but your question doesn't make sense to us. The transaction for running queries is based on START_REPORT not SQ02.

I've a suspicion I've got the solution to your problem, but I'm not going to suggest it until I fully understand why you're talking about SQ02. Sometimes a question needs clarification - simply repeating what you've already posted isn't helping.