Pragmas

light111Pragmas/Program Directives


Pragmas can be used to hide program warnings when certain checks  like extended program checks applied to the program/code lines.

The program- ABAP_SLIN_PRAGMAS  lists all the pragmas which are available in the system and when can be applied.

123


Lets check a simple scenario. In a global class method- a variable is just declared but not used then. Then when extended program checks applied on the class, it shows a warning stating that- the variable is not used and also proposes the pragma name which can be used to skip the warning.

4567

Select the highlighted line.

8

The system shows the cause of the warning and also provides suggestion how to deactivate using certain pragma.

9Apply the pragma.

10

Check and now the warning is gone but the tool is smart enough that display the statistics of hidden errors/warnings.

11


 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s