Configuration Guide Kazakhstan MPT Connector

Document History

Version

Changes

Effective Date

1.0

First approved version

3Keys Kazakhstan MPT Add-On release 3.1

01-May-2022

 

 

1.    About This Guide

This document describes configuration steps that are required, or are optionally possible, to configure 3Keys Kazakhstan MPT in SAP ATTP system.

2.   Solution overview

SAP ATTP delivers a solution to generate the reporting messages for Kazakhstan MPT system. The 3Keys Kazakhstan MPT Add-On automate the communication and message generation/transfer to Kazakhstan MPT system, visualize the message processing status with monitoring transaction, download and process the inbound documents in ATTP

2.1. Solution scope

In 3Keys Kazakhstan MPT, the following notifications are supported:

Rule

Notification

Z3KKZ_MT

Reg.Rep.Kazakhstan MPT - General rule

Z3KKZ_MT_0004

Reg.Rep.Kazakhstan MPT - Import EAEU notification (IMPORT_TRANSIT)

Z3KKZ_MT_0005

Reg.Rep.Kazakhstan MPT - Act notification (KZ_UPD)

Z3KKZ_MT_IMP

Reg.Rep.Kazakhstan MPT - Import notification (IMPORT)

Z3KKZ_MT_INBOUND_MSG

Reg.Rep.Kazakhstan MPT - Inbound message

Z3KKZ_MT_WRITEOFF

Reg.Rep.Kazakhstan MPT - WriteOff notification (MTTPS_90)

 

The list of supported rule types (notifications) is planned to be enhanced in future 3Keys Kazakhstan MPT releases. Also, you can enhance supported notification by adding custom rule types (See enhancement section).

3. Constraints, Assumptions, Prerequisites and Dependencies

The Kazakhstan reporting part for MPT 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 Root CA certificate of the certificate which is used to secure the connection from ATTP or middleware system to connector Java part, should be added to the SSL client (Anonymous) in the transaction STRUST.

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 Kazakhstan reporting system via MPT connector Java part, do the following:

·       Create an HTTP Destination to MPT connector.

·       Create a System (master data).

·       Maintain settings.

4.1.2. Create an HTTP Destination to MPT 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 MPT)

  • Connection Type: G – HTTP Connection to External Server

  • Description: Maintain a description for the destination (for example MPT via 3Keys Kazakhstan connector)

On the tab Technical Settings, maintain the URL in the fields Target Host, Service No. and Path Prefix.

  • For example, the URL: https://[URL provided by 3Keys support]/mpt/api results into:

    • Target Host: [URL provided by 3Keys support] (or server name in case on-premise installation)

    • Service No.: 443

    • Path Prefix: /mpt/api

Set the HTTP Proxy Options as required in your organizations network

On tab Logon & Security, do the following:

  • Basic Authentication: true

  • Input User and password for MPT Connector

  • Do Not Send Logon Ticket: true

  • SSL: active, Anonymous

On the tab Special Options, do the following:

  • 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.

Create the second RFC destination identical to created destination without path prefix (to test True API methods). Maintain a name for the destination (for example MPT_API).

4.1.3. Create a system

To create a system, do the following:

  1. Call transaction /STTP/COCKPIT

  2. Navigate to Master Data > Systems and then Choose Display/Edit.

  3. Choose Create. A popup is displayed. 

  4. In the popup, define a system name and use following parameters: 

a.      System name (for example MPT)

b.     System Type: D - Domestic

c.      System Group: <EMPTY>

d.     Communication Type: 0 – Not Specified

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 20 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

20

NTF (Notification System)

600

APPROVE_INB_EDI_DOC

/api/v3/true-api/edo-api/incoming-documents/{document_id}/events/approve

20

NTF (Notification System)

600

CREATE_DOC_FORMAL

/api/v3/true-api/edo-api/outgoing-documents/formal

20

NTF (Notification System)

600

CREATE_DOC_IMPORT

/api/v3/true-api/documents/transit/import/third_countries

20

NTF (Notification System)

600

CREATE_DOC_WRITEOFF

/api/v3/true-api/documents/writeOff

20

NTF (Notification System)

600

GET_CISES_INFO

/api/v3/true-api/cises/info

20

NTF (Notification System)

600

GET_DOCUMENTS

