Skip to content

Commit

Permalink
add trm-rest version if installed
Browse files Browse the repository at this point in the history
  • Loading branch information
simonegaffurini committed Dec 2, 2024
1 parent 8554773 commit 7fc354a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/zif_trm.intf.abap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
INTERFACE zif_trm
PUBLIC .

CONSTANTS version TYPE string VALUE '2.0.0' ##NO_TEXT.
CONSTANTS version TYPE string VALUE '2.0.1' ##NO_TEXT.

ENDINTERFACE.
8 changes: 8 additions & 0 deletions src/ztrm.fugr.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1645,12 +1645,20 @@
<PARAMETER>EV_VERSION</PARAMETER>
<TYP>STRING</TYP>
</RSEXP>
<RSEXP>
<PARAMETER>EV_REST</PARAMETER>
<TYP>STRING</TYP>
</RSEXP>
</EXPORT>
<DOCUMENTATION>
<RSFDO>
<PARAMETER>EV_VERSION</PARAMETER>
<KIND>P</KIND>
</RSFDO>
<RSFDO>
<PARAMETER>EV_REST</PARAMETER>
<KIND>P</KIND>
</RSFDO>
</DOCUMENTATION>
</item>
<item>
Expand Down
9 changes: 8 additions & 1 deletion src/ztrm.fugr.ztrm_version.abap
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
FUNCTION ZTRM_VERSION.
FUNCTION ztrm_version.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" EXPORTING
*" VALUE(EV_VERSION) TYPE STRING
*" VALUE(EV_REST) TYPE STRING
*"----------------------------------------------------------------------
"Avoid raising TRM_RFC_UNAUTHORIZED
"otherwise clients may not be able to find out if this system has
"trm-server installed or not

ev_version = zif_trm=>version.

"read other versions
FIELD-SYMBOLS <fs_rest> TYPE string.
ASSIGN ('ZIF_TRM_REST')=>('VERSION') TO <fs_rest>.
IF <fs_rest> IS ASSIGNED.
ev_rest = <fs_rest>.
ENDIF.

ENDFUNCTION.

0 comments on commit 7fc354a

Please sign in to comment.