You are on page 1of 69

SAP- APO

CIF Training

Integration

Contents

Introduction
CIF concepts and principles CIF administration CIF troubleshooting CIF configuration Summary Appendix I APO BAPIs

SAP 2007 / Page 2

By : Rahul Mohnot

Aims

Understand why CIF is necessary Understand basic principles of CIF Learn how to administer CIF Learn how to troubleshoot CIF

SAP 2007 / Page 3

By : Rahul Mohnot

1. Introduction

What is CIF? Why CIF? When is CIF used?

SAP 2007 / Page 4

By : Rahul Mohnot

What is CIF?

Literally Core Interface Communication layer to be applied to R/3 to enable an exchange of data between SAP APO and R/3 APO Core Interface serves to connect APO to one or more R/3 systems in the form of a socalled tight coupling Guarantees an incremental supply of relevant data changes to APO Delivered as R3 Plug-in Set of transactions and programs for

Interface definition Data transfer Data reconciliation and Problem analysis & resolution

SAP 2007 / Page 5

By : Rahul Mohnot

Why CIF?

APO is a separate system to R/3


APO has been designed to work with R3 as well as other systems APO has different hardware requirements to R/3 APO has Advanced features that not all clients require

APO used for planning/ATP, R/3 for execution

APO & R3 are part of the same business system so must use the same data wherever possible.

No need to create custom interface

Despite being separate systems, R3 & APO are commonly used together. SAP have therefore provided CIF as standard functionality.

SAP 2007 / Page 6

By : Rahul Mohnot

CIF Functions versus BAPI Functions Architecture

SAP R/3
SD
LO

non R/3 System

HR

CIF
(Core Interface)

BAPI BAPI

BAPIs

SAP APO

BAPI

SAP 2007 / Page 7

By : Rahul Mohnot

When is CIF used?

Plant Material master BOM / PPM Schedule Agreement

CORE INTERFACE

Master data

Master data Location Material master BOM / PPM Schedule Agreement

R3
Transaction data Requirements/Consumption Planned orders Production Orders Purchase Orders Confirmations

APO
Planning results Purchase Order/Req Stock transfer Order/Req Customer (VMI) Production /Planned Order ATP Request

SAP 2007 / Page 8

By : Rahul Mohnot

Contents - Review

Introduction CIF concepts and principles CIF administration CIF troubleshooting Summary Appendix I APO BAPIs

SAP 2007 / Page 9

By : Rahul Mohnot

2. CIF Concepts & Principles

Data Consistency is the ultimate aim of CIF


Integration models define shared data Queues ensure serialization Tools for consistency checking

Data Concurrency is also important


Near real-time update of transactional data Minimization of data transferred for performance

SAP 2007 / Page 10

By : Rahul Mohnot

Integration Models define shared data

APO Product

AW123456

MR123456

66123456

Integration model

R3 Material
SAP 2007 / Page 11

AW123456

MR123456

MR789101

66123456

By : Rahul Mohnot

Queues ensure serialization

Data changes made to a data object occur in the same order as they did in source system Queues also serve as buffer in case loss of R3-APO connection or excessive data exchange

SAP 2007 / Page 12

By : Rahul Mohnot

Outbound vs Inbound Queues Outbound only

R3

APO

R3 Outbound

APO Outbound

SAP 2007 / Page 13

By : Rahul Mohnot

Outbound vs Inbound Queues Outbound & Inbound

R3

APO

R3 Outbound

APO Inbound

R3 Inbound

APO Outbound

SAP 2007 / Page 14

By : Rahul Mohnot

Tools exist to check consistency

Data can become inconsistent between APO & R3 because:


Once data is placed in outbound queue, it is assumed the other system will receive that data Queues are blocked Queue data may be accidentally (or purposefully) deleted

Primary tool is consistency check - /SAPAPO/CCR

SAP 2007 / Page 15

By : Rahul Mohnot

Transactional data is updated in near real-time


Compared to master data, transactional data is constantly changing

In R3, execution data relevant to planning is being created or changed (eg shipping notifications) In APO, planning data relevant to execution is being maintained (eg schedule releases) refer next slide on how R3 is updated.

CIF will automatically update transaction data whenever it is changed in the source system

Assuming the object being updated exists in an integration model OR In the case of planning results from APO, the publication definition is maintained in configuration.

SAP 2007 / Page 16

By : Rahul Mohnot

CIF minimises quantity of data transfer to maintain performance


Master data changes are:

Less common Usually involve larger amounts of data

Therefore, are not real-time*

CIF uses the following techniques to minimise master data transfer


Delta transfer Change transfer

* Master data transfer can be real-time if configured, using Business Transaction Events.
SAP 2007 / Page 17

By : Rahul Mohnot

2. CIF Concepts & Principles Summary

Data Consistency & ConCurrency are important CIF principles Important concepts

Integration models Queues / serialisation

Consistency checking
Difference between master data & transaction data

SAP 2007 / Page 18

By : Rahul Mohnot

Contents - Review

Introduction CIF concepts and principles CIF administration CIF troubleshooting Summary Appendix I APO BAPIs

SAP 2007 / Page 19

By : Rahul Mohnot

3. CIF Administration

Integration model maintenance Change transfer Queue monitoring, maintenance Consistency checking Batch processing Housekeeping

SAP 2007 / Page 20

By : Rahul Mohnot

Maintaining Integration Models

Creation CFM1 Activation CFM2/CFM3 Display CFM4 Search CFM5 Change CFM6 Delete CFM7

SAP 2007 / Page 21

By : Rahul Mohnot

Create IM to define shared data

In transaction CFM1 you select the object types and objects to be included in the integration model Demonstration Save selection parameters as a variant

Variant effectively becomes your IM definition independent of the data objects that exist

Nightly update of all integration models

SAP 2007 / Page 22

By : Rahul Mohnot

Activate IM to share data

Activating integration model (CFM2/3):


Transfers master & transaction data defined in the integration model Starts automatic synchronisation of transaction data defined in the integration model

Use of delta logic

Data objects that are already in active integration models are NOT transferred

Demonstration

SAP 2007 / Page 23

By : Rahul Mohnot

Display IM to see shared data

Transaction CFM4 will show a count of objects per object type. Drill-down to see objects Useful when you need to heck weather an object exist in IM or not.

Demonstration

SAP 2007 / Page 24

By : Rahul Mohnot

Search in IM to help troubleshoot

Transaction CFM5 helps you find the integration model(s) to which a data object belongs Useful when you need to remove a data object from all integration models, eg production version

Demonstration

SAP 2007 / Page 25

By : Rahul Mohnot

Change IM to modify shared data

Transaction CFM6 allows you to add or delete objects from an integration model Useful when you want to make a small, temporary change to an integration model Use when you want to re-CIF a particular data object:

Remove object from active model Activate new IM (without object) Activate old IM delta update means only the object is transferred

Demonstration

SAP 2007 / Page 26

By : Rahul Mohnot

Delete IM as part of housekeeping

Transaction CFM7 lets you delete inactive integration models Typically used in regular batch job Useful when you need to delete production version cant delete when part of IM (active or inactive) Demonstration

SAP 2007 / Page 27

By : Rahul Mohnot

3. CIF Administration

Integration model maintenance Change transfer Queue monitoring, maintenance Consistency checking Batch processing Housekeeping

SAP 2007 / Page 28

By : Rahul Mohnot

Change transfer for Master Data

Remember the difference between initial transfer (with delta logic) and change transfer!

Change transfer works at the data field level (eg Material description) Initial transfer (with delta logic) works at the data object level (eg Material Master)

SAP help uses terminology Change transfer for the transfer of any changes to data. Here we are talking about transferring changes using ALE change pointers.

SAP 2007 / Page 29

By : Rahul Mohnot

How change transfer with change pointers works

Material Master AW339701


Material Description PANEL,ROOF Procurement type E F MRP Controller 303 Lot size EX

Table BDCPV
Object Field Old Value New Value

AW339701 Proc. E a field within F a master When a change is Type made to data object, it is recorded

This recording is known as a change pointer


Change pointers can be viewed in table BDCPV

SAP 2007 / Page 30

By : Rahul Mohnot

Processing change pointers

Program RCPTRAN4 is run for


Material

Masters Work Centers Vendors Customers

Table BDCPV
Object Field Old Value
E Active X X

New Value
F Data object AW338699 AW339701 AW339701

AW339701 Proc. Type Integration Model MD_MAT_NV (19/2/05) MD_MAT_NV (19/2/05) MD_MAT_NV (18/2/05)

Change pointers are scanned Check object for a change pointer is in an active integration model Update corresponding field in APO

AW399701 Proc type = F

APO

SAP 2007 / Page 31

By : Rahul Mohnot

3. CIF Administration

Integration model maintenance Change transfer Queue monitoring, maintenance Consistency checking Batch processing Housekeeping

SAP 2007 / Page 32

By : Rahul Mohnot

Queue monitoring

Monitor queues for queue blockages so that R3-APO data are kept consistent SMQ1 Monitor outbound queues /SAPAPO/CQ Queue Monitor CFG1, /SAPAPO/C3 Monitor Application Logs /SAPAPO/CPP CIF Post-processing

SAP 2007 / Page 33

By : Rahul Mohnot

What is a queue blockage?

R/3

APO
Error Data updating updated

Blockages occur when data cannot be updated in the destination system Queue entries (LUWs) behind the blockage are not processed until blockage resolved

SAP 2007 / Page 34

By : Rahul Mohnot

Use the Queue Monitor to resolve blockages


In SMQ1 (R3 and APO):

See outbound queues Display queue entries (known as LUWs) and contents Activate queues Delete queues (be careful!) Lock queues Debug queues

Demonstration

SAP 2007 / Page 35

By : Rahul Mohnot

Or manage queues centrally

Queue Manager (/SAPAPO/CQ) helps manage outbound queues for both R3 & APO Same functions available as SMQ1 Interface more user-friendly Double-clicking on blocked queue takes you to relevant Application Log entry. Demonstration

SAP 2007 / Page 36

By : Rahul Mohnot

Application logs help troubleshooting

Application logs record CIF errors, warnings and information messages encountered during data transfer They usually provide some indication as to cause of error In APO, logs can be viewed in /SAPAPO/C3 In R3, logs can be viewed in CFG1 Demonstration

SAP 2007 / Page 37

By : Rahul Mohnot

CIF post processing

Much of the data sent from APO does not require strict serialisation

Eg schedule releases for an agreement are sent in entirety

In this case, the CIF post-processing log is used to avoid queue blockages:

R/3
Error Data updating updated

APO

Remove cause of error


SAP 2007 / Page 38

CIF Postprocessing log


By : Rahul Mohnot

3. CIF Administration

Integration model maintenance Change transfer Queue monitoring, maintenance Consistency checking Batch processing Housekeeping

SAP 2007 / Page 39

By : Rahul Mohnot

Assessing and resolving consistency

/SAPAPO/CCR is used to detect inconsistencies between R3 & APO in a range of transactional object types. Inconsistencies can then be corrected within same transaction.

Demonstration

SAP 2007 / Page 40

By : Rahul Mohnot

Consistency between APO and Livecache is also important


Although not directly related to CIF, consistency of data between the APO database and livecache requires monitoring /SAPAPO/OM17 can be used to check for and resolve inconsistencies Program /SAPAPO/PWB_KILL_INCO detects and resolves inconsistencies for purchase orders/schedule lines

SAP 2007 / Page 41

By : Rahul Mohnot

3. CIF Administration

Integration model maintenance Change transfer Queue monitoring, maintenance Consistency checking Batch processing Housekeeping

SAP 2007 / Page 42

By : Rahul Mohnot

CIF batch jobs help automate CIF Administration


R3 Batch jobs

PRDx_CIF_CHANGETRANSFERS_ddd PRD0_CIF_MATERIAL_MASTER PRD0_CIF_PPEDELTA PRD0_CIF_PRESSSHOPPLAN PRD0_CIF_SCHED_AGREEMENTS PRD0_CIF_REQUIREMENTS PRD0_CIF_STOCK PRD0_CIF_PPECHANGE PRD0_CIF_HOUSEKEEPING_DAILY PRW7_CIF_IPPECIF_EKG_COMPARE

SAP 2007 / Page 43

By : Rahul Mohnot

Batch jobs run programs in background

RIMODGEN regenerates integration model. RIMODAC2 activates new integration modelRSPPMCHG sends PPM master data changes RCPTRAN4 sends other master data changes Use SE38 to manually run programs/change variants

SAP 2007 / Page 44

By : Rahul Mohnot

APO Batch jobs

PSD0_CIF_PWB_KILL_INCO_MAT_DAILY runs livecache consistency check for schedule lines PSR_CIF_MAIL_POSTPROCESS_2 HOUR sends email alerting of new post-processing logs PSR_CIF_MAIL_QUEUE_ERROR_2 HOUR sends email alerting of queue blockage PSD0_APPLOG_DELETE

SAP 2007 / Page 45

By : Rahul Mohnot

3. CIF Administration

Integration model maintenance Change transfer Queue monitoring, maintenance Consistency checking Batch processing Housekeeping

SAP 2007 / Page 46

By : Rahul Mohnot

Housekeeping for performance, ease of use

Application logs regularly cleared

/SAPAPO/RDELLOG, RDELALOG

Old integration models deleted

RIMODDEL

Clear obsolete/expired post-processing logs

/SAPAPO/CIF_POSTPROC_REORG

Processed change pointers cleared

RBDCPCLR

Old consistency check reports removed

/SAPAPO/CIF_DELTAREPORT3_REORG

Check material relevance to APO

RAPOKZFX

SAP 2007 / Page 47

By : Rahul Mohnot

3. CIF Administration - Review

Integration models are maintained to keep shared data up-to-date Change transfers with change pointers also help keep shared data up to date Queues need to be monitored to detect and resolve errors during the transfer of data Consistency checking ensures shared data stays consistent Batch processing automates regular processing Housekeeping keeps CIF running smoothly

SAP 2007 / Page 48

By : Rahul Mohnot

Contents - Review

Intoduction CIF concepts and principles CIF administration CIF troubleshooting Summary Appendix I APO BAPIs

SAP 2007 / Page 49

By : Rahul Mohnot

4. CIF troubleshooting

Use the tools Online resources (SAP Notes, help) OSS messages General advice

SAP 2007 / Page 50

By : Rahul Mohnot

Tools for problem analysis

Consistency checks

/SAPAPO/CCR, /SAPAPO/OM17, manual

Integration model:

CFM5, CFM6, CFM2

Programs

RIMODINI, RIMODAC2

Table display (SE11/SE16)

SAP 2007 / Page 51

By : Rahul Mohnot

OSS Notes & online documentation

http://service.sap.com/notes (requires OSS id) Transaction SNOTE

to implement program corrections, see if note has been implemented, etc

CIF FAQ

OSS Note 563806

R3/APO Integration trouble-shooting (requires OSS id)

service.sap.com/r3-plugin > Media Center > Literature

http://service.sap.com/scm

mySAP SCM technology -> Integration

SAP 2007 / Page 52

By : Rahul Mohnot

OSS Messages

Look up old OSS messages Create a new message

Typically category = SCM-APO-INT for CIF-related messages

SAP 2007 / Page 53

By : Rahul Mohnot

General advice

Always try and find the application log that is relevant to your problem When in doubt, re-activate (but not delta!) Best way to learn CIF troubleshooting is know the basic concepts and the tools. Experience will dictate when to apply them.

SAP 2007 / Page 54

By : Rahul Mohnot

Integration: Unit Summary

You are now able to: Appreciate why CIF is necessary Describe basic principles of CIF Describe how to administer CIF Know how to troubleshoot CIF

SAP 2007 / Page 55

By : Rahul Mohnot

Contents - Review

Intoduction CIF concepts and principles CIF administration CIF troubleshooting CIF configuration Summary Appendix I APO BAPIs

SAP 2007 / Page 56

By : Rahul Mohnot

CIF Configuration R3
Planning and Optimization

Integration with Other mySAP.com Components > Advanced

Basic Settings for Setting Up the System Landscape

Set Target System and Queue Type defines what system R3 is connected to and whether outbound/inbound queues are used.

Basic Settings for the Data Transfer


Configure Application Log could be useful for troubleshooting can define what data that is transferred gets logged
Initial Data Transfer > Set Filter and Selection Block Size defines packet sizes for data selection & transfer.

SAP 2007 / Page 57

By : Rahul Mohnot

CIF Configuration R3 continued

Basic Settings for the Data Transfer > Change Transfer > Change Transfer for Master Data > Configure Change Transfer for Master Data

Specify immediate or batch change transfer using change pointers Change parameters for resources Necessary for change transfers using change pointers CIF message types MUST be ticked

Activate ALE Change Pointers Generally

Activate ALE Change Pointers for Message Types

Application-Specific Settings and Enhancements This is where user-exits can be utilised to exercise greater control over data transfer Transfer Deactivated Materials to SAP APO may prove very useful Cross-Application Components > iPPE > General Settings > Define General iPPE Customizing Change documents must set to be ON (ie not OFF)

SAP 2007 / Page 58

By : Rahul Mohnot

CIF User Exit (R3)

Function EXIT_SAPLCMAT_001 is where the code is contained This user exit could be coded, for example, to populate fields in product master that are not included in the standard material/product mapping. It might do this based on other fields in the material master.

SAP 2007 / Page 59

By : Rahul Mohnot

CIF Configuration APO


>

Advanced Planning and Optimization > Basis Settings > Integration

Advanced Planning and Optimization > Basis Settings > Integration > Publication is where the types of data to be returned to R3 are defined

This is done on a plant-by-plant basis

Business System Group > Maintain Business System Group


BSGs allow grouping of R3 systems with an APO system where there is common data (see next slide). If an R3 system is not in the same BSG as the APO system, conversions have to be done on the data to differentiate it from same data in other BSGs.

Business System Group > Assign Logical System and Queue Type

Definition of systems within BSGs and use of inbound/outbound queues, post-processing

SAP 2007 / Page 60

By : Rahul Mohnot

Logical System & Business System Group

PK1 PK1CLI001

PE1 PE1CLI001

Legacy System

EDW APO SKACLI001

Legacy Systems

SAP 2007 / Page 61

By : Rahul Mohnot

CIF User Exit (APO)

Function module EXIT_/SAPAPO/SAPLCIF_PROD_001 is where the code located Eg, could be coded to automatically create product masters at vendor locations for subcontracted manufacture.

SAP 2007 / Page 62

By : Rahul Mohnot

SAP References

http://service.sap.com/scm

mySAP SCM technology -> Integration

CIF Best Practice SCM210 Core Interface Training Material

SAP 2007 / Page 63

By : Rahul Mohnot

Contents - Review

Intoduction CIF concepts and principles CIF administration CIF troubleshooting CIF configuration Summary Appendix I APO BAPIs

SAP 2007 / Page 64

By : Rahul Mohnot

Aims

Understand why CIF is necessary Understand basic principles of CIF Learn how to administer CIF Learn how to troubleshoot CIF CIF configuration

SAP 2007 / Page 65

By : Rahul Mohnot

Integration: Unit Summary

You are now able to: Describe why CIF is necessary Describe basic principles of CIF Describe how to administer CIF Describe how to troubleshoot CIF Perform CIF configuration

SAP 2007 / Page 66

By : Rahul Mohnot

Contents - Review

Intoduction CIF concepts and principles CIF administration CIF troubleshooting CIF configuration Summary Appendix I APO BAPIs

SAP 2007 / Page 67

By : Rahul Mohnot

BAPI Functions Architecture

non R/3 System

BAPI BAPI

BAPIs

SAP APO

BAPI

SAP 2007 / Page 68

By : Rahul Mohnot

Business Objects

Available business objects for APO-BAPIs


Master Data Transactional Data

ProductsAPS (BUS10001) LocationAPS (BUS10002) PPMAPS (BUS10003) ResourcesAPS (BUS10004) Other business Objects through Business Applications or BW services

SalesOrderAPS (BUS10501) ProcurementOrdersAPS (BUS10502) ManufacturingOrderAPS (BUS10503) StockAPS (BUS10501) Other business Objects through Business Applications or BW services

Eg factory calendars

SAP 2007 / Page 69

By : Rahul Mohnot

You might also like