Flow Builder to Integrate FI and MM in New Cash Management – Overview
You can find detailed information of Flow Builder in link https://uacp.hana.ondemand.com/http.svc/rc/PRODUCTION/a0a0b752bf730226e10000000a4450e5/1610%20001/en-US/frameset.htm
following path:
One Exposure from Operations => Financial Operations in One Exposure => Integration of Accounting Documents => Flow Builder
Or One Exposure from Operations => Materials Management in One Exposure => Integration of Accounting Documents => Flow Builder
This is the tool to integrate FI and MM in new cash management.
And the blog is to facilitate the discussion about this topic, and if necessary, we will compose new blog for more detailed descriptions. Please feel free to post your questions and ideas in this blog and we will try to answer all questions. Thank you.
Paste the content for easy access:
Overview
The Flow Builder generates cash flows detailing current amounts and dates of liquidity items by:
-
Tracing the original document line items from the related Financial Accounting (FI) and Materials Management (MM) tables.
-
Analyzing the document flow back to the source (original) document. The analysis is based on virtually clearing the open items in the preceding and subsequent documents, which results in precise amount, date, and account assignment. Items in the preceding documents are called base items, while items in the subsequent documents are called offsetting items.
-
Generating cash flows, according to the remaining offsetting items that are not cleared in the source (original) document. Each cash flow is split according to the offsetting items in the subsequent documents and the account assignment as inherited from the offsetting items in the source (original) document.
-
Importing the cash flows with the split amounts, dates, and liquidity items over into the One Exposure from Operations hub. Cash flows are then categorized into different certainty levels in One Exposure from Operations for further calculation and consumption.
Process
The following figure shows how the Flow Builder works. Based on the original transactional data from the related FI and MM tables, the Flow Builder generates cash-relevant flows, reflecting amount, date, flow level, liquidity item and other account assignments, which are then imported to One Exposure from Operations.
Figure 1. How Flow Builder works
Example
The following example is based on a vendor invoice. The incoming invoice (1a) is cleared via an outgoing payment (2a). Posting on the vendor account is categorized as payables with certainty level PAY_N
, cash forecast from an open item of a payable. After that, the amount can be found in a bank clearing account for outgoing payments. Posting on the bank clearing account is categorized as cash in transit with certainty level SI_CIT
, cash forecast from a self-initiated payment. Then the bank clearing account is debited and the transaction is posted at which point the bank clearing account is cleared (3a). This posting is categorized as cash with certainty level ACTUAL
, accounting document line items from bank statements.
Based on flow types, the Flow Builder traces the document chain back to its source. In the example below, this is the expense account, which shows a cash outflow of 100 EUR in liquidity item E01. The expense account shows other account assignment information, such as cost center, company code, and so on.
Figure 2. An Example of Document Chain Analysis
Prerequisites
IMG Customizing Activities
To use the Flow Builder, make the required settings in Customizing under
:Flow Types
Flow types classify the lifecycle of cash flows. Each flow type is assigned to an SAP-defined flow category. Flow type and flow level are used to differentiate document line items.
-
For FI documents, flow types must be defined and uploaded to line items in table
BSEG
. -
For MM documents, flow types are generated in One Exposure from Operations.
For more information, see Flow Types.
Liquidity Items
Liquidity items is a customer-defined attribute for categorizing the source and use of cash flows. It serves as an analytical dimension in cash flow statements and forecast reports.
-
For FI documents, liquidity items are uploaded to line items in table
BSEG
. -
For MM documents, currently only the query sequence for liquidity item is supported in Flow Builder for MM, which is used in the generation of MM loading class. However, when you define query sequence, only limited fields are supported. For more information, see SAP Note 2354048
.
For more information, see Liquidity Items and Liquidity Item Hierarchies.
Activate Individual Source Applications
and Activate Multiple Source Applications
under Data Setup
You can activate the source applications for Financial Operations (FI and BKPF) and Materials Management (MM) for cash flows corresponding to specific company codes.
For more information, see Integration with Source Applications in the Central System.
Activities
The Flow Builder program uses the accounting interface (RWIN) to trace back to the original documents, which are stored in delta tables. The Setting and Tools feature controls the background jobs based on the delta tables. Flows are then built automatically or manually.
Flow Builder (FCLM_FLOW_BUILDER
)
You can run this transaction in two ways, either by running the Flow Builder or by using the Customizing activity Build Cash Flows from Operations
. Flows are built either in the Delta Run
mode, or in the Mass Run
mode:
-
In the
Delta Run
mode, flows are built automatically as the back-end job of the program is triggered after online posting of FI documents. -
In the
Mass Run
mode, however, flows are built manually with certain search criteria, such as company code, fiscal year, document number, and line item. As an example, in the case of an initialization and flow rebuild, you would want to use the Mass Run mode instead of the Delta Run mode.Note
For MM documents, the selection criteria differs according to different data sources:
-
For purchase orders (PO) and scheduling agreements, you can select company code, fiscal year, document number and line Item.
-
For purchase requisitions (PR), you can select from several criteria, such as purchase requisitions, item of requisitions, document type, and so on.
-
Flow Builder also allows you to perform the following activities:
-
Maximum Steps of Chain Tracing
You can define the maximum steps in a document chain trace. For example, if you choose one step of chain tracing, you find the document flow with one preceding document and one subsequent document.
-
Merge Tax Items
If you choose to merge tax items, the tax line item, which was previously split as a line item, is merged with other line items. This means that there is no separate line item for tax. For more information, see SAP Note 2221748
.
Settings and Tools (FCLM_FB_UTIL
)
You can run this transaction in two ways, either by running the Settings and Tools or by using the customizing activity Customize the Flow Builder
.
With this transaction, you can perform the following activities:
-
Schedule Background Job
You use this setting to change the pre-defined back-end job parameters, such as:
Job Delay in Seconds
,Variant for Flow Builder
(Delta Run only), orBackground User
for authorization check. The variants for Flow Builder (FCLM_FLOW_BUILDER
) are defined in TransactionSE38
. The background job name is in the format ofFLOW_FLOW_BUILDER_{CLIENT}*
. -
Check Background Job Logs
You use this setting to check the status of the back-end jobs. This activity is automatically triggered by online posting. By defining the
User Name
andJob Name
, you can check the job status released, ready, active, finished, and canceled) within a time frame that you define. -
Delete Flows
This tool allows you to define specific search criteria to search for and delete flows from target tables.
-
Change Default Loading Classes
:For FI documents, the default loading class is
CL_FCLM_BSEGFLOW_SAMPLE
. For MM documents, you must use this tool to generate a loading class. You can then designate the query sequence to be used to derive liquidity items from MM transactions.-
Generate Loading Classes
You use this tool to generate loading classes, by specifying
Package
,Exit Class
andLoading Class Name
.-
FI documents require a
Date
. By default, the date is determined by the planning date for forecasting cash flows from invoices. For more information, see SAP Note 2273656.
-
MM documents requires
Query Sequence
in order to generate loading class. If you change the liquidity item derivation rules, you need to regenerate and assign your loading class. Please note that only limited fields are supported when you define query sequence. For more information, see SAP Note 2354048.
-
-
-
Assign Loading Classes
You use this tool to assign loading classes to the Flow Builder. Changes in the loading class is updated to the Flow Builder program.
Extensibility
Extension is supported. By taking the default exit class as an example, you can define your own exit class for use as the loading class in the Flow Builder. You can choose from the following exit classes:
-
For FI documents, you can use the example exit class
CL_FCLM_APAR_HADI_SAMPLE
. The standard ABAP interface isIF_FCLM_HADI_APAR
. -
For MM documents, such as Purchase Order (PO) Filter, Purchase Requisition (PR) Filter and flow adjustment, you can use the example exit class
CL_FCLM_MM_HADI_SAMPLE
. The standard ABAP interface isIF_FCLM_HADI_MM
.
You will have to regenerate the loading class after implementing flow adjustments using your own exit class.
Hello Lawrence!
Thank you for share with us these information.
I’ve been trying to derive the correct liquidity item for some months, through FCLM_FLOW__BUILDER. Could you help me with this question?
In SAP S/4HANA 1503 is possible to derive liquidity item when GL account expense is in Purchasing document?
Example:
Cr. bank
Dr. bank clearing account
Cr. bank clearing account
Dr.vendor
Cr.vendor
Dr.GR/IR
the expense GL account is in Purchasing document.
I’ve tried:
– Expense GL account in FLQINFACC – it doesn’t work.
– GL account query sequences – I’ve tried C and D, only using field GL account, but it also doesn’t work.
Thank you for your help.
Danielle.
Hello, Danielle:
Do you have the FI document posted from MM Good receipt? Cr: GR/IR, Dr: Expense G/L account?
Flow builder doesn't drill down to MM from FI to get the liquidity item.
BR, Lawrence
Hello Lawrence,
Thank you for your reply.
Yes, I have FI document from MM Good receipt. So, flow builder won't consider the account in purchase document, like classical LP?
Thank you a lot!
Danielle.
Hello, Danielle:
Flow builder for MM (purchase order) will consider G/L account to derive liquidity item, the G/L account information will be saved in FQM_FLOW, which is from EKKN-SAKTO (under tab Account Assignment in purchase order line item).
Second, if there is good receipt only, forecasted cash flow is still from purchase order.
Last, after invoice receipt, forecasted cash flow will come from FI vendor invoice via flow builder for FI.
Please let me know if it is still not clear to you.
BR, Lawrence
Hello Lawrence,
It is possible to consider the genral account in purchase document (when goods is received) in FF7ABN like a bank account, if I put in a Cash Manament level and dummy house bank?
I don't want to consider pucher order but only item con general account for Good Received.
Best Regards
Hi Lawerence,
To continuation to Danielle question; If I have a Asset purchased through a PO process then in that case system will no identify and classify the amount spent as an Investment, if not then the amount is recognized as Operational expenses as it reflects to GR IR account at vendor invoide level.Can you please let me know the how flow types will integrate in FI-MM or FI-SD invocies.
Thanks,
M.Shiva Kumar
Hello, Shiva:
If you are talking about vendor invoice with open GR/IR only, I think you are right, giving the vendor invoice document cannot provide information linking to investment/asset, you cannot categorize it as you expect. This is something caused by the fact that Flow Builder for FI cannot drill down to MM.
However, I think GR/IR will be cleared at certain point of time, with this, the document chain will provide asset/investment information so that you can setup the rule to derive required liquidity item in FI, right?
For flow type, I can describe a little bit in next question, if it is not the same flow type, please let me know.
BR, Lawrence
Hi Lawrence,
Thank you very much for the sharing!
Could you also write something about flow types in CASH MANAGEMENT?
Thanks,
Naoya
Hello, Naoya and Shiva:
For the flow type in One Exposure from Operations (FQM_FLOW - FLOW_TYPE).
First, it is something only for technical purpose, currently, it is not visible to end users.
It is the kind of tag we attach to the flows from different source applications (FI, MM, SD, TRM etc) so that different consumer applications (Fiori apps, like Cash Position Details, Liquidity Forecast etc) will know what to consume from FQM_FLOW. - this is the main usage of flow type in FQM_FLOW.
The same object is also used in accounting document (BSEG-FQFTYPE).
Here, the information is the tag for different accounting line items so that our processing logic can know what is what (bank G/L account, bank clearing G/L account, vendor/customer, expense/revenue, tax and so on), to generate proper flows from accounting documents.
Hope this can clarify.
BR, Lawrence
Hello Lawrence,
Could you please also help to check this question:
we found the bank statament that crerate via FF_5 with 'do not post' is updated to table FQM_FLOW. If there is a incorrect BS , then we have to delete all BS. Are there any solution that we can only delete the incorrect BS or, is it possible to rebuilt the BS like FI&MM?
Thanks,
Naoya
Hello, Naoya:
Please use below BAdI:
BAdI: Adjustment of Flows in Bank Statement Adapter
Use
With this BAdI, you can enhance the logic determining how flows in the Bank Statement adapter are created or changed. It is called whenever the system processes a bank statement item.
The BAdI offers the following possibilities:
Example
The external transaction of the bank statement item determines whether you can decide to delete a flow and to not disregard it in One Exposure. An external transaction is either mapped to a posting rule or not. Unless an external transaction is not mapped to a posting rule, this could be a situation for using this BAdI.
See also
BAdI method documentation: Adjust Flows in Bank Statement Adapter
Unfortunately, there is no tool to rebuild or load bank statement.
BR, Lawrence
Hello Lawrence,
Thanks for your blog.
We are scheduling FCLM_FLOW_BUILDER in delta mode, to load FI data into FQM_FLOW table, but see that the delta table, FCLM_BSEG_DELTA, empty, though BKPF and BSEG holds entries of multiple company codes and fiscal year.
Could you please help here, in knowing why this delta table is empty and how to have entries in this ?
Please note that I am from ABAP background and when I debugged related AMDP method, I see that the initial data is fetched from this delta table having a join with BKPF table.
Thanks and Regard,
Dinakaran
Hello, Dinakaran:
Can you find the corresponding cash flow in table FQM_FLOW for FI document?
Delta table is filled when FI document is created or changed, and Flow builder is consequently launched to process the documents captured in delta table, after flow is successfully built, flow builder will delete entries from delta table.
If you already can find entries in FQM_FLOW, it should be already working.
BR, Lawrence
Hello Lawrence,
Excellent blog, well summed up; I am having problems when the system generates the flows for an vendor invoice that has expenses in negative mixes with positive positions, i mean, with posting key 40 and 50 (thinking that the normal behavior is having expenses in with posting key 40); The problem is the liquidity items are incorrect in the flows.
Do you know about this? I have searched notes about it but there are not.
Thank you very much
HI Lawrence,
Your blog is dated in 2017. Is there any further update on the tracing? You mentioned that it is not possible to drill down in FI flow builder to the MM. Is that still valid?
I have a scenario where the LQITEM is derived based on the material in MM. The purchase order derives the correct Liquidity item based on the Query. But when we did the Invoice verification FI flow builder is triggered and the PAY_N flow does not get the Liquidity item inherited from the PO even though we can see the field *material’ is populated. Is this a normal behavior?
regards
Vaskar
Hi Lawrence Liang
I need to change the MM rule with my logic.
How can I change this logic?
Is there a BADI or Class?
regards
Hi Lawrence Liang,
my actual project would require a new field in table FQM_FLOW. Would you know if that is possible t ofill that easily?
Is it possible to add the order number(BSEG-AUFNR) into the table FQM_FLOW.
How would be the procedure? Thank you for feedback.
Hi all,
I got some feedback from SAP - development. They write to add a field is not possible in FQM_FLOW in the current setup.
Thank you for feedback