Skip to content

Commit

Permalink
Merge pull request #2 from RegestaItalia/development
Browse files Browse the repository at this point in the history
1.0.1
  • Loading branch information
simonegaffurini authored Nov 16, 2023
2 parents 33648f2 + 1d0bde0 commit 084b5dd
Show file tree
Hide file tree
Showing 11 changed files with 164 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/alignAfterPr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ jobs:
- name: Align after PR
uses: ./actions/regesta/alignAfterPr
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
githubToken: ${{ secrets.CI_GITHUB_TOKEN }}
repoName: ${{ github.event.repository.name }}
mainBranch: ${{ github.ref_name }}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ TRM Server is the essential component for operations between TRM Client and your

Typically, trm-server is used by a TRM Client.

When a TRM Client (like [trm-client](https://github.com/RegestaItalia/trm-client)) has to execute any of the functions of trm-server, it makes use od the [SAP NW RFC SDK](https://support.sap.com/en/product/connectors/nwrfcsdk.html).
When a TRM Client (like [trm-client](https://github.com/RegestaItalia/trm-client)) has to execute any of the functions of trm-server, it makes use of the [SAP NW RFC SDK](https://support.sap.com/en/product/connectors/nwrfcsdk.html).

The SDK connects to the development system, where this package exists, and executes the function.

Expand Down Expand Up @@ -64,4 +64,4 @@ Make sure to open an issue first.

Contributions will be merged upon approval.

[Click here](https://docs.trmregistry.com/#/CONTRIBUTING) for the full list of TRM contribution guidelines.
[Click here](https://docs.trmregistry.com/#/CONTRIBUTING) for the full list of TRM contribution guidelines.
18 changes: 18 additions & 0 deletions docs/rfcFunctions.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ The transport request will be created as a workbench transport (K).

Transport request description.

- IV_TARGET - `TR_TARGET`

Transport system target.

- Exporting
- EV_TRKORR - `TRKORR`

Expand Down Expand Up @@ -321,6 +325,20 @@ This parameter can also be seen in transaction `AL11`.

Binary file to write.

## TRM Package

TRM Package related functions.

### Update integrity

Integrity is used to verify package content.

- Function module `ZTRM_SET_INTEGRITY`
- Importing
- IS_INTEGRITY - **required** - `ZTRM_INTEGRITY`

Package integrity.

## Interfaces

Interfaces are used to modify objects.
Expand Down
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 '1.0.0' ##NO_TEXT.
CONSTANTS version TYPE string VALUE '1.0.1' ##NO_TEXT.

ENDINTERFACE.
34 changes: 34 additions & 0 deletions src/ztrm.fugr.xml
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,10 @@
<PARAMETER>IV_TEXT</PARAMETER>
<TYP>AS4TEXT</TYP>
</RSIMP>
<RSIMP>
<PARAMETER>IV_TARGET</PARAMETER>
<TYP>TR_TARGET</TYP>
</RSIMP>
</IMPORT>
<EXPORT>
<RSEXP>
Expand All @@ -482,6 +486,10 @@
<PARAMETER>IV_TEXT</PARAMETER>
<KIND>P</KIND>
</RSFDO>
<RSFDO>
<PARAMETER>IV_TARGET</PARAMETER>
<KIND>P</KIND>
</RSFDO>
<RSFDO>
<PARAMETER>EV_TRKORR</PARAMETER>
<KIND>P</KIND>
Expand Down Expand Up @@ -1662,6 +1670,32 @@
</RSFDO>
</DOCUMENTATION>
</item>
<item>
<FUNCNAME>ZTRM_SET_INTEGRITY</FUNCNAME>
<REMOTE_CALL>R</REMOTE_CALL>
<SHORT_TEXT>Set TRM package integrity</SHORT_TEXT>
<IMPORT>
<RSIMP>
<PARAMETER>IS_INTEGRITY</PARAMETER>
<TYP>ZTRM_INTEGRITY</TYP>
</RSIMP>
</IMPORT>
<EXCEPTION>
<RSEXC>
<EXCEPTION>TRM_RFC_UNAUTHORIZED</EXCEPTION>
</RSEXC>
</EXCEPTION>
<DOCUMENTATION>
<RSFDO>
<PARAMETER>IS_INTEGRITY</PARAMETER>
<KIND>P</KIND>
</RSFDO>
<RSFDO>
<PARAMETER>TRM_RFC_UNAUTHORIZED</PARAMETER>
<KIND>X</KIND>
</RSFDO>
</DOCUMENTATION>
</item>
<item>
<FUNCNAME>ZTRM_SET_TRANSPORT_DOC</FUNCNAME>
<REMOTE_CALL>R</REMOTE_CALL>
Expand Down
2 changes: 2 additions & 0 deletions src/ztrm.fugr.ztrm_create_import_tr.abap
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ FUNCTION ZTRM_CREATE_IMPORT_TR.
*"*"Local Interface:
*" IMPORTING
*" VALUE(IV_TEXT) TYPE AS4TEXT
*" VALUE(IV_TARGET) TYPE TR_TARGET
*" EXPORTING
*" VALUE(EV_TRKORR) TYPE TRKORR
*" EXCEPTIONS
Expand All @@ -22,6 +23,7 @@ FUNCTION ZTRM_CREATE_IMPORT_TR.
EXPORTING
iv_text = iv_text
iv_type = 'K'
iv_target = iv_target
IMPORTING
es_request_header = ls_header
EXCEPTIONS
Expand Down
21 changes: 21 additions & 0 deletions src/ztrm.fugr.ztrm_set_integrity.abap
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FUNCTION ZTRM_SET_INTEGRITY.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" VALUE(IS_INTEGRITY) TYPE ZTRM_INTEGRITY
*" EXCEPTIONS
*" TRM_RFC_UNAUTHORIZED
*"----------------------------------------------------------------------
CALL FUNCTION 'ZTRM_CHECK_AUTH'
EXCEPTIONS
trm_rfc_unauthorized = 1.
IF sy-subrc EQ 1.
RAISE trm_rfc_unauthorized.
ENDIF.

MODIFY ztrm_integrity FROM is_integrity.
COMMIT WORK AND WAIT.



ENDFUNCTION.
49 changes: 49 additions & 0 deletions src/ztrm_integrity.tabl.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<abapGit version="v1.0.0" serializer="LCL_OBJECT_TABL" serializer_version="v1.0.0">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<DD02V>
<TABNAME>ZTRM_INTEGRITY</TABNAME>
<DDLANGUAGE>E</DDLANGUAGE>
<TABCLASS>TRANSP</TABCLASS>
<DDTEXT>Package integrity</DDTEXT>
<MASTERLANG>E</MASTERLANG>
<MAINFLAG>X</MAINFLAG>
<CONTFLAG>A</CONTFLAG>
<EXCLASS>1</EXCLASS>
</DD02V>
<DD09L>
<TABNAME>ZTRM_INTEGRITY</TABNAME>
<AS4LOCAL>A</AS4LOCAL>
<TABKAT>0</TABKAT>
<TABART>APPL0</TABART>
<BUFALLOW>N</BUFALLOW>
</DD09L>
<DD03P_TABLE>
<DD03P>
<FIELDNAME>PACKAGE_NAME</FIELDNAME>
<KEYFLAG>X</KEYFLAG>
<ROLLNAME>ZTRM_PACKAGE_NAME</ROLLNAME>
<ADMINFIELD>0</ADMINFIELD>
<NOTNULL>X</NOTNULL>
<COMPTYPE>E</COMPTYPE>
</DD03P>
<DD03P>
<FIELDNAME>PACKAGE_REGISTRY</FIELDNAME>
<KEYFLAG>X</KEYFLAG>
<ROLLNAME>ZTRM_PACKAGE_REGISTRY</ROLLNAME>
<ADMINFIELD>0</ADMINFIELD>
<NOTNULL>X</NOTNULL>
<COMPTYPE>E</COMPTYPE>
</DD03P>
<DD03P>
<FIELDNAME>INTEGRITY</FIELDNAME>
<ROLLNAME>ZTRM_PACKAGE_INTEGRITY</ROLLNAME>
<ADMINFIELD>0</ADMINFIELD>
<NOTNULL>X</NOTNULL>
<COMPTYPE>E</COMPTYPE>
</DD03P>
</DD03P_TABLE>
</asx:values>
</asx:abap>
</abapGit>
24 changes: 24 additions & 0 deletions src/ztrm_package_integrity.dtel.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<abapGit version="v1.0.0" serializer="LCL_OBJECT_DTEL" serializer_version="v1.0.0">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<DD04V>
<ROLLNAME>ZTRM_PACKAGE_INTEGRITY</ROLLNAME>
<DDLANGUAGE>E</DDLANGUAGE>
<HEADLEN>55</HEADLEN>
<SCRLEN1>10</SCRLEN1>
<SCRLEN2>20</SCRLEN2>
<SCRLEN3>40</SCRLEN3>
<DDTEXT>TRM Package Integrity</DDTEXT>
<REPTEXT>Integrity</REPTEXT>
<SCRTEXT_S>Int</SCRTEXT_S>
<SCRTEXT_M>Integrity</SCRTEXT_M>
<SCRTEXT_L>Integrity</SCRTEXT_L>
<DTELMASTER>E</DTELMASTER>
<DATATYPE>CHAR</DATATYPE>
<LENG>000128</LENG>
<OUTPUTLEN>000128</OUTPUTLEN>
</DD04V>
</asx:values>
</asx:abap>
</abapGit>
8 changes: 8 additions & 0 deletions src/ztrm_package_name.dtel.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,15 @@
<DD04V>
<ROLLNAME>ZTRM_PACKAGE_NAME</ROLLNAME>
<DDLANGUAGE>E</DDLANGUAGE>
<HEADLEN>12</HEADLEN>
<SCRLEN1>04</SCRLEN1>
<SCRLEN2>04</SCRLEN2>
<SCRLEN3>12</SCRLEN3>
<DDTEXT>TRM Package name (incl. scope)</DDTEXT>
<REPTEXT>Package name</REPTEXT>
<SCRTEXT_S>Name</SCRTEXT_S>
<SCRTEXT_M>Name</SCRTEXT_M>
<SCRTEXT_L>Package name</SCRTEXT_L>
<DTELMASTER>E</DTELMASTER>
<DATATYPE>CHAR</DATATYPE>
<LENG>000042</LENG>
Expand Down
4 changes: 4 additions & 0 deletions src/ztrm_package_registry.dtel.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
<SCRLEN2>20</SCRLEN2>
<SCRLEN3>40</SCRLEN3>
<DDTEXT>TRM Package registry URL</DDTEXT>
<REPTEXT>Registry</REPTEXT>
<SCRTEXT_S>Reg</SCRTEXT_S>
<SCRTEXT_M>Registry</SCRTEXT_M>
<SCRTEXT_L>Registry</SCRTEXT_L>
<DTELMASTER>E</DTELMASTER>
<DATATYPE>CHAR</DATATYPE>
<LENG>000100</LENG>
Expand Down

0 comments on commit 084b5dd

Please sign in to comment.