/api/v3/true-api/doc/listV2

20

NTF (Notification System)

600

GET_DOCUMENT_INFO

/api/v3/true-api/documents/{document_id}/info

20

NTF (Notification System)

600

GET_INB_EDI_DOC

/api/v3/true-api/edo-api/incoming-documents

20

NTF (Notification System)

600

GET_INB_EDI_DOC_BODY

/api/v3/true-api/edo-api/incoming-documents/{document_id}/base64

20

NTF (Notification System)

600

GET_KEY

/api/v3/true-api/auth/key

20

NTF (Notification System)

600

GET_OUT_EDI_DOC

/api/v3/true-api/edo-api/outgoing-documents

20

NTF (Notification System)

600

SIGN_IN

/api/v3/true-api/auth/simpleSignIn

20

NTF (Notification System)

600

SIGN_INB_EDI_DOC

/api/v3/true-api/edo-api/incoming-documents/{document_id}/events/approve/signature

20

NTF (Notification System)

600

SIGN_OUT_EDI_DOC

/api/v3/true-api/edo-api/outgoing-documents/{document_id}/events/signature

20

NTF (Notification System)

600

WITHDRAW_OUT_EDI_DOC

/api/v3/true-api/edo-api/outgoing-documents/{document_id}/events/withdraw

 

 

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.

Import from 3rd countries

Property

Description

Mandatory?

ZR_KZ_CTR_CODE

Country of export according to the directory of countries

Y

ZR_KZ_DECL_DOCUMENT

Document type:

DECLARATION -

Declaration of goods;

STATEMENT- Application for release of goods before filing a declaration of goods

Y

ZR_KZ_DECL_NUM

Document registration number

Y

ZR_KZ_DECL_DATE

Document registration  date  in  YYYY-MM-DD format

Y

ZR_KZ_DECL_POS

Declaration item number

Y

ZR_KZ_DECISION_CODE

The code of the decision.  Possible values: 10, 11,

12, 13, 14, 20

Y

ZR_KZ_DECISION_DATE

Date in YYYY-MMDDThh format:mm:ssZ

Y

ZR_KZ_CUSTOMS_CODE

Customs authority  code.  See also Handbook of Customs Codes

Y

ZR_KZ_CERT_DOCUMENT

Information about the document confirming the  conformity of the goods - Document Type

Y

ZR_KZ_CERT_DOC_NUM

Information about the document confirming the  conformity of the goods - Document Number

Y

ZR_KZ_CERT_DOC_DATE

Information about the document confirming the  conformity of the goods - Document Date

Y

ZR_KZ_IMPORTER_ID

Importer tax code

Y

ZR_KZ_IMPORTER_NAME

Importer name

Y

ZR_KZ_PRM_DOC_NUM

Paper Document Number Notice

N

ZR_KZ_PRM_DOC_DATE

Date of paper document Notifications in the format

YYYY-MM-DD

N

ZR_KZ_TNVED_CODE

TNVED - commodity nomenclature of foreign economic activity of the Eurasian Economic Union

Y

 

Import from the EAEU

Property

Description

Mandatory?

ZR_KZ_CORR_FLAG

Sign of a corrected Notification (new Notification as a correction of the original one)

  • True - Corrected (corrected)

  • False - Original

 Default = false

N

ZR_KZ_CORR_DOC_ID

GUID of the document to which the  adjustment is sent

Y - if acceptance  or adjustment of the notice

ZR_KZ_REG_DOC_NUM

Registration document  number  of the import notice

Y - if acceptance  or adjustment of the notice

ZR_KZ_REG_DOC_DATE

The date of the registration document, in the dd.mm.yyyy format

Y - if acceptance  or adjustment of the notice

ZR_KZ_SUPPL_CTR_CODE

Country of departure.

  • AM - Armenia

  • BY - Belarus

  • KG - Kyrgyzstan

RU - Russia

Y

ZR_KZ_SUPPL_ID

Identifier

taxpayer (TIN,

IIN, BIN and

etc.) sender or equivalent

Y

ZR_KZ_SUPPL_NAME

Name of sender

(supplier)

Y

ZR_KZ_CONS_ID

IIN/BIN of the recipient

Y

ZR_KZ_CONS_NAME

Name of the recipient  (buyer)

N

ZR_KZ_PRM_DOC_NUM

