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

Background job

Former Member
0 Likes
1,303

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

14 REPLIES 14
Read only

Former Member
0 Likes
1,283

Hi,

I think database commit is not happening in that case.

you write commit work in the program and then try.

Regards

Sandipan

Read only

Former Member
0 Likes
1,283

I have Database commit in my program already....

Read only

Former Member
0 Likes
1,283

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

Read only

Former Member
0 Likes
1,283

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

Read only

0 Likes
1,283
i tried debugging the background job by using JDBG

Are you doing exit from debugging? pls try once without debugging and let program execute in whole manner.

Read only

0 Likes
1,283

can u paste your code here?

Read only

Former Member
0 Likes
1,283

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.

Read only

0 Likes
1,283
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

Read only

0 Likes
1,283

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

Read only

0 Likes
1,283

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...

Read only

Former Member
0 Likes
1,283

hi amit

i tried the comit work placing u suggested ... but the problem still persists....

Read only

Former Member
0 Likes
1,283

solved the problem .....

Read only

0 Likes
1,283
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.

Read only

0 Likes
1,283

hi ,

I am facing the same problem. Please tell me how to solve ythis.

regs

madhu