Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BAPI TRANSACION COMMIT

Former Member
0 Likes
259

Hi Gurus,

I came across a peculiar problem.Actually I wrote a program to create Business Partners in CRM.I was looping through internal table and was using a BAPI to create BP.After BAPI call I used bapi_transaction_commit and then endloop.But the performance was very poor.So i tried following

1) I tried using BAPI_TRANSACTION_COMMIT immediately after endloop.But only the last record was uploaded.

2)And then i used

ATLAST

BAPI_TRANSACTION_COMMIT .

ENDAT.

ENDLOOP.

Using this way records were getting uploaded perfectly.But why did the first approach failed.As far as I know AT last occurs for the last record.So theoritically transaction commit should be getting executed after last record in the above 2 methods..But why the difference.

<REMOVED BY MODERATOR>

Regards,

Raghu.

Edited by: Alvaro Tejada Galindo on Feb 26, 2008 10:22 AM

1 REPLY 1
Read only

Former Member
0 Likes
240

Hi Raghu,

I don't have access to a CRM system right now but I think that the problem you have is that you need to call another BAPI. That BAPI is about saving the BP you have just created.

AFTER you have created the BP and executed the ?_SAVE BAPI you have to call the BAPI_TRANSACTION_COMMIT. Then the BP will be created, up to that point even if you have used the ?_SAVE BAPI the BP is only in memory.

I can not remenber the name of the BAPI but I think it is very easy to find, look in the same function group of the BAPI you are using to create the BP.

Best regards,

Vicente.