Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to identify call to system function through ABAP code

sanjana_lingras
Active Participant
0 Likes
1,737

Hi Experts,

We need quick help. we are building tool for ABAP coding standards and we need to identify a call to system function in custom code and give appropriate error.

Error would be "Call of a System Function: CALL 'cfunc' is only intended for internal usage. Incompatible changes and further development is possible at any time and without warning or notice." 

So is there anyway to identify call to system functions, we are basically trying to find pattern to search in code for system function.

Can we get list of system functions from any table , so that particular list of functions can be searched in program?

Regards,

Sanjana

4 REPLIES 4
Read only

ThangaPrakash
Active Contributor
0 Likes
1,184

Hello Sanjana,

Read the source code using the FM "RPY_PROGRAM_READ " and check in internal table "SOURCE_EXTENDED" for the statement, then raise your message.

Regards,

Thanga

Read only

0 Likes
1,184

Hi Prakash,

We are able to read source code but we need inputs regarding the pattern for system functions or list of system functions which we can search in program.

Any idea from where we ca find available system functions?

Regards,

Sanjana

Read only

Former Member
0 Likes
1,184

Sample report

data    prog type c length 30.

data    itab type table of string.

data:   results type match_result_tab.

prog = 'RSWATCH0'.

read report prog into itab.

find all occurrences of regex 'CALL ''C_'

   in table itab

*  RESPECTING CASE

   results results.

Read only

ThangaPrakash
Active Contributor
0 Likes
1,184

Hello Sanjana,

I could find only below 4 arithmetic operations from the ABAP documentation.

You can also look into the below documentation for further info.

Regards,

Thanga