Skip to Content

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.

One Exposure using adapters for lots of source applications, including Financial operations, Treasury and Risk Management, Purchasing in Materials Management, Sales in Sales and Distribution, etc. But the FI part is really the most biggest one among all other source applications. Therefore, the data quality of One Exposure for FI part will impact the accurate figures in the apps.

The data quality always a key factor which impact the figures show to the customer, especially for the new Bank Account point of view, where legacy FI documents may lack of the bank account information (HBKID/HKTID in BSEG).

It will be much more helpful for the customer as well as the consultants to find out those issues as the first step.

Here comes a sample report which performs all relevant checks onĀ One Exposure (table FQM_FLOW) and list out the suspicious items:

*&---------------------------------------------------------------------*
*& Report ZAC_VALIDFLOWDATA
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT ZAC_VALIDFLOWDATA.

PARAMETERS: p_bukrs TYPE BUKRS.
PARAMETERS: p_crtll TYPE FQM_CERTAINTY_LEVEL.
PARAMETERS: p_orgap TYPE FQM_ORIGIN_APPLICATION DEFAULT 'BSEGV'.

START-OF-SELECTION.
  CHECK p_orgap IS NOT INITIAL.

IF p_bukrs IS NOT INITIAL.
SELECT DISTINCT COMPANY_CODE, HOUSE_BANK, HOUSE_BANK_ACCOUNT, FI_ACCOUNT, BANK_ACCOUNT_ID
  INTO TABLE @DATA(lt_result)
  FROM FQM_FLOW
  WHERE COMPANY_CODE EQ @p_bukrs
    AND CERTAINTY_LEVEL EQ @p_crtll
    AND ORIGIN_APPLICATION EQ @p_orgap
    AND DELETED <> 'X'
  ORDER BY COMPANY_CODE ASCENDING,
    HOUSE_BANK ASCENDING,
    HOUSE_BANK_ACCOUNT ASCENDING,
    FI_ACCOUNT ASCENDING
  .
ELSE.
SELECT DISTINCT COMPANY_CODE, HOUSE_BANK, HOUSE_BANK_ACCOUNT, FI_ACCOUNT, BANK_ACCOUNT_ID
  INTO TABLE @lt_result
  FROM FQM_FLOW
  WHERE COMPANY_CODE IS NOT NULL
    AND CERTAINTY_LEVEL EQ @p_crtll
    AND ORIGIN_APPLICATION EQ @p_orgap
    AND DELETED <> 'X'
  ORDER BY COMPANY_CODE ASCENDING,
    HOUSE_BANK ASCENDING,
    HOUSE_BANK_ACCOUNT ASCENDING,
    FI_ACCOUNT ASCENDING
  .
ENDIF.

WRITE / .
WRITE / '1. FI Flows without GL account'.
LOOP AT lt_result ASSIGNING FIELD-SYMBOL(<fs_result>)
    WHERE ( FI_ACCOUNT IS INITIAL OR FI_ACCOUNT EQ SPACE ).
  WRITE / <fs_result>-company_code.
  WRITE <fs_result>-house_bank.
  WRITE <fs_result>-house_bank_account.
  WRITE <fs_result>-fi_account.
  WRITE <fs_result>-bank_account_id.
ENDLOOP.

WRITE / .
WRITE / '2. FI Flows without house bank or without house bank account'.
LOOP AT lt_result ASSIGNING <fs_result>
    WHERE FI_ACCOUNT IS NOT INITIAL AND ( house_bank IS INITIAL OR house_bank_account IS INITIAL ).
  WRITE / <fs_result>-company_code.
  WRITE <fs_result>-house_bank.
  WRITE <fs_result>-house_bank_account.
  WRITE <fs_result>-fi_account.
  WRITE <fs_result>-bank_account_id.
ENDLOOP.

WRITE / .
WRITE / '3. FI Flows with house bank/house bank account but no BAM'.
LOOP AT lt_result ASSIGNING <fs_result>
    WHERE FI_ACCOUNT IS NOT INITIAL
      AND house_bank IS NOT INITIAL
      AND house_bank_account IS NOT INITIAL
      AND ( BANK_ACCOUNT_ID IS INITIAL OR BANK_ACCOUNT_ID EQ SPACE ).
  WRITE / <fs_result>-company_code.
  WRITE <fs_result>-house_bank.
  WRITE <fs_result>-house_bank_account.
  WRITE <fs_result>-fi_account.
  WRITE <fs_result>-bank_account_id.
ENDLOOP.