Primary document number

N

ZR_KZ_PRM_DOC_DATE

The date of the primary document, in the dd.mm.yyyy format

N

ZR_KZ_EXCISE_DOC_NUM

Excise duty receipt number

Y

ZR_KZ_EXCISE_DOC_DAT

The date of the excise duty payment, in the dd.mm.yyyy format

Y

ZR_KZ_EXCISE_AMOUNT

Excise duty amount.  Number with two   decimal places

Y

ZR_KZ_COMPL_DOC_NUM

Compliance document  number

N

ZR_KZ_COMPL_DOC_DATE

The date of the conformance document, in the dd.mm.yyyy format

N

ZR_KZ_COMPL_DOC_TYPE

Compliance document type

N

 

WriteOff

Property

Description

Mandatory?

ZR_KZ_REASON

The reason for the withdrawal of  goods from circulation with values:

  • 1 - Defect;  

  • 2 - Loss;

  • 3 - Damage;

  • 4 - Destruction;

  • 5 - Use for own needs of the  enterprise;

  • 6 - Sampling;

  • 7 - For medical purposes;

(only for TG Pharma)

  • 8 - Free  prescription leave; (only for TG Pharma)

  • 9 - Withdrawal from circulation in e-commerce;

  • 10 - Return to an individual;

  • 11 - Confiscation (reserved - not applicable)

Y

ZR_KZ_PRM_DOC_NAME

Name of the primary document

Y

ZR_KZ_PRM_DOC_NUM

Primary document number

Y

ZR_KZ_PRM_DOC_DATE

The date of the primary document, in dd.mm.yyyy format

Y

ZR_KZ_PARTIC_ID

Participant tax code

Y

ZR_KZ_PARTIC_NAME

Participant name

Y

 

Act of acceptance and transfer

Property

Description

Mandatory?

ZR_KZ_CORR_FLAG

Sign of a corrected Act (new Act as a correction of the original one)

  • True - Corrected (corrected)

  • False - Original

 Default = false

N

ZR_KZ_CORR_DOC_ID

GUID of the document to which the  adjustment is sent

Y - if a sign of a corrected Act

(correctionFlag) = true

ZR_KZ_OPER_TYPE

Operation type:

  • 1 - Sale;

  • 2 - Commission/Agency Trading

Y

ZR_KZ_REG_DOC_NUM

Registration number of the  document to  which the adjustment  is transmitted

Y - if a sign of a corrected Act

(correctionFlag) = true

ZR_KZ_REG_DOC_DATE

Date of registration of the  document to which the adjustment is transferred

Y - if a sign of a corrected Act

(correctionFlag) = true

ZR_KZ_PRM_DOC_NUM

Primary document number

N

ZR_KZ_PRM_DOC_DATE

The date of the primary document, in the dd.mm.yyyy format

N

ZR_KZ_SUPPL_ID

IIN/BIN of the sender (supplier)

Y

ZR_KZ_SUPPL_NAME

Name of sender (supplier)

N

ZR_KZ_CONS_ID

IIN/BIN of the recipient (buyer)

Y

ZR_KZ_CONS_NAME

Name of the recipient  (buyer)

N

 

4.3. Customizing the solution

In general, customizing is performed with following transactions:

  • /K3TKZ/PARAM

  • /K3TKZ/CUST

  • /K3TKZ/CONF

  • /K3TKZ/ATTR_MAP

4.3.1. General Customizing

The transaction /K3TKZ/PARAM contains parameters to influence the 3Keys Kazakhstan MPT. The settings will require a customizing transport. The view /K3TKZ/V_PARAM can be used with transaction SM30 for changes without customizing transport

Name

Description, Values

MPT_SYSTEM

System name at master data for online integration

Example: MPT

MON_NAVIG_ACTIVE

Navigation to ATTP Cockpit is active for transaction /K3TKZ/DOC_MONITOR

X - active

 

Following the recommended minimum set of parameters

Name

Value

MPT_SYSTEM

Example: MPT

 

4.3.2. Customizing for Reports

4.3.2.1. Relevant industry

Maintain relevant industry in the transaction /K3TKZ/CUST under “Relevant industry”.

These settings are also used for assignment of customer specific industries to product groups

Field

Description, Values

Industry

Industry relevant for connector operations

