关于调用C kernel functions

1、检查用户是否有权限从abap里调用C kernel functions
权限对象 S_C_FUNCT.
相关参数说明:
  • PROGRAM: Name of the ABAP/4 program that contains the call. If no program name is specified, the system assumes the current program.
  • ACTIVITY: Access type. The possible values are: CALL: Call C kernel function

 

  • FUNCTION: Name of the C kernel function

示例:
TYPE-POOLS SABC.
CALL FUNCTION 'AUTHORITY_CHECK_C_FUNCTION'
     EXPORTING  PROGRAM          = 'ZCALLTST'
                ACTIVITY         = SABC_ACT_CALL
                FUNCTION         = 'SYSTEM'.
     EXCEPTIONS NO_AUTHORITY     = 1
                ACTIVITY_UNKNOWN = 2.

2、ABAP变量类型和C变量类型对应表

basetype ABAP-Datentyp Typ in C
C c with length specification SAP_CHAR (*) [Length]
C_GENERIC c without length specification SAP_CHAR*
X x with length specification SAP_RAW (*) [Length]
X_GENERIC x without length specification SAP_RAW*
N n with length specification SAP_CHAR (*) [Length]
N_GENERIC n without length specification SAP_CHAR*
P p with lengthening and decimal indication SAP_BCD (*) [Length]
P_GENERIC p without lengthening and decimal indication SAP_BCD*
D d SAP_DATE*
T t SAP_TIME*
I i SAP_INT*
F f SAP_DOUBLE*
STRING string StrRef*
XSTRING xstring StrRef*
INT2 s SAP_SHORT*
INT1 b SAP_INT1*
TABLE all Tabel references TABH_REF*
OBJ_REF all object references ObjRef*
DATA_REF all data references FldRef*
STRUCT all structure types registrierter Typ ctype*
ANY ANY void*
DATA DATA void*
SIMPLE SIMPLE void*
CSEQUENCE CSEQUENCE void*
XSEQUENCE XSEQUENCE void*
NUMERIC NUMERIC void*
CLIKE CLIKE SAP_CHAR*
C_POINTER %_C_POINTER void**

posted on 2007-02-28 14:29  毛小娃  阅读(149)  评论(0编辑  收藏  举报

导航