Anda di halaman 1dari 64

Core Interface and Consistency

Interface Between Backend and APO

CIF Monitoring

CIF Performance Troubleshooting

Consistency

Contents/Objectives

Contents
Core Interface and Queued RFC Inbound and Outbound Queues Queue Management Application Logging

Objectives
At the end of this unit, you will be able to: Describe the components of CIF Describe the technology of CIF Set up and use monitoring tools for CIF

Interface Scenario

SAP OLTP
SD LO

qRFC

SAP APO

HR

CIF
Core Interface

CIF guarantees Serialization and Transactional Update

Core Interface with Help of Queued RFC (1)

Sending System

Receiving System

Queue 1

tRFC

Queue 2

tRFC

Queue 10

. . .

tRFC

. . Queue <n> .
Outbound Queues
qRFC

tRFC

Processing of RFCs
LUW

Core Interface with Help of Queued RFC (2)

Sending System

Receiving System

Queue 1

tRFC

Queue 2

tRFC

Queue 10

. . .

tRFC

. . Queue <n> .
Outbound Queues
qRFC

tRFC

Processing of RFCs
LUW

Core Interface with Help of Queued RFC: Errors


Error Sending System Receiving System

Queue 1 Dependency Queue 2

tRFC

tRFC

Queue 10

. . .

tRFC

. . Queue <n> .
Outbound Queues
qRFC

tRFC

Processing of RFCs
LUW

Outbound Queue Scenario

Standard APO CIF delivery : Only Outbound queues are used


Outbound scheduler is responsible to book LUW on target system

Outbound scheduler
booking of LUWs

OLTP

APO

booking of LUWs

Outbound scheduler

Inbound Queue Scenario

SAP Recommended : Outbound and inbound queues are used


Outbound scheduler is responsible to deliver LUW to the inbound queue of the target system Inbound scheduler is responsible to book LUW on target system

Outbound scheduler

deliver LUWs to inbound queue

Inbound scheduler

book LUW

OLTP
book LUW

APO
deliver LUWs to inbound queue

Inbound scheduler

Outbound scheduler

Customizing of Queue Scenario in R/3

Transaction SPRO -> Button Display SAP Reference IMG

Transaction CFC1

QOUT Scheduler

Transaction SMQS

Transactional RFC Options for automatic Error Handling Transaction SM59 double click on RFC-Destination <SID>CLNT<nnn> -> Destination -> TRFC options

Only entries in CPIC-ERR or RETRY status, no SYSFAIL

Automatic Error Handling in Batch or Dialog ?

Batch
Background job ARFC:<Transactional ID> based on RSTRFCSL High number of such background jobs if there are network problems

Dialog
Manual scheduling of periodic background job RSQOWKEX ( outbound ) and RSQIWKEX ( inbound ) for example every 15 min Higher waiting time in queues if there is an error Resets status of all queues

SAP recommendation : background jobs for connection errors Set the time between tries to 2 or 3 minutes Set the number of tries to 10 Adapt your response to the customer situation!

Example for SAP recommended Automatic Error Handling Transaction SM37

Retry every Entry every 3 Minutes in a batch job with upto 10 Attempts

Remind that status complete does not mean that the transmission was successful you have to look into the queue to determine the entry status.

QIN Scheduler

Transaction SMQR

Customizing Possibilities in Inbound Scenario

RFC logongroup distributes RFC-Calls

Dialog logongroup distributes RFC-Calls

rfc-Profileparameters limit the WPs used

WP2 Calls WP using RFC-logongroup in RFC-Destination

WP5 Books LUW WP4 Calls WP5 using AS-Group

WP1 Calls WP2 using AS-Group

Inbound scheduler
WP3 Saves LUW into inbound queue

Outbound scheduler

Customizing Possibilities : RZ12

SAP Profile Parameter


