Application Development 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: 

Commit Work in BDC

Former Member
0 Kudos

Hi All,

We are creating a customer through Z programs and we are using BDC for updating the master tables.

When we are creating a customer we are creating the order block through BDC and then we are saying Commit Work and wait.

After that i'm using BDC to update the credit master too. But it is not getting exectud. Once it reaches the Commit work it is fetching another record in excel instead of creating credit master data for the 1st record.

Thanks in Advance,

Bharathi.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

I believe you have inserted the commit and wait command so that you can edit the same record that

you have created.

The problem is you can never be sure as to how much time the update progs will run.

A better approach would be to create all records first ( in first loop ) and then change them.

This will also enhance your performance as the 'wait' wouls not be inside the loop.

Hope this helps,

Raj

11 REPLIES 11

Former Member
0 Kudos

There is nothing to do with Commit work in this, you need to doulbe check your program, if the logic is in right place or not. If possible paste the code or debug the program step by step.

OR

I am not sure about Screen flow, is both in the same transaction or different transactions? If different transactions it should work otherwise it wil go and fetch next record from excel. You can loop the same record and call the transaction again.

Edited by: Phanindra Annaparthi on Mar 2, 2009 7:05 AM

0 Kudos

Hi,

On debugging the program only i've come to know that after commit it is not executing the remaining part of the program. and no data is coming to the credit master.

Thanks and Regards,

Bharathi.

0 Kudos

Bharathi,

Why do you need to have commit work in your BDC program?

The commit work is supposed to be part of the SAP application, which normally gets executed when we BDC the 'SAVE' button.

We normally use commit work and its variant ONLY when we use BAPI or function module in update task.

Your problem may be caused by BDCDATA internal table is not populated well, or error during call transaction.

Regards,

Lim...

0 Kudos

hi,

I remembered, i hope you need to use RACOMMIT in Call Transaction statement.

RACOMMIT: Do not end transaction at COMMIT WORK.

When you use COMMIT WORK transaction will be end automatically, so continue execution you need to use RACOMMIT in OPTIONS of Call transaction statement.

Thanks

Satyasuresh

Former Member
0 Kudos

hi,

try using only wait stmt and comment the commit work .

note: if u get a message while populating the next record , that the user is currently editing. then u can use wait stmt only.

if else checkwith the code or else post the logic u used.

thanks,

kat.

Former Member
0 Kudos

Hi,

Pl. check from your BDC with ALL Screen Mode and see whether any error message is coming, so that no update is happening at the Commit statement.

If everything is fine, I suggest to wait for 3 to 5 seconds after commit and check.

From

Reddy

Former Member
0 Kudos

Hi,

You have to explicitly mention to continue execution, not to terminate batch input execution after commit statement.

See RACOMMIT in OPTIONS addition of CALL TRANSACTION statement.

You have to set value of RACOMMIT to true to continue execution of BDC.

Regards,

Vishal

Former Member
0 Kudos

Hi Bharathi,

You can use this Function Module for processing Watch:

CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'

EXPORTING

PERCENTAGE = 20

TEXT = 'PROCESS DATA '

Hope it helps

Regrds

Mansi

Former Member
0 Kudos

Hi,

Try to run BDC by 'A' MODE, step by step to find the problem.

Former Member
0 Kudos

Hi,

I believe you have inserted the commit and wait command so that you can edit the same record that

you have created.

The problem is you can never be sure as to how much time the update progs will run.

A better approach would be to create all records first ( in first loop ) and then change them.

This will also enhance your performance as the 'wait' wouls not be inside the loop.

Hope this helps,

Raj

Former Member
0 Kudos

answered