2008 Dec 05 3:51 PM
Hello all,
I created a small program to give me a total record count for my huge table and ran it in the background. It ran for hours and finally did finish but i dont know where to retrieve the information of how many records were counted in total. So i created another program to read a very small table of 2000 records and scheduled it in the background. This one ran almost instantly but i couldnt get any record count from this one either. What do I need to do to actually see my record count.
Heres my program: Please tell me what am I missing , should i store it somewhere and can someone please actually give me the code if mine needs to be adjusted or added.
DATA: count LIKE sy-tabix.
SELECT COUNT(*) FROM table INTO count.
WRITE: /001 'Number of records in table:', count.
Best regards,
Krrish
2008 Dec 05 3:59 PM
The write statement puts the data on the screen, which you will not see in background. Just add the count to the joblog itself by doing the following instead of the write:
message i000(oo) with 'Number of records in table:' count space space.
You'll find the count in the joblog after the job finished.
Hope that solves your problem.
Michael
The write statement puts the data on the screen, which you will not see in background. Just add the count to the joblog itself by doing the following instead of the write:
message i000(oo) with 'Number of records in table:' count space space.
You'll find the count in the joblog after the job finished.
Hope that solves your problem.
Michael
2008 Dec 05 3:59 PM
The write statement puts the data on the screen, which you will not see in background. Just add the count to the joblog itself by doing the following instead of the write:
message i000(oo) with 'Number of records in table:' count space space.
You'll find the count in the joblog after the job finished.
Hope that solves your problem.
Michael
2008 Dec 05 4:16 PM
this is how I have written the code:
DATA: count LIKE sy-tabix.
SELECT COUNT(*) FROM table INTO count.
*WRITE: /001 'Number of records in table:', count.
message i000(oo) with 'Number of records in table:' count space space.
Inso what you are saying is I will a 'number of records in table' next to Date Time Message text Message class Message no. & Message type.
Anyways if it works, i will update you for sure, most likely on the weekend.
Thanks,
Krrish
Edited by: Krrish Kumar on Dec 5, 2008 5:25 PM
2008 Dec 05 6:13 PM
Yes, that's what I meant. You do not need to be around when the job ends, the message will be recorded in the job log.
- SM37
- Put in the job name or the user who scheduled the job (which would be you)
- put in the correct timeframe
- execute selection
- on the next screen you'll see a job list (or just one depending on your selection)
- mark the job and click on the Job Log button in the application toolbar
- the screen should look something like this
11/26/2008 01:10:20 Job started
11/26/2008 01:10:20 Step 001 started (program 'report name', variant , user ID 'your user id')
11/26/2008 01:10:32 Number of records in table: xxxxx
11/26/2008 01:10:32 Job finished
Regards,
Michael
2008 Dec 06 11:32 PM
2008 Dec 05 6:36 PM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |