cancel
Showing results for 
Search instead for 
Did you mean: 

Failed ATC checks: AMDP and Native SQL

dmitry_sharshatkin
Active Participant
0 Kudos

Hello gurus,

I'm really struggling with ATC checks... I should avoid P1 and P2 messages, but still have several two types of them.

The first one:

Title: CodeProfiler by VF

Message: Unmanaged SQL ...

And it's related to Native SQL (exec sql. endexec. ), which i'm using to create a DB-index on HANA DB.

ATC does not give any hint how to avoid or suppress this message.

The second one:

Title: Low-Perform. Parameter Transfers

Message 1: Parameter contains strings, is passed by VALUE, and is not changed

Message 2: Parameter is an internal table and is passed by VALUE

And it's related to the AMDP method:

class-methods: free_text_search_amdp "#EC CI_VALPAR

importing

value(iv_max_hits) type i "#EC CI_VALPAR

value(iv_where) type string "#EC CI_VALPAR

exporting value(result) type crmt_cmg_guid "#EC CI_VALPAR

raising cx_amdp_error . "#EC CI_VALPAR

In this case ATC says: "The message can be suppressed with pseudo comment "#EC CI_VALPAR". This is what i have tried (as you can see above :-))), but no success.

When i click on the first message it brings me to the line where TMP is filled, when i click on the second one, it navigates me to the line where RESULT is filled. (see the code below).

method free_text_search_amdp

by database procedure

for hdb

language sqlscript

options read-only

using zscmg_free_textv.

TMP = APPLY_FILTER(ZSCMG_FREE_TEXTV, :iv_where );

RESULT = SELECT TOP :IV_MAX_HITS DISTINCT CASE_GUID FROM :TMP;

endmethod.

Please advise, i need to pass the Q-gates somehow...

Thanks, Dima

Accepted Solutions (1)

Accepted Solutions (1)

tudor_teoteoi
Explorer
0 Kudos

If anyone is landing in this thread after many years, you need to place this in the method implementation, after the ENDMETHOD i.e.:

ENDMETHOD. "#EC CI_VALPAR

ATC does give you a hint about this, as trying to display the object brings you into the method implementation, not to its definition, but I too tried to place after the respective parameter in the method declaration first 🙂

Answers (0)