Flow Builder: Check Delta Table’s Consistence
SAP Cash Management can build the flows on the fly. The key of the “on the fly flow generation” is the Delta Table, table FCLM_BSEG_DELTA, will store the document waiting to be proceed in Flow Builder (Program FCLM_FLOW_BUILDER) via the background job.
In a rare case, the delta table of Flow Builder, table FCLM_BSEG_DELTA, may contain some dirty entries. The ‘dirty’ entry here, stands for the entry without document number (field BELNR) or fiscal year (field GJAHR) or company code (field BUKRS). The reason behind is the complexity of One Exposure, and it shall be prevented from all cases we found.
As a consequence, the following background job which run on FCLM_FLOW_BUILDER will get cancelled. The job’s cancellation may attract eyes’ concentration though it’s harmless.
Hence, the following program provides a simple clear on the delta table (after print out all ‘dirty’ entries, all those entries got deleted):
REPORT zac_flowbuilder_checkdeltatable. START-OF-SELECTION. DATA lt_bseg_delta LIKE TABLE OF FCLM_BSEG_DELTA. SELECT * INTO TABLE lt_bseg_delta FROM FCLM_BSEG_DELTA WHERE BELNR = '' OR BUKRS = '' OR GJAHR = ''. LOOP AT lt_bseg_delta INTO DATA(ls_bseg_delta). WRITE / ls_bseg_delta-bukrs. WRITE ls_bseg_delta-gjahr. WRITE ls_bseg_delta-belnr. ENDLOOP. IF lt_bseg_delta IS NOT INITIAL. DELETE FROM FCLM_BSEG_DELTA WHERE BELNR = '' OR BUKRS = '' OR GJAHR = ''. COMMIT WORK AND WAIT. WRITE / 'Dirty entries deleted'. ENDIF.