Skip to Content
Author's profile photo Hongjun Qian

One Exposure: Find out the flows coming from Bank statement but bank statement is not exist any more

One Exposure is the central storage which targets to all actual and forecast operational business transactions, it plays as the single source of truth for all financial risks from operations. The SAP Cash Management are using One Exposure as it’s storage for the apps.

Bank Statement is one of most used source application in One Exposure. The traditional use scenario is that:

  1. The relevant bank statement flows (FQM flows with source application ‘BS’) generated when importing bank statement;
  2. When posting and clearing bank statement items, the accounting document posted;
  3. The relevant FI flows (FQM flows with source application ‘BSEGV’) generated, and the relevant bank statement flows will be deleted.

It is also quite common for the customer to archive bank statement (table FEBKO, table FEBKO, and so on). Normally there won’t be bank statement flows for those archived bank statement. The reasons behind could be quite complexity, such as relevant FI document failed to build flow, the logic detect between bank statement with FI documents are not solid.

This blog just targets to bring you the facts that how many bank statement flows exist without bank statement.

The following codes ship the logic to perform such check:


p_bukrs type bukrs.


SELECT DISTINCT origin_document_id from FQM_FLOW
  into table @data(lt_bsflows)
  where company_code = @p_bukrs
    and DELETED = ''
    and origin_application = 'BS'.

data lt_febko type table of febko.
data lv_kukey type KUKEY_EB.

LOOP AT lt_bsflows ASSIGNING FIELD-SYMBOL(<fs_bsflow>).
  move <fs_bsflow> to lv_kukey.
  select single * from febko
    into @data(ls_febko)
    where kukey = @lv_kukey.
  if sy-subrc ne 0.
    append INITIAL LINE TO lt_febko ASSIGNING FIELD-SYMBOL(<fs_febko>).
    <fs_febko>-kukey = <fs_bsflow>.

IF lines( lt_febko ) > 0.
  WRITE 'FQM flows but bank statement not exist: '.
  loop at lt_febko ASSIGNING <fs_febko>.
    write <fs_febko>-kukey.

To run it, copy the code into your own program, and execute it:

After executed, it find out several flows:


Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.