Trigger or Oracle Job
Hi Friends,
I need a suggestion in the best practice that can be used for the following scenario.
I have a table which gets populated by a process,not very frequently.Once entry comes to this table,I have to do some data operation based on this table data.
I can wait for this processing by may be next half an hour.
Please advice on whether I should use a trigger and a stored procedure / go for an oracle scheduled job which runs every 30 Mins and listen this table and calls a stored procedure to do the data manipulation.
Many Thanks,
SSN
Thanks for the hint.
1.If I go for option 1 , Running a scheduled job for every 30 Mins even if I am not sure whether entry will come to this table .So job would run every 30 mins and checks the table and find that no data is there,it would keep on checking...How much cost will it have ? Is it ignorable ?
2.if I go for option 2,Once the trigger submit the job , I want it to be executed only this time.Make the inserts and commit.
If another insert come to table,it will create a new job ? Or shall I remove the first job (if I know first one is complete) and schedule a new one ?
A little more light on my requirement.I have a GUI based program which triggers some data insert.this insert is happening on a big table(say 10 lakh records) ,and it may happen for a large date range,I dont want this calling program to wait until the DB part complete the assignment.So instead I want the program to just insert to some temp table and carry on with normal flow.It doesnt have to wait.
A background process(thats why I dont prefer a trigger and procedure here) can take this and do the inserts.
Please advice.
Similar Messages
-
Error faced while creating Oracle Job
Hi,
I have the following script to create a job.
It executed successfully on my database. When we tried to execute the same at our clients place we got some error,
===========================================
SQL> DECLARE
2 job NUMBER;
3 m_sleeptimegap NUMBER;
4 job_interval VARCHAR2(100);
5
6
7 BEGIN
8 SELECT to_number(tdvalue)
9 INTO m_sleeptimegap
10 FROM tabledetails
11 WHERE tdidcode = 'LICENSE_PULSE'
12 AND tdkey = 'STATUS_DELAY';
13
14 job_interval := 'SYSDATE +'|| m_sleeptimegap / 86400;
15
16 DBMS_JOB.SUBMIT(job, 'License_Pulse_Check;', SYSDATE, job_interval, 'FALSE');
17 UPDATE tabledetails
18 SET tdvalue = LTRIM( RTRIM( TO_CHAR(job) ) )
19 WHERE tdidcode = 'LICENSE_PULSE'
20 AND tdkey = 'ORACLE-JOB-ID';
21 COMMIT;
22 END;
23 /
DECLARE
ERROR at line 1:
ORA-23319: parameter value "SYSDATE
+,000347222222222222222222222222222222222222" is not appropriate
ORA-06512: at "SYS.DBMS_JOB", line 60
ORA-06512: at "SYS.DBMS_JOB", line 138
ORA-06512: at line 16
===========================================
'm_sleeptimegap' is = 30 , which we have configured in a table called "tabledetails".
This is present at the client's place.
What could be the reason of this script failure ?
Could it be grants issue or something else ?
Thanks.Hi,
But that parameter in the dbms_job.submit procedure is of VARCHAR2 type,
dbms_job.submit(
JOB OUT BINARY_INTEGER,
WHAT IN VARCHAR2,
NEXT_DATE IN DATE DEFAULT SYSDATE,
INTERVAL IN VARCHAR2 DEFAULT 'NULL',
NO_PARSE IN BOOLEAN DEFAULT FALSE,
INSTANCE IN BINARY_INTEGER DEFAULT 0,
FORCE IN BOOLEAN DEFAULT FALSE);
[http://www.psoug.org/reference/dbms_job.html?PHPSESSID=5a94d055d8b65bd4b4661d1d24dedbf8]
Thanks. -
Java function call from Trigger in Oracle
Moderator edit:
This post was branched from an eleven-year-old long dead thread
Java function call from Trigger in Oracle
@ user 861498,
For the future, if a forum discussion is more than (let's say) a month old, NEVER resurrect it to append your new issue. Always start a new thread. Feel free to include a link to that old discussion if you think it might be relevant.
Also, ALWAYS use code tags as is described in the forum FAQ that is linked at the upper corner of e\very page. Your formulae will be so very much more readable.
{end of edit, what follows is their posting}
I am attempting to do a similar function, however everything is loaded, written, compiled and resolved correct, however, nothing is happening. No errors or anything. Would I have a permission issue or something?
My code is the following, (the last four lines of java code is meant to do activate a particular badge which will later be dynamic)
Trigger:
CREATE OR REPLACE PROCEDURE java_contact_t4 (member_id_in NUMBER)
IS LANGUAGE JAVA
NAME 'ThrowAnError.contactTrigger(java.lang.Integer)';
Java:
CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "ThrowAnError" AS
// Required class libraries.
import java.sql.*;
import oracle.jdbc.driver.*;
import com.ekahau.common.sdk.*;
import com.ekahau.engine.sdk.*;
// Define class.
public class ThrowAnError {
// Connect and verify new insert would be a duplicate.
public static void contactTrigger(Integer memberID) throws Exception {
String badgeId;
// Create a Java 5 and Oracle 11g connection.
Connection conn = DriverManager.getConnection("jdbc:default:connection:");
// Create a prepared statement that accepts binding a number.
PreparedStatement ps = conn.prepareStatement("SELECT \"Note\" " +
"FROM Users " +
"WHERE \"User\" = ? ");
// Bind the local variable to the statement placeholder.
ps.setInt(1, memberID);
// Execute query and check if there is a second value.
ResultSet rs = ps.executeQuery();
while (rs.next()) {
badgeId = rs.getString("Note");
// Clean up resources.
rs.close();
ps.close();
conn.close();
// davids badge is 105463705637
EConnection mEngineConnection = new econnection("10.25.10.5",8550);
mEngineConnection.setUserCredentials("choff", "badge00");
mEngineConnection.call("/epe/cfg/tagcommandadd?tagid=105463705637&cmd=mmt%203");
mEngineConnection.call("/epe/msg/tagsendmsg?tagid=105463705637&messagetype=instant&message=Hello%20World%20from%20Axium-Oracle");
Edited by: rukbat on May 31, 2011 1:12 PMTo followup on the posting:
Okay, being a oracle noob, I didn't know I needed to tell anything to get the java error messages out to the console
Having figured that out on my own, I minified my code to just run the one line of code:
// Required class libraries.
import java.sql.*;
import oracle.jdbc.driver.*;
import com.ekahau.common.sdk.*;
import com.ekahau.engine.sdk.*;
// Define class.
public class ThrowAnError {
public static void testEkahau(Integer memberID) throws Exception {
try {
EConnection mEngineConnection = new EConnection("10.25.10.5",8550);
} catch (Throwable e) {
System.out.println("got an error");
e.printStackTrace();
}So, after the following:
SQL> {as sysdba on another command prompt} exec dbms_java.grant_permission('AXIUM',"SYS:java.util.PropertyPermission','javax.security.auth.usersubjectCredsOnly','write');
and the following as the user
SQL> set serveroutput on
SQL> exec dbms_java.set_output(10000);
I run the procedure and receive the following message.
SQL> call java_contact_t4(801);
got an error
java.lang.NoClassDefFoundError
at ThrowAnError.testEkahau(ThrowAnError:13)
Call completed.
NoClassDefFoundError tells me that it can't find the jar file to run my call to EConnection.
Now, I've notice when I loaded the sdk jar file, it skipped some classes it contained:
c:\Users\me\Documents>loadjava -r -f -v -r "axium/-----@axaxiumtrain" ekahau-engine-sdk.jar
arguments: '-u' 'axium/***@axaxiumtrain' '-r' '-f' '-v' 'ekahau-engine-sdk.jar'
creating : resource META-INF/MANIFEST.MF
loading : resource META-INF/MANIFEST.MF
creating : class com/ekahau/common/sdk/EConnection
loading : class com/ekahau/common/sdk/EConnection
creating : class com/ekahau/common/sdk/EErrorCodes
loading : class com/ekahau/common/sdk/EErrorCodes
skipping : resource META-INF/MANIFEST.MF
resolving: class com/ekahau/common/sdk/EConnection
skipping : class com/ekahau/common/sdk/EErrorCodes
skipping : class com/ekahau/common/sdk/EException
skipping : class com/ekahau/common/sdk/EMsg$EMSGIterator
skipping : class com/ekahau/common/sdk/EMsg
skipping : class com/ekahau/common/sdk/EMsgEncoder
skipping : class com/ekahau/common/sdk/EMsgKeyValueParser
skipping : class com/ekahau/common/sdk/EMsgProperty
resolving: class com/ekahau/engine/sdk/impl/LocationImpl
skipping : class com/ekahau/engine/sdk/status/IStatusListener
skipping : class com/ekahau/engine/sdk/status/StatusChangeEntry
Classes Loaded: 114
Resources Loaded: 1
Sources Loaded: 0
Published Interfaces: 0
Classes generated: 0
Classes skipped: 0
Synonyms Created: 0
Errors: 0
.... with no explanation.
Can anyone tell me why it would skip resolving a class? Especially after I use the -r flag to have loadjava resolve it upon loading.
How do i get it to resolve the entire jar file?
Edited by: themadprogrammer on Aug 5, 2011 7:15 AM
Edited by: themadprogrammer on Aug 5, 2011 7:21 AM
Edited by: themadprogrammer on Aug 5, 2011 7:22 AM
Edited by: themadprogrammer on Aug 5, 2011 7:23 AM
Edited by: themadprogrammer on Aug 5, 2011 7:26 AM -
Oracle Job not running properly
Hi All,
I am facing an issue with oracle jobs.
I have writtent the script of a job scheduled to be executed automatically after 2 seconds.It works on a table and dequeue the data in that table.
Now the job is not able to execute for next time.If i execute the job immediately then also it does not run for next time.
so where could be the problem...
Please give me pointers.
Thanks in advance :)
Thanks n Regards
Arunuser10280915 wrote:
Hi All,
I am facing an issue with oracle jobs.
I have writtent the script of a job scheduled to be executed automatically after 2 seconds.It works on a table and dequeue the data in that table.
Now the job is not able to execute for next time.If i execute the job immediately then also it does not run for next time.
so where could be the problem...
Please give me pointers.
Thanks in advance :)
Thanks n Regards
ArunThings that you'll need.
1. JOB_QUEUE_PROCESSES to be non-zero
2. A commit after submitting the job
3. The job not to be broken.
4. don't schedule very frequently (say <5s) if the os is Linux :( ).
I'd check in the above order.
Niall -
Drop/Create sequence using Oracle Job Scheduler
IDE for Oracle SQL Development: TOAD 9.0
Question: I am trying to do the following:
1. Check if a certain sequence exists in the user_sequences table
2. Drop the sequence if it exists
3. Re-create the same sequence afterward
All in a job that is scheduled to run daily at 12:00 AM.
What I would like to know is if this is even possible in the first place with Oracle jobs. I tried the following:
1. Create the actual "BEGIN...END" anonymous block in the job.
2. Create a procedure that uses a dynamic SQL string using the same "BEGIN...END" block that drops and recreates the sequence using the EXECUTE IMMEDIATE commands
But I have failed on all accounts. It always produces some sort of authorization error which leads me to believe that DDL statements cannot be executed using jobs, only DML statements.
BTW, by oracle jobs, I mean the SYS.DBMS_JOBS.SUBMIT object, not the job scheduler.
Please do not ask me why I need to drop and recreate the sequence. It's just a business requirement that my clients gave me. I just want to know if it can be done using jobs. If not, I would like to know if there are any work-arounds possible.
Thank you.Please do not ask me why I need to drop and recreate the sequence. It's just a business requirement that my clients gave me. I just want to know if it can be done using jobs. If not, I would like to know if there are any work-arounds possible.Well, I won't ask you then, but can you ask your clients why on earth they would want that?
Do they know that doing DDL 'on the fly' will invalidate the dependent objects?
Best shot you can give at it is reset the sequence. And you could do it in a job, yes, as long as it's interval is during some maintenance window (no active users).
Regarding resetting a sequence, you, (and your clients) should read this followup:
http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:1119633817597
(you can find lots more info on sequences and jobs by doing a search from the homepage http://asktom.oracle.com)
Regarding the authorization errors: your DBA should be able to provide you the nessecary privileges.
But in the end, this is something I'd rather not would like to see implemented on a production system... -
What to add to an program code in order to trigger an background job
Hi there
I wander what to add to an program code in order to trigger an event which consequently can trigger an background job
thx in advanceCheck this code:
DATA : v_jobhead LIKE tbtcjob.
DATA : v_jobcount LIKE tbtcjob-jobcount.
DATA : v_eventparm LIKE tbtcjob-eventparm.
DATA : v_flg_released TYPE c.
DATA: e_error.
DATA: running LIKE tbtcv-run.
TYPES: esp1_boolean LIKE boole-boole.
CONSTANTS: esp1_false TYPE esp1_boolean VALUE ' ',
esp1_true TYPE esp1_boolean VALUE 'X'.
CONSTANTS: true TYPE boolean VALUE esp1_true,
false TYPE boolean VALUE esp1_false.
PARAMETERS: v_jobnam LIKE tbtcjob-jobname,
v_report LIKE sy-repid,
v_varian LIKE raldb-variant,
v_uname LIKE sy-uname.
START-OF-SELECTION.
* add the new job
CALL FUNCTION 'JOB_OPEN'
EXPORTING
* delanfrep = 'X'
jobname = v_jobnam
IMPORTING
jobcount = v_jobcount
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF sy-subrc <> 0.
e_error = true.
ELSE.
CALL FUNCTION 'JOB_SUBMIT' " or you can use SUBMIT statement as well.
EXPORTING
authcknam = v_uname
jobcount = v_jobcount
jobname = v_jobnam
report = v_report
variant = v_varian
EXCEPTIONS
bad_priparams = 1
bad_xpgflags = 2
invalid_jobdata = 3
jobname_missing = 4
job_notex = 5
job_submit_failed = 6
lock_failed = 7
program_missing = 8
prog_abap_and_extpg_set = 9
OTHERS = 10.
IF sy-subrc <> 0.
e_error = true.
ELSE.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
* EVENT_ID = IC_WWI_WORKPROCESS_EVENT
* EVENT_PARAM = V_EVENTPARM
* EVENT_PERIODIC = 'X'
jobcount = v_jobcount
jobname = v_jobnam
strtimmed = 'X'
IMPORTING
job_was_released = v_flg_released
EXCEPTIONS
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
OTHERS = 8.
IF sy-subrc <> 0.
e_error = true.
ELSE.
DO.
CALL FUNCTION 'SHOW_JOBSTATE'
EXPORTING
jobcount = v_jobcount
jobname = v_jobnam
* IMPORTING
* ABORTED =
* FINISHED =
* PRELIMINARY =
* READY =
* running =
* SCHEDULED =
EXCEPTIONS
jobcount_missing = 1
jobname_missing = 2
job_notex = 3
OTHERS = 4.
IF sy-subrc <> 0.
e_error = true.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
IF running = space.
EXIT.
ENDIF.
ENDDO.
ENDIF.
ENDIF.
ENDIF. -
Date and Time issue oracle job
i have wriited oracle job to execute my procedure and the job has to execute the procdedure at 11:30 pm every day.
following are the parameters of the JOB.
next_date => TRUNC(SYSDATE) + 23/24+ 0.5/24
interval => 'SYSDATE + 1'
But it is not executing the procedure at 11.30 pm everydat. Waht coud be wrong in the schedule part. please help me in this.Hi,
born2win wrote:
i have wriited oracle job to execute my procedure and the job has to execute the procdedure at 11:30 pm every day.
following are the parameters of the JOB.
next_date => TRUNC(SYSDATE) + 23/24+ 0.5/24
interval => 'SYSDATE + 1'
But it is not executing the procedure at 11.30 pm everydat. Waht coud be wrong in the schedule part. please help me in this.When you use SYSDATE in the interval parameter, it is the time when the job finishes , not the time when the job begins (which may not be the time you wanted the job to begin, if the database is down).
If, regardless of when a job finishes, you want it to run again at 11:30 PM the next day, then use
interval => 'TRUNC (SYSDATE) + 1 + (23.5 / 24)'Unless you're using a very old version of Oracle, you should use dbms_scheduler instead of dbms_job. See
http://docs.oracle.com/cd/B28359_01/appdev.111/b28419/d_sched.htm#CIHHBGGI -
Hi,
create or replace procedure insert_sch is
begin
insert into sudhir name values ('sudhir');
end insert_sch;
I have created a Stored Procedure. I need to create a job to run this every 1min, Please suggest me how to create Oracle jobs in 10g and 11i.
Thanks
SudhirHi
Thanks have found the solution
declare
v_JobNo number := 123;
begin
dbms_job.submit(v_JobNo, 'insert_sch;', INTERVAL => 'SYSDATE+(1/24/60)');
end;
Thanks
Sudhir -
Backing up Jobs, Chains and Programs in Oracle Job Scheduler
What is the best way to back up Jobs, Chains and Programs created in the Oracle Job Scheduler via Enterprise Manager - and also the best way to get them from one database to another. I am creating quite a long chain which executes many programs in our test database and wish to back everything up along the way. I will also then need to migrate to the production database.
Thanks for any advice,
SusanHi Susan,
Unfortunately there are not too many options.
To backup a job you can use dbms_scheduler.copy_job. I believe EM has a button called "create like" for jobs and programs but I am not sure about chains and this can be used to create backups as well.
A more general purpose solution which should also cover chains is to do a schema-level export using expdp i.e. a dump of an entire schema.
e.g.
SQL> create directory dumpdir as '/tmp';
SQL> grant all on directory dumpdir to public;
# expdp scott/tiger DUMPFILE=scott_backup.dmp directory=dumpdir
You can then import into a SQL text file e.g.
# impdp scott/tiger DIRECTORY=dumpdir DUMPFILE=scott_backup SQLFILE=scott_backup.out
or import into another database (and even another schema) e.g.
# impdp scott/tiger DIRECTORY=dumpdir DUMPFILE=scott_backup
Hope this helps,
Ravi. -
Rename view,procedure,function,trigger in oracle.
hi all,
Just i am thinking a concept in oracle.
can i rename view,procedure,function,trigger in oracle. i know it is not possible bcos it is a script.
can u please confirm meYou can rename View
http://download.oracle.com/docs/cd/B12037_01/server.101/b10759/statements_9019.htm
You can rename Trigger
http://www.ss64.com/ora/trigger_a.html
Well there we go. Having never had a need to do it myself (I put it down to good design and coding standards!) I never knew it was possible.
;-)) -
Oracle Job in progress for too long (3 days)
Hi guys,
i am using oracle 10.2.0.3 database. One of the oracle job is in progress for almost 3 days & in active state.
i tried enabling trace but didnt get anything. please let me know what should i do. EM also dont show any current or previous SQL & the wait event is "jobq slave wait" ....
please help.....Here is the current situation i can see at OEM.
Current Status ACTIVE
Serial Number 4285
DB User Name JOBS
OS Process ID 6492
Logged On Since May 29, 2009 1:12:33 PM
Logged On For 3 Days, 22 Hours, 49 Minutes, 3 Seconds
Connection Type DEDICATED
Type USER
Resource Consumer Group Unavailable
Client
OS User Name admin
OS Process ID 6492
Host ORACLE_PRODUCTION
Terminal ORACLE_PRODUCTION
Current Client ID Unavailable
Current Client Info Unavailable
Application
Current SQL None
Current SQL Command UNKNOWN
Previous SQL None
Last Call Elapsed Time 3 Days, 22 Hours, 49 Minutes, 2 Seconds
SQL Trace DISABLED
Open Cursors 7
Program ORACLE.EXE (J000)
Service SYS$USERS
Current Module Unavailable
Current Action Unavailable
Contention
Blocking Session ID None
Wait
Current Wait Event jobq slave wait
Current Wait Class Idle
Waiting for 2 Minutes, 11 Seconds
P1 None
P2 None
P3 None
Object None -
Oracle 11g - Non Oracle JOB ?
Oracle 11g - Non Oracle JOB ?
=====================
I hope this is the right forum for this issue, if not let me, where to go.
We are using Oracle 11g (11.2.0.1.0) on (Platform : solaris[tm] oe (64-bit)), Sql Developer 3.0.04
1) We are loading table using PL/SQL -- > at Oracle server.
2) This data is consumed by Mainframe DB2 process -- > at DB2 server.
3) Return us another table with derived data from DB2 -- > at DB2 server.
There is a IBM JCL read our table and return a Oracle table with calculated data.
Do we able to automate a process using PL/SQL to start the IBM JCL upon loading the table Step (1)?
Are there any alternate approach?
Thanks in helping us.
Edited by: qwe16235 on Jul 19, 2011 1:54 PMHello,
I read the DBMS_SCHEDULER pieces. We need to create a job (Pl/sql procedure or shell script) to configure the DBMS_SCHEDULER.
If we are going to do such thing in the server, where our current Oracle DB instance located, we can perform desired tasks via jobs. No issues.
I reviewed the components within DBMS_SCHEDULER to start job on another server, where there is no Oracle DB instance running. I did not find any clue/pointer on the referred doc.
Do we need any additional components to do such things?
We are on Server A with Oracle DB 11g and Server B with Non-Oracle and no Oracle Instance running there.
How do we create a Job J1 on Server A, where it will request Server B to start a Job J2 in Non-Oracle instance?
Do we have a component within DBMS_Scheduler to do that?
Thanks in helping. -
Trigger a background job after executing tcode MMPV
Hi All,
I would like to trigger a background job after executing tcode MMPV. In MMPV, after closing a particular period and entering
new period, the transaction will be saved. After saving, the background job should be triggered. How to do it?
Regards,
VinodDepending what system you are on your best bet would be to create an enhancement point inside a form, that is called after the save has been performed, and raise an event within that form.
Events can be used to trigger background jobs are maintained in transaction SM62.
Cheers. -
Help, How to view the error log of oracle Job
Hi all,
I created a job in my database, which clears the archivelog. After the job is executed, it occurs error.Such as :
RMAN清理归档日志 1 问题 2010-3-19 下午03时11分00秒 GMT+08:00 PTDB 数据库实例 SYSTEM RMAN 脚本
How to view the error log of oracle Job?
Thank you.
Eric ZhouHello,
Besides some views (with the scheduler) that you can get on the link below:
http://download-west.oracle.com/docs/cd/B28359_01/server.111/b28310/scheduse002.htm#CHDGIDFD
You may use the LOG parameter with RMAN so as to generate a logfile on the server.
Also from EM DBConsole (starting with 10g) you may have the RMAN Backup Report.
Hope this help.
Best regards,
Jean-Valentin -
How to trigger a background job from BADI method.
hi friends,
i need to trigger a background job from the badi method CHANGE_AT_SAVE for the BADI BOM_UPDATE.
for this i think i need to create an event which i should give with parameters during job creation.
can you pls help me solve this issue.
thank u all.Hi Saravanan,
Here is an example of what you have to do.
Regards,
Eric
Reward any helpful sugestion.
*& Form generar_job
FORM generar_job .
Generar Variante
PERFORM generar_variante.
w_fecha = sy-datum + 3.
CALL FUNCTION 'DATE_COMPUTE_DAY'
EXPORTING
date = w_fecha
IMPORTING
day = w_weekday.
Si la fecha cae en sabado o domingo se debe continuar el lunes.
CASE w_weekday.
when '1'.
ADD 2 TO w_fecha.
WHEN '6'.
ADD 2 TO w_fecha.
WHEN '7'.
ADD 1 TO w_fecha.
ENDCASE.
w_jobname = 'ZQM_CIERRE_LOTE_INSPECCION'.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobgroup = 'QUEUE'
jobname = w_jobname
IMPORTING
jobcount = w_jobcount
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF sy-subrc EQ 0.
CALL FUNCTION 'JOB_SUBMIT'
EXPORTING
authcknam = sy-uname
jobcount = w_jobcount
jobname = w_jobname
report = 'ZQM_CIERRE_LOTE_INSPECCION'
variant = w_var
IMPORTING
step_number = w_stepnum
EXCEPTIONS
bad_priparams = 1
bad_xpgflags = 2
invalid_jobdata = 3
jobname_missing = 4
job_notex = 5
job_submit_failed = 6
lock_failed = 7
program_missing = 8
prog_abap_and_extpg_set = 9
OTHERS = 10.
IF sy-subrc EQ 0.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = w_jobcount
jobname = w_jobname
sdlstrtdt = w_fecha
sdlstrttm = w_hora
IMPORTING
job_was_released = w_rel
EXCEPTIONS
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
OTHERS = 8.
IF sy-subrc EQ 0.
IF w_rel EQ 'X'.
WRITE:/ w_jobname, 'FUE LIBERADO. VER SM37.'.
Guardamos los destinatarios
PERFORM destinatarios_job.
Guardamos la información a utilizar al ejecutar el job
PERFORM guardar_datos_job.
ELSE.
WRITE:/ w_jobname, 'NO FUE LIBERADO'.
ENDIF.
ELSE.
WRITE:/ w_jobname, 'NO FUE CERRADO'.
ENDIF.
ELSE.
WRITE:/ w_jobname, 'NO FUE ENVIADO'.
ENDIF.
ELSE.
WRITE:/ w_jobname, 'NO FUE CREADO'.
ENDIF.
ENDFORM. " generar_job
Maybe you are looking for
-
hi, firstly my ipod touch is working fine in itunes. i reformated my computer so i lost all my old drivers ect ect, so now my ipod shows up as an image device. i have reinstalled itunes several times and installed apple mobile device but still doesnt
-
Presario CQ61 - Boot Device not found, Hard dis not exist
Hi i bought my presario CQ61-405AX 2nd hand roughly a year ago and it was almost new, my laptop was running fine, and then it froze, and so i had to turn it off, after i waited 30min for it to unfreeze, it now, when i boot it up, appears with a black
-
Dear PM Experts, I want to create a counter in (IK01) for preventive maintenance plan of Compressor which require the CHARACTERISTIC (HRS),and i had created my own characteristic in CT04 but the counter dose not work properly. So please help me in cr
-
PCMCIA firewire adapter not working ....
with my LACie 40GB USB/Firewire mobile hard drive.. I previously posted that my TiBook 550 firewire port & the Lacie firewire port are fried. I was hinted that the Tibook firewire port may have been the culprit but not certain. I bought a 3rd party P
-
Spotlight search not appearing in ios7 when swiping down
The spotlight search box is supposed to appear in IOS7 when you swipe down on the home screen or within apps, but it doesn't. When I swipe down, I get the notification centre and that's all. In my settings- general - spotlight search, all apps shown