cancel
Showing results for 
Search instead for 
Did you mean: 

Read document flow at the time of Partner determination

kishorekumar_vemula
Active Participant
0 Kudos

Creating a followup opportunity on top of an existing opportunity. During this, Sales manager and Employee responsible needs to be copied from Old opportunity to new.

For this due to some constraint, i need to write a code in Partner determination procedure BADI(COM_PARTNER_BADI~DETERMINATION_ADD_IN_1) to find the old opportunity partners.

Here the issue is unable to read the document flow in the Partner determination procedure BADI.

My question is, is the document flow link is established after the Partner determination ? if yes then how can i read doc flow (Old opportunity-> New Opportunity).

If docflow is created well before Partner determination, then why i CRM_ORDER_READ_OW / OB are failing to get the document flow.

Thanks in advance for your expertise.

Accepted Solutions (1)

Accepted Solutions (1)

kishorekumar_vemula
Active Participant
0 Kudos

Hi, now the issue is solved. Find below the way to get the preceding document in the Pricing procedure BADI.

Whenever any followup is created, the Preceding document number is attached to the newly created (although its not created fully until it saved) Transaction in Header structure.

Use the FM CRM_ORDERADM_H_READ_OB to read the export parameter  ES_ORDERADM_H_WRK~PREDECESSOR_GUID.

In above case, I don't require a document flow but need a Predecessor document which is available by above method.

Thanks Deepika for your inputs in this regard.

Answers (1)

Answers (1)

deepika_chandrasekar
Active Contributor
0 Kudos

Hi Kishore,

Why cant you go for partner determination procedure for this instead of code?

You can use "preceeding" in Access Sequence for that perticular Partner function in partner determination procedure.

Regards,

Deepika.

kishorekumar_vemula
Active Participant
0 Kudos

Hi Deepika, thank you for reply.

You are right indeed. We implemented already an access sequence which says that pick the partners from Territory as standard Partner determination procedure.

In my case, i will be creating followup Opp on another Opportunity(when the status is changed to failed to gain). In this case, access sequence is triggered and partners are determined from Territory. But the requirement is to copy the partners from the preceding doc.

Unfortunate, i can't add another access sequence to the partner determination procedure because the same procedure is triggered for other kind of Opportunities(like, Tender, Manage sales deal ).

deepika_chandrasekar
Active Contributor
0 Kudos

Hi Kishore,

In that case if you want the parent opportunity GUID, you can go for below solutions

1.Create Call back FM and register for event after creation in SPRO and in that FM you will get the DOC FLOW details, there you can put your code to maintain partners

2. You can use global variable to pass the parrent opportunity guid in the followup event and take that in the BADI and use it for partner determination.

Regards,

Deepika.