2008 Aug 27 11:33 AM
Hi experts,
I have a un usual problem.
i have a program Z_XYZ ... it updates entries in a DB table.
If i run the program directly .. it works and the fields are populated.....
But if i schedule the program as a background job All the step in the job are successful.
Problem--> but the DB table is not updated with the entries ..
can any one suggest what can be the problem.?
Thanks in advance
Hi experts,
I have a un usual problem.
i have a program Z_XYZ ... it updates entries in a DB table.
If i run the program directly .. it works and the fields are populated.....
But if i schedule the program as a background job All the step in the job are successful.
Problem--> but the DB table is not updated with the entries ..
can any one suggest what can be the problem.?
Thanks in advance
2008 Aug 27 11:36 AM
Hi,
I think database commit is not happening in that case.
you write commit work in the program and then try.
Regards
Sandipan
2008 Aug 27 11:37 AM
2008 Aug 27 11:42 AM
Are you population any file to internal table than you are updating from that iternal table?
if yes than file must be on application server in case of background
2008 Aug 27 11:46 AM
no there is no file.... it is a simple update statement..... i tried debugging the background job by using JDBG.... there are no errors and the fields are populated in the Database.....but they are not getting reflected in the database table... it is very starnge......
this problem dose not occure if i directly run the program.....in foreground
2008 Aug 27 11:49 AM
i tried debugging the background job by using JDBGAre you doing exit from debugging? pls try once without debugging and let program execute in whole manner.
2008 Aug 27 11:50 AM
2008 Aug 27 11:55 AM
no first i executed teh program first without debugging... and then tried to debugg to find the problem....
unfortunately i am not able to ....
here is the lines of code..
loop at gt_xyz.
Update zeabl set pid = gt_xyz-pid
where ABC = gt_xyz-abc and pqr = gt_xyz-pqr and ZW = gt_xyz-zw .
endloop.
commit work.
2008 Aug 27 11:57 AM
loop at gt_xyz.
Update zeabl set pid = gt_xyz-pid
where ABC = gt_xyz-abc and pqr = gt_xyz-pqr and ZW = gt_xyz-zw .
commit work."<---see here
endloop.Edited by: Amit Gujargoud on Aug 27, 2008 12:57 PM
2008 Aug 27 12:04 PM
it is working perfectly for me....even without a commit work....in both foreground and background mode
here is the code i wrote - no commits...no issues.
loop at itab.
update zuser set STCOD = 'ABCD' where bname = itab-bname.
endloop.
Edited by: Priyank Jain on Aug 27, 2008 7:07 AM
2008 Aug 27 12:08 PM
I know it is really a strange problem i m encountering.... since it a very simple update statment and should not cause any problem... in forground it works perfectly fine..... even when i debug it in back ground mode every thing works out well....even the update statment is executed ... and the fields are populated.......
but when i run it in background and without debug mode .... nothing is populated...
2008 Aug 27 12:00 PM
hi amit
i tried the comit work placing u suggested ... but the problem still persists....
2008 Aug 27 12:43 PM
2008 Aug 27 12:49 PM
solved the problem .....Can you please tell us what we were missing?so that we will be take care in future with same problem.
Amit.
2008 Sep 11 11:31 AM
hi ,
I am facing the same problem. Please tell me how to solve ythis.
regs
madhu
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |