2008 Jan 12 5:56 AM
Dear All,
When i m using call transaction for calling program.
if for that tcode if i don't have authorization then also it is executed.
how to restrict this?
Thanks,
Arpit
2008 Jan 12 6:17 AM
Where is the authorization level described in ur case .
is it done in role assignment using PFCG or under an object of authority-check.
Vijay
2008 Jan 12 6:21 AM
I have make one report for display tcode & description.
and now click on tcode it will call that transaction.
but if i have not authorization then it will be give me message like i have not authorized but it will no give message and execute.
but if try directly means from menu execute that tcode then it give message that
You are not authorized to use transaction .
Thanks,
Arpit
2008 Jan 12 6:27 AM
Hi,
This is an Authorization Issue and this should be sorted out with Basis Person
Also Check the TCDCOUPLES tables in u which put the tcode of the calling program and see wheather the call transaction is mentioned and check for the field "OKFLAG"(Check Indicator for Checking S_TCODE in CALL TRANSACTION) it would be blank that the reason it not checking for the authorization check
2008 Jan 12 6:34 AM
my calling tcode is (zXX - tcode) not in TCDCOUPLES table.
so how to add my tcode in this table.
for which transaction for entry in TCDCOUPLES table.
2008 Jan 12 7:00 AM
Hi,
If you are using it programatically, you can have the addition,
Authority-check .
Syntax
AUTHORITY-CHECK OBJECT auth_obj [FOR USER user]
ID id1 {FIELD val1}|DUMMY
[ID id2 {FIELD val2}|DUMMY]
...
[ID id10 {FIELD val10}|DUMMY].
Addition:
... FOR USER user
Effect
This statement checks whether authorization is entered in the user master record of the current user or the user specified in user for the authorization object entered in the field auth_obj, and whether this authorization is sufficient for the request specified in the statement. A flat character-type field that contains the name of an authorization object is expected for auth_obj. Without the addition FOR USER, the authorization of the current user is checked.
With id1 ... id10, you must have at least one and can have a maximum of 10 authorization fields listed for the authorization object specified. With id1 ... id10, "flat", character-type fields are expected that contain the name of the authorization fields in uppercase letters. If an authorization field is specified that does not appear in the authorization object, no check can be executed and sy-subrc is set to 4. For each specified authorization field, you must specify with FIELD either a value to be checked in a flat, character-type field val1 ... val10 or the addition DUMMY.
The authority check is carried out if the check indicator for the specified authorization object for the current context is set to check with any proposal status. If the check indicator is set to no check, no authority check is carried out and sy-subrc is set to 0, as with a successful check.
The authorization check is successful if one or several authorizations are created for the authorization object in the user master record and if - for at least one of the authorizations - each of the value sets defined there for the authorization fields specified using FIELD includes the value val1 ... val10 to be checked. Authorization fields that are not included in the statement or that have DUMMY specified for them are not checked. If the check is successful, sy-subrc is set to 0. Otherwise, it is set to a value not equal to 0 (see below).
Example
Check as to whether the current user has the authorization required for displaying the airline that he specifies on the selection screen. The used authorization object is called S_CARRID and includes the authorization fields CARRID for the name of an airline and ACTVT for the activity. The abbreviation "03" stands for the "Display" activity and is one of the activities that are assigned to the authorization object S_CARRID.
PARAMETERS carr TYPE spfli-carrid.
AT SELECTION-SCREEN.
AUTHORITY-CHECK OBJECT 'S_CARRID'
ID 'CARRID' FIELD carr
ID 'ACTVT' FIELD '03'.
IF sy-subrc <> 0.
MESSAGE 'No authorization' TYPE 'E'.
ENDIF.
Pls reward points if useful.
Regards,
Renjith Michael.