rdisp/rfc_use_quotas rdisp/rfc_max_queue rdisp/rfc_max_login rdisp/rfc_max_own_login rdisp/rfc_max_own_used_wp rdisp/rfc_min_wait_dia_wp rdisp/rfc_max_comm_entries rdisp/rfc_max_wait_time

Quota Parameter : rdisp/rfc_check Keep in mind that there is only ONE rfc profile parameter set per instance : If two different rfc-Logon Groups of the same Instance refer to the same set of online parameters and you change the parameters for Logon Group CIF for instance cigsb_GSB_10 also the parameters of Logon Group Clientcopy for instance cigsb_GSB_10 are changed accordingly.

Check available resources for RFCs

Work processes currently availabe for qRFC / tRFC / aRFC processing

Central Tool : Queue Manager in APO (1)

Queue Manager (transaction /SAPAPO/CQ)


Makes systemwide CIF queue monitoring possible Is especially appropriate for monitoring from the application point of view: queues are classified according to object types Contains a link to technical monitors SMQ1/SMQ2 in the APO system

Central Tool : Queue Manager in APO (2)

Transaction /SAPAPO/CQ

As of SCM 4.1 : CIF Cockpit


Transaction /SAPAPO/CC :

CIF Cockpit Monitoring Features (1)

CIF Cockpit Monitoring Features (2)

Activation of time measurement for CIF Cockpit


Transaction ASACT :

Flag for activation

Saving CIF Cockpit evaluations into APO database

Define a daily variant for transaction /SAPAPO/CC_PERF_SAVE

Schedule a daily background job with transaction SM36

Local Outbound Queue Overview


Transaction SMQ1

Show blocked Queues

Details of Selected Queues

SMQ1 Click on bell or use key F8

SMQ1: Outbound Queue Management

Activate the qRFC Manager for a selected queue. The LUWs in the queue will be sent immediately.

Lock a selected queue. A stop mark will be set on the end of existing queue. All previously recorded LUWs will be processed up to the stop mark.

Unlock a selected queue. The first stop mark in the queue will be removed. The qRFC Manager will be started immediately and execute the LUWs until the next stop mark, or the end of the queue, if no stop mark is set.

Lock a selected queue immediately. The stop mark will be set to the very first line in the queue, so the complete queue will be stopped.

Unlock a selected queue without activation. The stop mark will be removed without activating the qRFC Manager ( e.g. used for debugging).

Deletion of CIF Queues

!
Don't simply delete queue entries. You might cause inconsistencies.

Protocol of deleted CIF Entries

Transaction SM21

Local Inbound Queue Overview


Transaction SMQ2

Display Inbound Queues with Problems

SMQ2 Click on bell or use key F8

Queue names R/3 => SCM (for a complete list see Note 786446)
Queue name
CFSTK* CFPO* CFPLO* CFSLS* CFRSV* CFCNF* CFPIR* CFMAT* CFFCC* CFPCM* CFCLA* CFCHR* CFCUVT* CFSHP* CFTL* CFTG* FC* CFCB* CFCR* CFCD** CFCL*

Description
Stock Purchase orders and purchase requisition Planned orders/Production orders Sales orders Manual reservations Confirmations Planned independent requirements (created in R/3) Reduction of PIRs Reduction of PIRs (if separate Imod is used) Production campaigns Master data for classes Master data for characteristics Planning tables Transports (TP/VS scenario) Transport locks (TP/VS scenario) Deletion of temporary quantity assigments GATP (in one LUW with CFSLS*) Fulfillment coordination (only if qRFC consumption is used) CBase Configuration CBase Configuration, special case CDP Configuration Classification

Queue names SCM => R/3 (for a complete list


see Note 786446)
Queue name CFEP* CFIP* CFFO* CFCO* CFPC* CFSH* CFDL* CFRV* CFPF* CFCF* CFCD* CFRP* Description External Procurement APO - R/3 In-house Production APO - R/3 Planned independent Requirements Sales Orders Production Campaign Transport Delivery Reservations Planning file entry (IS Automotive) Confirmation (IS Automotive) Confirmation of deletions (IS Automotive) Reporting points (IS Automotive)

