cancel
Showing results for 
Search instead for 
Did you mean: 

call a system function

former_member220801
Participant
0 Kudos

The relevant function must exist in the file sapactab.h

I would like to where does this file locate and where can I get the full list of system functions(with description and functionalities, and how to use it)?

Thanks!

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi

sapactab.h is the c fn header that stores information about all the C fns in the SAP system .It is stored in the OS.

I think the BASIS team or the forum for BASIS will give you a deeper idea on where exactly you can search for it.

Regards,

Anjali

Former Member
0 Kudos

Hello,

The file sapactab.h cannot be accessed. It resides on the application server in complied form. Remember all the system functions are written in C / C++ and only their object code is available on the Server. You will not have access to the source code!!

You can write a program to determine all the C-Functions used in your SAP system. But you will not get any documentation about how you could use them.

If this sounds a bit disappointing, I can give you the information about one C-Function -

<i>This is a rather unconventional way to check if a database table contains data.

Normally, we’d issue a SELECT SINGLE statement to see if the table has any data. This requires an access to the Database Server. However, there’s a flag that will be maintained at the application server level for every database table. This flag can be accessed using a C function.</i>

DATA: DBTABNAME LIKE DD02L-TABNAME,
      FLAG.

CALL 'C_DD_CHECK_VAL' ID 'TABNAME' FIELD TABNAME
                      ID 'EX_FLAG' FIELD FLAG.
	
CASE SY-SUBRC.
  when 2.
   " the table doesn't contain data"  
  when 0.
    if flag eq 'X'.
      " the table has data"
    endif.     
  when others.
    " some serious problem"
ENDCASE.

<i>Please note that the above logic only tells you whether the table has data in any client. Even if one client contains the data, the result is positive. If you'd like to check for existence of data in a specific client, you will still have to use the SELECT statement.</i>

Regards,

Anand Mandalika.

former_member220801
Participant
0 Kudos

So I can't even get the list of C-functions available to use?

Former Member
0 Kudos

No, you cannot. But there are hundreds of C-Functions that are used in SAP (especially in the Basis Components). you can write a smart program to figure out where these c-Functions are being used.

Regards,

Anand Mandalika.

former_member220801
Participant
0 Kudos

How can I figure out the C-functions used in SAP?

Any sources for the program you have mentioned?

Thanks!

Former Member
0 Kudos

The program that I'm talking about is not available in SAP. We'll have to write one of our own.