Skip to Content
6

​System-wide de-activation of certain SLIN / Syntax-Check warnings?

Jan 12, 2017 at 09:23 AM

3.9k

avatar image

When I'm doing development for S/4HANA I sometimes get the Syntax-Check-warning / SLIN-Error about "the database feature "TABLE_LEN_MAX1" is used here (read the long text)".

I get that it's about this: HANA tables can have a lot of columns, while old databases might have restrictions (like only 255 columns are ok, or something).

So it's ok to have this warning/error active by default.

However, I have this specific situation:

I'm doing S/4HANA-Development; this code will only ever run on S/4HANA; S/4HANA only runs an HANA

-> so there is no danger that it will ever run on another DB.

--> That is why I would like to have this check turned off completely in my development System.

(And: I do NOT want to write ##DB_FEATURE_MODE[TABLE_LEN_MAX1]. on every line of code, to avoid the warning!)

How do I do that?

Thanks

Joachim

10 |10000 characters needed characters left characters exceeded

...I now opened an Incident for this annoing issue (132942 / 2017 in case someone has the authorisation and the interst to look at it).

0

"I do NOT want to write ##DB_FEATURE_MODE[TABLE_LEN_MAX1]. on every line of code, to avoid the warning!"

Why?

That's what pragmas are made for.

0
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Horst Keller
Apr 15, 2017 at 10:56 AM
2

As far as I know, you cannot switch off syntax check warnings and this is one of those that we raise with good reason. You have to use the pragma to show that you recognize that you are using platform dependent features. In your case your'e sure that you never will port to another platform. Fine, document it with a pragma.

Remember the sh..storm we had because of CDS views with parameters that were available on some platforms only in the beginning. There we had such warnings too and that was good, because people ignoring the warning couldn't blame SAP if they wrote code that could not be ported to any platform.

PS: Also see the last note under https://help.sap.com/http.svc/rc/abapdocu_751_index_htm/7.51/en-US/index.htm?file=abenddic_database_tables_techstruc.htm

Share
10 |10000 characters needed characters left characters exceeded
Jerry Wang
Apr 15, 2017 at 10:34 AM
-1

Hello Joachim,

Good to know that you have created one incident for it. Is this syntax check warning message related to CDS view? If so, can you please paste an example of your CDS view's source code, so that we can reproduce it in our system to have a look?

Best regards,

Jerry

Show 2 Share
10 |10000 characters needed characters left characters exceeded

It's documented behavior and has nothing to do with CDS. Use a full text search in the ABAP Docu for TABLE_LEN_MAX1. I'm pretty sure that the incident will be answered like this.

0

Hello Horst,

Thanks a lot for providing your expertise on this topic!

Best regards,

Jerry

0
Peter Inotai Jan 12, 2017 at 09:47 AM
0

Hi Joachim,

I don't think there is a standard option for something like this. :(

The only option I can think of, is to make a copy of standard check class CL_CI_TEST_EXTENDED_CHECK to Z-version and remove this error from the result in the RUN() method. Of course deactivate standard and activate Z in transaction SCI.

Best regards,

Peter

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Peter,

thanks for your feedback. Do I get it right that your suggestion would only eliminate the message from Code Inspector (SCI), but not from the "regular" syntax-check (ctrl+F7 in SE80 / ctrg+F2 in Eclipse).

An besides being possible or not, do you agree it is a valid whish in my situation?

best

Joachim

1
Peter Inotai Jan 18, 2017 at 08:22 AM
0

Hi Joachim,

If you replace the code inspector standard class for extended check, it will be called only in the code inspector and ADT framework, not in other cases (syntax check, SLIN).

As far as I understand you get this warning because you access TABLE_MAX_LEN in CL_ABAP_DBFEATURE. My question is why do you have to access it, when you are sure that you always run your code on HANA, where the length is always ok? Or did I misunderstand it?

Best regards

Peter

Show 6 Share
10 |10000 characters needed characters left characters exceeded

Hi Peter,

this warning happens, when I access e.g. VBAP in a S/4HANA System:

1

Strange. I thought, you use CL_ABAP_DBFEATURE in your code.

For me it looks like a bug. This message doesn't make any sense to me.

Peter

0

OK, I found some info here: https://help.sap.com/abapdocu_750/en/abencl_abap_dbfeatures.htm

"The features TABLE_KEYCNT_MAX1, TABLE_KEYLEN_MAX1, and TABLE_LEN_MAX1 can currently only be used by SAP developers as internal flags for database tables, which indicate the tables potentially exceed globally defined and cross-platform sizes. When a table like this is accessed using Open SQL, a syntax check warning occurs that can be hidden by a pragma. The warning for TABLE_LEN_MAX1 also occurs for views that use a table of this type. In standard SAP systems, these tables are usually delivered within the general limits, but customers and partners can enhance them and exceed these sizes. Tables enhanced like this can only be accessed on database systems that support these expanded limits. Other database systems use a replacement implementation that can be accessed using the class CL_ABAP_DBFEATURES."

So it means if you use a larger table like VBAP, then you have to use this pragma everywhere? For me it would be really annoying :(

Peter

0

"So it means if you use a larger table like VBAP, then you have to use this pragma everywhere? For me it would be really annoying :("

Exactly! That's why I would like to turn this specific check komplette off somhow...

1

It seems even SAP has several sap notes (like 2380116 - Missing pragma ##DB_FEATURE_MODE[TABLE_LEN_MAX1] - FUGR FMGR_RED) to add this pragma :(

Hopefully someone from SAP will provide some info how to deactivate this check.

1

You deactivate the syntax warning with the pragma. That's what pragmas are made for ;-)

The pragma documents that you know that your program might crash on another platform.

1