在不使用 ABAP 中 FM 的情况下,使用类及 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?

下表为您提供了更多有关使用此方法获取信息的思路



更新日期: 2019 年 12 月 10 日

491 次浏览

开启您的 职业

通过完成课程获得认证

开始
广告
© . All rights reserved.