...
SAP ATTP delivers a solution to generate the reporting messages for Russian ISMT system. The 3Keys CRPT Connector ISMT automate the communication and message transfer to Russian ISMT system, visualize the message processing status with monitoring transaction, download and process the electronical document and receipts in ATTP
2.
...
1. Solution scope
In 3Keys CRPT Connector ISMT, the following notifications are supported:
...
The list of supported rule types (notifications) is planned to be enhanced in future 3Keys CRPT Connector ISMT releases. Also, you can enhance supported notification by adding custom rule types (See enhancement section).
3. Constraints, Assumptions, Prerequisites and Dependencies
The Russian reporting part for ISMT is configured in SAP ATTP.
4. Setting up the Solution
4.
...
1. Connection to Java part
The connector Java part as SaaS solution supports HTTPS communication using web services.
...
The corporate firewall, proxy, gateway, etc. should allow outbound HTTPS connection from ATTP or middleware system to the Connector Java part.
4.1.
...
1. Prerequisites
For setting up an online integration to a Russian reporting system via CRPT connector Java part, do the following:
...
· Maintain settings.
4.1.
...
2. Create an HTTP Destination to CRPT connector
To create an HTTP connection to the external server, do the following:
· Call transaction SM59
· Create a new destination as follows:RFC Destination: Maintain a name for the destination (for example GISMT)o
Connection Type: G – HTTP Connection to External Server
...
Description: Maintain a description for the destination (for example GIS MT via CRPT connector)
· On the tab Technical Settings, maintain the URL in the fields Target Host, Service No. and Path Prefix.o
For example, the URL: https://[URL provided by 3Keys support]/gismt/api results into:
...
Target Host: [URL provided by 3Keys support]
...
Service No.: 443
...
Path Prefix: /gismt/api
· Set the HTTP Proxy Options as required in your organizations network
· On tab Logon & Security, do the following:o
Basic Authentication: true
...
Input User and password for CRPT Connector
...
Do Not Send Logon Ticket: true
...
SSL: active, Anonymous
· On the tab Special Options, do the following:o
HTTP Version: HTTP 1.1
...
Compression: Inactive
...
Compressed Response: Yes
...
Accept Cookies: No
· Save the destination.
· Click on Connection Test to test the created destination. If the connector and reporting system is reachable and the destination is set up correctly, the test result shows that the HTTP response value is 200 and Text is OK.
4.1.
...
3. Create a system
To create a system, do the following:
Call transaction /STTP/COCKPIT
Navigate to Master Data > Systems and then Choose Display/Edit.
Choose Create. A popup is displayed.
In the popup, define a system name and use following parameters:
...
e. RFC Destination: Maintain the destination name created in SM59
4.1.4.
...
Technical user and authorization role
One technical user shall be created in ATTP and have authorization to execute web service calls. The authorization to post events is needed if inbound electronic document processing shall generate objects or post events in ATTP.
4.1.5.
...
Maintain service paths
Check and, if needed, maintain the service paths in the view /STTP/V_RSRVPATH via transaction SM30. Industry FS is default industry for methods, correct product group depends on industry and added before True API request execution
Industry Identifier | RU System | RU System Revision | REST Operation | REST Path |
FS | NTF (Notification System) | 600 | ZZGET_CISES_AGG_LIST | /cises/aggregated/list |
FS | NTF (Notification System) | 600 | ZZGET_CISES_INFO | /cises/info |
FS | NTF (Notification System) | 600 | ZZGET_CIS_INFO | /cises/list |
FS | NTF (Notification System) | 600 | ZZGET_DOCUMENTS | /doc/listV2 |
FS | NTF (Notification System) | 600 | ZZGET_DOCUMENT_INFO | /documents/{document_id}/info |
FS | NTF (Notification System) | 600 | ZZGET_RECEIPT_INFO | /receipt/{receiptId}/info |
FS | NTF (Notification System) | 600 | ZZGET_RECEIPT_LIST | /receipt/listV2 |
FS | NTF (Notification System) | 600 | ZZGET_UTD_INFO | /documents/edo/tpr/ud |
4.
...
2. Event additional properties
The following is a list of expected event properties to compose the notification message. The notification raise error in case the mandatory event properties is not available on the event.
...
Property | Description | Mandatory? |
RR_RU_AGGREGATION_TYPE | Aggregation type. Default value: AGGREGATION | Y |
...
4.
...
3. Customizing the solution
In general, customizing is performed with following transactions:
/K3TMT/PARAM
/K3TMT/CUST
/K3TMT/CONF
4.3.
...
1. General Customizing
The transaction /K3TMT/PARAM contains parameters to influence the 3Keys CRPT connector ISMT. The settings will require a customizing transport. The view /K3TMT/V_PARAM can be used with transaction SM30 for changes without customizing transport
...
Name | Value |
ISMT_SYSTEM | Example: GISMT |
4.3.2.
...
Customizing for Reports
4.3.2.
...
1. Relevant industry
Maintain relevant industry in the transaction /K3TMT/CUST under “Relevant industry”.
...
Industry | Product group | Text |
FS | lp | Clothing items, bed, table, bath and kitchen linens |
TR | tires | New pneumatic rubber tires and tire casings |
ZM | milk | Dairy products |
4.3.2.
...
2. Document type description
Maintain document type description in the transaction /K3TMT/CUST under “Document Type”
Field | Description, Values |
Doc Type | Internal document type (values are predefined). Example:
|
Document Type Description | Text to be displayed at Report Monitor for document type |
ISMT Document Type | TRUE API document type |
4.3.2.
...
3. Mapping attributes
Mapping attributes in the transaction /K3TMT/CUST under “Mapping attributes” contains attributes for each report used on notification creation. 3Keys CRPT connector ISMT already contains predefined mapping attributes for delivered rule types:
Field | Description, Values |
Rule Type | Rule execution type |
Notification Type | Notification type |
NS | AIF namespace. Value is common for 3Keys CRPT connector: /STTC3 |
Interface | AIF interface. Unique for each rule type, example: ZR_ISMT_15 |
Version | AIF interface version. 3Keys CRPT connector value: 1 |
Raw Data Structure | AIF request/response structure for notification data Example: /K3TMT/S_APPL_KM_CANC_MSG |
SAP Data Structure | SAP structure for notification data Example: /K3TMT/S_APPL_KM_CANC_MSG |
ISMT Document Type | Internal document type Example: 15 |
ObjectTypeName | Execution class to collect notification data Example: /K3TMT/CL_3K_RULE_MAPPING |
Mapper class | Mapper class to fill notification with data Example: /K3TMT/CL_APPL_CANC_MAPPER |
Event Type | Event type triggering reporting Example: 1 Object event |
Event Action | Event action triggering reporting Example: ADD Add/Create |
Notif Action ID | Notification action ID to determine object status by SAP ATTP standard (replaced with Proc valid status field) Example: IS_MT-ApplCanc |
Proc object type | Object types to be included into notification Example: 3 sgtin_sscc_det |
Proc valid status | Object status to be included into notification Example: 2 active (active+read-only+disposition active/in_transit/returned/081) |
Notif Part name | Notification part name on file uploading (not used) Example: IS_MT-ApplCanc |
Max. No.of Obj/Not | Maximum object number at 1 notification part Example: 30000 |
Participant Fieldname | Field name for tax number determination |
Description | Free text for description |
4.3.2.
...
4. Product Group
Product group in the transaction /K3TMT/CUST under “Product group” contains possible values for product groups at ISMT system. 3Keys CRPT connector ISMT already contains product groups, maintain additional values in case new product group added:
Field | Description, Values |
Product group | Product group from True API documentation Example: shoes |
Text | Description (used at search help) Example: Shoes |
...
4.4.
...
Rule processing
The common rule processing scheme:
...
The rule type Z3K_RR_MT shall be assigned in the transaction /STTP/CUST_RULES to business steps / location groups related for the ISMT Russian reporting
The rule type Z3K_RR_MT allows to use additional customizing parameters to determine the rule to be executed, determine the approval parameters, and helps with sequence check. In case event triggered rule contains more than one industry rule type Z3K_RR_MT split objects into several reporting events group by industry.
Maintain the rules in the transaction /K3TMT/CONF under “Rule Configuration”
Field | Description, Values |
Scenario | Free text used to describe the scenario and group multiple rules to be triggered for the same event |
Rule processing sequence | Sequence of rule triggering for the same Scenario |
Industry identifier | Industry for which rule will trigger For empty industry the following logic used:
|
ISMT Document type | ISMT Document type |
Rule type | The ATTP standard rule type or customer developed |
Rule is active | Set check box to activate the rule |
Rule Condition Cust | Rule condition |
Business Step | Business step |
Disposition | Disposition code (optional) |
Location Group | Business location group (optional) |
BizLocation GLN | Business location GLN (optional) |
BizLoc. GLN Ext | Business location extension (optional) |
Bus. Transact. Type | Business transaction type (optional) |
Description | Description |
Maintain additional parameters in the transaction /K3TMT/CONF under “Rule Configuration” if required skip specific rules using SAP ATTP rule conditions or class-based rule conditions
Field | Description, Values |
Scenario | Free text used to describe the scenario and group multiple rules to be triggered for the same event |
Rule processing sequence | Sequence of rule triggering for the same Scenario |
Rule Condition Cust | Rule condition |
SAP ATTP rule condition is based on BADI /STTP/BADI_RULE_CONDITIONS with filter = rule condition (Rule processing will stop check if result is skip rule).
Class-based rule condition is maintained via transaction /K3TMT/CUST node “Rule condition” and based on class method /K3TMT/CL_RULES=>GET_RULE_CONDITION_CLASS. Method is used to get class name from table /K3TMT/C_COND, custom class could be assigned as condition processor. Class method /K3TMT/IF_3K_RULE_CONDITIONS~EXECUTE is called. (Rule processing will stop check if result is skip rule).
4.5. Message approval
By default every report is ready for sending. If the explicit waiting of user approval is required activate User Approval check box in the transaction /K3TMT/CONF under “Configuration ID”
Field | Description, Values |
Configuration ID | Free text used to describe the Configuration ID |
User Apprvl | Wait explicit user approval (optional) |
4.6. Sequence check
The sequence check is active for all outbound notification to ISMT system. The sequence check is triggered during the message approval, check sequence function, sending notification to ISMT via report /K3TMT/DISPATCHER.
Background job needs to be planned for the report /K3TMT/DISPATCHER. The sequence check results are stored as application log transaction SLG1, Object /STTP/, Sub object DM, External ID /K3TMT/SEND
The logic of the sequence check:
Check objects ISMT status (status found). The ISMT status tracked for every SGTIN in the table /K3TMT/OBJ_STA. The SSCC ISMT status determined based on the first found SGTIN in the current hierarchy
Processing status: there is no report with the same objects in status “Send”
Check predecessor: there is no report with the same objects earlier than the current message.
The ISMT status could be updated with transaction /K3TMT/SN_INFO or program /K3TMT/OMS_REP (if SGTIN was send to OMS with BR_CRYPTO_COMM event).
The sequence check can be skipped/ignored by user in the transaction /K3TMT/REP_MONITOR with button Approval
4.7. Configuration ID determination
The Configuration ID represents the user / certificate for login to the ISMT system and electronic signature of the message in the connector Java part configuration file.
Only one Configuration ID is currently supported. Support of multiple Configuration IDs will be added in future releases.
Maintain Configuration ID in the transaction /K3TMT/CONF under “Configuration ID”
Field | Description, Values |
Configuration ID | Free text used to describe the Configuration ID |
Config description | Description |
Approved by | User for automatic approval (optional) |
User Apprvl | Wait explicit user approval (optional) |
Delay Response | Delay in seconds before first response for notification |
Max error | Maximum error counter before set notification status “No response” |
4.8. Inbound Universal Documents processing
Maintain Universal document type description in the transaction /K3TMT/CUST under “Universal Document Type” in case UD text need to be corrected
Field | Description, Values |
UD Type | Universal document type of inbound document (Example: 01 – UNIVERSAL_TRANSFER_DOCUMENT or 02 – UNIVERSAL CORRECTION DOCUMENT) |
Universal Document Type | Text to be displayed at Universal Document Monitor (transaction /K3TMT/UD_MONITOR) |
Universal Document Type | TRUE API document type (displayed at Universal Document Monitor - transaction /K3TMT/UD_MONITOR) |
Activate inbound Universal Documents processing in the transaction /K3TMT/CUST node “Relevant industry”
Field | Description, Values |
Configuration ID | Configuration ID for the ISMT cabinet where the universal document expected |
Inbound UD active | Processing state indicator. Value X |
Maintain inbound filter customizing in the transaction /K3TMT/CUST node “Inbound Filter”
Field | Description, Values |
Configuration ID | Configuration ID for the ISMT cabinet where the universal document expected |
Industry | Industry relevant for universal document processing. Example: FS |
UD Int.sec | Interval between inbound UD requests |
UD Ovl.sec | UD overlap in seconds (“Date from” field to request inbound UD will be calculated as Last Run time – UD overlap)
|
The report /K3TMT/UD_IN shall be planned as a background job to request from ISMT and process the universal documents. The document processing executed with AIF functions and visible in the transaction /AIF/ERR.
The 3Keys CRPT Connector for ISMT provides the list of function modules for processing of inbound messages.
Function module /K3TMT/AIF_UD_IN_NO_REACTION set universal document status based on ISMT document status.
Assign the processing function module in the transaction /K3TMT/CONF under “Inbound Universal Doc”.
Field | Description, Values |
UD Type | Universal document type of inbound document (Example: 01 – UNIVERSAL_TRANSFER_DOCUMENT or 02 – UNIVERSAL CORRECTION DOCUMENT) |
Sender INN | Sender tax number from ISMT document (optional) |
Receiver INN | Receiver tax number from ISMT document (optional) |
Sequence | Sequence |
Function Module | Execution function module |
Alert Category | Alert category for email notification (optional) |
Description | Description |
In common universal document processing is presented on the following diagram
...
4.9. Inbound receipts processing
Activate inbound Receipts processing in the transaction /K3TMT/CUST node “Relevant industry”
Field | Description, Values |
Configuration ID | Configuration ID for the ISMT cabinet where the universal document expected |
Inbound RCP active | Processing state indicator. Value X |
Maintain inbound filter customizing in the transaction /K3TMT/CUST node “Inbound Filter”
Field | Description, Values |
Configuration ID | Configuration ID for the ISMT cabinet where the universal document expected |
Industry | Industry relevant for universal document processing. Example: FS |
RCP Int.sec | interval between inbound receipts requests |
RCP Ovl.sec | Receipts overlap in seconds (“Date from” field to request inbound receipts will be calculated as Last Run time – receipts overlap) |
The report /K3TMT/RCP_IN shall be planned as a background job to process the inbound receipts. The document processing executed with AIF functions and visible in the transaction /AIF/ERR.
The 3Keys CRPT Connector for ISMT provides the list of function modules for processing of receipts.
Function module /K3TMT/AIF_RCP_IN_NO_REACTION set receipt status based on ISMT document status.
Assign the processing function module in the transaction /K3TMT/CONF under “Inbound Receipt”.
Field | Description, Values |
Receipt Type | Receipt type of inbound document (Example: 01 – RECEIPT or 02 – RECEIPT_RETURN) |
Sender INN | Sender tax number from ISMT document (optional) |
Sequence | Sequence |
Function Module | Execution function module |
Alert Category | Alert category for email notification (optional) |
Description | Description |
4.10. Background jobs for report processing
4.10.1. Report sending
The report /K3TMT/DISPATCHER (could be planned as background job or run manually) collects created reports with status “Sequence check” and “Ready for sending”, perform sequence check and send report to ISMT system and update data:
Report header / item
Reporting event
Program works as single instance for all configurations (based on logical lock).
In case sending failed program updates field “Error text” and leave processing status without change to send report with next run.
The report run results are stored as application log transaction SLG1, Object /STTP/, Sub object DM, External ID /K3TMT/SEND
4.10.2. Response processing
The report /K3TMT/RESPONSE (could be planned as background job or run manually) collects send reports with status “Send”, receives report status from ISMT system and updates data:
Report header / item
Program works as single instance for all configurations (based on logical lock).
First response for report is requested after delay set in the configuration customizing (table /K3TMT/C_CONF_ID).
In case no positive response (response http code 200) received for report, program updates:
field “Error text” with error from JSON
field “Response code”
field “Response error counter” - increase value by 1. When response error counter value become more than maximum error counter set in the configuration customizing (table /K3TMT/C_CONF_ID) report processing status is set to “No response”
analyze if received HTTP error code is server error (selection screen parameter) during this report run and stop processing if value of screen parameter “Stop after error number” exceeded
The report run results are stored as application log transaction SLG1, Object /STTP/, Sub object DM, External ID /K3TMT/RESPONSE
4.10.3. OMS report processing
The report /K3TMT/OMS_REP (could be planned as background job or run manually) collects events with processed BR_CRYPTO_COMM reporting events (see chapter 5.3), checks status at ISMT system for specific number (subset) of SGTINs and updates data:
Report monitor header
Report monitor item
SGTIN status (APPLIED) for sequence check
The following diagram described program work:
...
The report run results are stored as application log transaction SLG1, Object /STTP/, Sub object DM, External ID /K3TMT/OMS_REP
The enhancement for class implementing interface /STTP/IF_BADI_RR_RU_OMS for specific industry needed at method /STTP/IF_BADI_RR_RU_OMS~SEND_IC_USAGE_REPORT (see chapter 5.3)
5. Enhancements of the Solution
The 3Keys CRPT connector ISMT solution is designed as to be possibly enhance based on customizing and code enhancements. Code enhancements are realized through BAdI implementations.
5.1.1. Enhancing rule determination
3Keys rule configuration includes a possibility to further refine the selection criteria for a rule to be executed. This can be accomplished by using one of the following options:
Redefine default rule execution class /K3TMT/CL_3K_RULE_PROC to custom class using table /K3TMT/C_RTYPE and implement own logic with ABAP to skip specific rule after rule configuration reading
Maintain rule type in the transaction /K3TMT/CUST under “Rule Type”
Field | Description, Values |
Rule Type | Rule type Example Z3K_RR_MT |
Class name | Customer class name to redefine logic |
Description | Text description |
Implementing a BADI /STTP/BADI_RULE_CONDITIONS with filter = rule condition
Implementing 3Keys rule condition class containing interface /K3TMT/IF_3K_RULE_CONDITIONS. Custom logic needs to be created at method /K3TMT/IF_3K_RULE_CONDITIONS~EXECUTE.
Maintain rule condition in the transaction /K3TMT/CUST under “Rule Condition”
Field | Description, Values |
Customer Condition for Rules | Rule condition unique name |
Class name | Customer class name |
5.1.2. Change report content
The report JSON generated by ATTP standard may not fit to the business requirements. To change report JSON the following options available:
5.1.2.1. Create custom mapping logic
To compose report data, it is possible to use own logic by creating new rule type with own rule type execution class by implementing interface /K3TMT/IF_3K_RULE_MAPPING (method EXECUTE).
Based on import parameters (event data, industry, rule key) it is necessary to fill output table with AIF structure to transfer data to AIF and create report monitor header and item.
To assign custom execution class use transaction /K3TMT/CUST, node “Mapping Attributes”, column “Class/Interface”.
5.1.2.2. Change existing mapping logic
To compose report data it is possible to change existing rule type logic by using mapping class redefinition. It is necessary to create own class as child class of /K3TMT/CL_INT_G_MAPPER (or copy of this class) and assign this new class to relevant rule type via transaction /K3TMT/CUST, node “Mapping Attributes”, column “Mapper class”.
5.1.2.3. Change report after mapping
Badi /STTP/BADI_RU_CHANGE_AFTER_MAP shall be implemented for the rule type and own processing logic needs to be implemented.
5.1.3. New custom ISMT report type
The new ISMT reporting type not existing in the 3Keys Connector ISMT or SAP ATTP standard can be created with following steps:
Create new rule type via transaction /STTP/CUST_RULE_TYPE - Define Rule types
Create new notification type via transaction /STTP/REP_NOTIF_TYPE - Define Reporting Notification Types
Create ABAP structures for AIF (use structure /K3TMT/S_INT_G_AIF as example)
Create AIF customizing via transaction /AIF/CUST (Namespace /STTC3):
o Define interface
o Specify interface engine
o Define structure mapping
Create customizing for mapping report content via transaction /K3TMT/CUST (“Mapping attributes” node)
Add logic to extract report data implementing BADI /K3TMT/BADI_REP_PARSE
Create customizing for new rule via transaction /STTP/CUST_RULES (3Keys General rule)
Create customizing for new rule via transaction /K3TMT/CONF (“Rule configuration” node)
Create logic to parse data by implementing Badi /K3TMT/BADI_REP_PARSE
5.1.4. New industry
The new industry not supported by SAP ATTP standard can be created with following steps:
Create fixed value append for domain /STTP/D_INDUSTRY (for example ZP – Perfume). Skip this step if industry is supported by SAP standard.
Specify relevant industry for reporting (transaction /K3TMT/CUST, node “Relevant Industry”)
Add new REST path for created industry (transaction SM30 view /STTP/V_RSRVPATH)
Add general customizing parameter RR_RU_NTF_REV for industry using transaction /STTP/CUSTGEN
Customizing Parameter Key | Customizing Parameter Option | Value |
RR_RU_NTF_REV | ZP | 600 |
5.1.5. Create new True API function
The new True API method not existing in the 3Keys Connector ISMT can be created with following steps
If base class for API processing does not exist create child class of /K3TMT/CL_TRUE_API_REQ as custom class ZCL_TRUE_API_REQ
Create method GET_INSTANCE_ATT as copy of GET_INSTANCE at custom class ZCL_TRUE_API_REQ
Create new constant for rest operation (use constant /K3TMT/CL_REST_CONST=>GCS_REST_OPERATION-NOTIFICATION-ISMT-GET_CISES_INFO as example)
Add new REST path for created REST operation (transaction SM30 view /STTP/V_RSRVPATH)
Create processor class (use class /K3TMT/CL_TRUE_API_CISES_INFO as example), for example ZCL_TRUE_API_CISES_INFO2
Add processor (class ZCL_TRUE_API_CISES_INFO2) instance creation logic into method GET_INSTANCE_ATT (based on rest operation) of base class ZCL_TRUE_API_REQ
Implement new created API processing class ZCL_TRUE_API_REQ call into custom code
5.1.6. Enhancement spot /K3TMT/ES_REP
Badi | Description |
/K3TMT/BADI_REP_PARSE | Parse ISMT report data Additional processing logic to parse notification data into report monitor entry on notification creation |
/K3TMT/BADI_REP_RESPONSE | Get Response from ISMT Additional processing logic to change report monitor entry after report response receiving |
5.2. Enhancement for navigation to ATTP cockpit
Add general customizing parameter /K3TMT/COCKPIT_NAVIG (usage scope Customizing) to enable navigation to ATTP Cockpit from transaction /K3TMT/REP_MONITOR using transaction /STTP/CUSTGEN
Component | Customizing Parameter Key | Customizing Parameter Option | Value |
REP | /K3TMT/COCKPIT_NAVIG |
| X |
5.3. Enhancement for OMS report processing
SAP ATTP use interface STTP/IF_BADI_RR_RU_OMS method /STTP/IF_BADI_RR_RU_OMS~SEND_IC_USAGE_REPORT for OMS interaction on trigger BR_CRYPTO_COMM rule.
To store event for later ISMT status analysis by report /K3TMT/OMS_REP method /STTP/IF_BADI_RR_RU_OMS~SEND_IC_USAGE_REPORT need to be enhanced at all classes implementing interface /STTP/IF_BADI_RR_RU_OMS for relevant industries.
Enhancement example:
The class /STTP/CL_BADI_RR_RU_OMS_FS_283 method /STTP/IF_BADI_RR_RU_OMS~SEND_IC_USAGE_REPORT shall be extended at the end of ABAP code to be able to store event ID for status check. Following the example of the ABAP code:
Code Block | ||
---|---|---|
| ||
DATA ls_oms_evt TYPE /k3tmt/oms_evt.
IF ev_return_code = /iwcor/cl_rest_status_code=>gc_success_ok.
ls_oms_evt-evtid = is_usage_data_generic-evtid_comm. INSERT INTO /k3tmt/oms_evt VALUES ls_oms_evt .
ENDIF. |