sap-cif-complete-guide.ppt
DESCRIPTION
APO CIFTRANSCRIPT
By : Rahul Mohnot© SAP 2007 / Page 2
Integration
Contents
Introduction
CIF concepts and principles
CIF administration
CIF troubleshooting
CIF configuration
Summary
Appendix I – APO BAPIs
By : Rahul Mohnot© SAP 2007 / Page 3
Aims
Understand why CIF is necessary
Understand basic principles of CIF
Learn how to administer CIF
Learn how to troubleshoot CIF
By : Rahul Mohnot© SAP 2007 / Page 5
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 so-called 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
By : Rahul Mohnot© SAP 2007 / Page 6
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.
By : Rahul Mohnot© SAP 2007 / Page 7
SDSD LOLO
HRHR
SAP R/3
SAP APO
non R/3 non R/3 SystemSystem
BAPI
BAPI
BAPI
CIF(Core Interface) BAPIs
CIF Functions versus BAPI Functions Architecture
By : Rahul Mohnot© SAP 2007 / Page 8
When is CIF used?
Master data
PlantMaterial masterBOM / PPM Schedule Agreement
Transaction data
Requirements/ConsumptionPlanned ordersProduction OrdersPurchase OrdersConfirmations
Master data
LocationMaterial masterBOM / PPM Schedule Agreement
Planning resultsPurchase Order/ReqStock transfer Order/ReqCustomer (VMI)Production /Planned OrderATP Request
R3 APOC
OR
E I
NT
ER
FA
CE
CO
RE
IN
TE
RF
AC
E
By : Rahul Mohnot© SAP 2007 / Page 9
Contents - Review
IntroductionIntroduction
CIF concepts and principles
CIF administration
CIF troubleshooting
Summary
Appendix I – APO BAPIs
By : Rahul Mohnot© SAP 2007 / Page 10
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
By : Rahul Mohnot© SAP 2007 / Page 11
Integration Models define shared data
APO Product
R3Material
MR123456MR123456 MR789101MR789101 6612345666123456AW123456AW123456
Integration model
MR123456MR123456 6612345666123456AW123456AW123456
By : Rahul Mohnot© SAP 2007 / Page 12
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
By : Rahul Mohnot© SAP 2007 / Page 13
Outbound vs Inbound Queues – Outbound only
APOR3
R3 OutboundR3 Outbound
APO Outbound
APO Outbound
By : Rahul Mohnot© SAP 2007 / Page 14
Outbound vs Inbound Queues – Outbound & Inbound
APOR3
R3 OutboundR3 Outbound
R3 InboundR3 Inbound
APO InboundAPO
Inbound
APO Outbound
APO Outbound
By : Rahul Mohnot© SAP 2007 / Page 15
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
By : Rahul Mohnot© SAP 2007 / Page 16
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.
By : Rahul Mohnot© SAP 2007 / Page 17
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.
By : Rahul Mohnot© SAP 2007 / Page 18
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
By : Rahul Mohnot© SAP 2007 / Page 19
Contents - Review
IntroductionIntroduction
CIF concepts and principlesCIF concepts and principles
CIF administration
CIF troubleshooting
Summary
Appendix I – APO BAPIs
By : Rahul Mohnot© SAP 2007 / Page 20
3. CIF Administration
Integration model maintenance
Change transfer
Queue monitoring, maintenance
Consistency checking
Batch processing
Housekeeping
By : Rahul Mohnot© SAP 2007 / Page 21
Maintaining Integration Models
Creation – CFM1
Activation – CFM2/CFM3
Display – CFM4
Search – CFM5
Change – CFM6
Delete – CFM7
By : Rahul Mohnot© SAP 2007 / Page 22
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
By : Rahul Mohnot© SAP 2007 / Page 23
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
By : Rahul Mohnot© SAP 2007 / Page 24
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
By : Rahul Mohnot© SAP 2007 / Page 25
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
By : Rahul Mohnot© SAP 2007 / Page 26
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
By : Rahul Mohnot© SAP 2007 / Page 27
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 – can’t delete when part of IM (active or inactive)
Demonstration
By : Rahul Mohnot© SAP 2007 / Page 28
3. CIF Administration
Integration model maintenanceIntegration model maintenance
Change transfer
Queue monitoring, maintenance
Consistency checking
Batch processing
Housekeeping
By : Rahul Mohnot© SAP 2007 / Page 29
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.
By : Rahul Mohnot© SAP 2007 / Page 30
Table BDCPV
How change transfer with change pointers works
When a change is made to a field within a master data object, it is recorded
This recording is known as a change pointer
Change pointers can be viewed in table BDCPV
Material Master
Material Description
Procurement type
MRP Controller
Lot size
AW339701AW339701
PANEL,ROOF
E
303
EX
F
Object Field Old Value New Value
AW339701 Proc. Type E F
By : Rahul Mohnot© SAP 2007 / Page 31
Processing change pointers
Program RCPTRAN4 is run for Material MastersWork CentersVendorsCustomers
Change pointers are scanned
Check object for a change pointer is in an active integration model
Update corresponding field in APO
Table BDCPV
Object Field Old Value New Value
AW339701 Proc. Type E FIntegration Model Active Data object
MD_MAT_NV (19/2/05) X AW338699
MD_MAT_NV (19/2/05) X AW339701
MD_MAT_NV (18/2/05) AW339701
APOAPOAW399701
Proc type = FAW399701
Proc type = F
By : Rahul Mohnot© SAP 2007 / Page 32
3. CIF Administration
Integration model maintenanceIntegration model maintenance
Change transferChange transfer
Queue monitoring, maintenance
Consistency checking
Batch processing
Housekeeping
By : Rahul Mohnot© SAP 2007 / Page 33
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
By : Rahul Mohnot© SAP 2007 / Page 34
What is a queue blockage?
Blockages occur when data cannot be updated in the destination system
Queue entries (LUWs) behind the blockage are not processed until blockage resolved
R/3 APO
Data updatedError updating
By : Rahul Mohnot© SAP 2007 / Page 35
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
By : Rahul Mohnot© SAP 2007 / Page 36
… 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
By : Rahul Mohnot© SAP 2007 / Page 37
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
By : Rahul Mohnot© SAP 2007 / Page 38
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:
Data updated
R/3 APO
Error updating
CIF Post-processing logRemove cause of error
By : Rahul Mohnot© SAP 2007 / Page 39
3. CIF Administration
Integration model maintenanceIntegration model maintenance
Change transferChange transfer
Queue monitoring, maintenanceQueue monitoring, maintenance
Consistency checking
Batch processing
Housekeeping
By : Rahul Mohnot© SAP 2007 / Page 40
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
By : Rahul Mohnot© SAP 2007 / Page 41
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
By : Rahul Mohnot© SAP 2007 / Page 42
3. CIF Administration
Integration model maintenanceIntegration model maintenance
Change transferChange transfer
Queue monitoring, maintenanceQueue monitoring, maintenance
Consistency checkingConsistency checking
Batch processing
Housekeeping
By : Rahul Mohnot© SAP 2007 / Page 43
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
By : Rahul Mohnot© SAP 2007 / Page 44
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
By : Rahul Mohnot© SAP 2007 / Page 45
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
By : Rahul Mohnot© SAP 2007 / Page 46
3. CIF Administration
Integration model maintenanceIntegration model maintenance
Change transferChange transfer
Queue monitoring, maintenanceQueue monitoring, maintenance
Consistency checkingConsistency checking
Batch processingBatch processing
Housekeeping
By : Rahul Mohnot© SAP 2007 / Page 47
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
By : Rahul Mohnot© SAP 2007 / Page 48
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
By : Rahul Mohnot© SAP 2007 / Page 49
Contents - Review
IntoductionIntoduction
CIF concepts and principlesCIF concepts and principles
CIF administrationCIF administration
CIF troubleshooting
Summary
Appendix I – APO BAPIs
By : Rahul Mohnot© SAP 2007 / Page 50
4. CIF troubleshooting
Use the tools
Online resources (SAP Notes, help)
OSS messages
General advice
By : Rahul Mohnot© SAP 2007 / Page 51
Tools for problem analysis
Consistency checks /SAPAPO/CCR, /SAPAPO/OM17, manual
Integration model: CFM5, CFM6, CFM2
Programs RIMODINI, RIMODAC2
Table display (SE11/SE16)
By : Rahul Mohnot© SAP 2007 / Page 52
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
By : Rahul Mohnot© SAP 2007 / Page 53
OSS Messages
Look up old OSS messages
Create a new message Typically category = SCM-APO-INT for CIF-related messages
By : Rahul Mohnot© SAP 2007 / Page 54
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.
By : Rahul Mohnot© SAP 2007 / Page 55
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
By : Rahul Mohnot© SAP 2007 / Page 56
Contents - Review
IntoductionIntoduction
CIF concepts and principlesCIF concepts and principles
CIF administrationCIF administration
CIF troubleshootingCIF troubleshooting
CIF configuration
Summary
Appendix I – APO BAPIs
By : Rahul Mohnot© SAP 2007 / Page 57
CIF Configuration – R3Integration with Other mySAP.com Components > Advanced Planning and
Optimization
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.
By : Rahul Mohnot© SAP 2007 / Page 58
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
Activate ALE Change Pointers Generally Necessary for change transfers using change pointers
Activate ALE Change Pointers for Message Types CIF… message types MUST be ticked
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)
By : Rahul Mohnot© SAP 2007 / Page 59
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.
By : Rahul Mohnot© SAP 2007 / Page 60
CIF Configuration – APOAdvanced 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 BSG’s 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
By : Rahul Mohnot© SAP 2007 / Page 61
Logical System & Business System Group
PK1PK1CLI001
PK1PK1CLI001
APOSKACLI001
APOSKACLI001
PE1PE1CLI001
PE1PE1CLI001
Busines
s
System
Group
BSG_1
Business System GroupBSG_2 EDWEDW
Legacy System
Legacy System
Legacy Systems
Legacy Systems
By : Rahul Mohnot© SAP 2007 / Page 62
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.
By : Rahul Mohnot© SAP 2007 / Page 63
SAP References
http://service.sap.com/scm mySAP SCM technology -> Integration
CIF Best Practice
SCM210 – Core Interface Training Material
By : Rahul Mohnot© SAP 2007 / Page 64
Contents - Review
IntoductionIntoduction
CIF concepts and principlesCIF concepts and principles
CIF administrationCIF administration
CIF troubleshootingCIF troubleshooting
CIF configurationCIF configuration
Summary
Appendix I – APO BAPIs
By : Rahul Mohnot© SAP 2007 / Page 65
Aims
Understand why CIF is necessary
Understand basic principles of CIF
Learn how to administer CIF
Learn how to troubleshoot CIF
CIF configuration
By : Rahul Mohnot© SAP 2007 / Page 66
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
By : Rahul Mohnot© SAP 2007 / Page 67
Contents - Review
IntoductionIntoduction
CIF concepts and principlesCIF concepts and principles
CIF administrationCIF administration
CIF troubleshootingCIF troubleshooting
CIF configurationCIF configuration
SummarySummary
Appendix I – APO BAPIs
By : Rahul Mohnot© SAP 2007 / Page 68
SAP APO
non R/3 non R/3 SystemSystem
BAPI
BAPI
BAPI
BAPIs
BAPI Functions Architecture
By : Rahul Mohnot© SAP 2007 / Page 69
Business Objects
Master Data
ProductsAPS (BUS10001)
LocationAPS (BUS10002)
PPMAPS (BUS10003)
ResourcesAPS (BUS10004)
Other business Objects through Business Applications or BW services
Eg factory calendars
Transactional Data
SalesOrderAPS (BUS10501)
ProcurementOrdersAPS (BUS10502)
ManufacturingOrderAPS (BUS10503)
StockAPS (BUS10501)
Other business Objects through Business Applications or BW services
Available business objects for APO-BAPIs