Product group

Product group at MPT system

Text

Free text used to describe industry

Inbound document active

Flag to activate inbound document processing

 

This mapping will be used to identify correct product group on execution True API request.

Example:

Industry

Product group

Text

20

Pharma

Pharmaceuticals

 

4.3.2.2. Document type description

Maintain document type description in the transaction /K3TKZ/CUST under “Document Type”

Field

Description, Values

Doc Type

Internal document type (values are predefined).

Example:

  • 0001 Import from 3rd countries (IMPORT)

  • 0002 Introduce goods (KZ_INTRODUCE_GOODS)

  • 0003 Withdrawal from circulation (MTTPS_90)

  • 0004 Import from EAEU (IMPORT_TRANSIT)

  • 0005 Act of acceptance (KZ_UPD)

  • 0091 Code Usage for OMS (OMS_USAGE)

Document Type Description

Text to be displayed at Report Monitor for document type

MPT Document Type

TRUE API document type

4.3.2.3. Mapping attributes

Mapping attributes in the transaction /K3TKZ/CUST under “Mapping attributes” contains attributes for each report used on notification creation. 3Keys Kazakhstan MPT connector 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 MPT connector: /STTC3

Interface

AIF interface.

Unique for each rule type, example: ZKZMPT_IMP

Version

AIF interface version.

3Keys Kazakhstan MPT connector value: 1

Raw Data Structure

AIF request/response structure for notification data

Example: /K3TKZ/S_MPT_IMP_AIF

SAP Data Structure

SAP structure for notification data

Example: /K3TKZ/S_MPT_IMP_MSG

MPT Document Type

Internal document type

Example: 1

Mapper class

Mapper class to fill notification with data

Example: /K3TKZ/CL_IMPORT_MAPPER

REST Operation

REST service operation used to determine service path

Example: CREATE_DOC_IMPORT

4.3.2.4. Product Group

Product group in the transaction /K3TKZ/CUST under “Product group” contains possible values for product groups at MPT system. 3Keys Kazakhstan MPT 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: pharma

Text

Description (used at search help)

Example: Pharma

4.3.2.5. MPT Status send from, MPT Status send to

MPT status customising in the transaction /K3TKZ/CUST under “MPT Status send from” contains possible status values for message sequence check before sending to MPT system. Note “MPT Status change to” contains new status value to be set after receiving successful response for notification. 3Keys Kazakhstan MPT already contains MPT status, maintain values in case other status processing logic is required

4.3.2.6. Reporting message attributes

Participant tax code fields could be filled with value from source or destination fields of the EPCIS event or business transaction in the transaction /K3TKZ/ATTR_MAP.

The following location data source is supported:

BIZTRANS-SHIPFROM - event business transaction document ship from party
BIZTRANS-SHIPTO - event business transaction document ship to
BIZTRANS-SOLDFROM - event business transaction document sold from party
BIZTRANS-SOLDTO - event business transaction document sold to party
EVT-BIZLOC - event business location
EVT-DST-LOC - event destination location
EVT-DST-OWNR - event destination owning party
EVT-READPOINT - event read point
EVT-SRC-LOC - event source location
EVT-SRC-OWNR - event source owning party

The following fields are available for mapping:

CONSIGNEEID - Act of acceptance, Introduce EAEU
IMPORTERCODE - Import from third countries
PARTICIPANTIDENTIFICATIONCODE - Write off
SUPPLIERID - Act of acceptance

4.4. Rule processing

The common rule processing scheme:

The rule type Z3KKZ_MT shall be assigned in the transaction /STTP/CUST_RULES to business steps / location groups related for the MPT Kazakhstan reporting 

The rule type Z3KKZ_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 Z3KKZ_MT split objects into several reporting events group by industry.

Maintain the rules in the transaction /K3TKZ/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:

  • For each relevant industry from system (transaction /K3TKZ/CUST, node “Relevant Industry”) check event contains at least one object with this industry;

  • Start rule from rule configuration

MPT Document type

MPT 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 /K3TKZ/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 /K3TKZ/CUST node “Rule condition” and based on class method /K3TKZ/CL_RULES=>GET_RULE_CONDITION_CLASS. Method is used to get class name from table /K3TKZ/C_COND, custom class could be assigned as condition processor. Class method /K3TKZ/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 /K3TKZ/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 MPT system. The sequence check is triggered during the message approval, check sequence function, sending notification to MPT via report /K3TKZ/MPT_DISPATCHER.

