Categories: SAP CRM

Quick Quide How To Retrieve SAP CRM Document Flow

Retrieve SAP CRM Document Flow: This post will go explain how to read SAP CRM Document flow for a SAP CRM transaction using ABAP code and functions modules.

Important Tables for SAP CRM Document Flow

Basically there are three tables to see the document flow.
The first one, which works at item level, is CRMD_BRELVONAI. Here you can enter with the item GUID extracted from CRMD_ORDERADM_I.
The second one is SRRELROLES. Here you enter at header level, extracted from CRMD_ORDERADM_H

The Role Types in this table are:

  • VORGAENGER – for Preceding document
  • NACHFOLGER – for the follow-up Document
  • IOBJ – Object changed by Bdoc
  • OOBJ – Object stored in Bdoc

The third one is called CRMD_BRELVONAE and basically stores additional attributes of header document.
The main fields to consider are:

Related Post
  • OBJGUID_A_SEL?: this field gives the guid of transaction.
  • OBJGUID_B_SEL?: this field will give you the guid of follow up document up to Role Type
  • ROLETYPE_A: give the role type between the two SAP CRM documents

Function Module to read the document Flow in SAP CRM

If you want to follow the previous methods to play with Guid in SAP CRM Tables, good luck.
A better performant way is the call the function module CRM_DOC_FLOW_READ_DB in SE37
Here the signature of the CRM_DOC_FLOW_READ_DB :

*"----------------------------------------------------------------------
*"*"Local?Interface:
*"??IMPORTING
*"?????REFERENCE(IV_HEADER_GUID)?TYPE??CRMT_OBJECT_GUID
*"??EXPORTING
*"?????REFERENCE(ET_DOC_LINKS)?TYPE??CRMT_DOC_FLOW_DB_WRKT
*"?????REFERENCE(ET_DOC_FLOW_PLNK_ATTR)?TYPE
*"????????CRMT_DOC_FLOW_PLNK_WRK_DBT
*"?????REFERENCE(ET_DOC_FLOW_PNT_ATTR)?TYPE??CRMT_DOC_FLOW_PNT_WRK_DBT
*"?????REFERENCE(ET_DOC_FLOW_IPLK_ATTR)?TYPE
*"????????CRMT_DOC_FLOW_IPLK_WRK_DBT
*"??EXCEPTIONS
*"??????ERROR_OCCURRED
*"----------------------------------------------------------------------

In IV_HEADER_GUID, just put the Guid of the Order or Opportunity or any relavant SAP CRM Transaction you want to read the Doc flow for.

The Output Table ET_DOC_LINKS gives you the Full SAP CRM Doc flow of the input Operation a??????????? s following:

  • OBJKEY_A: the SAP CRM Guid of a document in the Doc flow
  • OBJTYPE_A: transaction category for preceding document
  • ROLETYPE_A :
    • VORGAENGER – Preceding document
    • NACHFOLGER – followup Document
    • IOBJ – Obj changed by Bdoc
    • OOBJ – Object stored in Bdoc

Credit go to How to read the document flow within SAP CRM

Share
Published by
John

Recent Posts

The Most Important SAP ISU Tables

SAP ISU Tables for Technical master data, for Billing Master Data, Billing and invoicing Tables?…

December 22, 2020

SAP Fiori 3 UX and Design of SAP Fiori Apps for SAP S/4HANA, SAP TechEd Lecture

SAP Fiori 3 UX and Design of SAP Fiori Apps for SAP S/4HANA, SAP TechEd…

November 18, 2020

The Main SAP Dunning Transaction Codes

Dunning is the business practice of informing a customer of past due payment. Dunning letters…

November 28, 2019

SAP Accounts Payable Tcodes & Accounts Receivable Tcodes ( SAP AP Tcodes & SAP AR Tcodes)

SAP AP Tcodes & SAP AR Tcodes: House Banks Tcodes, Advance Payments or Down Payments,…

August 1, 2019

The Most Important SAP Payment Terms Tables (ZTERM, Text…)

What are the main SAP Payment Terms Tables ? What are the related Tables in…

October 21, 2018

The most Important SAP Work Center Tables in SAP PP

Work center consists of master data related to routing of products. It contains data related…

October 21, 2018