среда, 21 мая 2014 г.

ERP <--> SCM integration tricks

BALHDR Duplicate Records

During Integration Model Activation (CFM2), espessially if you are playing with IDES, error message can appears:

  • SAP SQL Insert Duplicate Records

Or short Dump (check both systems, ERP and SCM)

  • SAPSQL_ARRAY_INSERT_DUPREC
The reason could be difference between current number of records BALHDR-table, t-code SLGN
You should implement note:

196113 - SAPSQL_ARRAY_INSERT_DUPREC, BALHDR


Errors clarifying

During Integration Model Activation (CFM2), you can have general errors, like this (ERP system):
To have more information, you can go to SCM system, t-code /SAPAPO/CC Core Interface Cockpit, where error is more detailed:


After error correction you have to delete Queues with errors (t-code SMQ1) and re-launch activation.



четверг, 8 мая 2014 г.

IDOC Data Filtering

If you are going to transfer IDOC-s between systems, you may be need to restrict data during it.
In my case I want to transfer only one valuation type for material (MATMAS, segment E1MBEWM, field BWTAR).
By the way, to block all valuation type segments  you can use t-code BD56 (table TBD20):


To activate filter, in BD64 (change mode) double click on "No filter set":

In pop-up screen push "Create Filter Group"

Then  double click on field and populate the values, you want to transfer:

To extend the filter values, you need to do additional steps.

In SWO1 define business object you want to handle (for MATMAS - BUS1001001) --> Display --> Methods --> Clone (doubleclick) --> ABAP tab --> Name (doubleclick) --> Tables tab --> Associated Type (for example BAPIE1MBEWRT) --> Component (for example VAL_TYPE = BWTAR)

Now in BD95 create new entry based on data, defined in SWO1, save it:

In BD59 point message type (MATMAS):

and create new entry with new field, save:

Result in BD64 field Valuation Type is in filter now:



среда, 7 мая 2014 г.

How to connect two systems for IDOC interaction

In this post you will know, how to setup connection between two clients (SAP system - the same) for IDOC interaction (Message type MATMAS).
As usual, installed IDES SAP system has at least two clients with data. In my case - IDES DI/MILL PRODUCTS 2011 installed and I have next clients: 
  • 710 Discrete Industries
  • 720 Mill Products
In t-code SM59 you need to setup ABAP RFC Connections:
from 710 client - MIL_00_720
from 720 client - DIS_00_710

Technical settings from 710 client for MIL_00_720 connection:
1- Target host, 2- Instance number

Logon & Security:
Client (720), User (IBS_RFC - standard IDES user), Password - minimum 8 digits

Unicode: Is better to mark Unicode radiobutton

Connection test:

Also you should do the same for DIS_00_710 connection from 720 client.

Next step - setup in 710 client distribution model  for MATMAS IDOC in t-code BD64
Create model view:
Add message type (MATMAS):
Add message type (SYNCH) - you need it for distributing:

Result:

Next step - setup in 710 - Generate Partner Profile for model view




Next step - setup in 710 - Distribute model view to 720 client (after Save):




After that model view D710__M720 appears in 720 client:

Now you should generate partner for distribution model in 720 client:


Test material transfer from 710 to 720 client (BD10):

WE05 in 720 client

For MATMAS IDOC is possible to see error log in MM90
One more usefull t-code - BD12 for customer distribution (IDOC DEBMAS)

More customizing can be done here:

SPRO -- Application Server -- IDoc Interface / Application Link Enabling (ALE)

-- Modelling and Implementing Business Processes -- Global Organizational Units -- Cross-System Company Codes

-- Modelling and Implementing Business Processes -- Converting Data Between Sender and Receiver