SAP Cash Management provides a program FQM_UPD_FLOW_TYPE to update Flow Type in Accounting Document.
As the program will set the Flow Types based on the master data definition (like G/L account, bank account), configuration data (like Payment program) and transaction data (mostly the accounting document itself), and the customizing (IMG path is: Financial Supply Chain Management > Cash and Liquidity Management > Cash Management > Flow Types > Assign Flow Types to G/L Accounts).
However, the program won't reset the flow types in the Accounting Documents automatically.
Here comes a program which help you to reset all the Flow Types in Accounting Documents which you can reset all Flow Types if you need to.
REPORT ZAC_RESETFLOWTYPE.
PARAMETERS p_bukrs TYPE BUKRS OBLIGATORY.
PARAMETERS p_hkont TYPE HKONT.
PARAMETERS p_shkzg type shkzg.
DATA: gv_amount TYPE i.
INITIALIZATION.
START-OF-SELECTION.
CLEAR: gv_amount.
IF p_hkont is not INITIAL AND p_shkzg IS NOT INITIAL.
SELECT COUNT( * )
FROM BSEG
INTO gv_amount
WHERE bukrs = p_bukrs
AND hkont = p_hkont
AND shkzg = p_shkzg.
UPDATE BSEG
SET FQFTYPE = ''
WHERE bukrs = p_bukrs
AND hkont = p_hkont
AND shkzg = p_shkzg.
ELSEIF p_hkont IS NOT INITIAL AND p_shkzg IS INITIAL.
SELECT COUNT( * )
FROM BSEG
INTO gv_amount
WHERE bukrs = p_bukrs
AND hkont = p_hkont.
UPDATE BSEG
SET FQFTYPE = ''
WHERE bukrs = p_bukrs
AND hkont = p_hkont.
ELSEIF p_hkont IS INITIAL AND p_shkzg IS NOT INITIAL.
SELECT COUNT( * )
FROM BSEG
INTO gv_amount
WHERE bukrs = p_bukrs
AND shkzg = p_shkzg.
UPDATE BSEG
SET FQFTYPE = ''
WHERE bukrs = p_bukrs
AND shkzg = p_shkzg.
ELSE.
SELECT COUNT( * )
FROM BSEG
INTO gv_amount
WHERE bukrs = p_bukrs.
UPDATE BSEG
SET FQFTYPE = ''
WHERE bukrs = p_bukrs.
ENDIF.
COMMIT WORK AND WAIT.
WRITE 'BSEG UPDATED COMPLETED: '.
WRITE gv_amount.