Enterprise Resource Planning Blog Posts by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 
Vijayasree
Advisor
Advisor
43

Introduction

Flow Builder Plus (FCLM_FLOW_BUILDER_2) generates cash flow data for Cash Position and Liquidity Analysis in SAP S/4HANA Finance. Performance issues come up frequently in production, and most trace back to the same few root causes.

If you are new to it, start with SAP Note 3111810- the Technical Setup Guide for Flow Builder Plus. It is worth reading before diving into any troubleshooting.

Running Types at a Glance

Flow Builder Plus has seven running types. Knowing which one is in use is the first thing to check when a performance issue comes in.

#

Running Type

Purpose

1

Cash Position: Delta Run from Staging

Incremental update for cash position

2

Cash Position: Mass Run for Financial Accounting

One-time / rebuild run for FI

3

Delta Run from Staging for Material Management

Incremental update for MM

4

Liquidity Analysis: Delta Run from Staging

Incremental update for liquidity

5

Liquidity Analysis: Mass Run for Financial Accounting

One-time / rebuild run for FI

6

Mass Run for Purchase Ord./Sch. Agreement

One-time / rebuild run for PO/SA

7

Mass Run for Purchase Requisition

One-time / rebuild run for PR

 Mass Runs (rows 2, 5, 6, 7) are one-off executions for migration or data rebuilds. Do not schedule them as regular jobs. For routine updates, use the Delta Run types.

Initial Diagnosis Checklist

When a performance issue is reported, work through these six checks first — they cover the vast majority of cases.

1.  Mass Run or Delta Run?

Check the Running Type in the job variant. Mass Runs process large volumes by design and take longer. Delta Runs should be fast and incremental. Mixing them up leads to the wrong conclusions.

2.  Is the variant correctly configured?

Make sure Parallel Run is enabled with a valid Server Group — without one, the job runs single-threaded regardless of the setting. Also verify Start Items: Mass Runs need 'Input Items', Delta Runs need 'Relevant Items'. The wrong setting pulls in far more data than needed.

3.  Are the relevant performance SAP Notes implemented?

Many reported cases are already fixed in an existing note. Check the Version-Specific SAP Notes section and apply anything missing for your S4CORE version before going further.

4.  Is the job event-based?

Flow Builder Plus works best when triggered by workflow events, so it only runs when new data actually exists. A periodic timer job that fires regardless wastes resources.

For cash position and MM flows, configure event linkage in transaction SWETYPV (see SAP Note 3193587).

5.  Are there uncleared entries in FCLM_FB2_STRTIM?

When a job is manually terminated, temporary tables may not get cleaned up. Check FCLM_FB2_STRTIM for open entries. If any exist:

  • Cancel all active jobs and stop FCLM_FLOWBUILDER_JOB (see SAP Note 2849364).
  • Use transaction FCLM_FB2_UTIL to list all Run IDs and clear the temporary tables by passing the relevant Run ID.

6.  How many entries are in FCLM_FI_STAGING?

Check the record count in FCLM_FI_STAGING. Make sure all existing entries are fully processed before scheduling a new job, a large backlog will significantly slow down the next delta run.

To recover failed entries (XFLAG = X), run program FCLM_FB2_RECOVERY. It can run alongside a live job - no need to stop anything.

What Is Happening: FI Clearing Chain Depth

When using running type Liquidity Analysis: Delta Run from Staging, Flow Builder Plus navigates up to 9 chain steps through FI clearing documents. For every entry in the staging table, it traverses the clearing chain, finds all linked documents relevant for cash flow, and regenerates flows for all of them. The more complex your FI clearing structure, the more documents get processed per run.

This does not surface in Mass Runs because you manually pick the starting document, keeping the scope contained. In Delta Run mode, any FI document can land in the staging table, so the chain traversal can get very wide very quickly.

Last-Resort BAdI Options for Chain Depth (SAP Note 3459738)

First, make sure all performance notes for your version are implemented and Parallel Run is properly configured. That fixes most cases.

If those steps are not enough, three last-resort options are available - all documented in SAP Note 3459738, Symptom 1 -Solutions 2 to 4. All require custom development and should be evaluated thoroughly before going to production.

Option 1: Add a secondary index on FCLM_FB2_FLOW

