Skip to end of metadata
Go to start of metadata

Introduction

The extended program check performs a complete check that includes the interfaces of external procedures called from your program, for example, checking whether the number and type of the interface parameters in an external procedure call is correct.
The extended program check is also only a static check. It cannot eliminate all of the circumstances that could lead to exception situations or runtime errors. For example, any statements in which you specify arguments dynamically as the contents of fields, or in which you call procedures dynamically, cannot be checked statically. To start the extended program check -

  • Go to transaction SLIN, specify the program name and click on .
  • Select the relevant program in the object list and choose Check -> Extended Program Check from the Program menu.

It is important to check all boxes (F6) to verify all possible problems, then choose run (F8).

It will appear to you a screen like this:

Errors numbers are in red, warnings in yellow and messages in blue.

Pay attention to Errors, because there will be potential dump errors. Examples: comparing fields with different type, number of with parameters in a message, obligatory FM parameters not filled or with wrong type.

Warnings and messages are important too, but in minor impact, does not affect the performance at all. Example: variables declared but not used, text pool not created.

Do you think that you are an exceptional programmer? This screen can be revealing...  When we are writing code, is normal to forget some things, like to declare variables and use it, test and remove the code but forget to remove the declaration...

Some topics and what they do

  1. Test enviroment - verify if the program is active. The Extended Check verify only active programs. 
  2. Call Function interfaces - verify if the parameters' type is correct, the using of exceptions.
  3. Obsolete statements - Verify obsolete statements...
  4. Character strings - Verify if the used text pool was created
  5. Problematic Semantics - It shows to you better codes, like "WRITE TO can be replaced by more efficient MOVE TO"
  6. Syntax check warnings - Pay attention to use conversion functions to compare fields. Or it will be listed in syntax check warnings' topic... and select statements are verified too.
  7. Message - verify the number of with fields of message number

How to correct the errors/warnings/messages

Double click in the topic error, and you will see the full description:

In this example, the form f_validade  was declared but not called in the program. Sometimes, in interface programs (BAPIs for example) you need to create forms that the BAPI will call it. This error message will appear, but you will not need to correct it, of course.

Double click in the message and you will be redirected to the code. Then, do the needed changes, active your program and do the Extended Check again!
 

Important:

Remember to test your program when you finish the extended check.

Tip: If your program has a message error that you cant remove, use the "#EC NEEDED to hide the display, and insert a comment in your code to identify why you are using it.