• No results found

How to read the document flow within SAP CRM: Example Use Case

N/A
N/A
Protected

Academic year: 2021

Share "How to read the document flow within SAP CRM: Example Use Case"

Copied!
8
0
0

Loading.... (view fulltext now)

Full text

(1)

Author: Davy Pelssers – [email protected] www.dasap.be Pagina 1

How to read the document flow within SAP CRM: Example Use Case

Suppose I have created a lead in the system.

Next, in the sales process I might be creating a follow-up opportunity.

As such I press the button “follow-up” where in the list of potential follow-up transaction types I choose ‘lean opportunity’.

(2)

Author: Davy Pelssers – [email protected] www.dasap.be Pagina 2 To illustrate the relationship I have added some fields such as transaction ID, and relation type using the personalization option of that assignment block. We can see that the lead with ID 831 is a preceding document.

Now, from that initial lead with ID 831; I will also create a follow-up appointment of type ‘Store visit’.

So now I have created 3 documents in total:

1) The original lead with ID 831 (transaction type LEAD)

2) The follow-up opportunity with ID 1447 (transaction type ZOPL) 3) The follow-up store visit with ID 12217 (transaction type ZCPG)

(3)

Author: Davy Pelssers – [email protected] www.dasap.be Pagina 3 If for some reason the opportunity is LOST ; this would mean the employee would set the status of the opportunity to LOST.

Now suppose our business requirement would be the following:

When the status is set to LOST, we want the system to automatically change the status of the LEAD to LOST.

This means that the setting the status of the opportunity to LOST will be the trigger to not only save the opportunity itself, but also change the preceding document of type LEAD where the status should be automatically set to LOST.

Somewhere in this logic it means that we’ll need to retrieve the preceding document of type LEAD to know which preceding document we’ll need to update.

Relevant Tables

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.

(4)

Author: Davy Pelssers – [email protected] www.dasap.be Pagina 4  The second one is SRRELROLES. Here you enter at header level, extracted from

CRMD_ORDERADM_H.

Role Types in this table:

VORGAENGER - Preceding document NACHFOLGER - followup Document IOBJ - Obj changed by Bdoc

OOBJ - Object stored in Bdoc

 The third one is called CRMD_BRELVONAE and basically stores additional attributes of header document.

OBJGUID_A_SEL field you can give the guid of transaction. OBJGUID_B_SEL will give you the guid of follow up document

Example: using table SRRELROLES to find back the previous document (lead) starting from the

opportunity.

We know that the opportunity is the Follow-up document, so Role Type NACHFOLGER.

Step 1: Via table CRMD_ORDERADM_H we first lookup the GUID of the opportunity with ID 1447.

GUID: E39EE280C481ABF1960400E081B02B67

Step 2: Now; in table SRRELROLES I enter this GUID as OBJKEY, and additionally set the ROLETYPE as

(5)

Author: Davy Pelssers – [email protected] www.dasap.be Pagina 5 RoleID found: uvxYn3tklV6M103WWR0hPm

Step 3: Go to table CRMD_BINREL where you enter role GUID B and get the role GUID A.

A is for preceding documents and B is for follow-up documents.

Now we copy the value obtained in ROLE A uvxYn3tklF6M103WWR0hPm (which is the role guid of the preceding document).

(6)

Author: Davy Pelssers – [email protected] www.dasap.be Pagina 6 This will show us the GUID of the preceding document which would be the Lead.

OBJKEY obtained now is : E39EE1CE74E2D4F1960400E081B02B67

Step 5: enter the OBJKEY as GUID in table CRMD_ORDERADM_H and finally we will retrieve the

Object ID (transaction number) of the preceding lead.

Now – that’s a hell of a job to perform all these actions just to know the OBJECT ID (transaction number) of the preceding document. Therefore, your Abap consultant will probably need a better and more efficient way to obtain this information. That’ s where the next function module will come in handy.

(7)

Author: Davy Pelssers – [email protected] www.dasap.be Pagina 7

Relevant Function Module to read the document Flow: CRM_DOC_FLOW_READ_DB

When I test out this function module via transaction code SE37 I have following input parameters.

Previously we already checked the GUID of the opportunity: GUID: E39EE280C481ABF1960400E081B02B67

(8)

Author: Davy Pelssers – [email protected] www.dasap.be Pagina 8 So what you should retrieve is the GUID of the preceding document , so

- OBJKEY_A (guid of preceding document)

Based on conditions:

- OBJTYPE_A (BUS2000108)  transaction category for leads

- ROLETYPE_A  VORGAENGER as we are searching for the preceding document And using input the GUID of the preceding document.

References

Related documents

For female children, the disparities across ethnic groups in drop-out rates in grade 0 are even wider: 1.4 percent of ethnic Turkish girls do not complete first grade whereas

b In cell B11, write a formula to find Condobolin’s total rainfall for the week.. Use Fill Right to copy the formula into cells C11

iomart award winning Cloud Control provides you with total control over every aspect of your iomart Hosting cloud environment from billing and account management through to

All of the participants were faculty members, currently working in a higher education setting, teaching adapted physical activity / education courses and, finally, were

All records for LASIK procedures from one single cen- ter without patient identifiers were extracted from the Optical Express electronic medical record system using the

These included Sjafruddin Prawiranegara, Mohamad Roem, Jusuf Wibisono, and Sutan Sjahrir (who was in the class ahead of Natsir.) "We saw him as our guru, for he was much more

In addition, if I marked "Yes" to any of the above questions, I hereby authorize release of information from my Department of Transportation regulated drug and alcohol

calcium-dependent release of gliotransmitters that control synaptic transmission and plasticity has led to the establishment of a new concept in synaptic physiology, the