在 ABAP 中不使用 FM,使用 Class 及其在 SE11 中的方法來檢查表是否存在
不使用函式模組執行此操作時,可以使用以下類:“cl_rebf_ddic_tabl”。請注意,類方法與函式模組幾乎類似。它們被定義為用於執行特定功能的程式碼塊。
示例
嘗試使用以下程式碼:
CALL METHOD cl_rebf_ddic_tabl=>exists EXPORTING id_name = [table name] id_tabclass = 'TRANSP' " For table * if_noview = ABAP_FALSE receiving rf_exists = yes
.
如果表在事務 SE11 中存在,將返回“X”。
CALL METHOD CL_REBF_DDIC_TABL=>methodname EXPORTING/IMPORTING GET_TEXTTAB - Supplies the Corresponding Text Table GET_COMPLETE - Supplies All Technical Information GET_DETAIL_X - Supplies Extended Header Data GET_FIELD_LIST - Supplies the Field List GET_FIELD_LIST_X - Supplies the Field List with Additional Data GET_RUSER - Supplies Author/Date/Time of Last Change COMPARE_WITH_DATA - Detail Comparison PUT_COMPLETE - Creates a New Table/Structure SPLIT_FIELDNAMES - Generates Field List According to List EXISTS - Table/Structure Available? EXISTS_FIELD - Field Available in Table/Structure? EXISTS_INDEX_FOR_FIELDS - Field Available in Table Index?
下表為您更深入瞭解此方法來獲取資訊提供了思路

廣告
資料結構
網路
RDBMS
作業系統
Java
iOS
HTML
CSS
Android
Python
C 程式設計
C++
C#
MongoDB
MySQL
Javascript
PHP