Job_log

I ran the following script but i cant view thw additional info column. It says(oracle clob) in a bracket. How i can enable additional info column in dba_scheduler_job_log?
SELECT*from dba_scheduler_job_log
where job_name not like('%R%')

Is "it" in the sentence "It says (oracle clob) in a bracket" referring to some GUI, tool, or utility? If so, which one?
Many tools lack the ability to display CLOB (and BLOB) data. Other tools have settings that allow you to display the first N bytes of a LOB. Other tools display CLOB data automatically.
Justin

Similar Messages

  • Job submit

    Hi all,
    i am trying to submit a oracle job using the following code but i am getting the oracle error PLS-00103. when i put this sql statement in a textfile and run it with a batchfile it goes well. can anybody give me some advise.
    Imports Oracle.DataAccess.Client
    Public Class Form1
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim cn As New OracleConnection("Data Source=test;" & "User Id=myusername;" & "Password=mypassword;")
    Try
    Dim sql As String = ("declare " & _
    "jobnr number(10); " & _
    "instnr number(10); " & _
    "begin" & _
    "select instance_number into instnr from v$instance;" & _
    "dbms_job.submit(jobnr,'insert into system.job_logging(''system'',sysdate,''22:00'',''select name from v$database;'');'," & _
    "trunc(sysdate+1)+(22+00/60)/24," & _
    "'trunc(least(next_day(sysdate,''TUESDAY''),next_day(sysdate,''WEDNESDAY''),next_day(sysdate,''THURSDAY''),next_day(sysdate,''FRIDAY''),next_day(sysdate,''SATURDAY'')))+(22+00/60)/24',true,instnr);" & _
    "commit;" & _
    "end;")
    Dim cmd As New OracleCommand(sql, cn)
    cmd.Connection.Open()
    Dim result As String = cmd.ExecuteNonQuery()
    cmd.Connection.Close()
    If result = 0 Then
    MessageBox.Show("no job submitted")
    Else
    MessageBox.Show("succesfully submitted job")
    End If
    Catch ex As Exception
    MessageBox.Show("error' " & ex.Message)
    If cn.State = ConnectionState.Open Then
    cn.Close()
    End If
    End Try
    End Sub
    End Class
    kind regards,
    bryan

    Hi,
    i checked the code again and removed the "(" befor begin and at the end. here is the code again. I ran the code with sqlplus again offcourse without the " and the & or + _ around the code, because this is vb, against the datasource and the plsql procedure succeeded. when i run this code in vb i keep getting the following error:
    ora-6550: line 1, column 74:
    pls-00103: encountered the symbol "INTO" when expecting one of the following:
    := .(@ % ; not null range default character.
    i hope you can help me out with this problem.
    Imports Oracle.DataAccess.Client
    Public Class Form1
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim cn As New OracleConnection("Data Source=test;" & "User Id=myusername;" & "Password=mypassword;")
    Try
    Dim sql As String = "declare " + _
    "jobnr number(10); " + _
    "instnr number(10); " + _
    "begin" + _
    "select instance_number into instnr from v$instance;" + _
    "dbms_job.submit(jobnr,'insert into system.job_logging(''system'',sysdate,''22:00'',''select name from v$database;'');'," + _
    "trunc(sysdate+1)+(22+00/60)/24," + _
    "'trunc(least(next_day(sysdate,''TUESDAY''),next_day(sysdate,''WEDNESDAY''),next_day(sysdate,''THURSDAY''),next_day(sysdate,''FRIDAY''),next_day(sysdate,''SATURDAY'')))+(22+00/60)/24'," + _
    "true," + _
    "instnr" + _
    ");" + _
    "commit;" + _
    "end;" + _
    Dim cmd As New OracleCommand(sql, cn)
    cmd.Connection.Open()
    Dim result As String = cmd.ExecuteNonQuery()
    cmd.Connection.Close()
    If result = 0 Then
    MessageBox.Show("no job submitted")
    Else
    MessageBox.Show("succesfully submitted job")
    End If
    Catch ex As Exception
    MessageBox.Show("error' " & ex.Message)
    If cn.State = ConnectionState.Open Then
    cn.Close()
    End If
    End Try
    End Sub
    End Class
    kind regards,
    bryan

  • Trigger Table

    <pre>
    i have audit table as below
    CREATE TABLE DS_JOB_LOG
    JOB_ID NUMBER,
    JOB_NAME VARCHAR2(200),
    LOAD_DATE TIMESTAMP,
    i am trying to write a trigger which does the job of inserting one sequence number kind of thing for the column JOB_ID in DS_JOB_LOG table.
    Trigger should be fired when i insert the data into the columns JOB_NAME and LOAD_DATE .
    Process: For every insert on the table it should create one new record and for any update(on JOB_NAME) it updates the row with just LOAD_DATE column
    i am not strong at PLSQL could any one help me for this .
    CREATE OR REPLACE TRIGGER TRIG_TEST
    AFTER INSERT ON DS_JOB_LOG
    FOR EACH ROW
    BEGIN
    UPDATE SCOTT.DS_JOB_LOG JOB_LOG
    SET
    JOB_LOG.JOB_ID = (
    SELECT COALESCE(MAX(LG.JOB_ID),0) + 1
    FROM SCOTT.DS_JOB_LOG LG
    WHERE
    LG.JOB_NAME=:new.JOB_NAME
    END;
    Regards
    naren.

    thanks for reply..
    i have modified trigger code but trigger is created with error msg.
    CREATE OR REPLACE TRIGGER TRIG_TEST
    AFTER INSERT ON SCOTT.DS_JOB_LOG
    FOR EACH ROW
    BEGIN
    UPDATE SCOTT.DS_JOB_LOG JOB_LOG
    SET
    JOB_LOG.JOB_ID = (
    SELECT SCOTT.LOG_SEQ.NEXTVAL
    FROM SCOTT.DS_JOB_LOG LG
    WHERE
    LG.JOB_NAME=:new.JOB_NAME
    WHERE SCOTT.DS_JOB_LOG.JOB_NAME=:new.JOB_NAME
    END;
    i have created sequence
    CREATE SEQUENCE SCOTT.LOG_SEQ
    INCREMENT BY 1
    START WITH 1
    NOMAXVALUE
    NOMINVALUE
    NOCYCLE
    CACHE 20
    NOORDER
    GO

  • XS Scheduled Job stuck in state "RUNNING"

    Hello guys,
    I am running HANA Dev Edition on AWS (Rev. 70). There is a .xsjs file which is called every 5 minutes by the xs job scheduler.
    However after shutdown on Tuesday and startup on Friday the job did not start correctly (?)
    I am pretty sure the job isn't running any more - the instance has been stopped another time in the meantime and the HANA Database was restarted, too.
    The question is: How can I reset the job? While the last run is in state RUNNING, the next one won't be scheduled. I tried removing the "active" flag in XS-Admin and setting it again but without success.
    Should I try an update on "_SYS_XS"."JOB_LOG" and set STATUS to 'SCHEDULED'?
    Any hints are appreciated,
    Fabian

    Hi Fabian,
    I'm experiencing a similar problem with stuck job.  Did you ever get this resolved?  What did you do?
    Thanks,
    -Patrick

  • Filewatcher problems - again

    Hi all
    Been reading almost every post in this subject, and tried almost every suggested solution found, but still...
    First some technical info:
    OS: Linux 2.6.18-308.11.1.e15 ... EDT 2012 x86_64 x86_64 x86_64 GNU/Linux
    Ora DB: ver. 11g R2
    A short description of the problematic setup:
    A Linux directory (+/home/infiles/bs/in+) is (should be) monitored by a dedicated file watcher with owner=+cts+ (other than sys)
    Oracle user is oraprd, belonging to groups: dba wheel pb
    Credential is created, infiles, in Linux belonging to groups: users pb, owner = cts
    All scheduling objects (filewatcher, program,metadata_argument, job) are created with cts as owner using dbms_scheduler.create_object style from within SQLPLUS (logged in as user cts)
    The file watcher is using above mentioned and dedicated Credential - which is verified through a simple test job calling a shell-script touching a file, using this credential, so this cred works OK). I have also verified it by su to oraprd (oracle OS user) and then tried jssu with this credential (uname/pwd) and this also works OK - also verified by Linux Audit-logs as res=success.
    A program is created referring a Store Procedure within a PL/SQL package
    A job is created having it's action referring this program that should trigger that package procedure inserting file names from files found in monitored direcrtory into a DB table
    Each time I touch the file in Linux directory +/home/infiles/bs/in+ I can see in the tailed audit-log that jssu have been accessed with res=success
    I also see, some short time after each touch, in a trace file ORAINSTNAME_j00#.trc (name differs over time of course) the following logs:
    *** 2012-11-14 18:43:54.074
    *** SESSION ID:(27.5) 2012-11-14 18:43:54.074
    *** CLIENT ID:() 2012-11-14 18:43:54.074
    *** SERVICE NAME:(SYS$USERS) 2012-11-14 18:43:54.074
    *** MODULE NAME:(DBMS_SCHEDULER) 2012-11-14 18:43:54.074
    *** ACTION NAME:(FILE_WATCHER) 2012-11-14 18:43:54.074
    FILE_TRANSFER error is:
    Don't know what this means at all.
    And there is no log history for the job (not in job_log nor in job_run_detail) so I assume the Job is never triggered, but it seems the jssu is called (due to Linux audit logs) and also something happens with the File watcher (but the SYS default one, not my custom created under cts schema)
    Worth mentioning is also that the Job is referring, in the queue_spec, the custom created file watcher name and I've also tried a several variations on the event_condition attribute of the Job (right now it's set to NULL => 1=1)
    Both oraprd and infiles users have read access to the monitored directory +/home/infiles/bs/in+...
    So, here I stand, not knowing how to verify the Filewatcher funtionality or what to do next to track down the problem.
    Oh, almost forgot, server guys have implemented lots of hardening on the dedicated server the DB runs on, but still, directory permissions still seems OK for both the oracle user (+oraprd+) and the credential user (+infiles+)...
    So my questions are:
    What more can I do to verify things are correctly setup ?
    Or better off, what's causing my Filewatcher not triggering the Job/Program . and hence gets the file name inserted into DB table?
    Is there a way to monitor the Filewtcher activity or the SYS.SCHEDULER_FILEWATCHER_Q - is this queue somewhat involved?
    May the force be with me...
    /R
    Edited by: 961345 on 2012-nov-14 10:29

    Additional info on the subject
    There is a table in the SYS schema, SCHEDULER_FILEWATCHER_QT, that I guess should be populated with info on files detected in the "watched" directory.
    In our dev and test environment this table is filled with info on watched files (column USER_DATA) but in prod environment this table is, and has always been empty...
    So, this even more makes me think the problem lies within some sys object or configuration... and not in any user created object, cause they should only matter when events get queued and records put into this above mentioned sys table.
    /R
    Edited by: 961345 on 2012-dec-13 15:41

  • CPF1338 received by STRRMTDB at 1900

    Hi all,
    I am running ECC 6.0 on iSeries V5R4M0.
    When i try to start SAP using <sid>OFR, i get the following message:
    Display Program Messages
    Backup job description will be used for job 031751/ECDOFR/DSP01.
    Job 031751/ECDOFR/DSP01started on 10/27/08 at 10:42:11 in subsystem QCTL in
    CPF1338 received by STRRMTDB at 1900 (C D I R)
    If i input R (retry), i still get the same message, "CPF1338 received by STRRMTDB at 1900 (C D I R)"
    But, if i cancel (option C) and start SAP again, it can start successfully without any messages.
    However, when I check the SAP database server job QXDAEDRSQL, on the display job status attribute, it says that it is submitted by job DSP01.  I believe, that DSP01 should be STRRMTDB.
    Can anyone please explain to me why this problem occurs and how do i fix this?
    Thanks
    Regards,
    Pandu

    Hi Volker,
    I have found the job log for DSP01. Here it is
    MSGID TYPE SEV DATE TIME FROM PGM LIBRARY INST TO PGM LIBRARY INST
    CPI0913 Information 60 10/27/08 16:15:04.934840 QWTMESGN QSYS 1AAA *EXT *N
    From user . . . . . . . . . : QSYS
    Message . . . . : Backup job description will be used for job
    032386/ECDOFR/DSP01.
    Cause . . . . . : The job description for this job was not found. The
    backup job description QSYSJOBD in QSYS library will be used. Recovery . .
    . : Either create the job description which was not found, or restore the
    library in which the job description exists.
    CPF1124 Information 00 10/27/08 16:15:05.033032 QWTPIIPP QSYS 066E *EXT *N
    Message . . . . : Job 032386/ECDOFR/DSP01 started on 10/27/08 at 16:15:04 in
    subsystem QCTL in QSYS. Job entered system on 10/27/08 at 16:15:04.
    *NONE Information 10/27/08 16:15:06.809936 R3INLPGM R3ECD400 *STMT R3INLPGM R3ECD400 *STMT
    From module . . . . . . . . : O4TMKLIBI
    From procedure . . . . . . : prtjoblA
    Statement . . . . . . . . . : 15
    To module . . . . . . . . . : O4TMKLIBI
    To procedure . . . . . . . : prtjoblA
    Statement . . . . . . . . . : 15
    Message . . . . : R3INLPGM: Version: 7000 (Compiled: Mar 12 2008 (19:36:49))
    CPC2206 Completion 00 10/27/08 16:15:07.097744 QSYCHONR QSYS 0665 QLIINSRT QSYS 0453
    Message . . . . : Ownership of object GETOBJINF in QTEMP type *USRSPC
    changed.
    Cause . . . . . : The ownership of object GETOBJINF in library QTEMP type
    *USRSPC has changed.
    CPC2198 Completion 00 10/27/08 16:15:07.331648 QLICHLLE QSYS 01A3 QC2SYS QSYS *STMT
    To module . . . . . . . . . : QC2SYS
    To procedure . . . . . . . : system
    Statement . . . . . . . . . : 6
    Message . . . . : Current library changed to R3ECDDATA.
    Cause . . . . . : The current library in the library list was changed to
    R3ECDDATA.
    CPC2196 Completion 00 10/27/08 16:15:07.333248 QLICUSRL QSYS 0113 QC2SYS QSYS *STMT
    To module . . . . . . . . . : QC2SYS
    To procedure . . . . . . . : system
    Statement . . . . . . . . . : 6
    Message . . . . : Library SAPECDUC added to library list.
    Cause . . . . . : If the ADDLIBLE command was used, SAPECDUC was added to
    the user library list. If the CHGSYSLIBL command was used, SAPECDUC was
    added to the system portion of the library list.
    CPC2206 Completion 00 10/27/08 16:15:18.482896 QSYCHONR QSYS 0665 QLIINSRT QSYS 0453
    Message . . . . : Ownership of object GETOBJINF in QTEMP type *USRSPC
    changed.
    Cause . . . . . : The ownership of object GETOBJINF in library QTEMP type
    *USRSPC has changed.
    CPC2206 Completion 00 10/27/08 16:15:18.521896 QSYCHONR QSYS 0665 QLIINSRT QSYS 0453
    Message . . . . : Ownership of object GETOBJINF in QTEMP type *USRSPC
    changed.
    Cause . . . . . : The ownership of object GETOBJINF in library QTEMP type
    *USRSPC has changed.
    *NONE Information 10/27/08 16:15:18.652024 O4STRSAP SAPECDUC *STMT O4STRSAP SAPECDUC *STMT
    From module . . . . . . . . : O4TMKLIBI
    From procedure . . . . . . : prtjoblA
    Statement . . . . . . . . . : 15
    To module . . . . . . . . . : O4TMKLIBI
    To procedure . . . . . . . : prtjoblA
    Statement . . . . . . . . . : 15
    Message . . . . : Checking input parameters...
    *NONE Information 10/27/08 16:15:18.887792 O4STRSAP SAPECDUC *STMT O4STRSAP SAPECDUC *STMT
    From module . . . . . . . . : O4TMKLIBI
    From procedure . . . . . . : prtjoblA
    Statement . . . . . . . . . : 15
    To module . . . . . . . . . : O4TMKLIBI
    To procedure . . . . . . . : prtjoblA
    Statement . . . . . . . . . : 15
    Message . . . . : Calling STRRMTDB...
    CPFA981 Escape 40 10/27/08 16:15:19.155704 QP0ZDLTE QSYS *STMT STRRMTDB SAPECDUC 000D
    From module . . . . . . . . : QP0ZDLTE
    From procedure . . . . . . : main
    Statement . . . . . . . . . : 91
    Message . . . . : Environment variable does not exist.
    Cause . . . . . : You tried to change (CHGENVVAR) or remove (RMVENVVAR) an
    environment variable 'strrmtdb_submitted', of level *JOB, that does not
    exist. Recovery . . . : Retry the command with an environment variable
    that does exist. You may use the Work with environment variables (WRKENVVAR)
    command to see what environment variables have been defined for the job.
    CPCA980 Completion 00 10/27/08 16:15:19.221472 QP0ZADDE QSYS *STMT STRRMTDB SAPECDUC 0014
    From module . . . . . . . . : QP0ZADDE
    From procedure . . . . . . : main
    Statement . . . . . . . . . : 230
    Message . . . . : Environment variable added.
    Cause . . . . . : Environment variable 'strrmtdb_submitted' has been added.
    CPF1139 Diagnostic 40 10/27/08 16:15:19.286704 QWTSCSBJ QSYS 137E STRRMTDB SAPECDUC 0018
    Message . . . . : Job description QXDAEDRSQL in library QSYS not found.
    Cause . . . . . : The job description QXDAEDRSQL in library QSYS was not
    found. Possible causes are: -- The job description does not exist. -- The
    job description exists but is in an independent auxiliary storage pool
    (ASP). For the Submit Job (SBMJOB) command, the job description must be in
    the submitter's library name space. For the Add Job Schedule Entry
    (ADDJOBSCDE) and Change Job Schedule Entry (CHGJOBSCDE) commands, the job
    description must be in the system ASP or in a basic user ASP. Recovery . .
    . : Either correct the job description name or change the library name
    (JOBD parameter), or correct the job description name or library name in the
    job description specified in the user profile (USER parameter).
    CPF1338 Escape 40 10/27/08 16:15:19.286744 QWTCCSBJ QSYS 0154 STRRMTDB SAPECDUC 0018
    Message . . . . : Errors occurred on SBMJOB command.
    Cause . . . . . : See the messages previously listed. Recovery . . . :
    Correct the errors and then submit the command again.
    CPA0701 Inquiry 99 10/27/08 16:15:19.335192 QCLXERR QSYS 00C6 *EXT *N
    Message . . . . : CPF1338 received by STRRMTDB at 1900. (C D I R)
    Cause . . . . . : Control language (CL) program STRRMTDB in library SAPECDUC
    detected an error at statement number 1900. Message text for CPF1338 is:
    Errors occurred on SBMJOB command. Recovery . . . : This inquiry message
    can be avoided by changing the program. Monitor for the error (MONMSG
    command) and perform error recovery within the program. To continue, choose
    a reply value. Possible choices for replying to message . . . . . . . . . .
    . . . . . : C -- Cancel the CL program. D -- Dump the CL program variables
    and cancel the CL program. I -- Ignore the failing command. R -- Try the
    failing command again.
    *NONE Reply 10/27/08 16:15:33.068448 QMHDSEXT QSYS 016E *EXT *N
    Message . . . . : C
    CPF9999 Escape 40 10/27/08 16:15:19.287704 QMHUNMSG *N O4STRSAP SAPECDUC *STMT
    To module . . . . . . . . . : AS4EXECI
    To procedure . . . . . . . : as4_run_ca
    Statement . . . . . . . . . : 60
    Message . . . . : Function check. CPF1338 unmonitored by STRRMTDB at
    statement 1900, instruction X'0018'.
    Cause . . . . . : An escape exception message was sent to a program which
    did not monitor for that message. The full name of the program to which the
    unmonitored message was sent is STRRMTDB . At the time the message was sent
    the program was stopped at higher level language statement number(s) 1900.
    If more than one statement number is shown, the program was a bound program.
    Optimization does not allow a single statement number to be determined. If
    *N is shown as a value, it means the actual value was not available.
    Recovery . . . : See the low level messages previously listed to locate
    the cause of the function check. Correct any errors, and then try the
    request again.
    *NONE Information 10/27/08 16:15:33.243776 O4STRSAP SAPECDUC *STMT O4STRSAP SAPECDUC *STMT
    From module . . . . . . . . : O4TMKLIBI
    From procedure . . . . . . : prtjoblA
    Statement . . . . . . . . . : 15
    To module . . . . . . . . . : O4TMKLIBI
    To procedure . . . . . . . : prtjoblA
    Statement . . . . . . . . . : 15
    Message . . . . : O4STRSAP: Failed to run *LIBL/STRRMTDB.
    *NONE Request 10/27/08 16:15:35.706208 QUICMD QSYS 0461 QUICMD QSYS 0461
    Message . . . . : -wrkjoblog
    *NONE Request 10/27/08 16:16:02.794064 QUICMD QSYS 0461 QUICMD QSYS 0461
    Message . . . . : -wrkjoblog
    *NONE Request 10/27/08 16:16:13.514336 QPTCHECK *N QUICMD QSYS 0461
    Message . . . . : -WRKJOBLOG JOBLOGSTT(*PENDING *SPOOLED)
    JOB(032386/ALL/ALL)
    *NONE Request 10/27/08 16:16:50.554232 QPTCHECK *N QUICMD QSYS 0461
    Message . . . . : -DSPJOBLOG JOB(ECDOFR/DSP01)
    CPF0906 Diagnostic 30 10/27/08 16:17:10.679096 QMHDSPJL QSYS 00CA QUICMENU QSYS 00C1
    Message . . . . : A duplicate job named 032127/ECDOFR/DSP01 was found.
    Recovery . . . : Either specify a job name with a user name or, a user name
    and a job number (JOB parameter).
    CPF0906 Diagnostic 30 10/27/08 16:17:10.679104 QMHDSPJL QSYS 00E3 QUICMENU QSYS 00C1
    Message . . . . : A duplicate job named 032386/ECDOFR/DSP01 was found.
    Recovery . . . : Either specify a job name with a user name or, a user name
    and a job number (JOB parameter).
    CPF1069 Diagnostic 40 10/27/08 16:17:10.679336 QMHDSPJL QSYS 166C QUICMENU QSYS 00C1
    Message . . . . : End of duplicate names.
    Recovery . . . : Qualify the job name with a user name and a job number.
    *NONE Request 10/27/08 16:17:15.802904 QPTCHECK *N QUICMD QSYS 0461
    Message . . . . : -DSPJOBLOG JOB(032386/ECDOFR/DSP01)
    *NONE Request 10/27/08 16:17:33.050720 QPTCHECK *N QUICMD QSYS 0461
    Message . . . . : -WRKJOBLOG JOB(032386/ECDOFR/DSP01)
    *NONE Request 10/27/08 16:17:47.742304 QUIMNDRV QSYS 02B9 QUIMNDRV QSYS 02B9
    Message . . . . : -/* */
    *NONE Request 10/27/08 16:17:50.090464 QPTCHECK *N QUICMD QSYS 0461
    Message . . . . : -DSPJOBLOG OUTPUT(*PRINT)
    In the job log, i found that job description QXDAEDRSQL in library QSYS is not found. (CPF1339, the entry before CPF1338) but im not sure if this means anything.
    I have also uploaded the PDF version of the job log above which (in my opinion) is neater and easier to read.  You can get it from the link below:
    [url]http://budihardja.com/downloads/job_log.pdf[url]
    I look forward to your reply.  Thanks a lot
    Pandu

  • Does job in DEFAULT_JOB_CLASS run on the weekend?

    I scheduled a job for 2am everyday but it ran only during the weekdays (from the EM Job History). While in dbms_scheduler.create_schedule I specifiied that
    BYDAY=SAT,SUN,MON,TUE,WED,THU,FRI;
    Not
    BYDAY=MON,TUE,WED,THU,FRI,SAT,SUN;
    Don't know if this will make a difference. Thanks.
    for example:
    dbms_scheduler.create_schedule(
    schedule_name => p_sched
    , start_date => trunc(sysdate)+2/24
    , repeat_interval => 'FREQ=DAILY; BYDAY=SAT,SUN,MON,TUE,WED,THU,FRI; BYHOUR=2;'
    , comments => 'Run, Forest, Run!');
    - Zac

    Hi,
    I have a couple comments.
    - If you want the job to run every day you don't need to list all the days, just freq=daily defaults to every day
    - you can use the dbms_scheduler.evaluate_calendar_string to test your repeat_interval. I tested this on your repeat interval and it ran fine. So there may be some other problem, you should take a look at the job_log etc . Below I give the code I used to verify your repeat interval
    - for further dbms_scheduler question there is a dedicated forum at
    Scheduler
    I used the following code to confirm that the repeat_interval of 'FREQ=DAILY; BYDAY=SAT,SUN,MON,TUE,WED,THU,FRI; BYHOUR=2;' works as it should
    create or replace procedure print_dates
    cal_string in varchar2,
    start_date in timestamp with time zone,
    nr_of_dates in pls_integer
    is
    date_after timestamp with time zone := start_date - interval '1' second;
    next_execution_date timestamp with time zone;
    begin
    for i in 1 .. nr_of_dates
    loop
    dbms_scheduler.evaluate_calendar_string
    (cal_string, start_date, date_after, next_execution_date);
    dbms_output.put_line(to_char(next_execution_date,
    'DY DD-MON-YYYY (DDD-IW) HH24:MI:SS TZH:TZM TZR'));
    date_after := next_execution_date;
    end loop;
    end;
    begin
    print_dates(
    'FREQ=DAILY; BYDAY=SAT,SUN,MON,TUE,WED,THU,FRI; BYHOUR=2;',
    sysdate,30);
    end;
    -- this also returns the same dates
    begin
    print_dates(
    'FREQ=DAILY; BYHOUR=2;',
    sysdate,30);
    end;
    Hope this helps,
    Ravi.

  • Log_history of job

    Hi all,
    In my 10.2.1 database I have a job that runs every 5 sec .
    To prevent the job log from growing indiscriminately, I created a job class with attribute log_history set to 2 days and assigned that job class to my job that runs every 5 sec.
    According to administrator guide Once a day, the Scheduler automatically purges all log entries from the job log that are older than the specified history.
    but when i see the job_logs purging is not occuring ,job_log still showing logs of more than 2 days.
    if anyone can help?
    Thanks

    Hi, certainly.... thanks for your reply
    First query:
    SQL> column next_run_date format a35
    SQL>
    SQL> select run_count
      2       , state
      3       , failure_count
      4       , next_run_date
      5  from dba_scheduler_jobs
      6  where job_name = 'PURGE_LOG';
    RUN_COUNT STATE           FAILURE_COUNT NEXT_RUN_DATE
          1075 SCHEDULED                   0 20-JAN-09 03.00.00.500000 AM -07:00Second query:
    SQL> column operation format a15
    SQL> column status    format a15
    SQL> column log_date  format a35
    SQL>
    SQL> select *
      2  from (select operation, status, log_date
      3       from dba_scheduler_job_log
      4       where job_name = 'PURGE_LOG'
      5       order by log_date desc)
      6  where rownum <= 10;
    OPERATION       STATUS          LOG_DATE
    RUN             SUCCEEDED       19-JAN-09 06.00.39.225498 AM -04:00
    RUN             SUCCEEDED       18-JAN-09 06.00.43.597260 AM -04:00
    SQL>
    Note: you only see two job executions for the PURGE_LOG job above because I did a manual dbms_scheduler.purge_log myself on Sunday. Also noteworthy, I have since changed the log_history attribute of my job_class to 1 day (before it was 2 days, and I had to wait 2 days to see if the purge had worked). See below:
    SQL> COLUMN JOB_NAME FORMAT A15
    SQL> COLUMN JOB_CLASS_NAME FORMAT A20
    SQL>
    SQL> SELECT a.job_name, a.job_class, b.log_history
      2  FROM dba_scheduler_jobs a
      3  ,dba_scheduler_job_classes b
      4  WHERE a.job_name = 'SESSION_END_JOB'
      5  AND a.job_class = b.job_class_name;
    JOB_NAME        JOB_CLASS                      LOG_HISTORY
    SESSION_END_JOB SESSION_END_JOB_CLASS                    1
    SQL>Thanks
    PS -
    Just want to clarify... my co-worker (the original poster) mistyped our version... it is:
    SQL> select version from v$instance;
    VERSION
    10.1.0.4.0
    SQL>Edited by: user10756614 on Jan 19, 2009 10:13 AM

  • Is this below code is correct ?

    Hi Experts ,
    Plz check the below , is this code will work or not ?
    *&      Form  job_logic
    FORM job_logic .
      SELECT * FROM zt68 INTO TABLE v_zt68_tab.
      LOOP AT v_final_tab.
        IF v_zt68_tab-jobname(2) EQ 'SA' AND v_zt68_tab-jobname+8(4) NE '-CA7'.
          IF v_zt68_tab-jobtype EQ 'LGY'.
            IF v_zt68_tab-jobid NE 'D O N E'.
              SELECT jobname jobtype jobid sdlstrtdt sdlstrttm
                     msg1 msg2 msg3 msg4 msg5 msg6 FROM zt68
                     INTO CORRESPONDING FIELDS OF TABLE l_zt68_tab
                                        WHERE jobname EQ v_zt68_tab-jobname
                                          AND jobtype EQ v_zt68_tab-jobtype
                                          AND jobid   NE v_zt68_tab-jobid
                                          AND msg1    EQ zt68-msg1
                                          AND msg2    EQ zt68-msg2
                                          AND msg3    EQ zt68-msg3
                                          AND msg4    EQ zt68-msg4
                                          AND msg5    EQ zt68-msg5
                                          AND msg6    EQ zt68-msg6.
              IF sy-subrc EQ 0.
                CONCATENATE zt68-msg1 zt68-msg2 zt68-msg3 zt68-msg4
                                     zt68-msg5 zt68-msg6 INTO msg.
                MOVE msg TO l_zt68_tab-i_msg.
              ELSE.
                MESSAGE i001(z001).
              ENDIF.
            ENDIF.
          ENDIF.
        ENDIF.
        IF l_zt68_tab[] IS NOT INITIAL.
          SELECT jobname jobtype owner text expected_day FROM
               zt67 INTO CORRESPONDING FIELDS OF TABLE l_zt67_tab
                                    WHERE jobname EQ l_zt68_tab-jobname
                                      AND jobtype EQ l_zt68_tab-jobtype.
    Aging
          IF sy-subrc EQ 0.
            i_cmpdate = sy-datum+6(2) - l_zt67_tab-expected_day.
            CONCATENATE sy-datum l_zt67_tab-expected_day
                                INTO i_cmpdate.
            MOVE i_cmpdate TO v_final_tab-datum.
          ENDIF.
          IF l_zt67_tab[] IS NOT INITIAL.
            SELECT contact_name FROM zt107 INTO TABLE l_zt107_tab WHERE
                                              owner EQ l_zt67_tab-owner.
          ENDIF.
        ENDIF.
        MOVE-CORRESPONDING l_zt68_tab TO v_final_tab.
        MOVE-CORRESPONDING l_zt67_tab TO v_final_tab.
        MOVE-CORRESPONDING l_zt107_tab TO v_final_tab.
        APPEND v_final_tab.
      ENDLOOP.
    ENDFORM.                    " logic
    v_final_tab is final internal table using for output display through ALV Grid.
    Thnx.

    Hi,
    Follow the below code it may be useful for you.
    *& Report  ZRJ_SPEC_BUDGET_ACTUAL_COMMIT
    REPORT  ZRJ_SPEC_BUDGET_ACTUAL_COMMIT.
    INITIALIZATION.
    TYPE-POOLS : SLIS.
    PARAMETERS: P_COAREA TYPE COAS-KOKRS DEFAULT 1000,
                P_INTORD TYPE COAS-AUFNR DEFAULT 000000900043,
                P_FISCAL TYPE BPJA-GJAHR DEFAULT 2007.
    * DATA TYPE DECLARATION
    TYPES : BEGIN OF TY_COAS,
              IONO TYPE COAS-AUFNR,
              ORTYP TYPE COAS-AUART,
              AMT3 TYPE EKBZ-DMBTR,
            END OF TY_COAS,
            BEGIN OF TY_EKKN,
              PONO TYPE EKKN-EBELN,
              ITNO TYPE EKKN-EBELP,
              IONO TYPE EKKN-AUFNR,
    *EKKO FIELD
              POTYP TYPE EKKO-BSART,
              POCUR TYPE EKKO-WAERS,
              EXCRT TYPE EKKO-WKURS,
    *EKET FIELD
              DELDT TYPE EKET-EINDT,
    *EKPO FIELD
              QTY1 TYPE EKPO-MENGE,
              AMT1 TYPE EKKO-WKURS,
    *EKBE FIELD
              QTY2 TYPE EKBE-MENGE,
              AMT21 TYPE EKBE-DMBTR,
    *EKBZ FIELD
              AMT22 TYPE EKBZ-DMBTR,
              QTY3 TYPE EKBZ-MENGE,
              AMT33 TYPE EKBZ-DMBTR,
    * BPJA FIELD OR  BPGE FIELD ''' DEPENDS ON CONDITION
              AMT4 TYPE BPJA-WTJHR,
           END OF TY_EKKN,
            BEGIN OF TY_EKKO,
              PONO TYPE EKKO-EBELN,
              POTYP TYPE EKKO-BSART,
              POCUR TYPE EKKO-WAERS,
              EXCRT TYPE EKKO-WKURS,
           END OF TY_EKKO,
           BEGIN OF TY_EKET,
             PONO TYPE EKET-EBELN,
             ITNO TYPE EKKN-EBELP,
             DELDT TYPE EKET-EINDT,
           END OF TY_EKET,
           BEGIN OF TY_EKPO,
             PONO TYPE EKET-EBELN,
             ITNO TYPE EKKN-EBELP,
             QTY1 TYPE EKPO-MENGE,
          END OF TY_EKPO,
          BEGIN OF TY_EKBE,
             PONO TYPE EKET-EBELN,
             ITNO TYPE EKKN-EBELP,
             QTY2 TYPE EKBE-MENGE,
             AMT21 TYPE EKBE-DMBTR,
             SHKZG TYPE EKBE-SHKZG,
             BUDAT TYPE EKBE-BUDAT,
          END OF TY_EKBE,
          BEGIN OF TY_EKBZ,
             PONO TYPE EKBZ-EBELN,
             ITNO TYPE EKBZ-EBELP,
             AMT22 TYPE EKBZ-DMBTR,
             SHKZG TYPE EKBZ-SHKZG,
             BUDAT TYPE EKBZ-BUDAT,
          END OF TY_EKBZ,
          BEGIN OF TY_EBKN,
            IONO TYPE EBKN-AUFNR,
            PRNO TYPE EBKN-BANFN,
            ITNO TYPE EBKN-BNFPO,
            AMT6 TYPE EBAN-MENGE,
          END OF TY_EBKN,
          BEGIN OF TY_EBAN,
            PRNO TYPE EBAN-BANFN,
            ITNO TYPE EBAN-BNFPO,
            STATU TYPE EBAN-STATU,
            LOEKZ TYPE EBAN-LOEKZ,
            MENGE TYPE EBAN-MENGE,
            PREIS TYPE EBAN-PREIS,
          END OF TY_EBAN,
          BEGIN OF TY_BPJA,
            OBJNR TYPE BPJA-OBJNR,
            WRTTP TYPE BPJA-WRTTP,
            GJAHR TYPE BPJA-GJAHR,
            WTJHR TYPE BPJA-WTJHR,
          END OF TY_BPJA,
            BEGIN OF TY_BPGE,
            OBJNR TYPE BPGE-OBJNR,
            WRTTP TYPE BPGE-WRTTP,
            WTGES TYPE BPGE-WTGES,
          END OF TY_BPGE.
    * DATA OBJECT DECLARATION FOR REPORT
    DATA: IT_COAS TYPE STANDARD TABLE OF TY_COAS,
          WA_COAS TYPE TY_COAS,
          IT_EKKN TYPE STANDARD TABLE OF TY_EKKN,
          WA_EKKN TYPE TY_EKKN,
          IT_EKKO TYPE STANDARD TABLE OF TY_EKKO,
          WA_EKKO TYPE TY_EKKO,
          IT_EKET TYPE STANDARD TABLE OF TY_EKET,
          WA_EKET TYPE TY_EKET,
          IT_EKPO TYPE STANDARD TABLE OF TY_EKPO,
          WA_EKPO TYPE TY_EKPO,
          IT_EKBE TYPE STANDARD TABLE OF TY_EKBE,
          WA_EKBE TYPE TY_EKBE,
          IT_EKBZ TYPE STANDARD TABLE OF TY_EKBZ,
          WA_EKBZ TYPE TY_EKBZ,
          IT_EBKN TYPE STANDARD TABLE OF TY_EBKN,
          WA_EBKN TYPE TY_EBKN,
          IT_EBAN TYPE STANDARD TABLE OF TY_EBAN,
          WA_EBAN TYPE TY_EBAN,
           IT_BPJA TYPE STANDARD TABLE OF TY_BPJA,
          WA_BPJA TYPE TY_BPJA,
          IT_BPGE TYPE STANDARD TABLE OF TY_BPGE,
          WA_BPGE TYPE TY_BPGE,
          SUM_S_ME TYPE EKBE-MENGE,
          SUM_H_ME TYPE EKBE-MENGE,
          SUM_TOTME TYPE EKBE-MENGE,
          SUM_S_DMBTR TYPE EKBE-MENGE,
          SUM_H_DMBTR TYPE EKBE-MENGE,
          SUM_TOTDMBTR TYPE EKBE-MENGE,
          FLAG TYPE I,
          SUM_AMT4 TYPE BPJA-WTJHR.
    *  "DATA OBJECT DECLARATION for ALV
    DATA: IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,    " FOR PASSING FIELDCAT VALUE
           G_REPID LIKE SY-REPID,  " FOR PASSING REPORT ID
           IT_HEADER TYPE SLIS_T_LISTHEADER,   " FOR PASSING HEADER'
           IT_SORT TYPE SLIS_T_SORTINFO_ALV.
    * START OF SELECTION
    START-OF-SELECTION.
    G_REPID = SY-REPID.
    SELECT AUFNR AUART FROM COAS INTO TABLE IT_COAS
            WHERE AUFNR = P_INTORD AND KOKRS = P_COAREA .
    CHECK IT_COAS IS NOT INITIAL.
        SELECT EBELN EBELP AUFNR FROM EKKN INTO TABLE IT_EKKN
          FOR ALL ENTRIES IN IT_COAS
              WHERE AUFNR = IT_COAS-IONO AND KOKRS = P_COAREA .
    CHECK IT_EKKN IS NOT INITIAL.
        SELECT EBELN BSART WAERS WKURS FROM EKKO INTO TABLE IT_EKKO
          FOR ALL ENTRIES IN IT_EKKN WHERE EBELN = IT_EKKN-PONO.
        SELECT EBELN EBELP EINDT FROM EKET INTO TABLE IT_EKET
          FOR ALL ENTRIES IN IT_EKKN WHERE EBELN = IT_EKKN-PONO AND EBELP = IT_EKKN-ITNO AND EINDT <= P_FISCAL.
        SELECT EBELN EBELP MENGE FROM EKPO INTO TABLE IT_EKPO
          FOR ALL ENTRIES IN IT_EKKN WHERE EBELN  = IT_EKKN-PONO AND EBELP = IT_EKKN-ITNO .
        SELECT EBELN EBELP MENGE DMBTR SHKZG BUDAT FROM EKBE INTO TABLE IT_EKBE
          FOR ALL ENTRIES IN IT_EKKN
          WHERE EBELN  = IT_EKKN-PONO AND EBELP = IT_EKKN-ITNO AND VGABE = 1 AND BUDAT <= P_FISCAL .
         SELECT EBELN EBELP DMBTR SHKZG BUDAT FROM EKBZ INTO TABLE IT_EKBZ
          FOR ALL ENTRIES IN IT_EKKN
          WHERE EBELN  = IT_EKKN-PONO AND EBELP = IT_EKKN-ITNO AND VGABE = 1 AND BUDAT <= P_FISCAL .
        LOOP AT IT_EKBE INTO WA_EKBE.
            IF WA_EKBE-SHKZG = 'S'.
             SUM_S_ME = SUM_S_ME + WA_EKBE-QTY2.
             SUM_S_DMBTR = SUM_S_DMBTR + WA_EKBE-AMT21 .
            ELSEIF WA_EKBE-SHKZG = 'H'.
              SUM_H_ME = SUM_H_ME +  WA_EKBE-QTY2.
              SUM_H_DMBTR = SUM_H_DMBTR + WA_EKBE-AMT21 .
           ENDIF.
             SUM_TOTME = SUM_TOTME + ( SUM_S_ME - SUM_H_ME ).
             SUM_TOTDMBTR = SUM_TOTDMBTR + ( SUM_S_DMBTR - SUM_H_DMBTR ).
             WA_EKBE-QTY2 = SUM_TOTME.
             WA_EKBE-AMT21 = SUM_TOTDMBTR.
              CLEAR SUM_TOTME.
              CLEAR SUM_TOTDMBTR.
             MODIFY IT_EKBE FROM WA_EKBE TRANSPORTING QTY2 AMT21.
        ENDLOOP.
        CLEAR :  SUM_S_ME ,
                SUM_H_ME ,
                SUM_TOTME ,
                SUM_S_DMBTR ,
                SUM_H_DMBTR ,
                SUM_TOTDMBTR .
        LOOP AT IT_EKBZ INTO WA_EKBZ.
            IF WA_EKBZ-SHKZG = 'S'.
                       SUM_S_DMBTR = SUM_S_DMBTR + WA_EKBZ-AMT22 .
            ELSEIF WA_EKBZ-SHKZG = 'H'.
                      SUM_H_DMBTR = SUM_H_DMBTR + WA_EKBZ-AMT22 .
           ENDIF.
                    SUM_TOTDMBTR = SUM_TOTDMBTR + ( SUM_S_DMBTR - SUM_H_DMBTR ).
             WA_EKBZ-AMT22 = SUM_TOTDMBTR.
              CLEAR SUM_TOTDMBTR.
              MODIFY IT_EKBZ FROM WA_EKBZ TRANSPORTING AMT22.
        ENDLOOP.
    CHECK IT_COAS IS NOT INITIAL.
        SELECT AUFNR BANFN BNFPO FROM EBKN INTO TABLE IT_EBKN
          FOR ALL ENTRIES IN IT_COAS
          WHERE AUFNR = IT_COAS-IONO AND KOKRS = P_COAREA.
    CHECK IT_EBKN IS NOT INITIAL.
        SELECT BANFN BNFPO STATU LOEKZ MENGE PREIS FROM EBAN INTO TABLE IT_EBAN
          FOR ALL ENTRIES IN IT_EBKN
          WHERE BANFN =  IT_EBKN-PRNO AND BNFPO = IT_EBKN-ITNO AND STATU IN ('B','L','S').
      LOOP AT IT_EBKN INTO WA_EBKN.
          READ TABLE IT_EBAN INTO WA_EBAN WITH KEY PRNO = WA_EBKN-PRNO
                                                   ITNO = WA_EBKN-ITNO.
          WA_EBKN-AMT6 = WA_EBAN-MENGE * WA_EBAN-PREIS .
        MODIFY IT_EBKN FROM WA_EBKN TRANSPORTING AMT6.
        READ TABLE IT_COAS INTO WA_COAS WITH KEY IONO  = WA_EBKN-IONO.
    *        MESSAGE 'RR' TYPE 'I'.
      ENDLOOP.
      LOOP AT IT_COAS INTO WA_COAS.
      CONCATENATE 'OR' WA_COAS-IONO INTO WA_COAS-IONO.
        IF WA_COAS-ORTYP+0(3) = 'HOP' OR WA_COAS-ORTYP = 'CAPX' OR WA_COAS-ORTYP = 'ONOF'.
            SELECT OBJNR WRTTP GJAHR WTJHR FROM BPJA INTO TABLE IT_BPJA
              WHERE  OBJNR = WA_COAS-IONO AND WRTTP = 41 AND GJAHR <= P_FISCAL .
                FLAG = 0.
        ELSE.
             SELECT OBJNR WRTTP WTGES FROM BPGE INTO TABLE IT_BPGE
               WHERE OBJNR = WA_COAS-IONO AND WRTTP = 41.
                FLAG = 1.
        ENDIF.
      ENDLOOP.
    LOOP AT IT_EKKN INTO WA_EKKN.
      READ TABLE IT_EKKO INTO WA_EKKO WITH KEY PONO = WA_EKKN-PONO.
          IF SY-SUBRC = 0.
          WA_EKKN-POTYP = WA_EKKO-POTYP.
          WA_EKKN-POCUR = WA_EKKO-POCUR.
          WA_EKKN-EXCRT = WA_EKKO-EXCRT.
          ENDIF.
       READ TABLE IT_EKET INTO WA_EKET WITH KEY PONO = WA_EKKN-PONO
                                                ITNO = WA_EKKN-ITNO.
          IF SY-SUBRC = 0.
            WA_EKKN-DELDT = WA_EKET-DELDT.
          ENDIF.
       READ TABLE IT_EKBE INTO WA_EKBE WITH KEY  PONO = WA_EKKN-PONO
                                                ITNO = WA_EKKN-ITNO.
            IF SY-SUBRC = 0.
              WA_EKKN-QTY2 = WA_EKBE-QTY2.
              WA_EKKN-AMT21 = WA_EKBE-AMT21.
            ENDIF.
       READ TABLE IT_EKBZ INTO WA_EKBZ WITH KEY  PONO = WA_EKKN-PONO
                                                ITNO = WA_EKKN-ITNO.
            IF SY-SUBRC = 0.
              WA_EKKN-AMT22 = WA_EKBZ-AMT22.
            ENDIF.
        IF FLAG = 0.
          READ TABLE IT_BPJA INTO WA_BPJA INDEX 1.
          IF SY-SUBRC = 0.
            SUM_AMT4 = SUM_AMT4 + WA_BPJA-WTJHR.
            WA_EKKN-AMT4 = WA_EKKN-AMT4 + SUM_AMT4.
         ENDIF.
          ELSEIF FLAG = 1.
          READ TABLE IT_BPGE INTO WA_BPGE INDEX 1.
          IF SY-SUBRC = 0.
            SUM_AMT4 = SUM_AMT4 + WA_BPGE-WTGES.
            WA_EKKN-AMT4 = WA_EKKN-AMT4 + SUM_AMT4.
         ENDIF.
       ENDIF.
        MODIFY IT_EKKN FROM WA_EKKN TRANSPORTING POTYP POCUR EXCRT DELDT QTY2 AMT21 AMT22 AMT4.
          READ TABLE IT_EKPO INTO WA_EKPO WITH KEY PONO = WA_EKKN-PONO
                                                ITNO = WA_EKKN-ITNO.
                IF SY-SUBRC = 0 AND WA_EKKN-POCUR <> 'INR'  .
                    WA_EKKN-QTY1 = WA_EKPO-QTY1.
                    WA_EKKN-AMT1 = WA_EKKN-EXCRT * WA_EKKN-AMT1.
                ENDIF.
        MODIFY IT_EKKN FROM WA_EKKN TRANSPORTING QTY1 AMT1.
        WA_EKKN-QTY3 = WA_EKKN-QTY1 - WA_EKKN-QTY2.
        WA_EKKN-AMT33 = ( ( WA_EKKN-AMT1 / WA_EKKN-QTY1 )  * WA_EKKN-QTY3 ).
        MODIFY IT_EKKN FROM WA_EKKN TRANSPORTING QTY3 AMT33.
        READ TABLE IT_COAS INTO WA_COAS with KEY IONO = WA_EKKN-IONO.
    *      *    MESSAGE 'RA' TYPE 'I'.
    ENDLOOP.
    PERFORM BUILD_HEADER USING IT_HEADER[].
    PERFORM TOP_OF_PAGE.
    PERFORM FIELD_CAT USING IT_FIELDCAT[].
    PERFORM it_sort_functionality using it_sort[].
    PERFORM ALV_GRID_DISPLAY.
      FORM BUILD_HEADER  USING  P_IT_HEADER TYPE SLIS_T_LISTHEADER..
        DATA: WA_LISTHEADER TYPE SLIS_LISTHEADER.
        DATA: TEXT(50) TYPE C,
              DT(10),
              DT1(10).
        WA_LISTHEADER-TYP = 'H'.
        WA_LISTHEADER-INFO = 'ITC LIMITED – BUDGET ACTUAL COMMIT'.
        APPEND WA_LISTHEADER TO P_IT_HEADER.
        CLEAR WA_LISTHEADER.
        WRITE SY-DATUM TO DT DD/MM/YYYY.
        CONCATENATE 'DATE :' DT INTO TEXT.
        WA_LISTHEADER-TYP = 'S'.
        WA_LISTHEADER-INFO = TEXT.
        APPEND WA_LISTHEADER TO P_IT_HEADER.
        CLEAR WA_LISTHEADER.
        CLEAR DT.
        CONCATENATE 'CONTROLLING AREA :' P_COAREA INTO TEXT.
        WA_LISTHEADER-TYP = 'S'.
        WA_LISTHEADER-INFO = TEXT.
        APPEND WA_LISTHEADER TO P_IT_HEADER.
        CLEAR WA_LISTHEADER.
        CONCATENATE 'ORDER NO : ' P_INTORD INTO TEXT.
        WA_LISTHEADER-TYP = 'S'.
        WA_LISTHEADER-INFO = TEXT.
        APPEND WA_LISTHEADER TO P_IT_HEADER.
        CLEAR WA_LISTHEADER.
    *    CONCATENATE 'DATE: ' SO_DATE INTO TEXT.
        WA_LISTHEADER-TYP = 'S'.
        WA_LISTHEADER-INFO = 'DEVELOPED BY RAJAN'.
        APPEND WA_LISTHEADER TO P_IT_HEADER.
        CLEAR WA_LISTHEADER.
      ENDFORM.                    " BUILD_HEADER
    FORM TOP_OF_PAGE .
        CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
          EXPORTING
            IT_LIST_COMMENTARY = IT_HEADER[]
            I_LOGO             = 'ENJOYSAP_LOGO'.
    *   I_END_OF_LIST_GRID       =
    *   I_ALV_FORM               =
      ENDFORM.                    " TOP_OF_PAGE
    FORM FIELD_CAT  USING P_IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
        DATA: WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
        clear WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME     = 'PONO'.
        WA_FIELDCAT-ref_fieldname = 'EBELN'.
        WA_FIELDCAT-REF_TABNAME   = 'EKKN'.
    *     WA_FIELDCAT-DO_SUM           = 'X'.
        WA_FIELDCAT-KEY           = 'X'.
        APPEND WA_FIELDCAT TO  P_IT_FIELDCAT.
    clear WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME     = 'ITNO'.
        WA_FIELDCAT-ref_fieldname = 'EBELP'.
        WA_FIELDCAT-REF_TABNAME   = 'EKKN'.
    *     WA_FIELDCAT-DO_SUM           = 'X'.
        WA_FIELDCAT-KEY           = 'X'.
        APPEND WA_FIELDCAT TO  P_IT_FIELDCAT.
    clear WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME     = 'IONO'.
        WA_FIELDCAT-ref_fieldname = 'AUFNR'.
        WA_FIELDCAT-REF_TABNAME   = 'EKKN'.
    *     WA_FIELDCAT-DO_SUM           = 'X'.
        WA_FIELDCAT-KEY           = 'X'.
        APPEND WA_FIELDCAT TO  P_IT_FIELDCAT.
    clear WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME     = 'POTYP'.
        WA_FIELDCAT-ref_fieldname = 'BSART'.
        WA_FIELDCAT-REF_TABNAME   = 'EKKO'.
    *     WA_FIELDCAT-DO_SUM           = 'X'.
    *    WA_FIELDCAT-KEY           = 'X'.
        APPEND WA_FIELDCAT TO  P_IT_FIELDCAT.
    clear WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME     = 'POCUR'.
        WA_FIELDCAT-ref_fieldname = 'WAERS'.
        WA_FIELDCAT-REF_TABNAME   = 'EKKO'.
    *     WA_FIELDCAT-DO_SUM           = 'X'.
    *    WA_FIELDCAT-KEY           = 'X'.
        APPEND WA_FIELDCAT TO  P_IT_FIELDCAT.
    clear WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME     = 'EXCRT'.
        WA_FIELDCAT-ref_fieldname = 'WKURS'.
        WA_FIELDCAT-REF_TABNAME   = 'EKKO'.
    *     WA_FIELDCAT-DO_SUM           = 'X'.
    *    WA_FIELDCAT-KEY           = 'X'.
        APPEND WA_FIELDCAT TO  P_IT_FIELDCAT.
    clear WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME     = 'DELDT'.
        WA_FIELDCAT-ref_fieldname = 'EINDT'.
        WA_FIELDCAT-REF_TABNAME   = 'EKET'.
         WA_FIELDCAT-DO_SUM           = 'X'.
    *    WA_FIELDCAT-KEY           = 'X'.
        APPEND WA_FIELDCAT TO  P_IT_FIELDCAT.
    clear WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME     = 'QTY1'.
        WA_FIELDCAT-SELTEXT_L = 'QTY1'.
         WA_FIELDCAT-DO_SUM           = 'X'.
    *    WA_FIELDCAT-KEY           = 'X'.
        APPEND WA_FIELDCAT TO  P_IT_FIELDCAT.
    clear WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME     = 'AMT1'.
        WA_FIELDCAT-SELTEXT_L = 'AMOUNT 1'.
         WA_FIELDCAT-DO_SUM           = 'X'.
    *    WA_FIELDCAT-KEY           = 'X'.
        APPEND WA_FIELDCAT TO  P_IT_FIELDCAT.
    clear WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME     = 'QTY2'.
        WA_FIELDCAT-SELTEXT_L = 'QTY 2'.
         WA_FIELDCAT-DO_SUM           = 'X'.
    *    WA_FIELDCAT-KEY           = 'X'.
        APPEND WA_FIELDCAT TO  P_IT_FIELDCAT.
    clear WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME     = 'AMT21'.
        WA_FIELDCAT-SELTEXT_L = 'AMT 21'.
         WA_FIELDCAT-DO_SUM           = 'X'.
    *    WA_FIELDCAT-KEY           = 'X'.
        APPEND WA_FIELDCAT TO  P_IT_FIELDCAT.
    clear WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME     = 'AMT22'.
        WA_FIELDCAT-SELTEXT_L = 'AMT22'.
         WA_FIELDCAT-DO_SUM           = 'X'.
    *    WA_FIELDCAT-KEY           = 'X'.
        APPEND WA_FIELDCAT TO  P_IT_FIELDCAT.
    clear WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME     = 'QTY3'.
        WA_FIELDCAT-SELTEXT_L = 'QTY 3'.
         WA_FIELDCAT-DO_SUM           = 'X'.
    *    WA_FIELDCAT-KEY           = 'X'.
        APPEND WA_FIELDCAT TO  P_IT_FIELDCAT.
    clear WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME     = 'AMT33'.
        WA_FIELDCAT-SELTEXT_L = 'AMT 33'.
         WA_FIELDCAT-DO_SUM           = 'X'.
    *    WA_FIELDCAT-KEY           = 'X'.
        APPEND WA_FIELDCAT TO  P_IT_FIELDCAT.
    clear WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME     = 'AMT4'.
        WA_FIELDCAT-SELTEXT_L = 'AMT 4'.
         WA_FIELDCAT-DO_SUM           = 'X'.
    *    WA_FIELDCAT-KEY           = 'X'.
        APPEND WA_FIELDCAT TO  P_IT_FIELDCAT.
      ENDFORM.                    " FIELD_CAT
    FORM it_sort_functionality  USING P_IT_SORT TYPE SLIS_T_SORTINFO_ALV.
        DATA: LS_SORT TYPE SLIS_SORTINFO_ALV.
        LS_SORT-FIELDNAME = 'PONO'.
        LS_SORT-SPOS      = 1.
        LS_SORT-UP        = 'X'.
        LS_SORT-SUBTOT    = 'X'.
        APPEND LS_SORT TO P_IT_SORT.
        LS_SORT-FIELDNAME = 'ITNO'.
        LS_SORT-SPOS      = 1.
        LS_SORT-UP        = 'X'.
        LS_SORT-SUBTOT    = 'X'.
        APPEND LS_SORT TO P_IT_SORT.
    ENDFORM.                    " it_sort_functionality
    FORM ALV_GRID_DISPLAY .
        CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
         EXPORTING
    *   I_INTERFACE_CHECK                 = ' '
    *   I_BYPASSING_BUFFER                = ' '
    *   I_BUFFER_ACTIVE                   = ' '
           I_CALLBACK_PROGRAM                = G_REPID
    *   I_CALLBACK_PF_STATUS_SET          = ' '
           I_CALLBACK_USER_COMMAND           = 'USER_COMMAND'
           I_CALLBACK_TOP_OF_PAGE            = 'TOP_OF_PAGE'
    *   I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
    *   I_CALLBACK_HTML_END_OF_LIST       = ' '
    *   I_STRUCTURE_NAME                  =
    *   I_BACKGROUND_ID                   = ' '
    *   I_GRID_TITLE                      =
    *   I_GRID_SETTINGS                   =
    *   IS_LAYOUT                         = IT_LAYOUT
           IT_FIELDCAT                    = IT_FIELDCAT[]
    *   IT_EXCLUDING                      =
    *   IT_SPECIAL_GROUPS                 =
       IT_SORT                           = it_sort[]
    *   IT_FILTER                         =
    *   IS_SEL_HIDE                       =
    *   I_DEFAULT                         = 'X'
    *   I_SAVE                            = ' '
    *   IS_VARIANT                        =
    *   IT_EVENTS                         =
    *   IT_EVENT_EXIT                     =
    *   IS_PRINT                          =
    *   IS_REPREP_ID                      =
    *   I_SCREEN_START_COLUMN             = 0
    *   I_SCREEN_START_LINE               = 0
    *   I_SCREEN_END_COLUMN               = 0
    *   I_SCREEN_END_LINE                 = 0
    *   I_HTML_HEIGHT_TOP                 = 0
    *   I_HTML_HEIGHT_END                 = 0
    *   IT_ALV_GRAPHICS                   =
    *   IT_HYPERLINK                      =
    *   IT_ADD_FIELDCAT                   =
    *   IT_EXCEPT_QINFO                   =
    *   IR_SALV_FULLSCREEN_ADAPTER        =
    * IMPORTING
    *   E_EXIT_CAUSED_BY_CALLER           =
    *   ES_EXIT_CAUSED_BY_USER            =
          TABLES
            T_OUTTAB                       = IT_EKKN
         EXCEPTIONS
           PROGRAM_ERROR                     = 1
           OTHERS                            = 2
        IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDFORM.                    " ALV_GRID_DISPLAY
    Thanks & regards,
    Dhruv shah

  • Parallel Extractor

    Hi All,
    Does anybody know how to enable parallel process in data extraction?
    I need to extract COPA data from SAP ECC 6.0 to SAP BW 7.0 and I want the data to be extracted in parallel. It is my knowledge that in SAP BW 7.0 I cannot set it via menu bar (please see below screen cap).
    http://i144.photobucket.com/albums/r171/Spinnnzzzz/RSA1.jpg
    So I looked around and found info about RSBATCH TCode. I set the LOAD_NEWDS process type to have 10 parallel processes. This created an entry in RSBATCHPARALLEL table (please see below screen cap). But when I run the infopackage the there's only 1 job created.
    Please do share some insight. Thanks

    Hi Durgesh,
    I looked at SM37 and after setting the parallel process to 10, the difference was not significant.
    Job with parallel process has been set (BIREQU_4MHYJI8VANIL23L4IUE1HLTS4) took 2328 seconds.
    Job before the parallel process has been set (BIREQU_4MJY82EKOIUTYF0IP0VHA77D0) took 2425 seconds.
    Please refer to below screen cap.
    [SM37-After-Before|http://i144.photobucket.com/albums/r171/Spinnnzzzz/SM37_TWO_JOBS.jpg]
    I also looked at the job log and it seemed like the data package extraction was still in sequential mode. Please refer to below screen cap.
    [Job Log|http://i144.photobucket.com/albums/r171/Spinnnzzzz/JOB_LOG.jpg]
    I checked ROIDOCPRMS table and the entry was already correct there (parallel process set to 10).
    [ROIDOCPRMS table|http://i144.photobucket.com/albums/r171/Spinnnzzzz/ROIDOCPRMS.jpg]
    Perhaps there's something that I miss (i.e. have to activate or do something for this setting)?
    Regards,

  • Disable logging completly- even for missing objects

    Hi
    i hav dev database that is generating millions of job failure/due to missing objects... is there away to disable the errors?
    those jobs are scheduled thru dbms_schedule jobs have their logging level already set to "no logging ( off ) "
    but i think oracle still geenrates eror when there is missing object ....

    RnR wrote:
    Hi,
    Can you post exactly what error messages you are seeing and where ? Oracle does log job failures to the alert log even if logging is off. But if logging is off there shouldn't be any rows in the JOB_LOG or JOBRUN_DETAILS views.
    One other thing to consider is that the job class that the job points to also has a logging level which specifies the minimum logging level that will be done for the job, so you may need to reduce the logging level of the job class as well.
    Hope this helps,
    Ravi.for example
    ORA-12012: error on auto execute of job "DEV-SCHEMA1"."P_DELETE_Data"
    ORA-06576: not a valid function or procedure name
    looks like a job failing because its calling P_Delete_data which doesnt exist ... .. the job belongs to default job class and logging level set to "Log Job runs only (RUNS)" will end users notice if I change it to off ?
    I only want to stop the logging in the db alert.log not in the job tables and views ... I still want them there so users can debug their jobs ...

Maybe you are looking for

  • 2012 Macbook Pro and Sony DCR PC!

    I have a MBA and my Sony only has Firewire, 400, so a friend of mine was importing the micro cassetes from my old camera, into his Macbook Pro with iMovie and transferring them to a thumb drive for me to use. The last time he did this was early 2012.

  • Creating a Report based on different schema objects

    Hi, I have a situation in creating Reports for my database performance. Let me explain my requirment. There are 2 schemas in my database called X, Y X owns all the performance related data. But Y has read access on X objects. Now in APEX I have a dev

  • Is my iPhone a Verizon or a ATT?

    I bought my iPhone in France. How can I know if it is a Verizon or ATT? I need to know because i want to change some parts thanks

  • SAPINST 4.7  with  MS SQL SERVER Error "Unable to stop server"

    I'm trying to install SAP 4.7 on - Windows 2003 Server _ host "tpt" - SQL Server 2000 SP3 _ new Instance "MYSAP". Collation is already set to "SQL_Latin1_General_CP850_BIN2". Sapinst ran well on all input data steps. Next it applied from steps "Creat

  • How to recover "Recovered Items" after upgrade to Mavericks

    After upgrading to Mavericks (from Mountain Lion), I had to create a new user. Then, after logging in, I noticed my Applications and users were missing. After some searching in the Terminal, it seems all the items are in "Recovered Items". It's as if