sitemap
Read sales document flow using a function module

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.

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
*         aufbereitung  = '2
'*         belegtyp      = beleg_typ
comwa         = i_vbco6
*    IMPORTING
*         BELEGTYP_BACK =
TABLESvbfa_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
All of the  product names here are trademarks of their respective companies.  The site
www.allsaplinks.com no way affiliated with SAP AG. We have made every effort for the content
integrity.  Information used on this site is at your own risk.
SapMaterial.com  
ABAP TECHNICAL

SAP Introduction

sap abap faq

sap Tables

SAP Transaction codes

Internal tables

data dictionary

performance tuning

transports & Requests

Sap scripts

Smartforms

lsmw

reports

sap Workflow

module pool/ dialog
programming

table control

user exits

sap memory

abap memory

alv reports

ABAP ADVANCED

IDOC

ALE

BAPI

BADI

RFC


FUNCTIONAL SIDE

Materials Management

FICO

Human Resources

BIW / BW / SEM


Free Documentation
Abap Material

Ale Material

BAPI Material

BC Material

IDOC Material

R/3 Database Management

SAP material

RFC

Transport

Sales & Distribution Material

Basic Data and Function
Material

Basis (BC) Material

Billing Material

CA Material

CATT : Computer Aided Test
Tool

Capacity Evaluation and
leveling Material

Capacity Planning Material

Cross Application Material

Countries

Customer Service Material

Enterpise  Material

Financial / Controlling (FICO)

Internet Time Sheet

Inspection Material

HR Material

Material Management
Material

Payments Material

Payroll Material

Pension Fund

Production Planning and
Control

Plant Maintenance

Quality Management Material

Real Estate Material

SAP material

Wage Types