Not sure what reply you expect with this little given information. Especially as you are doing updates with a "customized" program.
How shall anybody be able to tell you what is wrong without knowing what you do in your program?
Do you hard table updates? do you call a BAPI to post confirmations?
Do you have problems in programming, then this question should be posted in the ABAP space.
How do you usually do the delta load from R/3 to BW . (shouldn't this be asked in BW instead of MM?)