OpenSAP Btp4 Week 3 All Slides
OpenSAP Btp4 Week 3 All Slides
Custom post-processing
after mapping
Custom Communication Custom Pre-Processing Custom Mapping Custom Post- Custom Receiver
Sender Flow Integration Flow Integration Flow Processing Inte- Communication
Custom receiver gration Flow
communication Communi-
cation and set
parameters
Pre-processing
flow steps
Mapping flow
steps
Post-processing
flow steps
Communi-
cation and set
parameters
steps steps
▪ Not all
− Required communication is supported
− Manipulation or mapping of payloads is possible
− Data will be available at the point of time of processing
▪ Customized integration flows connected via ProcessDirect
help fulfill the additional requirements at
− Communication sender and/or receiver side
− Mapping, enriching, or manipulation via custom mapping,
pre-processing, and/or post-processing
▪ Naming conventions support consistent creation,
categorization, and search for related custom integration
flows
▪ Bear in mind: Next releases may provide standard features
for existing customizations
Suggestion: Think about the migration strategy
© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 13
Thank you.
Contact information:
[email protected]
Follow all of SAP
www.sap.com/contactsap
parameters
SAP_EDI_REC_Sender_Routing_Add UNB/[02]S002/[03] EDI_DC40/[22]SNDSAD
Mapping:
▪ Central configuration and provisioning of values for mappings
Receiver Communication:
▪ Configuration parameters for receiver communication
▪ Additional ProcessDirect-based receiver communication channels
Outbound Direction
▪ Overruling already set TPM communication parameters
How to create
▪ Simply via import of CSV files
For what are individual activity parameters useful? Create Activity-Related Custom Parameters
▪ Sender Interchange:
– Pre-Processing: e.g. sender message function, sender extension
parameters
▪ Mapping: e.g. controlling agency, message function,
▪ Receiver Interchange Inbound Direction → Activity Parameters Defined in TPA Template
– Envelope/Message Header: e.g. message function, extension types
– Post-Processing: e.g. receiver message function, receiver extension
functions
▪ Receiver Communication: e.g. email/AS2 (SMTP) subject, email AS2 Outbound Direction → Activity Parameters Defined in TPA
content type, SFTP directory
Mapping Guideline → Global Setting of Custom Parameters in Business Transaction Declaration of Custom
Activity Parameters in MAG
Parameters
▪ Custom parameters must be set as global
parameters
a) Single values:
▪ e.g. create date time stamp with
adjusting time zone using the custom
parameter $Trading_Partner_Timezone a) Mapping
Element Function
b) With lists (lookup tables): Using Single
Values
▪ e.g. provide a target value based on a
match of compound of source values
with the entries in CVM table
$CVM_TaxCode for getting the resulting
tax code b) Mapping
Element Function
Using Lookup
Tables with a
Compound of
Source Values
© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 9
Using dynamic parameters
Demo: definition and usage of custom parameters in mappings
[email protected]
Follow all of SAP
www.sap.com/contactsap
Activated Trading
Once the TPA is successfully activated, you can Partner
check what kind of data is pushed into the partner Agreement
directory for each business transaction activity
a) Check that the TPA is activated
b) Open the “View Data” in the Business Transaction →
Partner Directory Data → Inbound or Outbound
Display in API-
An end-to-end flow can be effectively simulated Based Test Client
using an API-based test client, where you can
see the sender and receiver interchange payload
in one view Enablement of
Sender/Receiver
To do this: Communication
Channels
▪ You should prepare two custom communication flows
(available as package):
– Step 1a – B2B Simulation. Sender that receives the Custom Integration Flows
calls from API test client hands over to Step 1b and
returns the processing results back to the API test
client
– Step 3b – B2B Simulation Receiver. It inserts
linefeeds (in UN/EDIFACT or ASC X12) and stores
them in datastore for the response via Step 1a
▪ In TPM: Both custom communication flows should be
enabled as ProcessDirect sender and receiver
communication channels
© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 5
Validating the end-to-end scenario
How to set up a test end-to-end scenario – Preparation in the API test client
HTTP Header Parameters
Changes in Trading
Partner Agreement
Due to the identified mismatch, you need to
change the following in the TPM:
▪ Trading Partner Agreement/Profile Parameters
a) Type System Version
b) Company Identifier (Sender in Outbound
Direction)
c) Trading Partner Identifier (Receiver in
Outbound Direction)
▪ Sender Interchange Payload, deletion of
d) SNDPRT – Sender Partner Type
Changes in New PID and
e) RCVPRT – Receiver Partner Type Sender PID String After
because both are not yet supported Interchange Update in
Payload Partner
The updated PD entry should have the same Directory
PID string:
Process_Direct-SAP_IDoc--755-BSQA1001-
----TGB10213244-----INVOIC.INVOIC02
Process_Direct-SAP_IDoc--755-BSQA1001-----
TGB10213244-----INVOIC.INVOIC02
Example: Based on the definition of the MIG, the following errors will be shown:
a) Value of KUNDEINR is too long
b) Code of FKTYP is not defined in the MIG
c) According to the assertion rule, the value of CURCY is not the same as EU
[email protected]
Follow all of SAP
www.sap.com/contactsap
Reason:
▪ There is a fatal mapping error in the Mapping Guideline
so the XSLT cannot be generated.
The consequence: The TPA cannot be activated or
updated
▪ At least one mapping element has a syntactically
incorrect function
Root Cause:
▪ Do a simulation in MAG before TPA activation or updating
Issue
▪ Subsequent change of identifier leads to processing error
after updating the business transactions
Reason:
▪ All subsequent changes in the TPA overview will not be
updated in the partner directory while just clicking on
“Update” (a)
Root Cause:
▪ Do “Deactivate” (b) and “Activate” instead of “Update” (a)
BSQA1001
Reason:
▪ At least one of the key values in the sender interchange payload header
is incorrect:
– Communication protocol type value (a)
– B2B standard type (type system) (b)
– Message type (c)
– Message type or B2B standard version (d)
– Sender or partner ID, qualifier, or type (e)
– Receiver or partner ID, qualifier, or type (e)
Reason:
▪ The sender interchange payload based on UN/EDIFACT or
ASC.X12 might be incorrect in its syntax representation or
might have incorrect values in the headers or trailers
Reason:
▪ The IA generated (source/target) Russian Doll is invalid,
because at least one node has inconsistencies in its
properties, such as fixed value and the selected code value
do not match.
Reason:
▪ The output does not match the defined validation rules in the target MIG:
– Mandatory elements are missing
– Value is too long or does not match the primitive type
– Code value does not match the defined list
– Violation of integrity condition (assertions)
Reason:
▪ The output does not fit to the expected syntax rules
(esp. ASC X12, UN/EDIFACT or TRADACOMS)
Processing failed:
... No consumers available on endpoint
▪ The ProcessDirect addresses of the custom processes do not match
Processing failed:
... SaxonApiException: Errors were reported during stylesheet compilation
▪ Issues with the mapping, such as incorrect functions
Processing failed:
... Failed to resolve endpoint:
xslt://pd:SAP_TPM_47705c5ebb9b1b001f8d64c0ec9d614c:MAPPING_XSLT:Binary
▪ The MAG is not available in the partner directory
[email protected]
Follow all of SAP
www.sap.com/contactsap
In the overview list of Mapping Guidelines, click Overview list of Mapping Guidelines → Export
“Export”
In Trading Partner Management → Cross Actions Display result of export action at “Cross Actions”
overview, you’ll see the status of the actions
Exported file in
download folder
In the overview list of Mapping Guidelines, click Overview list of Mapping Guidelines → Import
“Import”.
After processing, the import action entity has the status Final status
▪ Completed, if the content is imported successfully of import
action
▪ Failed, if the content cannot be imported.
In most cases, the referenced MAGs or MIGs do not exist in
the target tenant
After a successful import you should see the imported entries: Imported trading partner agreement
▪ Trading partner profile and company profile with identifiers,
communication channels, custom parameters, and security, if
selected
▪ Trading partner agreement template and trading partner
agreement with custom parameters, and references to MAGs
as well as MIGs, if selected
Procedure
▪ First time: Content should be complete
▪ Properties may be changed accordingly, for example, the
communication channels
▪ Updates: Content will be updated. Make sure that changed
properties will not be overwritten
© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 8
Export and import in a multi-tier system
Demo: how to export and import Mapping Guidelines and trading partner agreements
[email protected]
Follow all of SAP
www.sap.com/contactsap
Comparison
▪ Displays the differences in the structures and
details
▪ Can be also used for comparing MIGs based on
same message types
MAG → Overview
d) Possibility to change the versions of assigned
source/target MIGs
[email protected]
Follow all of SAP
www.sap.com/contactsap
Initially
▪ The MIGs will be created from the payloads
▪ The draft MAG is made by the proposal service
– The quality of the proposal depends on the contributions by
the crowd
– Therefore: Please activate the MIGs and MAGs before
transport
[email protected]
Follow all of SAP
www.sap.com/contactsap
Name Standard Sender Header Parameters Standard Receiver Header Parameters TPM UN-EDIFACT ASC-X12 SAP-IDoc SAP-SOAP
Receiver System Identifier SAP_EDI_GS_Receiver_ID SAP_EDI_REC_Receiver_System_ID TRUE UNG/[03]S007/[01]0044 GS/[03]124 EDI_DC40/[24]RCVPOR MessageHeader/[09]RecipientBusinessSystemI
D
Interchange Reference Number SAP_EDI_Interchange_Control_Number SAP_EDI_REC_Interchange_Control_Number TRUE UNB/[05]0020 ISA/[13]I12 EDI_DC40/[03]DOCNUM MessageHeader/[01]ID/[04]CONTENT
IEA/[02]I12 (Receiver)
Create Company
Create company profile Profile
partner role, partner function of e-mail address (for e-mail communication) yes
application
▪ Copy test data from QA business application into test data directory
▪ Create MIG via provided test data Another
business
transaction
▪ MIG should be in draft while complete cycle created activity?
Create Trading
Create trading partner profile per trading partner Profile
trading partners
▪ Get test data from trading partner Another
business
transaction
– Adjust it according to the given company-related test data activity?
▪ Activate TPA no
no
– Run tests with provided test data based on agreed test cases
Another
– Compare test results with expected test data Activate Trading Activate MIGs and business yes
Partner Agreemnt MAG transaction
– Update B2B integration content accordingly activity?
no
Transport to QA
Tenant
© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 7
Lifecycle management Test Trading Partner Agreement
QA tenant: test trading partner agreement with trading partner QA Tenant DEV Tenant
Start
▪ Run all agreed test cases and collect all change requests from no
PROD tenant: set trading partner agreement productive PROD Tenant DEV Tenant QA Tenant
Start
Import B2B
integration content
Test
If QA tests are
▪ Activate trading partner agreement
Production
required?
Productive mode no
Changes/fixes
▪ Collect bugs and change requests requied on
priority
Ask for
confirmation
Confirm for
tested with trading partner Stop
productive use
[email protected]
Follow all of SAP
www.sap.com/contactsap