Background job needs to be planned for the report /K3TKZ/MPT_DISPATCHER. The sequence check results are stored as application log transaction SLG1, Object /STTP/, Sub object DM, External ID /K3TKZ/MPT_SEND

The logic of the sequence check:

  1. Call BADI /K3TKZ/BADI_REP_SEQ_CHECK method BEFORE_CHECK

  2. Check objects MPT status (status found). The MPT status tracked for every SGTIN in the table /K3TKZ/OBJ_STA. The SSCC MPT status determined based on the first found SGTIN in the current hierarchy

  3. Processing status: there is no report with the same objects in status “Send”

  4. Check predecessor: there is no report with the same objects earlier than the current message

  5. Call BADI /K3TKZ/BADI_REP_SEQ_CHECK method AFTER_CHECK

The MPT status could be updated with transaction /K3TKZ/MPT_SN_INFO or program /K3TKZ/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 /K3TKZ/DOC_MONITOR with button Approval

 

4.7. Configuration ID determination

The Configuration ID represents the user / certificate for login to the MPT system and electronic signature of the message in the connector Java part configuration file. 

Multiple Configuration ID are supported.

Maintain Configuration ID in the transaction /K3TKZ/CONF under “Configuration ID” 

Field

Description, Values

Configuration ID

Free text used to describe the Configuration ID

Config description

Description

Delay Response

Delay in seconds before first response for notification

Max error

Maximum error counter before set notification status “No response”

User Apprvl

Wait explicit user approval (optional)

Signature required

Manual signature via NCA Layer required

 Maintain Participant Tax code in the transaction /K3TKZ/CONF under “Participant Tax code” 

Field

Description, Values

Participant tax code

Participant Tax code from notification

Configuration ID

Free text used to describe the Configuration ID

4.8. Inbound Documents processing

Activate inbound Documents processing in the transaction /K3TKZ/CUST in the transaction /K3TKZ/CUST under “Relevant industry”.

Field

Description, Values

Industry

Industry relevant for connector operations

Inbound document active

Flag to activate inbound document processing

Maintain inbound filter customizing in the transaction /K3TKZ/CUST node “Inbound Filter”

Field

Description, Values

Configuration ID

Configuration ID for the MPT cabinet where the document expected

Industry

Industry relevant for document processing.

Example: 20

Document Int.sec

Interval between inbound document requests

Document Ovl.sec

Document overlap in seconds (“Date from” field to request inbound document will be calculated as Last Run time – Document overlap)

 

The report /K3TKZ/MPT_DOC_IN shall be planned as a background job to request from MPT and process the documents. The document processing executed with AIF functions and visible in the transaction /AIF/ERR.

The 3Keys Kazakhstan Connector for MPT provides the list of function modules for processing of inbound messages.

Function module /K3TKZ/AIF_DOC_IN_NO_REACTION set document status based on MPT document status.

Assign the processing function module in the transaction /K3TKZ/CONF node “Inbound Document processing”

Field

Description, Values

Doc Type

Document type of inbound document (Example:
0004 – IMPORT_TRANSIT, 0005 – KZ_UPD )

Sender Bin

Sender tax number from MPT document (optional)

Receiver Bin

Receiver tax number from MPT document (optional)

Sequence

Sequence 

Function Module

Execution function module

Alert Category

Alert category for email notification (optional)

Description

Description

 

In common inbound document processing is presented on the following diagram

 

4.9. Background jobs for report processing

4.9.1. Report sending

The report /K3TKZ/MPT_DISPATCHER (could be planned as background job or run manually via transaction /K3TKZ/DISP) collects created reports with status “Sequence check” and “Ready for sending”, perform sequence check and send report to MPT 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 /K3TKZ/MPT_SEND

4.9.2. Response processing

The report /K3TKZ/MPT_RESPONSE (could be planned as background job or run manually via transaction /K3TKZ/MPT_RESPONSE) collects send reports with status “Send”, receives report status from MPT 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 /K3TKZ/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 /K3TKZ/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 /K3TKZ/MPT_RESPONSE

4.9.3. OMS report processing

