CHECK zcl_cds_view_case_tool=>is_cds_view( <abap_token>-lexem ) = abap_false.
class ZCL_CDS_VIEW_CASE_TOOL definition
public
final
create public .
public section.
class-methods IS_CDS_VIEW
importing
!IV_NAME type ABPTOKEN-LEXEM
returning
value(RV_RESULT) type ABAP_BOOL .
protected section.
private section.
TYPES: BEGIN OF ty_result,
name TYPe ABPTOKEN-LEXEM,
result TYPE ABAP_BOOL,
end of ty_result.
TYPES: tt_result TYPE STANDARD TABLE OF ty_result WITH KEY name.
class-data: mt_result TYPE tt_result.
ENDCLASS.
CLASS ZCL_CDS_VIEW_CASE_TOOL IMPLEMENTATION.
* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Static Public Method ZCL_CDS_VIEW_CASE_TOOL=>IS_CDS_VIEW
* +-------------------------------------------------------------------------------------------------+
* | [--->] IV_NAME TYPE ABPTOKEN-LEXEM
* | [<-()] RV_RESULT TYPE ABAP_BOOL
* +--------------------------------------------------------------------------------------</SIGNATURE>
method IS_CDS_VIEW.
CHECK sy-uname = 'WANGJER'.
READ TABLE mt_result ASSIGNING FIELD-SYMBOL(<result>) WITH KEY name = iv_name.
IF sy-subrc = 0.
rv_result = <result>-result.
RETURN.
ENDIF.
SELECT single obj_name INTO @data(ls) FROM TADIR
WHERE pgmid = 'R3TR' and object = 'DDLS' and obj_name = @iv_name.
data(ls_result) = value ty_result( name = iv_name result = boolc( sy-subrc = 0 ) ).
APPEND ls_result to mt_result.
rv_result = ls_result-result.
endmethod.
ENDCLASS.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
4 | |
4 | |
2 | |
2 | |
2 | |
2 | |
2 | |
2 | |
2 | |
1 |