Table FCLM_FB2_FLOW stores intermediate flows during chain tracing. Adding a secondary Standard index (not Unique, not buffer-only) on fields MANDT, RUNID, STEP, FORWARD_TYPE, OFF_BUKRS, OFF_GJAHR, OFF_BELNR, OFF_BUZEI improves the selections and joins that happen during chain traversal.

Option 2: Reduce chain steps via BAdI

Implement BAdI interface IF_FCLM_FB2_EXT~ADJUST_CHAIN_STEP and change the return value to reduce the chain step from 9 to a lower number. Dropping to 4 (the Flow Builder 1.0 default) gives results comparable to Flow Builder 1.0 with a noticeable improvement in execution time. See SAP Note 3214882 for reference.

Option 3: Cut long chains via BAdI

Implement BAdI interface IF_FCLM_FB2_EXT~FINAL_DECISION_EXT to stop chain traversal at specific documents. Set field FINAL = X in the internal table for the items where Flow Builder Plus should stop. This is useful when you know which document types do not need further chain navigation in your business scenario.

⚠  These are last-resort options. Options 2 and 3 involve custom BAdI implementation; Option 1 adds a database index in the customer namespace. Test thoroughly in a non-production system before applying in production.

Flow Builder Plus: TSV_TNEW_PAGE_ALLOC_FAIL Runtime Error

If Flow Builder Plus jobs are being cancelled with a TSV_TNEW_PAGE_ALLOC_FAIL runtime error, this is covered in detail in:

KBA  3777550  - Flow Builder Plus Job cancelled with runtime error TSV_TNEW_PAGE_ALLOC_FAIL in S/4HANA Cash Management

Version-Specific SAP Notes

Before raising a case with SAP for any Flow Builder Plus issue, implement all notes in the consulting note for your S4CORE version.

Consulting Notes by Version

  • S4CORE 106 (OP 2021): SAP Note 3144000 - SAP S/4HANA Finance, on-premise Edition 2021: Troubleshooting Note for Flow Builder Plus
  • S4CORE 107 (OP 2022): SAP Note 3389195 - SAP S/4HANA Finance, on-premise Edition 2022: Troubleshooting Note for Flow Builder Plus
  • S4CORE 108 (OP 2023): SAP Note 3459738 - SAP S/4HANA Finance, on-premise Edition 2023: Troubleshooting Note for Flow Builder Plus

Key Performance and Fix Notes

SAP Note Description S4CORE Version(s)

3237591Flow Builder Plus: Slow Performance in Packaging106, 107
3286284Flow Builder Plus: Expensive statements of getting start items and packaging106, 107
3296285Flow Builder Plus: Condense logic refinement 106, 107
3300852Flow Builder Plus: Slow Performance in Packaging, Part II106, 107
3311844Flow Builder Plus: Cumulative fixing and improvements 107
3338726Flow Builder Plus: Expensive statements on steps of packaging and finalizing flows 106, 107
3348914Flow Builder Plus: Clearing on GR/IR account is not traced even with BAdI implementation (cannot work after 3300852)106, 107
3360442Flow Builder Plus: Enhancement of the Delta Run Process and Bug Fix in Log Process 106, 107, 108
3390990Flow Builder Plus: Cumulative fixing and improvements 2106, 107
3511762Flow Builder Plus: Performance Improvement of Class CL_FCLM_FLOWBUILDER_2_FIOFFCLR 108
3573953Flow Builder Plus: Performance Improvements 108

Before You Raise a Case with SAP: Quick Checklist

Run through this list in order before opening a support ticket:

  1. Confirm the running type: Mass Run or Delta Run. Different expectations apply to each.
  2. Implement all performance notes for your S4CORE version (see the table above).
  3. Check the variant: Is Parallel Run enabled? Is a valid Server Group set? Are Start Items configured correctly?
  4. Check FCLM_FB2_STRTIM for uncleared temporary entries and clear them via FCLM_FB2_UTIL.
  5. Check FCLM_FI_STAGING record count and use FCLM_FB2_RECOVERY for any failed entries.
  6. If nothing has resolved it: explore the last-resort BAdI options to control chain depth (SAP Note 3459738, Solutions 2 to 4).
  7. Be careful with SAP Note 3467640 if your data volumes are high - it can make things worse, not better.