Skip to Content
0
Former Member
Nov 02, 2005 at 07:14 PM

Performance of BAPI's to create Leads and Activities

39 Views

Hi,

I'm using the BAPI's BAPI_LEAD_CREATEMULTI and BAPI_ACTIVITYCRM_CREATEMULTI to create Leads and Activities.

The scenario is:

1) The input file has 3 types of records coming in

(a) Leads only

(b) Activities only (Prospect Lead activities)

(c) LEad + Activity (rescheduled activities)

2) Depending on the type of record, I'm required to create the relevant order and if required link the lead and activity (scenario - C)(using the FM CRM_DOC_FLOW_MAINTAIN_OW).

3) In addition to this, I'm also required to link campaign elements to both Leads and Activities (done within the BAPI's BAPI_LEAD_CREATEMULTI and BAPI_ACTIVITYCRM_CREATEMULTI in the doc_flow structure).

ISSUE:

The issue that I am facing is that it is taking a lot of time to create these. I'm basically running a custom conversion program for LEads and Activities. The rate is almost 6-8 secs for each record, and we have about 500,000 records to be converted.

Also, I'm having to use the following function modules after the creation of Leads and Activities:

1) CRM_MA_ACT_SAVE - to set the status of the activity to OPEN or IN PROGRESS. This is being done after the creation of an activity because the BAPI BAPI_ACTIVITYCRM_CREATEMULTI seems to always default the status to OPEN.

2) CRM_ORDER_CHANGE_STATUS - to set the status of the LEad to OPEN or IN PROGRESS. This is being done after the creation of an activity because the BAPI BAPI_LEAD_CREATEMULTI seems to always default the status to OPEN.

3) BAPI_LEAD_ATT_CHANGE - to set the STATUS SINCE field for a Lead. This is being done because I'm unable to set the STATUS_SINCE field using the BAPI BAPI_LEAD_CREATEMULTI.

The logic being used within the code is to process a batch of records (500/1000 records - value is an input selection parameter) from the input file in one go, and then commit all of them after their creation. After this, the next batch of records is again processed and committed.

We've also tried to create LEads and Activities record by record and not in batches... but the performance still remains the same.

I'm not sure what is slowing down the process. If whether it is all the commits, or if it is the additional use of the FM's to change the 'status' and 'Stauts-since' values after having committed the leads and activities.

When we look at the LEads and Activities that are created, everything looks fine. It is only that the performance is really slow.

Thanks for all your patience and suggestions,

- Akarsh