1, 例子代码
调用函数SD_DOCUMENT_FLOW_GET可以方便的得到销售订单的后续订单,
代码如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
REPORT z_get_sd_doc_flow. PARAMETERS gv_docno TYPE vbeln. DATA : git_docflow TYPE tdt_docflow, gwa_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 = git_docflow. * ouput documents LOOP AT git_docflow INTO gwa_docflow. WRITE :/ gwa_docflow-docnum, gwa_docflow-description, gwa_docflow-erdat, gwa_docflow-status. ENDLOOP. |
2, 运行测试
输出后续订单,
与VA03查看的document flow一致,
以上。
发表评论