cancel
Showing results for 
Search instead for 
Did you mean: 

Business logic vs Integration logic - IDoc splitting to be done in PI or SAP (ABAP)

phanikumar_akella
Participant
0 Kudos

Hi Experts

I am working on change to existing file to multiple IDocs interface. We receive a file say ABC with multiple records.Currently PI is reading the file and creating Z_ABC1 and Z_ABC 2 Idocs (java/sax mapping in PI) based on below logic

Condition for ABC1 IDoc - if records S1,S2, and S3 records are together then Z_ABC1 idoc needs to be created

Condition for ABC2 IDoc - if S1,S7 and S8 segments are together then Z_ABC2 IDoc needs to be created.

Sample ABC inbound file should create 2 Z_ABC1 and 3 Z_ABC2 IDocs.

Currently the splitting logic is implemented in PI using java mapping (SAX parser) based on above ,mentioned conditions. In our design meetings we had multiple design approaches presented by team.

Approach 1 - Minimum customization need to be done at SAP and hence the IDocs needs to be split at PI and sent to SAP

Approach 2 - Business logic needs to me implemented in SAP hence this splitting should be done in SAP.

My question is:


What is the best practise to design this interface? As per my understanding Approach 1 should be apt in current scenario. Please provide your expert comments on best design approach and any other parameters need to consider here?

Sample ABC file:

Header

S1......

S2.......

S3......

S1......

S7......

S8......

S1......

S7......

S8......

S1......

S2.......

S3......

S1......

S7......

S8......

Trailer

Accepted Solutions (0)

Answers (3)

Answers (3)

Shabarish_Nair
Active Contributor
0 Kudos

The purpose of tools like PI is to reduce customization on the backend business applications.

Always keep the business logic in the backend but scenarios like merge, split etc should be left to the ESB. I will suggest you realize your requirement in PI rather than customizing ECC

Former Member
0 Kudos

The sorting/grouping of the records based on a certain logic is integration logic.

The scenario doesn't end at grouping the records. But IDOC's need to posted in ECC.

There will be heavy custom coding in ECC if the split is done in ECC.

Your first approach is good.

~ Siva

Harish
Active Contributor
0 Kudos

Hi PhaniKumar,

you need to first define if the above logic is business logic or integration logic. As per my understanding it is a integration logic to get the data from third party system to SAP system. In this logic we are not modifying/changing the business process but we are extracting the relevant message to route to a business process.

So the integration can reside on SAP PI (and i would suggest should reside on SAP PI). and your first approach is good.

Please refer the below blog for more details about business and integration logic

Regards,

Harish