Problem solve Get help with specific problems with your technologies, process and projects.

Call SAP function module to read Document Flow

How to read those billing document flow from your ABAP report?

How to read those billing document flow from your ABAP report? Just call the function module. You can also prefer...

to read from the SAP table, VBFA.

****  To read the billing document flow from ABAP report.
**** or the SAP Table VBFA ==> Document flow table
REPORT zsd_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
*         aufbereitung  = '2'
*         belegtyp      = beleg_typ
          comwa         = i_vbco6
*    IMPORTING
*         BELEGTYP_BACK =
     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!'.
* 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.

*&---------------------------------------------------------------------*
*&      Form  INPUT_VBELN_RECORDS
*&---------------------------------------------------------------------*
FORM input_vbeln_records.

  i_vbco6-vbeln = '0060001625'.
  i_vbco6-posnr = '000000'.
  i_vbco6-etenr = '0000'.
****  APPEND i_vbco6.

ENDFORM.                    " INPUT_VBELN_RECORDS
This was last published in March 2002

Dig Deeper on SAP Basis administration and NetWeaver administration

PRO+

Content

Find more PRO+ content and other member only offers, here.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchManufacturingERP

SearchOracle

SearchDataManagement

SearchAWS

SearchBusinessAnalytics

SearchCRM

SearchContentManagement

SearchFinancialApplications

Close