在 SAP ABAP 中建立資料庫檢視


在 ABAP 中,你可以使用功能模組 - DDIF_VIEW_PUT 和 DDIF_VIEW_ACTIVATE 啟用檢視。所有表引數都應正確定義,否則會導致建立過程中的錯誤。

DDIF_VIEW_PUT − ABAP 字典中寫入檢視的介面。

你可以訪問以下連結瞭解更多詳情 −

http://www.se80.co.uk/sapfms/d/ddif/ddif_view_put.htm
CALL FUNCTION 'DDIF_VIEW_PUT' "DD: ABAP 字典中寫入檢視的介面
EXPORTING

name = " ddname Name of the view to be written
* dd25v_wa = ' ' " dd25v View header
* dd09l_wa = ' ' " dd09v Technical settings of the view
* TABLES
* dd26v_tab = " dd26v Basis tables of the view
* dd27p_tab = " dd27p View fields
* dd28j_tab = " dd28j Join conditions of the view
* dd28v_tab = " dd28v Selection conditions of the view

EXCEPTIONS
VIEW_NOT_FOUND = 1 " Header of the view could not be found
NAME_INCONSISTENT = 2 " Name in Sources Inconsistent with NAME
VIEW_INCONSISTENT = 3 " Inconsistent Sources
PUT_FAILURE = 4 " Write Error (ROLLBACK Recommended)
PUT_REFUSED = 5 " Write not Allowed

. " DDIF_VIEW_PUT
DDIF_VIEW_ACTIVATE: Interface for activating a view
EXPORTING

name = " ddname Name of view to be activated
* auth_chk = 'X' " ddbool_d 'X': Perform authorization check for DB operations
* prid = -1 " sy-tabix ID for Log Writer
IMPORTING
rc = " sy-subrc Result of Activation
EXCEPTIONS

NOT_FOUND = 1 "View not found
PUT_FAILURE = 2 "View could not be written
. " DDIF_VIEW_ACTIVATE


這兩個檢視都可以用於 T 程式碼:SE80 或 SE37。你可以使用這兩個事務顯示 SAP 系統中可用的 SAP 函式模組文件。


你還可以像下面這樣建立 SAP ABAP 中的交易程式碼 SE11 的檢視

你必須維護並激活檢視。一旦啟用,你就可以像下面所示檢視標準事務程式碼 SE16 的內容 −


更新於:25-Feb-2020

929 瀏覽量

開啟你的職業

完成課程,獲得認證

開始
廣告
© . All rights reserved.