WRITE /.
WRITE / '4. FI Flows with house bank/house bank account assigned more than one GL'.
DATA ls_result LIKE LINE OF lt_result.
DATA lv_count TYPE i VALUE 0.
SORT lt_result BY COMPANY_CODE ASCENDING HOUSE_BANK ASCENDING HOUSE_BANK_ACCOUNT ASCENDING.
LOOP AT lt_result ASSIGNING <fs_result>
    WHERE FI_ACCOUNT IS NOT INITIAL
      AND house_bank IS NOT INITIAL
      AND house_bank_account IS NOT INITIAL.

  IF ls_result IS INITIAL.
    MOVE-CORRESPONDING <fs_result> TO ls_result.
    ADD 1 TO lv_count.
  ELSE.
    IF ls_result-company_code EQ <fs_result>-company_code
      AND ls_result-house_bank EQ <fs_result>-house_bank
      AND ls_result-house_bank_account EQ <fs_result>-house_bank_account.
      ADD 1 TO lv_count.
      IF lv_count GT 1.
        IF lv_count EQ 2.
          WRITE / ls_result-company_code.
          WRITE ls_result-house_bank.
          WRITE ls_result-house_bank_account.
          WRITE ls_result-fi_account.
          WRITE ls_result-bank_account_id.
        ENDIF.

        WRITE / <fs_result>-company_code.
        WRITE <fs_result>-house_bank.
        WRITE <fs_result>-house_bank_account.
        WRITE <fs_result>-fi_account.
        WRITE <fs_result>-bank_account_id.
      ENDIF.
    ELSE.
      MOVE-CORRESPONDING <fs_result> TO ls_result.
      lv_count = 1.
    ENDIF.
  ENDIF.
ENDLOOP.

WRITE /.
WRITE / '5. FI Flows with house bank / house bank account assigned only one GL'.
CLEAR: ls_result, lv_count.
LOOP AT lt_result ASSIGNING <fs_result>
    WHERE FI_ACCOUNT IS NOT INITIAL
      AND house_bank IS NOT INITIAL
      AND house_bank_account IS NOT INITIAL.

  IF ls_result IS INITIAL.
    MOVE-CORRESPONDING <fs_result> TO ls_result.
    ADD 1 TO lv_count.
  ELSE.
    IF ls_result-company_code EQ <fs_result>-company_code
      AND ls_result-house_bank EQ <fs_result>-house_bank
      AND ls_result-house_bank_account EQ <fs_result>-house_bank_account.
      ADD 1 TO lv_count.
    ELSE.
      IF lv_count EQ 1.
        WRITE / ls_result-company_code.
        WRITE ls_result-house_bank.
        WRITE ls_result-house_bank_account.
        WRITE ls_result-fi_account.
        WRITE ls_result-bank_account_id.
      ENDIF.

      MOVE-CORRESPONDING <fs_result> TO ls_result.
      lv_count = 1.
    ENDIF.
  ENDIF.
ENDLOOP.
IF lv_count EQ 1.
  WRITE / ls_result-company_code.
  WRITE ls_result-house_bank.
  WRITE ls_result-house_bank_account.
  WRITE ls_result-fi_account.
  WRITE ls_result-bank_account_id.
ENDIF.

WRITE /.
WRITE / '6. FI flows with GL account assigned more than one house bank/house bank account'.
SORT lt_result BY COMPANY_CODE ASCENDING FI_ACCOUNT ASCENDING.
CLEAR: ls_result, lv_count.
LOOP AT lt_result ASSIGNING <fs_result>
    WHERE FI_ACCOUNT IS NOT INITIAL
      AND house_bank IS NOT INITIAL
      AND house_bank_account IS NOT INITIAL.

  IF ls_result IS INITIAL.
    MOVE-CORRESPONDING <fs_result> TO ls_result.
    ADD 1 TO lv_count.
  ELSE.
    IF ls_result-company_code EQ <fs_result>-company_code
      AND ls_result-fi_account EQ <fs_result>-fi_account.
      ADD 1 TO lv_count.
      IF lv_count GT 1.
        IF lv_count EQ 2.
          WRITE / ls_result-company_code.
          WRITE ls_result-house_bank.
          WRITE ls_result-house_bank_account.
          WRITE ls_result-fi_account.
          WRITE ls_result-bank_account_id.
        ENDIF.

        WRITE / <fs_result>-company_code.
        WRITE <fs_result>-house_bank.
        WRITE <fs_result>-house_bank_account.
        WRITE <fs_result>-fi_account.
        WRITE <fs_result>-bank_account_id.
      ENDIF.
    ELSE.
      MOVE-CORRESPONDING <fs_result> TO ls_result.
      lv_count = 1.
    ENDIF.
  ENDIF.
ENDLOOP.

WRITE /.
WRITE / '7. FI Flows with GL account assigned only one house bank/house bank account'.
CLEAR: ls_result, lv_count.
LOOP AT lt_result ASSIGNING <fs_result>
    WHERE FI_ACCOUNT IS NOT INITIAL
      AND house_bank IS NOT INITIAL
      AND house_bank_account IS NOT INITIAL.

  IF ls_result IS INITIAL.
    MOVE-CORRESPONDING <fs_result> TO ls_result.
    ADD 1 TO lv_count.
  ELSE.
    IF ls_result-company_code EQ <fs_result>-company_code
      AND ls_result-fi_account EQ <fs_result>-fi_account.
      ADD 1 TO lv_count.
    ELSE.
      IF lv_count EQ 1.
        WRITE / ls_result-company_code.
        WRITE ls_result-house_bank.
        WRITE ls_result-house_bank_account.
        WRITE ls_result-fi_account.
        WRITE ls_result-bank_account_id.
      ENDIF.

      MOVE-CORRESPONDING <fs_result> TO ls_result.
      lv_count = 1.
    ENDIF.
  ENDIF.
ENDLOOP.
IF lv_count EQ 1.
  WRITE / ls_result-company_code.
  WRITE ls_result-house_bank.
  WRITE ls_result-house_bank_account.
  WRITE ls_result-fi_account.
  WRITE ls_result-bank_account_id.
ENDIF.

 

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply