Banner
Banner

Attention: open in a new window. PDFPrintE-mail

2009
09
Jan

Read sales document flow using a function module

How to read billing document flow from your ABAP report?

Just call the function module 'RV_ORDER_FLOW_INFORMATION'.
You can also prefer to read from the SAP table, VBFA.

Code

****  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.

DATA: i_vbco6 LIKE vbco6.

CLEAR: i_vbfa, i_vbco6.
REFRESH: i_vbfa.

PERFORM input_vbeln_records.

CALL FUNCTION 'RV_ORDER_FLOW_INFORMATION'
  EXPORTING
     comwa         = i_vbco6
  TABLES
     vbfa_tab      = i_vbfa
  EXCEPTIONS
     no_vbfa       = 1
     no_vbuk_found = 2
     OTHERS        = 3.

IF sy-subrc <> 0.
  MESSAGE i019 WITH 'No documents found!'.
ELSE.
  LOOP AT i_vbfa.
    WRITE:/  i_vbfa-vbeln, i_vbfa-posnn, i_vbfa-vbtyp_n.
  ENDLOOP.
ENDIF.

*&---------------------------------------------------------------------**
*&      Form  INPUT_VBELN_RECORDS
*&---------------------------------------------------------------------*
FORM input_vbeln_records.
  i_vbco6-vbeln = '0060001625'.
  i_vbco6-posnr = '000000'.
  i_vbco6-etenr = '0000'.
ENDFORM.                    " INPUT_VBELN_RECORDS

Last Updated (Tuesday, 30 November 1999 00:00)
Banner
Free software downloads