Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
fschmidt-warema committed Jan 9, 2024
1 parent 48d3adf commit 85a713b
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 15 deletions.
14 changes: 10 additions & 4 deletions src/utils/zcl_oapi_references.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,16 @@ CLASS zcl_oapi_references IMPLEMENTATION.
lt_copy = ms_spec-components-schemas.
CLEAR ms_spec-components-schemas.
WHILE lo_graph->is_empty( ) = abap_false.
lv_name = lo_graph->pop( ).
READ TABLE lt_copy INTO ls_copy WITH KEY name = lv_name.
ASSERT sy-subrc = 0.
INSERT ls_copy INTO ms_spec-components-schemas INDEX 1.
TRY.
lv_name = lo_graph->pop( ).
READ TABLE lt_copy INTO ls_copy WITH KEY name = lv_name.
ASSERT sy-subrc = 0.
INSERT ls_copy INTO ms_spec-components-schemas INDEX 1.
CATCH zcx_oapi_graph_cycle INTO DATA(lo_exc).


ENDTRY.

ENDWHILE.

ENDMETHOD.
Expand Down
42 changes: 32 additions & 10 deletions src/utils/zcx_oapi_graph_cycle.clas.abap
Original file line number Diff line number Diff line change
@@ -1,14 +1,36 @@
class ZCX_OAPI_GRAPH_CYCLE definition
public
final
create public .

public section.
protected section.
private section.
ENDCLASS.
CLASS zcx_oapi_graph_cycle DEFINITION
PUBLIC
INHERITING FROM cx_static_check
FINAL
CREATE PUBLIC .

PUBLIC SECTION.
INTERFACES if_t100_message.
INTERFACES if_t100_dyn_msg.

METHODS constructor
IMPORTING
!cycle_typename TYPE string
!textid LIKE if_t100_message=>t100key OPTIONAL
!previous LIKE previous OPTIONAL .
PROTECTED SECTION.
PRIVATE SECTION.

DATA cycle_typename TYPE string.
ENDCLASS.



CLASS ZCX_OAPI_GRAPH_CYCLE IMPLEMENTATION.
CLASS zcx_oapi_graph_cycle IMPLEMENTATION.
METHOD constructor ##ADT_SUPPRESS_GENERATION.
CALL METHOD super->constructor
EXPORTING
previous = previous.
CLEAR me->textid.
IF textid IS INITIAL.
if_t100_message~t100key = if_t100_message=>default_textid.
ELSE.
if_t100_message~t100key = textid.
ENDIF.
ENDMETHOD.
ENDCLASS.
15 changes: 14 additions & 1 deletion src/utils/zcx_oapi_graph_cycle.clas.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<abapGit version="v1.0.0" serializer="LCL_OBJECT_CLAS" serializer_version="v1.0.0">
<asx:abap version="1.0" xmlns:asx="http://www.sap.com/abapxml"/>
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<VSEOCLASS>
<CLSNAME>ZCX_OAPI_GRAPH_CYCLE</CLSNAME>
<LANGU>D</LANGU>
<DESCRIPT>Cycle Graph Exception</DESCRIPT>
<CATEGORY>40</CATEGORY>
<STATE>1</STATE>
<CLSCCINCL>X</CLSCCINCL>
<FIXPT>X</FIXPT>
<UNICODE>X</UNICODE>
</VSEOCLASS>
</asx:values>
</asx:abap>
</abapGit>

0 comments on commit 85a713b

Please sign in to comment.