Skip to Content
0
Former Member
May 17, 2005 at 08:13 PM

BAPI_OPPORTUNITY_CREATEMULTI

288 Views

Can someone please show me an example of how to use this BAPI to create CRM Sub-Opportunities - have been struggling for several days. Am creating a simple prototype prg to see if feasible at-this-time. Sub-Opps already exist in the system, I just want to add/assign them to a Master CRM rec.

Seems like I only need 3 param tables:

1. HEADER - is this for the Master Rec or do you build header based on sub-opp info/guid?

2. OPPORTUNITY - seems clear but am not sure about fields REF_HANDLE & REF_GUID. Are these for the master rec or the opportunity?

3. INPUT_FIELDS - everyone has trouble with this:

lt_InputFields-REF_HANDLE = ? "N(10)

lt_InputFields-REF_GUID = ? "C(32)

lt_InputFields-REF_KIND = ? "C(01)

lt_InputFields-OBJECTNAME = ? "C(30)

lt_InputFields-LOGICAL_KEY = ? "C(42)

lt_InputFields-FIELDNAME = ? "C(30)

lt_InputFields-CHANGEABLE = ? "C(1)

I have tried the following alternate strategies too, maybe

1. Debug main transaction CRMD_BUS2000111 (Maintain Opportunities) at point of saving sub-opps but I cannot find where the save occurs to see how SAP does it. Ran SE30 on it and found some functions that look promising but when I set a break-point on a specific func-name, it never stops!

2. Function CRM_WAP_OPP_CREATE() actually calls BAPI_OPPORTUNITY_CREATEMULTI and it seems much-much simpler because it requires a minimal number of parameters but I get nothing.

If anyone can help, I promise to upload my final prototype here for others.