Common Queue Status Note 378903

READY RUNNING WAITING SYSLOAD RETRY

Not yet executed (only temporary) Execution active Waiting until the LUWs with a higher priority are executed No free DIALOG work processes in the sending syste Temporary problem during execution (locking issue), background job scheduled Execution explicitly stopped Outbound: LUW is not sent (only used for debugging) Inbound: LUW is not processed (only used for debugging) A serious error has occurred in the target system (APO) while the LUW was executed An error occurred during establishing the connection

STOP NOSENDS NOEXEC SYSFAIL CPICERR

Enhanced Display of queue contents in SCM

double-click

Queue display with all related tables and their content in DDIC format on SCM side

Enhanced Display of queue contents in OLTP

Prerequisites of Enhanced Display

TA SMQE on SCM side

TA SMQE on OLTP side

CIF Data Storage


Used for qRFC calls only Sender system
TRFCQOUT ARFCSDATA ARFCSSTATE

Used for tRFC and qRFC calls

TRFCQIN TRFCQDATA TRFCQSTATE

Receiver system
ARFCRDATA
This table is not filled by tRFC instead the function module is called directly

ARFCRSTATE

OLTP and APO: Stopping and Starting Queues

Outbound Queue Transaction / Report Stop selected queue(s) Start selected queue(s) SMQ1 / RSTRFCQ1 SMQ1 / RSTRFCQ3

Inbound Queue Transaction / Report SMQ2 / RSTRFCI1 SMQ2 / RSTRFCI3

Queues can be stopped / started without losing data changes

APO only : Remote Stopping and Starting Queues


To stop selected remote CIF queues :
Lock remote queue immediately with report /SAPAPO/CIFSTOPQUEUES

To start selected remote CIF queues:


Reactivate remote queue with report /SAPAPO/CIFSTARTQUEUES

/SAPAPO/CIFSTOPQUEUES

/SAPAPO/CIFSTARTQUEUES

APO only : Restart CIF after system shutdown

Tasks of Report /SAPAPO/RCIFRESTART


1. Determination of change pointer entries in APO and publish them 2. Determination of CIF outbound queue entries and restart them 3. Restart the APO CIF inbound queues 4. Determination of R/3 systems integrated with APO system and restart CIF outbound queues towards APO

SAP OLTP only : CIF Data Channel Control


Transaction CFP2 or report RCPQUEUE
Start / Stop data channels without losing data changes Monitor / Display details

Local Application Logging

Display Application Log in OLTP System: Transaction CFG1 Display Application Log in APO System: Transaction /SAPAPO/C3

Maintain Logging Level: CFC2 in OLTP, /SAPAPO/C41 in APO

Reorganize Application Log


!

Delete entries in the Application Log regularly


Report SBAL_DELETE

qRFC Monitoring
qRFC monitor
Display transfer queues Display waiting qRFC calls Restart waiting calls

qRFC problem causes:


Communication errors
Network problems Dialog work processes unavailable

Application errors (non-posting of data to APO)


Bugs Missing master data Locking of objects

Application problems must be solved by a system administrator in cooperation with an application manager

APO: qRFC Alert Monitor

Transaction /SAPAPO/CW (report /SAPAPO/RCIFQUEUECHECK)

Example: RZ20 with qRFC Monitors

RZ20 : Important Parameters for APO / liveCache

Standard System Monitoring

Standard SAP Basis Monitoring (APO, OLTP)


System log - SM21 ABAP dump - ST22 System process overview - SM50, SM66, SM51 Locking - SM12, DB01 Update - SM13 Batch - SM37 Database - DB02 RFC destination - SM59 Gateway - SMGW

Different Measurement needed for OLTP and APO


OLTP
Area System Performance Indicators Active Users Avg. Response Time in Dialog Task Max. Dialog Steps per Hour Avg. Response Time at Peak Dialog Hour Avg. Availability per Week Database Performance Avg. DB Request Time in Dialog Task Avg. DB Request Time in Update Task Database Space Management DB Size Value 1065 Trend steady

APO
Value 10

638 ms

down

2862 ms

73508

down

181

672 ms 100 % 402 ms

down steady down

3591 ms

100 %

214 ms

390 ms

down

214 ms

880.98 GB

steady

88.81 GB

Last Month DB Growth

17.98 GB

up

0.07 GB

Example: APO and R/3

Active Users
Normally very high number in R/3, Less in APO ( only Planners )

Average Dialog Response Time


in R/3 should be about 1 - 1,5 seconds as a rule. No rules for APO available, may differ because of very different business processes. In general it is higher than in R/3 systems.

Database Size
R/3 databases are often big and increase rapidly In general APO is smaller and growths slowly

R/3 Key Performance Indicators ( KPI ) do not work in APO Service Level Agreements ( SLA ) have to be adapted

Alternative CIF handling procedure

Postprocessing
is an alternative strategy to avoid blocked CIF queues.

CIF Error Handling Default


Example without error handling
Planned Order CFPLO2222222222 Planned Order CFPLO1111111111 Confirmation CFCNF1111111111 Confirmation CFCNF2222222222 Stock XXX CFSTKXXX Stock YYY CFSTKYYY

Receiving System
qRFC

Error

LUW of 1111111111 LUW of 2222222222

CIF Error Handling with Postprocessing

Example with error handling


Planned Order CFPLO2222222222 Planned Order CFPLO1111111111 Confirmation CFCNF1111111111 Confirmation CFCNF2222222222 Stock XXX CFSTKXXX Stock YYY CFSTKYYY

Receiving System
qRFC

Error

LUW of 1111111111 LUW of 2222222222

LUW is skipped and will be rebuilt during post processing

Postprocessing Facts

After activation of CIF error handling, the chance of blocked queues after online data transfers of transactional data will decrease Improved analysis of qRFC warnings and errors without automatic interruption of queue transfer process Instead of blocked queues a so called CIF error log will be created Warnings/Errors can be solved offline without stopping data transfers Integration of new CIF Error Handling in CCMS is currently not planned

Postprocessing Limitations

No Postprocessing possible for


initial loads integration of master data ( transaction data only ! ) ABAP dumps APO system / liveCache not available IS-specific objects (e.g. DI-backflush)

Application specific limitations


See note 602484

Queue monitoring in Postprocessing is still necessary

Activation of CIF Error Handling with Postprocessing


Switch on Error Handling in APO Customizing or in transaction /SAPAPO/C2 (for error handling in both directions)

Default : Error handling is switched OFF

Storing Postprocessing Records

APO CIF

OLTP

Store CIF post processing records OLTP -> APO

Store CIF post processing records APO -> OLTP

DB

DB

Resent Postprocessing Records

Procedure of postprocessing

APO CIF Post Processing Resend LUWs CIF

OLTP

Read CIF post processing records

DB

DB

Usage types for Postprocessing


Postprocessing transactions

! Postprocessing Records must be reorganized

/SAPAPO/CPP: one user exclusively

/SAPAPO/CPP1: more than one user simultaneously

/SAPAPO/CPP2: same as CPP1, but only for display

/SAPAPO/CPPR: mark records as obsolete and delete

/SAPAPO/CPPA: set up alert options

Alerting for Postprocessing Records

Postprocessing alert screen /SAPAPO/CPPA

Handling of Postprocessing Records


Postprocessing screen as result of /SAPAPO/CPP

Set entry as obsolete

Send to R/3

R/3 to APO APO to R/3

Postprocessing Records for processing

Add to Worklist

Refresh button

Drill Down Area Postprocessing records already processed

List of actions done

Responsibility for Postprocessing

!
Whether an entry should be postprocessed or not must be determined by the application team

Summary

You are now able to:


Describe the components of CIF Describe the technology of CIF Set up and use monitoring tools for CIF