Job creation problem
Hi,
while creating a job i am getting an error my db version is oracle 9.2
declare
vJobNum binary_integer;
begin
dbms_job.submit(
job => vJobNum,
next_date => to_date('20:00', 'HH24:MI'),
interval => 'SYSDATE + 1',
what => 'test_srn'
[pre]
output is
[pre]
ERROR at line 9:
ORA-06550: line 9, column 2:
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the
following:
begin case declare end exception exit for goto if loop mod
null pragma raise return select update while with
<an identifier> <a double-quoted delimited-identifier>
<a bind variable> << close current delete fetch lock insert
open rollback savepoint set sql execute commit forall merge
<a single-quoted SQL string> pipe
Missing "end" at the end.
declare
vJobNum binary_integer;
begin
dbms_job.submit(
job => vJobNum,
next_date => to_date('20:00', 'HH24:MI'),
interval => 'SYSDATE + 1',
what => 'test_srn'
h4. end;
Similar Messages
-
Smbd(383) deny job-creation
I am getting this error whenever I use Windows or Mac connect to my macbook air Lion
I am getting this error.
Aug 7 15:26:18 MBAir sandboxd[385] ([383]): smbd(383) deny job-creation
It won't let me connect until I restart the file sharing in system preferences. It consistently doing it after a reboot and I have to restart the service everytime I restart my macbook air.
Does anyone know what is this error?I have the same problem.
I enable SMB file sharing on my mac mini 2011. When i access it from my windows 7 PC it works.
But if i restart the mac mini i can't access SMB shares from windows until i restart the SMB file sharing in system preferences.
No solution.
Come on Apple ! -
Background job scheduling problem
Hai..Can anyone check the below program and correct it.
I am unable to see the output in SP01 (SPOOL REQUEST)
MY PROGRAM:-
REPORT zh_test4.
TABLES : mara, TBTCO.
DATA : BEGIN OF itab OCCURS 0,
matnr LIKE mara-matnr,
END OF itab.
****background data declarations
data : job_name like TBTCO-JOBNAME.
data : job_num like TBTCO-JOBCOUNT,
rep like sy-repid.
***selection screen
PARAMETERS : p_matnr LIKE mara-matnr default '1500-610'.
SELECT matnr FROM mara INTO TABLE itab WHERE matnr EQ p_matnr.
job_name = 'HARI'.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
DELANFREP = ' '
JOBGROUP = ' '
jobname = job_name
SDLSTRTDT = NO_DATE
SDLSTRTTM = NO_TIME
IMPORTING
jobcount = job_num
EXCEPTIONS
CANT_CREATE_JOB = 1
INVALID_JOB_DATA = 2
JOBNAME_MISSING = 3
OTHERS = 4
IF sy-subrc <> 0.
write :/ ' Job opening problem'.
else.
write :/ 'Job succesfully opened', sy-subrc.
ENDIF.
MOVE SY-UNAME TO TBTCO-AUTHCKNAM.
rep = sy-repid.
job_name = 'HARI'.
CALL FUNCTION 'JOB_SUBMIT'
EXPORTING
ARCPARAMS =
authcknam = SY-UNAME
jobcount = job_num
jobname = job_name
LANGUAGE = SY-LANGU
PRIPARAMS = ' '
REPORT = 'ZH_TEST4'
VARIANT = 'VAR'
IMPORTING
STEP_NUMBER =
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.
WRITE :/ 'JOB SUBMIT PROBLEM',
job_name,
job_num,
rep,
sy-subrc.
else.
write :/ 'Job succesfully submitted in background', sy-subrc.
ENDIF.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = job_num
jobname = job_name
LASTSTRTDT = NO_DATE
LASTSTRTTM = NO_TIME
PRDDAYS = 0
PRDHOURS = 0
PRDMINS = 0
PRDMONTHS = 0
PRDWEEKS = 0
PREDJOB_CHECKSTAT = ' '
PRED_JOBCOUNT = ' '
PRED_JOBNAME = ' '
SDLSTRTDT = datum
SDLSTRTTM = uzeit
STARTDATE_RESTRICTION = BTC_PROCESS_ALWAYS
STRTIMMED = 'X'
TARGETSYSTEM = ' '
START_ON_WORKDAY_NOT_BEFORE = SY-DATUM
START_ON_WORKDAY_NR = 0
WORKDAY_COUNT_DIRECTION = 0
RECIPIENT_OBJ =
TARGETSERVER = ' '
DONT_RELEASE = ' '
TARGETGROUP = ' '
IMPORTING
JOB_WAS_RELEASED = 'X'.
EXCEPTIONS
CANT_START_IMMEDIATE = 1
INVALID_STARTDATE = 2
JOBNAME_MISSING = 3
JOB_CLOSE_FAILED = 4
JOB_NOSTEPS = 5
JOB_NOTEX = 6
LOCK_FAILED = 7
INVALID_TARGET = 8
OTHERS = 9
IF sy-subrc <> 0.
write :/ 'Unable to close the Job', rep, sy-subrc.
else.
write :/ 'Succesfully closed the job', sy-subrc.
ENDIF.Here is an example, slightly different from your version.
REPORT ztest.
PARAMETERS: p_vbeln LIKE vbak-vbeln,
p_bkrun NO-DISPLAY.
DATA: ls_vbak LIKE vbak.
DATA: v_answer,
v_jobcount LIKE tbtcjob-jobcount.
IF p_bkrun IS INITIAL.
*-- not background processing
CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
EXPORTING
textline1 = 'This may time out.'
textline2 = 'Do you want to run in background?'
titel = 'Warning!!!'
cancel_display = space
IMPORTING
answer = v_answer.
IF v_answer = 'J'.
*-- run in the background
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = 'ZTEST'
IMPORTING
jobcount = v_jobcount
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE 'E' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
EXIT.
ENDIF.
*-- submit the program in the background
SUBMIT ztest
WITH p_bkrun = 'X'
WITH p_vbeln = p_vbeln
USER sy-uname
VIA JOB 'ZTEST' NUMBER v_jobcount AND RETURN.
*-- close the job
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = v_jobcount
jobname = 'ZTEST'
strtimmed = 'X'
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.
MESSAGE ID sy-msgid TYPE 'W' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
EXIT.
ELSE.
CLEAR v_answer.
ENDIF.
ENDIF.
CHECK v_answer IS INITIAL.
SELECT SINGLE * FROM vbak
INTO ls_vbak
WHERE vbeln = p_vbeln.
IF sy-subrc <> 0.
WRITE:/ 'Invalid Order Id.'.
ENDIF.
END-OF-SELECTION.
CHECK v_answer IS INITIAL.
IF p_bkrun IS INITIAL.
WRITE:/ 'Here is the result running the program in foreground.'.
ELSE.
WRITE:/ 'Here is the result running the program in background.'.
ENDIF.
WRITE:/ ls_vbak-vbeln,
ls_vbak-vkorg. -
Hi Expert,
By JOB_OPEN, JOB_SUBMIT, JOB_CLOSE, we can schedule a job.
When the first two FMs is executed, the job is still in 'scheduled' status. Only when the FM JOB_CLOSE is executed, the job will be in 'released' status.
In my applicaiton, I need to check the job status. If the job is in 'scheduled' status, I think that the job creation is not successsful; Otherwise, the job creation is successful.
But the issue is, if job is in 'scheduled' status, how can I know whether all three FMs is executed in the job creation or only JOB_OPEN and JOB_SUBMIT are executed while JOB_CLOSE still not starts?
In the later case, the applicaiton should wait some time and check the job later.
Thanks for your support
Best Regards, Johnney.Hi,
Suppose there two APIs.
In API1, there are four steps:
1. call FM JOB_OPEN
2. call FM JOB_SUBMIT
3. Save the Jobname and Jobcount in the DB
4. CAll JOB_CLOSE
in API2, there are two steps:
1. get the Jobname and Jobcount from the DB
2. Call FM BP_JOBLIST_STATUS_GET to get the job status.
API1 and API2 are executed asynchronically. Consider the following case:
After STEP3 is executed(STEP4 has not yet been started), the API2 starts to run. Now the job status that API2 get is 'Scheduled'.
This is not correct, because the job creation is still not finished. The API2 should wait some time and check later.
So my question, is how API2 know that the job creation is not finished.
Thanks & Best Regards, Johnney. -
Hello everybody,
I have the next requirement, I need an option in the menu in a Z dynpro program to execute the transaction in a background job, the problem is that i need it to work just like this option works with selection screens, that in the Program option in the menu it has the Execute in background, so it generates automatically the job, I've seen the functions JOB_OPEN, JOB_SUBMIT and JOB_CLOSE they will work the problem is with the variant cause there is no variants and i don't know how the system generates some kind of temporal variant with a name such as &00000000054 and so on, does anyone know how can i do this, thanks in advance.
Regards,
Julio CesarYou don't need a temporary variant for this. Just use the SUBMIT statement and pass your data(captured in the screen) to another "Z" program using the WITH statement. Problemm solved.
data: l_valid,
ls_params like pri_params,
l_jobcount like tbtcjob-jobcount,
l_jobname like tbtcjob-jobname.
* Get Print Parameters
call function 'GET_PRINT_PARAMETERS'
exporting
no_dialog = 'X'
importing
valid = l_valid
out_parameters = ls_params.
* Open Job
l_jobname = 'Z_SUBMITTED_PROGRAM'.
call function 'JOB_OPEN'
exporting
jobname = l_jobname
importing
jobcount = l_jobcount.
* Submit report to job
submit z_submitted_program
with P_parm1 = <some_value>
with P_parm2 = <some_value>
via job l_jobname
number l_jobcount
to sap-spool without spool dynpro
spool parameters ls_params
and return.
* Schedule and close job.
call function 'JOB_CLOSE'
exporting
jobcount = l_jobcount
jobname = l_jobname
strtimmed = 'X'.
Regards.
Rich Heilman
Edited by: Rich Heilman on May 21, 2008 3:51 PM -
Dear All,
May i know what is the table to store a background job's master data? I mean the table which stored the job creation date, change date, change by, event.
Please comment.Hi Friend,
Check the following table:
BTCUED
Hope this helps you.
Regards,
Chandra Sekhar -
Cannot successfully create a dj for an ATO item that has a project # referenced using the WICDOL module: AutoCreate Final Assembly Orders. Order is scheduled and booked. Status is Awaiting Job Creation. Run AutoCreate. Job completes with a warning. If the same item is ordered and scheduled without a project number I can create a WIP job with no difficulty. A TAR has been opened but the progress has been slow. Any thoughts would be greatly appreciated.
Hi,
Just try by giving task number, along with project number. Iam assuming that you are giving project number to all items in the SO i.e. Model, option class,option, etc.
Reg
Sreenivas Amisagadda -
SQL job creation/modification/deletion auditing?
I have a job 'pop-up' 3 days ago on one of our Servers and of course 'nobody' is coming forward and saying 'I did it'. Is there a way to determine who created the job after the fact?
Going forward, is there a way to be notified via email when jobs are created/modified/deleted in SQL 2005 Enterprise? Trigger maybe? I'm not having much success searching the web on this.--Job creator / owner
select a.name
as job_name ,b.name
as job_owner from sysjobs a
, sys.syslogins b
where a.owner_sid
= b.sid
n
Trigger on sysjobs table
create
trigger trigg on msdb.dbo.sysjobs
after
insert ,
update
as
EXEC msdb.dbo.sp_send_dbmail
@profile_name
= 'name_of_mail_profile',
@recipients = '[email protected]',
@body = 'New job creation alert',
@subject = 'Automated Message'
-- Who ran the job ?
select a.name
as JOB_NAME , b.message
from msdb.dbo.sysjobhistory b
, msdb.dbo.sysjobs a
where
a.job_id=b.job_id
and a.job_id
= 'AD5AAF63-4C4D-496A-AAFB-98F981E69BC2'
and b.step_name =
'(Job outcome)'
Thanks, Leks -
Prforma Invoice creation problem
HI,
We have intercompany sales flow. The flow is like, sales order will be created and for that a delivery will be created and an intercompany invoice will be created at first and after that a proforma invoice will be created with reference to the existing delivery.When we are creating the proforma invoice manually, we are able to create the proforma invoice without any problem. But when we are trying to create an proforma invoice through background job, we are facing the problem. When we checked in the billing due list also we are not able to find the pending documents for billing.
When we checked the delivery,we were able to see the status as not relevant for billing. But in the itemcategory definition, it is maintained as relevant for proforma invoice.
Can anyone help in finding out the reason why we are not able to create and invoice through back ground job.
Thanks in advance.
Regards,
CSHi CS,
Please see the following information in note 301254 (Creation of billing index):
1. Relevance for billing (table TVAP):
Depending on the specification of field FKREL in table TVAP (Customizing
item category, Transaction VOV7), the system creates a billing index for
order-, delivery- or billing-reference. Without an entry, no
billing-reference exists.
If the billing-reference is 'D' (relevant for pro-forma), the system
does not set up a billing index. In this case, you can only use
Transaction VF01, however not VF04/VF06 to create pro-forma invoices.
You can create as many pro forma invoices as you like for a sales
order or a delivery because the billing status in the sales order or
delivery is not updated.
Note that items with relevancy for billing 'D' also occur in intercompany billing. If an item category is relevant for billing, that is TVAP-FKREL is not blank, and the plant belongs to a company different than selling company (linked to sales organization), then the item is automatically considered relevant for intercompany billing (VBUP-FKIVP = A). There is not a separate setting for item intercompany billing relevance.
I hope this information helps.
Kind regards,
Kelly -
Database creation problem on Windows XP
Hello Readers
I have installed ORACLE Database Engine on windows XP.
I am facing problem in database creation.
I have tryed wizard as well as mannual method.
in wizard at 90% it gives an error "END-OF-FILE ON COMMUNICATION CHANNEL"
although CD drive is in CR Rom drive.
Please help me ....
Rashid Masood Ashraf
email: [email protected]After going to the properties as you suggested:
Right now the Obtain an IP address automatically is checked
I need to check the Use the following IP address:
What should I enter for
IP address:
Subnet mask:
Default gateway:
Please help.
Edited by: Nel Marcus on Dec 2, 2008 3:49 PM -
Hi Masters,
In SM37 I seen that 3 jobs were cancelled.
Pls see below:
======
Job started
Step 001 started (program RSSTAT1, variant &0000000002410, user name ALEREMOTE)
Log:Programm RSSTAT1; Request REQU_3ZAF2Q2IY0EE5RZCTYPE2FCAT; Status ; Action Start
Deleting/reconstructing indexes for InfoCube ZSRVPUR01 is not permitted
Deleting/reconstructing indexes for InfoCube ZSRVPUR01 is not permitted
Log:Programm RSSTAT1; Request REQU_3ZAF2Q2IY0EE5RZCTYPE2FCAT; Status @08@; Action Callback
Report RSSTAT1 completed with errors
Job cancelled after system exception ERROR_MESSAGE
How to investigate cancelled jobs under ALEREMOTE? How can i know this cancelled Job's request is assigned for what task.?
How to rerun a cancelled job? Pls tell steps.
Please suggest me.
Thanks,
BW26.Hi,
it looks like you have an authority problem with aleremote. But anyway, did you check the syslog (sm21) or the dump overview (st22)? Are there any problems logged for the run time of the job?
regards
Siggi
PS: Have look here it might be of some help for you! /people/siegfried.szameitat/blog/2005/07/28/data-load-errors--basic-checks
Message was edited by: Siegfried Szameitat -
Hi All,
My problem is the next:
I would like to call two functions, in one function module, but I cannot schedule the second job after the first. I wrote the code, use the parameter PREDJOB_CHECKSTAT of JOB_CLOSE, but when the mother function called two jobs started immediately and paralell. What is worng in the following code?
Thanks /and points :)/ for your help!
Tamas
L_JOBNAME = 'REQUEST_COPY'.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
JOBNAME = L_JOBNAME
IMPORTING
JOBCOUNT = L_JOBCOUNT.
SUBMIT RSSEM_REQUEST_COPY
WITH RNR = I_RNR
WITH S_CUBE = LS_CUBES-SOURCE_CUBE
WITH T_CUBE = LS_CUBES-TARGET_CUBE
USER SY-UNAME VIA JOB L_JOBNAME NUMBER L_JOBCOUNT
AND RETURN.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
JOBCOUNT = L_JOBCOUNT
JOBNAME = L_JOBNAME
STRTIMMED = 'X'.
L_JOBNAME2 = 'REQUEST_CLOSE'.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
JOBNAME = L_JOBNAME2
IMPORTING
JOBCOUNT = L_JOBCOUNT2.
SUBMIT Z_REQUEST_CLOSE_ZSD_P25
USER SY-UNAME VIA JOB L_JOBNAME2 NUMBER L_JOBCOUNT2
AND RETURN.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
JOBCOUNT = L_JOBCOUNT2
JOBNAME = L_JOBNAME2
STRTIMMED = 'X'
PREDJOB_CHECKSTAT = 'X'
PRED_JOBCOUNT = L_JOBCOUNT
PRED_JOBNAME = L_JOBNAME.Hi Thomas,
Thanks for all helps, I found the solution!
Inserted a select from the Job Status Table into th second job definition.
Thanks for the ideas!
Tamás
The finally code is the the following:
L_JOBNAME = 'REQUEST_COPY'.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
JOBNAME = L_JOBNAME
IMPORTING
JOBCOUNT = L_JOBCOUNT.
SUBMIT RSSEM_REQUEST_COPY
WITH RNR = I_RNR
WITH S_CUBE = LS_CUBES-SOURCE_CUBE
WITH T_CUBE = LS_CUBES-TARGET_CUBE
USER SY-UNAME VIA JOB L_JOBNAME NUMBER L_JOBCOUNT
AND RETURN.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
JOBCOUNT = L_JOBCOUNT
JOBNAME = L_JOBNAME
STRTIMMED = 'X'.
L_JOBNAME2 = 'REQUEST_CLOSE'.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
JOBNAME = L_JOBNAME2
IMPORTING
JOBCOUNT = L_JOBCOUNT2.
DO.
SELECT SINGLE STATUS FROM TBTCO INTO L_STATUS
WHERE JOBNAME = L_JOBNAME
AND JOBCOUNT = L_JOBCOUNT.
IF L_STATUS = 'F'.
EXIT.
ELSE.
WAIT UP TO 1 SECONDS.
ENDIF.
ENDDO.
SUBMIT Z_REQUEST_CLOSE_ZSD_P25
USER SY-UNAME VIA JOB L_JOBNAME2 NUMBER L_JOBCOUNT2
AND RETURN.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
JOBCOUNT = L_JOBCOUNT2
JOBNAME = L_JOBNAME2
STRTIMMED = 'X'
PREDJOB_CHECKSTAT = 'X'
PRED_JOBCOUNT = L_JOBCOUNT
PRED_JOBNAME = L_JOBNAME. -
Background job scheduling problem in APO
Hi fellow SDNers,
i am going through this peculiar problem of background job scheduling:
scenario is like , i have an CSV (excel file) in aplication server which would load data into the infosource, which i have scheduled to run in backhround (in infopackage) ,after event is triggered (option in scheduling tab of infopackage...THE SCHEDULING OPTIONS)
now everything seems to be fine.. but the data is not getting loaded...?? could u lease help me out..how to load data from excel file (in background), after an event gets triggered.
thanks in advance,
Rohanhi Alexander,
i am triggering the event from BP_EVENT_RAISE FM in APO by passing the event id... this would automaitically raise the event...just like sm64
Thanks
Rohan -
Remittance challan creation problem in Cross company code scenario.
I made to Advance payment to Cross comany code while posting time we deduct the TDS amount. at the time remiottance challan creation i got bellow error.please help to me
No unpaid tax lines exist for the given selection criteria.
Message no. 8I702
Diagnosis
The corresponding withholding tax line &1& is not present in WITH_ITEM table.
System Response
For withholding tax recovered from the vendor, tax line is present in table BSIS, but the corresponding entry is missing in table WITH_ITEM , which is necessary for challan updation. Check the entries.
Procedure
check entries in table WITH_ITEM for the open tax items chosen for clearing.
Edited by: TEEGALA SATISH on Jun 15, 2010 5:43 PMHi ...Actually i am getting same problem in challan creation.. Did you get any solution? ...
-
Process order creation problem
I am creating a process order . while creating the process order system is throwing error as Auto batch numbering not set up for material type XXXX in plant xxxx . System is not allowing to create process order.
How to resolve the issue.Check in CORW and switch off batch creation to isolate the problem if needed. Also see whether you have any batch managed compoents for which you have set master data for automatic batch determination.
There is no setting for material types and plant for batch. May be the error message is not correct. What is the message number?
Maybe you are looking for
-
Looking for some assistance with my bill
A little back story. December 2009, I purchased/upgraded to Verizon’s new Motorola DROID. Loved the phone, served me well. I had a $59.99 phone plan and the $30 unlimited data plan. In November of 2010, I get an email from Verizon offering a limited
-
How to add a default value in a prompt list?
I have a prompt list that I'm getting from the database, I want to add a deafult value in the top of the list. Ei "ALL", my current list is: "AMERICAS" "EMEA" "ASIA" I want a list like: "ALL" "AMERICAS" "EMEA" "ASIA" This is the code I have: @Select(
-
Rename a set of files in Power Shell
Hello Scripting Guys, I am trying to rename a group of files in a given directory. The files all start with a number and a dash (such as "1 - " or "24 - ") when I first get them. Sometimes there are files that do not start with a number or a dash in
-
Problem in loading dynamic library.
Hi, I am trying to load a DYLIB built using Xcode on MAC OSX in my Eclipse java project. I have used both System.load with obsolete path and System.loadlibrary. But I am getting "AWT EventQueue UnsatisfiedLinkerError" exception. I followed few sugges
-
Tried purchasing gift card on iPad and wasn't able to. Told to contact iTunes support. All credit info correct and viable