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
DItem proposal
EScheduling agreement
FScheduling agreement with external service agent
IOrder w/o charge
KCredit memo request
LDebit memo request
NInvoice cancellation
OCredit memo
PDebit memo
QWMS transfer order
RGoods movement
SCredit memo cancellation
TReturns delivery for order
UPro forma invoice
VPurchase Order
WIndependent reqts plan
XHandling unit
0Master contract
1Sales activities (CAS)
2External transaction
3Invoice list
4Credit memo list
5Intercompany invoice
6Intercompany credit memo
7Delivery/shipping notification
aShipment costs
bCRM Opportunity
cUnverified delivery
dTrading Contract
eAllocation table
gRough Goods Receipt (only IS-Retail)
hCancel goods issue
iGoods receipt
jJIT call
pGoods Movement (Documentation)
rTD Transport (only IS-Oil)
sLoad confirmation reposting (only IS-Oil)
tGain / loss (only IS-Oil)
uReentry into storage (only IS-Oil)
vData Collation (only IS-Oil)
wReservation (only IS-Oil)
xLoad confirmation goods receipt (only IS-Oil)
:Service Order
.Service Notification
*Pick Order