on 09-09-2004 1:47 PM
Hi,
In my program I use 'CALL TRANSACTION' statement, and when I run a Code Inspection on it, I got the following message:
<i>CA CL_CI_TEST_CRITICAL_STATEMENTS0002
____________________________________________________
Code Inspector
Critical Statements
Call of Transaction &1
&1 = Name of Transaction
For CALL TRANSACTION there must already be a suitable transaction authorization with the calling transaction.
Message can be hidden using pseudo-comment "#EC CI_CALLTA
</i>
Even if I check the authorization before I still get the same message.
I do know that with pseudo-comment I can hide this message, but it's not the way I'm looking for.
Can it be the problem that it's a 46C version of Code Inspector?
What is the correct way of calling transaction?
Thanks in advance,
Peter Inotai
My relevant code fragmant:
...
*-----> Vendor - XK03
ELSEIF gwa_alvouttab-objectclas = c_objectclas_vend.
CALL FUNCTION 'AUTHORITY_CHECK_TCODE'
EXPORTING
tcode = 'XK03'
EXCEPTIONS
ok = 1
not_ok = 2
OTHERS = 3.
IF sy-subrc > 1.
* No authorization for transaction &1
MESSAGE i063(vo) WITH 'XK03'.
ELSE.
SET PARAMETER ID 'LIF' FIELD gwa_alvouttab-kunnr .
SET PARAMETER ID 'KDY' FIELD '/130/120/111'. " General data
CALL TRANSACTION 'XK03' AND SKIP FIRST SCREEN."#EC CI_CALLTA
ENDIF.
ENDIF.
...
Hi Peter,
When Using a Call Transaction Method, I think You need to handle certain exceptions like Error MEssages,Mode of Update and so on,Any way am sending you the syntax for calling a Transaction.
CALL TRANSACTION 'LQ02' USING git_bdcdata
OPTIONS FROM git_ctu
MESSAGES INTO git_messtab.
Where the structure git_ctu is of type ctu_params and
git_messtab of type bdcmsgcoll.
Regards,
Rajeev.N
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Peter,
as you already know 'CALL TRANSACTION xxx' does not check permissions and requires a prior call to FuBa 'AUTHORITY_CHECK_TCODE' (as described in the online docu).
For a static check it would be hard to check if this is done. And if one looks at the implementation of the CI test CL_CI_TEST_CRITICAL_STATEMENTS=>Run( ) its easy to discover that the test only scans for the tokens 'CALL TRANSACTION'. So I assume the pseudo comment '"#EC CI_CALLTA' should be used to tag the coding as okay.
Kind Regards
Klaus
Hi Klaus,
Thanks a lot for your help.
I didn't know method CL_CI_TEST_CRITICAL_STATEMENTS=>RUN and all the relevant classes, but it's good to know that the checks are based on these classes.
I'm just wondering pseudo-commets why don't work for the 46C version, however within CL_CI_TEST_CRITICAL_STATEMENTS=>RUN seems to be considered. Probable the answer is in another method.
Regards,
Peter
Hello Peter,
as far as I understand is the pseudo code checking done within the Inform() method. I set a break-point within the case of the Run() method, maybe you can try too.
First the Error description was read from the error code:
read table SCIMESSAGES into SMSG
with table key TEST = P_TEST
CODE = P_CODE.
The SMsg structure contained a component with the pseudo comment. This string was checked against the tokenized source.
Kind Regards
Klaus
Hi Klaus,
Thanks a lot for your help again.
I checked the method INFORM and it always went to 'raise event MESSAGE ...' statement in line 54.
I check in a WAS 6.20 system this method, and I found the following difference:
In line 9
4.6C:
if P_POSITION > 0.
6.20:
if P_POSITION > 0 and P_SUPPRESS is not initial.
I might make difference, but I'm not sure.
I don't think it makes sense to modify this line, it's better for wait to the Upgrade.
When I have time I'll debug these methods, as it's quite interesting to understang on this level that how Code Inspector works.
Regards,
Peter
User | Count |
---|---|
100 | |
11 | |
11 | |
6 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.