**** To read the billing document flow from ABAP
report.
**** or the SAP Table VBFA ==> Document flow table
REPORT y_doc_flow
MESSAGE-ID rebates.
*Internal Table for VBFA
DATA: BEGIN OF i_vbfa OCCURS 0.
INCLUDE STRUCTURE vbfa.
DATA: END OF i_vbfa.
IF sy-subrc <> 0.
MESSAGE i019 WITH 'No documents found!'.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1
SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
LOOP AT i_vbfa.
WRITE:/ i_vbfa-vbeln, i_vbfa-posnn, i_vbfa-vbtyp_n.
ENDLOOP.
ENDIF.