Dynamic ALE Inbound Processing
Dynamic ALE Inbound Processing
Troubleshooting bgRFC:
– How to identify if the bgRFC scheduler is running?
In 7.40 transaction SBGRFCSCHEDMON exists, in 7.31 the report
RS_BGRFC_SCHEDULER_MONITOR can be used
– How to restart a scheduler?
Not directly possible: Could be done by reducing in SBGRFCCONF the number of schedulers to 0 and
then increase again. But in general AUTOABAP checks every 5 minutes if the scheduler is running and
restarts it if not. This is not the case for RFC.
In case of IDoc processing errors will the bgRFC logic be executed again:
– No in case of reprocessing of IDocs after error (non-queued) the IDocs will be posted normally without
using bgRFC resource control.
– Due to the low number of IDocs in error there should be no need to run them via the bgRFC runtime
again.
Current ALE framework offers two ways of inbound processing for IDocs:
■ Immediate processing
■ Posting the IDocs in background using RBDAPP01
Idea:
■ Renovation of job based processing to more dynamic process with less jobs, starting processing
faster depending on priorities and with better overall resource control
Initially shipped as pilot only via Note 1803547 - Pilot: IDoc Eingang mit Hilfe
von bgRFC
With EHP6 (SAP Basis 7.31) the feature is shipped per default
More information at Note 1793313 - ALE: IDoc inbound using bgRFC as standard
Queued IDocs:
Will be released with Note 1855518 with basis release 7.31 SP9
Background on bgRFC:
■ New RFC framework replacing tRFC and qRFC
■ Already in use for other technologies like WSRM
■ Highly scalable and configurable RFC framework
■ More information in the Appendix
Benefits
■ Non-disruptive for business since message types can be switched individually
■ Faster average time until processing per IDOC to improve meeting business KPIs / SLAs
■ Prioritize: process messages with higher business importance before less important ones
■ Locking issues can be avoided by queuing the IDocs based on payload information (e.g.
Material Number)
■ No jobs for posting the IDocs are required
■ Improved operations by less granular configuration
■ Transparent from monitoring perspective (no new status, same monitors and same
troubleshooting methods as before)
RBDAPP01
immediately (A)synchronous calls to (re)start queue
WE20 BADI
IDoc IDoc IDoc
worklist
Determine priority EOIO
medium IDoc
4. Dynamic retry on error: allow automatic retry in case of temporary issues (e.g. locking)
• Trigger via own criteria (BADI) direct reprocessing IDOCs on error (and allow to limit attempts)
• In case retry is done for queued IDOCs, IDOC on error remains on top of list (enables EOIOIP)
no bgRFC transactional
no sequence
IDOC saved+received
Other prio is taken
bgRFC inbound
sequence by ratio of IDoc
destination 1
queuename bgRFC in queue
into worklist
ressources
Servergroup 1
number parallel destinations
no sequence
bgRFC ratio of bgRFC inbound
IDoc
in queue or transactional ressources destination 2
sequence by Servergroup 2
queuename number parallel destinations Standard:
Appl called
exactly once
no sequence
bgRFC ratio of bgRFC inbound
ressources
IDoc
in queue or transactional destination 3
sequence by Servergroup 3
queuename number parallel destinations
no bgRFC in queue
IDOC saved+received
Other prio is taken
sequence by
queuename bgRFC inbound
destination 1 IDoc
into worklist
Servergroup 1
number parallel destinations
In case of queued processing additional queue naming rules can be specified here
SBGRFCPERFMON
SBGRFCMON:
In table EDIDS:
Time between countr second status 64 and 62 is the time IDoc spend in bgRFC (in example 3:41
minutes)
Test setup:
– 240 IDocs send per minute for one interface only
– Test 1: Using RBDAPP01 scheduled every minute
– Test 2: Using bgRFC with 5 parallel connections
Result :
– IDoc wait time with bgRFC 0 seconds compared to 38 seconds with job based approach (see graph
below)
– 38 seconds is around average wait time till job is running + time till backlog is consumed by job
Result :
– With bgRFC clearly controllable DIA WP utilzation for IDoc processing
– With RBDAPP01 very high DIA WP usage
Test setup:
– 2 Message Types:
o COMAS using MP with 5 connections
o ZCOALM using LP with 1 connections
Result :
– 7770 ZCOELEM and 4200 COSMAS
– MP: Average 0 secs wait time
– LP Average 9 secs wait time
Test setup:
– 2 Message Types:
o COMAS using MP with 5 connections
o ZCOALM using MP with 2 connections
– Same volume planned : 240 messages every minute
– At the end 5180 Idocs of both message types
Result :
– Average MP: 0 secs
– Average LP: 8 secs
Test setup:
– 2 Message Types:
o COMAS using MP with 7 connections
o ZCOALM using MP with 2 connections
– Same volume planned : 240 messages every minute
– RBDAPP01 scheduled every minute for both interfaces (two individual jobs)
Result :
– Only medium priority evaluated:
o With bgRFC the average response time was 0 seconds. Now the average wait time is 33 seconds
due to the 1 minute scheduling interval of the RBDAPP01.
Test setup:
– Done on internal AGS system
– Posting of IDoc takes several seconds to simulate a higher impact on sender system
– Both tests are using trigger immediately on Sender and Receiverside:
o Test I: On Receiver side with standard trigger immediate
o Test II: On Receiver side with new ALE framework using priority 01 (using bgRFC in case of shortage)
Test I:
– Regular peaks can be seen during the test period
– Very high backlog in case
Test period
– Al resources on SMQS for this receiver were free (unfortunately no screenshot taken)
– On receiver side overload occurred and therefore HP messages were processed using bgRFC
Test period
Summary:
– Better decoupling of sender and receiver system with new ALE framework
– In case of performance problems on receiver side much less resources will be blocked on
sender side
– Number of work processes per SMQS destination are used less and therefore risk of
blockage of high priority messages on sender side is reduced significantly.
In the beginning...
Synchronous RFCs (sRFC)
Systems involved must be available at the time the call is made
Executes the function module (at most) once.
Quality of Service (QoS): Best Effort (BE)
Next developments...
Asynchronous RFCs (aRFC)
Executes the function module (at most) once in the RFC Server.
Remote server must be available at the time the RFC client executes the RFC.
The parameters of asynchronous RFCs are not logged in the database but sent directly to the server.
create
Inbound database Server System
units
fetch units
Inbound Scheduler
process units
FM calls
Client System
create
Outbound units database Server System
fetch units
process
Outbound scheduler units FM calls
create
OutInbound units database Server System
fetch units
transfer database
Outbound Scheduler units
fetch units
Inbound Scheduler
In the OutInbound scenario unit data is only
transferred to the server system. process units
The execution will be done locally by the inbound
scheduler of the server system. FM calls
bgRFC Scheduler...
bgRFC Type Q
Quality of service EOIO
Supported scenarios Q-A 11 8 7 4 1
Inbound
Q-B 11 9 6 4 2
Outbound
OutInbound Q-C 10 6 5 3
8 7 4 1
11 9 6 2
10 5 3
bgRFC Type Q
Quality of service EOIO
Supported scenarios Q-A 8 7 4 1
11
Inbound
Q-B 11 9 6 4 2
Outbound
OutInbound Q-C 10 6 5 3
8 7 4 1
11 9 6 2
10 5 3
Supervisor destination
Necessary for the scheduler to start
Outbound scenario
A destination in SM59 has to exist
The destination has to be maintained for bgRFC
Select tab strip Special Options -> Protocol -> bgRFC
Inbound scenario
A destination for the inbound scenario is an identifier for the application
This destination can be maintained in SBGRFCCONF
For Type Q maintain an additional queue prefix
Transaction SBGRFCCONF
System-wide Settings:
Scheduler: System • No. of Log Messages: number of
entries in SLG1
• Log lifetime (h): Lifetime of the
SLG1 entries
• Unit Delete Time (s): Deletion
time for units in seconds
• Compression On: Unit is
compressed before it is stored.
Reduced network load but slightly
more resources are needed.
Transaction SBGRFCCONF
Inbound/Outbound Settings:
Scheduler: App. Server • Scheduler Count: number of
schedulers per application server.
• Open Connections: Max. No. Of
open connections per scheduler.
• Gateway Resource %: % of “free”
gateway resources available to the
scheduler.
• Scheduler Idle Time: How long
Per app the scheduler waits if no queries
server are currently waiting to be
Available processed.
per • Entry Expiration: Automatic load
server
balancing data normally collected
“-1” by returning calls. Request made if
means information is older than this
“1” value.
• Dest. Per Scheduler: Max. No. Of
Recommendation:
60s destinations processed by a
scheduler.
Transaction SBGRFCCONF
Destination Settings:
Scheduler: Destination • Scheduler Count: number of
schedulers per destination.
• Max. Auto. Retries: Number of
retries if a Unit fails.
• Wait per Unit (s): Wait time
between 2 successive retries.
• Wait/Destination (s): Wait time
between 2 successive attempts to
Per Transaction: connect to a destination.
destination SBGRFCHIST
• Dest.Proc Time (s): Max. time a
scheduler can process units for a
particular destination.
• Open Connections: Max. No. Of
connections per destination.
• Unit Alive Checks: If a scheduler
Access protection exits while units are being
for queues and
destinations
processed, the next scheduler
checks the status of the units at
regular intervals. Once exceeded,
units are locked.
© 2012 SAP AG. All rights reserved. 57
bgRFC – Configuration (number of schedulers)
Transaction SBGRFCCONF
Inbound Dest. Settings:
Define Inbound Dest. • Destination: Name of the
destination linked to a RFC
destination (SM59).
• Logon/server group: Load
balancing for inbound processing
(RZ12). Transaction SARFC
shows available resources per app
server (Dialog WPs).
• Prefixes: Name extension for a
queue in bgRFC processing. If no
queue is found, exception thrown.
• Using a server group: specific to
a destination, it is possible to
control where units are processed.
Leaving this empty will balance
processing across ALL available
application servers (SPACE
group)
Transaction SBGRFCCONF
Supervisor Dest. Settings:
Define Supervisor Dest. • Destination: Name of the RFC
destination.
Transaction SBGRFCMON
Transaction SBGRFCMON
UNIT_ID
PRED_CNT
REDO_CNT FK1 LOCK_KIND
VALID_UNTIL
IS_DELETED
TRFC_I_ERR_STATE
IS_NOOP
CTIMESTAMP PK, FK1 UNIT_ID
UNAME
CLIENT MSGNR
LANGU
TRFC_I_QIN
TCODE
CPROG
PK, FK1 UNIT_ID
HOST_NAME
TRFC_I_EXE_STATE
UNIT_SIZE
QUEUE_NAME
IS_TRACE_ON
PK, FK1 UNIT_ID
PW_HASH
TIMESTAMP
SCHEDULER_ID
STATE
CCMS...
Destination
Current number of parallel tasks for this bgRFC destination
Ratio of communication steps with errors to total number of communication steps (in %) during
the observation period
Number of bytes processed within the observation period, with reference to the length of the
time interval
CCMS...
Scheduler
Start time of bgRFC scheduler instance
Current size of program context of bgRFC scheduler instance in KB
Current throughput of a bgRFC Scheduler instance (units per hour)
Average throughput of a bgRFC Scheduler instance (units per hour)