SQL Server administration and T-SQL development, Web Programming with ASP.NET, HTML5 and Javascript, Windows Phone 8 app development, SAP Smartforms and ABAP Programming, Windows 7, Visual Studio and MS Office software
Development resources, articles, tutorials, code samples, tools and downloads for SAP HANA and ABAP, HANA Database, SQLScript, SAP UI5, Screen Personas, Web Dynpro, Workflow

Get SAP Document Flow using SD_DOCUMENT_FLOW_GET ABAP Function Module

ABAP developers can get SAP document flow for a sales document using ABAP function module SD_DOCUMENT_FLOW_GET. It is enough to call function module SD_DOCUMENT_FLOW_GET using document number of the target SAP Sales document as an input value for IV_DOCNUM parameter.





Here is the ABAP codes of an ABAP report which reads sales document number as an input from SAP user and then display document flow using ABAP function module SD_DOCUMENT_FLOW_GET

REPORT ZSD_DOCUMENT_FLOW_GET.

PARAMETERS gv_docno TYPE vbeln.

DATA :
 gt_docflow TYPE TDT_DOCFLOW,
 gs_docflow TYPE TDS_DOCFLOW.

CALL FUNCTION 'SD_DOCUMENT_FLOW_GET'
 EXPORTING
  IV_DOCNUM = gv_docno
* IV_ITEMNUM =
* IV_ALL_ITEMS =
* IV_SELF_IF_EMPTY = ' '
 IMPORTING
  ET_DOCFLOW = gt_docflow.

LOOP AT gt_docflow INTO gs_docflow.
 WRITE :/
  gs_docflow-DOCNUM,
  gs_docflow-DESCRIPTION,
  gs_docflow-ERDAT,
  gs_docflow-STATUS.
ENDLOOP.
Code

And here is the output of the above ABAP report

document flow using ABAP function module sd_document_flow_get



SAP HANA and ABAP

Install SAP Free
CRM Companies List
Web Based CRM Software


Copyright © 2004 - 2021 Eralper YILMAZ. All rights reserved.