Read SAP Document flow in SAP SD

SAP Document flow in SAP SD: This post will introduce a BAPI to read all the SAP Document flow for a SAP SD document. ( For example, read the delivery and Billing Document for Sales Order in SAP SD Sales and distribution).

SAP Document flow Overview

SAP Doc. Flow Tables and Tcodes

Get the most important list of SAP tcodes and SAP tables for documents flow in this post: ?Document Flow SAP SD and SAP MM with Tables and Tcodes

SAP Document flow BAPI

Read the SAP Doc. flow can be done by the function module?RV_ORDER_FLOW_INFORMATION.

Read SAP Document Flow using BAPI sample code

The following part is a sample ABAP code to read the SAP Document Flow for SAP SD sales Order.
The input is the SAP Order Number ( VBCO6-VBELN ) and the output LT_VBFA for the Document flow information.

Main SAP SD Document Category

When dealing with SAP Doc. Flow, it is important to understand the category of each documents in the flow. here the list of the most used SAP SD Document:

SD Doc. Category Description
A Inquiry
B Quotation
C Order
D Item proposal
E Scheduling agreement
F Scheduling agreement with external service agent
G Contract
H Returns
I Order w/o charge
J Delivery
K Credit memo request
L Debit memo request
M Invoice
N Invoice cancellation
O Credit memo
P Debit memo
Q WMS transfer order
R Goods movement
S Credit memo cancellation
T Returns delivery for order
U Pro forma invoice
V Purchase Order
W Independent reqts plan
X Handling unit
0 Master contract
1 Sales activities (CAS)
2 External transaction
3 Invoice list
4 Credit memo list
5 Intercompany invoice
6 Intercompany credit memo
7 Delivery/shipping notification
8 Shipment
a Shipment costs
b CRM Opportunity
c Unverified delivery
d Trading Contract
e Allocation table
g Rough Goods Receipt (only IS-Retail)
h Cancel goods issue
i Goods receipt
j JIT call
p Goods Movement (Documentation)
r TD Transport (only IS-Oil)
s Load confirmation reposting (only IS-Oil)
t Gain / loss (only IS-Oil)
u Reentry into storage (only IS-Oil)
v Data Collation (only IS-Oil)
w Reservation (only IS-Oil)
x Load confirmation goods receipt (only IS-Oil)
: Service Order
. Service Notification
* Pick Order