The report /K3TKZ/OMS_REP (could be planned as background job or run manually) collects events with processed BR_CRYPTO_COMM reporting events, checks status at MPT 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 /K3TKZ/OMS_REP

5. Enhancements of the Solution

The 3Keys Kazakhstan connector MPT 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 /K3TKZ/CL_3K_RULE_PROC to custom class using table /K3TKZ/C_RTYPE and implement own logic with ABAP to skip specific rule after rule configuration reading 

Maintain rule type in the transaction /K3TKZ/CUST under “Rule Type”

Field

Description, Values

Rule Type

Rule type

Example Z3KKZ_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  /K3TKZ/IF_3K_RULE_CONDITIONS. Custom logic needs to be created at method /K3TKZ/IF_3K_RULE_CONDITIONS~EXECUTE.

Maintain rule condition in the transaction /K3TKZ/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 XML 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 /K3TKZ/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 /K3TKZ/CUST, node “Mapping Attributes”, column “Mapper Class”.

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 /K3TKZ/CL_IMPORT_MAPPER (or copy of this class) and assign this new class to relevant rule type via transaction /K3TKZ/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 MPT report type

The new MPT reporting type not existing in the 3Keys Kazakhstan Connector MPT 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 /K3TKZ/S_MPT_IMP_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 /K3TKZ/CUST (“Mapping attributes” node)

  • Add logic to extract report data implementing BADI /K3TKZ/BADI_REP_PARSE

  • Create customizing for new rule via transaction /STTP/CUST_RULES (3Keys General rule)

  • Create customizing for new rule via transaction /K3TKZ/CONF (“Rule configuration” node)

  • Create logic to parse data by implementing Badi /K3TKZ/BADI_REP_PARSE

5.1.4. New industry

The new industry not supported by SAP ATTP standard can be created with following steps:

  1. Create fixed value append for domain /STTP/D_INDUSTRY (for example ZP – Perfume). Skip this step if industry is supported by 3Keys Kazakhstan Connector for MPT.

  2. Specify relevant industry for reporting (transaction /K3TKZ/CUST, node “Relevant Industry”) 

  3. Add new REST path for created industry (transaction SM30 view /STTP/V_RSRVPATH)

  4. 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 MPT can be created with following steps

  1. If base class for API processing does not exist create child class of /K3TKZ/CL_TRUE_API_REQ as custom class ZCL_TRUE_API_REQ

  2. Create method GET_INSTANCE_ATT as copy of GET_INSTANCE at custom class ZCL_TRUE_API_REQ

  3. Create new constant for rest operation (use constant /K3TKZ/CL_REST_CONST=>GCS_REST_OPERATION-NOTIFICATION-MPT-GET_CISES_INFO as example)

  4. Add new REST path for created REST operation (transaction SM30 view /STTP/V_RSRVPATH)

  5. Create processor class (use class /K3TKZ/CL_TRUE_API_CISES_INFO as example), for example ZCL_TRUE_API_CISES_INFO2

  6. 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

  7. Implement new created API processing class ZCL_TRUE_API_REQ call into custom code

5.1.6. Enhancement spot /K3TKZ/ES_REP

Badi

Description

/K3TKZ/BADI_REP_PARSE

Parse MPT report data

Additional processing logic to parse notification data into  report monitor entry on notification creation

/K3TKZ/BADI_REP_RESPONSE

Get Response from MPT

Additional processing logic to change report monitor entry after report response receiving

/K3TKZ/BADI_REP_SEQ_CHECK

Sequence check on MPT Interaction

Redefine default sequence check logic with own logic

/K3TKZ/BADI_CHANGE_AFTER_CHECK

MPT: Change Data After Check

Redefine check result on notification creation with own logic

/K3TKZ/BADI_CHANGE_AFTER_MAP

MPT: Change Data After Mapping

Redefine field mapping on notification creation with own logic

 

5.2. Enhancement for navigation to ATTP cockpit

Add general customizing parameter /K3TKZ/COCKPIT_NAVIG (usage scope Customizing) to enable navigation to ATTP Cockpit from transaction /K3TKZ/DOC_MONITOR using transaction /STTP/CUSTGEN

Component

Customizing Parameter Key

Customizing Parameter Option

Value

REP

/K3TKZ/COCKPIT_NAVIG

 

X