Core Interface and Consistency
CIF Monitoring
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 qRFC
LO
SD SAP APO
HR
CIF
Core Interface
CIF guarantees Serialization and Transactional Update
Core Interface with Help of Queued RFC (1)
Sending System Receiving System
tRFC
Queue 1
tRFC
Queue 2
.
.
. tRFC
Queue 10
.
.
tRFC
. <n>
Queue
Outbound Processing
Queues of RFCs
qRFC LUW
Core Interface with Help of Queued RFC (2)
Sending System Receiving System
tRFC
Queue 1
tRFC
Queue 2
.
.
. tRFC
Queue 10
.
.
tRFC
. <n>
Queue
Outbound Processing
Queues of RFCs
qRFC LUW
Core Interface with Help of Queued RFC:
Errors
Error
Sending System Receiving System
tRFC
Queue 1
Dependency
tRFC
Queue 2
.
.
. tRFC
Queue 10
.
.
tRFC
. <n>
Queue
Outbound Processing
Queues of RFCs
qRFC 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 Inbound scheduler
deliver LUWs to
inbound queue
book LUW
OLTP
APO
book LUW
Inbound scheduler deliver LUWs to Outbound scheduler
inbound queue
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 Dialog
Background job Manual scheduling of
ARFC:<Transactional ID> periodic background job
based on RSTRFCSL RSQOWKEX ( outbound ) and
RSQIWKEX ( inbound )
High number of such
for example every 15 min
background jobs if there are
network problems 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
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 Dialog logongroup rfc-Profileparameters
distributes RFC-Calls distributes RFC-Calls limit the WPs used
WP5
WP2
Calls WP Books LUW
using RFC-logongroup
in RFC-Destination WP4
Calls WP5
using AS-Group
WP1
Inbound scheduler
Calls WP2 WP3
using AS-Group
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
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 Description
CFSTK* Stock
CFPO* Purchase orders and purchase requisition
CFPLO* Planned orders/Production orders
CFSLS* Sales orders
CFRSV* Manual reservations
CFCNF* Confirmations
CFPIR* Planned independent requirements (created in R/3)
CFMAT* Reduction of PIRs
CFFCC* Reduction of PIRs (if separate Imod is used)
CFPCM* Production campaigns
CFCLA* Master data for classes
CFCHR* Master data for characteristics
CFCUVT* Planning tables
CFSHP* Transports (TP/VS scenario)
CFTL* Transport locks (TP/VS scenario)
CFTG* Deletion of temporary quantity assigments GATP (in one LUW
with CFSLS*)
FC* Fulfillment coordination (only if qRFC consumption is used)
CFCB* CBase Configuration
CFCR* CBase Configuration, special case
CFCD** CDP Configuration
CFCL* Classification
Queue names SCM => R/3 (for a complete list
see Note 786446)
Queue name Description
CFEP* External Procurement APO - R/3
CFIP* In-house Production APO - R/3
CFFO* Planned independent Requirements
CFCO* Sales Orders
CFPC* Production Campaign
CFSH* Transport
CFDL* Delivery
CFRV* Reservations
CFPF* Planning file entry (IS Automotive)
CFCF* Confirmation (IS Automotive)
CFCD* Confirmation of deletions (IS Automotive)
CFRP* Reporting points (IS Automotive)
Common Queue Status – Note 378903
READY Not yet executed (only temporary)
RUNNING Execution active
WAITING Waiting until the LUWs with a higher priority are executed
SYSLOAD No free DIALOG work processes in the sending syste
RETRY Temporary problem during execution (locking issue),
background job scheduled
STOP Execution explicitly stopped
NOSENDS Outbound: LUW is not sent (only used for debugging)
NOEXEC Inbound: LUW is not processed (only used for debugging)
SYSFAIL A serious error has occurred in the target system (APO)
while the LUW was executed
CPICERR An error occurred during establishing the connection
CIF Data Storage
Used for qRFC Used for tRFC
calls only and qRFC calls
Sender system
TRFCQOUT ARFCSDATA ARFCSSTATE
TRFCQIN
Receiver system
TRFCQDATA
ARFCRDATA ARFCRSTATE
TRFCQSTATE
This table is not filled
by tRFC – instead the
function module is
called directly
OLTP and APO: Stopping and Starting Queues
Outbound Queue Inbound Queue
Transaction / Report Transaction / Report
Stop selected queue(s) SMQ1 / RSTRFCQ1 SMQ2 / RSTRFCI1
Start selected queue(s) SMQ1 / RSTRFCQ3 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
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
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 APO
Area Indicators Value Trend Value
System Performance Active Users 1065 steady 10
Avg. Response Time in Dialog 2862 ms
638 ms down
Task
Max. Dialog Steps per Hour 73508 down 181
Avg. Response Time at Peak 3591 ms
672 ms down
Dialog Hour
Avg. Availability per Week 100 % steady 100 %
Database Avg. DB Request Time in Dialog
402 ms down 214 ms
Performance Task
Avg. DB Request Time in Update
390 ms down 214 ms
Task
Database Space
DB Size 880.98 GB steady 88.81 GB
Management
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 Receiving System
Planned Order qRFC
CFPLO2222222222
Error
Planned Order LUW of 1111111111
CFPLO1111111111
LUW of 2222222222
Confirmation
CFCNF1111111111
Confirmation
CFCNF2222222222
Stock XXX
CFSTKXXX
Stock YYY
CFSTKYYY
CIF Error Handling with Postprocessing
Example with error handling Receiving System
Planned Order qRFC
CFPLO2222222222
Error
Planned Order LUW of 1111111111
CFPLO1111111111
LUW of 2222222222
Confirmation
CFCNF1111111111
Confirmation
CFCNF2222222222
Stock XXX
CFSTKXXX
LUW is skipped and
will be rebuilt during
Stock YYY post processing
CFSTKYYY
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 OLTP
CIF
Store CIF post Store CIF post
processing processing
records records
OLTP -> APO APO -> OLTP
DB DB
Resent Postprocessing Records
Procedure of postprocessing
APO OLTP
CIF Post Processing
CIF
Resend LUWs
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
Responsibility for Postprocessing
!
Whether an entry should be
postprocessed or not must be
determined by the application
team
Important Administrative Reports and Jobs (1)
Important Administrative Reports and Jobs (2)
Important Administrative Reports and Jobs (3)
Summary
You are now able to:
Describe the components of CIF
Describe the technology of CIF
Set up and use monitoring tools for CIF
Priorities and
Preemptive Scheduling
Priorities
Prior to kernel 7.40:
Scheduling with respect to work process type only
No distinction between UI and background processing in DIA processes
Priorities in 7.40:
High: request from UI (by default only SAP GUI)
Low: batch processing (RFC started from BTC session)
Medium: all other requests (HTTP, RFC)
Child processes have same or lower priority as their mother process
ABAP API to set RFC/HTTP session to high priority (by default the priority is normal)
Priorities & Quotas
Quotas
Work process quota for sessions with medium and low priority
A maximal runtime can be configured for each priority (instead of using
“rdisp/max_wprun_time”)
Session Priorities
SAP Note 2129291 - Session Priority and Work Process Quota in SAP Kernel
7.4x
Preemption
Session preemption
Imagine that a request (with high/middle priority) cannot be processed because all work
processes all work processes that can handle this sessions are busy.
The ABAP VM periodically checks whether there is such a request of higher priority and a
rollout of the current session is possible (via check function ThCheckForPreemption).
If this is the case, the session with lower priority is rolled out.
Configuration
Request Queue Configuration
All processes and queues share the same request queue infrastructure in shared memory
Limitation is the maximum number of requests
Configuration via profile parameter rdisp/max_elems_per_queue
Default: 2000
Results in 7 ×
rdisp/max_elems_per_queue requests Default: 14000
(to keep old profiles
compatible)
Many requests have an attached communication block (“ca block”)
Limitation is the maximum number of ca blocks
Configuration via profile parameter rdisp/wp_ca_blk_no Default:
($(rdisp/elem_per_queue)*3)
Default value depends on
rdisp/max_elems_per_queue Default: 6000
High Load Quota
Protect the request queue from being flooded by requests for a certain worker type
“High load quota”:
Configuration via profile parameter rdisp/high_load_quota Default: load=90,
queue=5
Parameter value has the form “load=x, queue=y”.
A server sends a “high load” message for a worker type to all other servers when
– x% of all work processes of this type are busy in the last 20 seconds or
– y% of all queue slots (rdisp/elem_per_queue × 7) are occupied by the requests of this
type
Task Limit of Sessions
Protect the request queue from being flooded by requests for a single session
Task limit of session:
Configuration via profile parameter rdisp/task_limit Default: 1000
Open tasks of a session are the sum of
– open asynchronous RFCs
– open HTTP connections
– number of requests in the request queue of this session
When task limit is exceeded, session will be aborted with a short dump
Quotas for DIA work processes
Runtime limit for dialog request:
rdisp/scheduler/prio_low/max_runtime Default: no limit
rdisp/scheduler/prio_normal/max_runtime Default: 60 min
rdisp/scheduler/prio_high/max_runtime Default: 10 min
usage of rdisp/max_wprun_time overwrites all of the individual runtime parameters
above
(kernel default is ignored; parameter has to be explicitly set)
Maximum quota for dialog work process used for medium/low prio requests:
rdisp/scheduler/prio_low/max_quota Default: 80%
rdisp/scheduler/prio_normal/max_quota Default: 80%
Deprecated and Removed Parameters
Only having one request queue infrastructure makes configuration simpler.
Deprecated parameters:
rdisp/rfc_min_wait_dia_wp Number of work processes not used for RFC
rdisp/http_min_wait_dia_wp Number of work processes not used for HTTP
usage overwrites quotas set by
“rdisp/scheduler/prio_*/max_quota”
Removed parameters:
rdisp/rfc_check Enable/disable work process check for RFC
rdisp/http_check Enable/disable work process check for for HTTP
rdisp/max_arq Length of local wp queues for asynchronous requests
rdisp/appc_ca_blk_no Maximum number of ca blocks reserved for CPIC/RFC
Help on changed/removed parameters: see SAP note 2001276