Vous êtes sur la page 1sur 14

SAP Development Community of Experts

The Development Soapbox

Interface Logging
Architecture

Tyson Crosby
tyson.crosby@accenture.com
Canada Delivery Centre

1
SAP Development Community of Experts

Interface Logging Architecture The Development Soapbox

Overview

Business Benefits
Architecture Explained
Architecture Flow
Demo of Architecture
Questions

2
SAP Development Community of Experts

Interface Logging Architecture The Development Soapbox

Opening Questions

What is the Last Requirement We Typically Receive


from the Business for Interfaces?

How Often do you Receive Requests to Add Log Files


and or Email Functionality to an Interface at the Last
Minuet?

3
SAP Development Community of Experts

Interface Logging Architecture The Development Soapbox

Business Benefits

Ability to Consolidate Logging in One Central Location

Ability to Add Email Logging Functionality by Calling a


RFC

Ability to Write Log File to Application Server by Calling


a RFC

Ability to Provide a Single Transaction for Viewing logs

4
SAP Development Community of Experts

Interface Logging Architecture The Development Soapbox

Architecture Explained
Four Custom Tables
RICEF Id Check Table
Contains RICEF Ids, Sub Ids, and Descriptions
Contains Direction and Logical File Path for Log File Generation

Email Detail Table


Contains RICEF Ids and Sub Ids
Contains Message Classification (Transactional or Technical)
Contains Recipient Type (SAP Inbox or Email)
Contains Errors Only Flag (Only Email When Errors Occur)

Interface Log Table


Contains RICEF Ids, Sub Ids, and Source System
Contains Interface Transaction Id, Execution Date, and Execution Time
Contains Message Details including Message Classification (Transactional or Technical)

5
SAP Development Community of Experts

Interface Logging Architecture The Development Soapbox

Architecture Explained
Four Custom Tables
Interface Direction / Source
Contains Interface Direction, Source, and Processing Order
These Details are used by the Display Interface Logs Program
When Determining How to Sort the Messages.

6
SAP Development Community of Experts

Interface Logging Architecture The Development Soapbox

Architecture Explained
Four Custom RFCs:
Get Interface Transaction Id
Generates Next Available Number using SAP Custom Number Ranges (T-Code OYSN)
Two Number Ranges Have Been Developed. One for Inbound and One for Outbound.

Add Messages to Log Table


Validates and Adds Messages to the Interface Log Table.
Messages can Be Add One at a Time or Can Be Sent in with Multiple Entries.

Get Messages from Log Table


Retrieves Messages from the Interface Log Table.

Create Email / Log File


Triggers the Creation of the Generic Log Email and/or the Creation of the Log File on the
Application Server.

7
SAP Development Community of Experts

Interface Logging Architecture The Development Soapbox

Architecture Explained
Two Custom Programs
Maintain Table Entries
Single Transaction Code Created to Maintain the Table Entries in the RICEF Id, Email, and
Direction / Source tables.

View Logs
Single Transaction Code Created to Allow End Users to View the Interface Logs.
Code is Setup to Purge Logs that are Over 90 Days Old.
This Program also Contains the Logic for Generating the Generic Emails and the
Generation of the Log Files. These options are Hidden from the End User So They Can Not
Manually Trigger Them.

Common Includes
A Common Top Include Has Been Created to Ease the Migration of the Code from Project to
Project.
A Common Subroutine Include Has Been Created to Help Drive Consistency in Creation of
Interface Logs

8
SAP Development Community of Experts

Interface Logging Architecture The Development Soapbox

Architecture Flow
Inbound / Outbound Interface:

Step 1 (Initiating System):


- Call RFC to Get Unique Interface Transaction Id.

Step 2 (Initiating System):


- Add Initial Messages
- Add Processing Messages
- Add Closing Messages

Step 3 (Initiating System):


- Pass Unique Interface Transaction Id from Step 1 to Middleware Along with Data

9
SAP Development Community of Experts

Interface Logging Architecture The Development Soapbox

Architecture Flow
Inbound / Outbound Interface:

Step 4 (Middleware System):


- Add Initial Messages
- Add Processing Messages
- Add Closing Messages

Step 5 (Middleware System):


- Pass Unique Interface Transaction Id Received from Initiating System from Step 3 to
Receiving
System Along with Data

10
SAP Development Community of Experts

Interface Logging Architecture The Development Soapbox

Architecture Flow
Inbound / Outbound Interface:

Step 6 (Receiving System):


- Add Initial Messages
- Add Processing Messages
- Add Closing Messages

Step 7 (Receiving System):


- If Required, Call RFC to Trigger Email and or Log File Creation.

11
SAP Development Community of Experts

Interface Logging Architecture The Development Soapbox

Architecture Flow
Inbound / Outbound Interface:

Error Handling:

If an Error Occurs In the Initiating System (Step 2 or 3), it is Responsible for Triggering
the Email and or Log File Creation (if required).

If an Error Occurs In the Middleware Tool (Step 4 or 5), it is Responsible for Triggering
the Email and or Log File Creation (if required).

If an Error Occurs In the Receiving System (Step 6 or 7), it is Responsible for


Triggering the Email and or Log File Creation (if required).

12
SAP Development Community of Experts

Interface Logging Architecture The Development Soapbox

Demo of Architecture

13
SAP Development Community of Experts

Interface Logging Architecture The Development Soapbox

Questions

14