Submitting job in background with lock mechanism
Hi,
I'm obtaining a lock before submitting the job and releasing it after submitting...as explained below
I want to know whether the lock will get released immediately after submitting the job or it will be released only after the finish of the job. Can you explain with any documentation if possible...
CALL FUNCTION 'ENQUEUE_EXXXX'
SUBMIT rvv50r10c USING SELECTION-SET w_variant
TO SAP-SPOOL
SPOOL PARAMETERS print_parameters
WITHOUT SPOOL DYNPRO
VIA JOB name NUMBER number
AND RETURN.
CALL FUNCTION 'DEQUEUE_EXXXX'
Hi,
If you are locking any database table object then the lock will be removed only after the call function 'DEQUEUE_EXXXXX".
Regards,
Shahu
Similar Messages
-
Locking Mechanism/Isolation Level with Datastore (Pessimistic) Tr ansactions
What type of locking is Kodo JDO performing in datastore (pessimistic)
transaction mode? Is a TRANSACTION_SERIALIZABLE isolation level being
specified when the connection is obtained or is SELECT FOR UPDATE being
used?
Does the locking mechanism differ across database platforms? I had read
that only shared locks would be used on Microsoft SQL Server.
Also, what is the JDOLOCKX column generated by the schematool used for?
Does it contain a counter or timestamp used during optimistic transactions?
Thanks,
Sasha Haghani.What type of locking is Kodo JDO performing in datastore (pessimistic)
transaction mode? Is a TRANSACTION_SERIALIZABLE isolation level being
specified when the connection is obtained or is SELECT FOR UPDATE being
used?Kodo sticks with the default isolation level of the JDBC driver in use
for transactions, as we've found that many drivers act up when assigned
a level manually.
To lock records during pessimistic transactions, SELECT FOR UPDATE is
used. For the most part, it gives good object-level locking, preventing
concurrent modification, even in applications that span multiple JVMs.
Does the locking mechanism differ across database platforms?The locking differs across databases only in that some DBs do not
support SELECT FOR UPDATE (in which case it is still possible to get
optimistic lock exceptions during pessimistic transactions), some DBs
use a different mechanism (SQLServer has a shared lock construct that is
just as good if not better), and some DBs place restrictions on its use
(Oracle and PostgreSQL cannot lock rows when a SELECT DISTINCT is used).
See the 'known bugs and limitations' appendix of the Kodo user guide for
a detailed listing of locking issues with each databse.
Also, what is the JDOLOCKX column generated by the schematool used for?
Does it contain a counter or timestamp used during optimistic
transactions?The lock column contains a counter to keep track of object versions. As
you suspect, it is used so that during optimistic transactions when no
locking is performed (or during pessimistic transactions on DBs or
queries that can't perform locking), the system is able to detect that
concurrent modification of an object has occurred and throw the proper
exception. This way data integrity is never lost, even without locking.
As an aside, you can always view the SQL generated by Kodo (and by
looking at it get a feel for how the various table columns are used,
etc) by setting a print writer in the
JDBCPersistenceManagerFactory.setLogWriter() method. Kodo will echo all
SQL to the given stream.
Happy coding.
-- Abe White
TechTrader -
Revision: 4746
Author: [email protected]
Date: 2009-01-29 15:36:59 -0800 (Thu, 29 Jan 2009)
Log Message:
User-submitted patch for SDK-16147 - HaloBorder does not take border widths into account when drawing background with rounded corners.
Bugs: SDK-16147 (bug), SDK-16963 (patch)
Ticket Links:
http://bugs.adobe.com/jira/browse/SDK-16147
http://bugs.adobe.com/jira/browse/SDK-16147
http://bugs.adobe.com/jira/browse/SDK-16963
Modified Paths:
flex/sdk/branches/3.x/frameworks/projects/framework/src/mx/skins/halo/HaloBorder.as -
Submitting program in Background - Very Urzent
Hi,
I am currently working in mySAPERP 2005 upgradation project.
Here i am facing a strange situation. I want to submit a SAP standard program SAPMV50S (Delivery due list creation) in my custom program in Background.
I tried below option:
CALL FUNCTION 'JOB_OPEN'
EXPORTING
JOBNAME = JOBNAME
IMPORTING
JOBCOUNT = JOBNUMBER
EXCEPTIONS
CANT_CREATE_JOB = 01
INVALID_JOB_DATA = 02
JOBNAME_MISSING = 03
OTHERS = 99.
IF SY-SUBRC > 0.
<error processing>
ENDIF.
SUBMIT SAPMV50S WITH VSTEL = 'USCQ'
WITH LEDAB = SY-DATUM
TO SAP-SPOOL
SPOOL PARAMETERS print_parameters
WITHOUT SPOOL DYNPRO
USER SY-UNAME
VIA JOB JOBNAME NUMBER JOBNUMBER
AND RETURN.
But program is not submitting in the background.
But same program is working in 4.5 b system, but it is not working in mySAPERP2005.
If anyone faced same kind of situation please help me on this.
Its very very very urzent.
Expecting the reply from you soooon.
Thanks,
Regards
RajRaj,
Debugg the background program .Then you will find the problem
Goto Tcode SM50--->select your process->on menubar Program/Session>program->Debugging
Don't forget to reward if useful.... -
Error while running a job in background
Hi,
I got the following error message while running the job in background.
"Step 001 started .
Control Framework: Fatal error - GUI cannot be reached.
ABAP/4 processor: RAISE_EXCEPTION
Job cancelled"
What is the reason for this error and how to correct it?ALV Grid control is based on the custom controls on the screen. When the program is scheduled in background, it tries to create GUI related front-end objects and hence the error u201CFatal Error u2013 GUI cannot be reachedu201D. This type of problem is common with all the programs that use the ALV grid control to display the output.
Solution:
Whenever we execute this type of programs in background, we should be passing a blank docking container instead of the custom container as parent to our grid control.
The docking container doesnu2019t need any of the custom controls on the screen; instead it attaches an area to any or all of the four edges of the screen (top, left, right or bottom). The behavior of the areas in the container is determined by the sequence in which they are initialized. Docking Containers are attached to the screen from the inside out. This means that when you create a second container, it is attached to the edge of the screen, and the container that was already there is pushed outwards.
Let us modify the standard program (by taking a copy of it) to enable it to execute it in background.
Following modifications have to be made:
· Define a docking container in the program
data: or_doc type ref to cl_gui_docking_container .
· At the time of creating a custom container, check if the program is being executed in background or foreground. If the program is scheduled in background, then create a docking container instead of custom container.
if cl_gui_alv_grid=>offline( ) is initial.
create object or_custom_container
exporting container_name = c_container.
create object or_grid
exporting i_parent = or_custom_container.
else .
create object or_grid
exporting i_parent = or_doc .
endif .
Now test executing the program in background. The report would be generated. -
Hi,
We have a query regarding submission of Jobs in background. If we use JOB_OPEN,JOB_CLOSE in our executable program to submit a job to run this proram with a transaction code and also schedule this job in background using SM36 the what will be the effect?Hi pankaj,
1. If the program only display some data,
and does not update anything,
then nothing will go wrong.
2. Both programs will run independently of each other,
in background.
regards,
amit m. -
Schedule job in background and ftp the data to non-sap system
Hello All,
I have a requirement where in i have to write a program(with selection screen) to download 2 files into application server(frequency: end of each day i.e daily at 23:59), and then in turn i need to put those two files into FTP server using FTP script.
i guess my flow of the code should be
1. write the program with selection screen and
2. get the data from corresponding tables and put it into internal tables.
3. then i have download the data into application server
my question is : how i will schedule the job in background to download the data into application server daily? using job_open, job_submit, job_close?
4. then how i need to move the files from application server to FTP server using FTP SCRIPT?
Also my doubt is once i execute the program ONLY, the background job is triigred (because i wrote job_open, job_submit and job_close inside my program). then how will i input the data into screen daily and download the data into application server in background automatically???? i am confused ...
Please help me to solve the above issues
thanks
sangeetha>
sangeetha s k wrote:
How my data in application server will be transfer to another system using above FM? Because i am not passing application server file path in SAP to that FM. Could you please explain ?
So the path name and the file name are always the same? In that case you could simply create a SM49 entry with hard coded file & path name.
An easy example for the COPY command under WINDOWS OS:
Create a command in SM49 called ZCOPY with following data:
Operating System = Windows NT
OS command: cmd
Parameters for os command: /C copy "C:\tmp\my_file.txt" "z:\tmp\my_file_copy.txt"
Additional parameters allowed: (leave blank)
In this case you would call SXPG_COMMAND_EXECUTE by filling this 2 parameters:
commandname = 'ZCOPY'
operatingsystem = 'Windows NT'
In the case that the file name and the path are not fixed you would set the following in the SM49 definition:
Additional parameters allowed: X
In this case you would call SXPG_COMMAND_EXECUTE by filling this 3 parameters:
commandname = 'ZCOPY'
operatingsystem = 'Windows NT'
additional_parameters = params "<== fill in the path and file name during run time into this variable -
Hi All
I have a program with selection screen. The selection screen has Job name as one of the parameters. When I press F8 (Execute), this program should get scheduled in the background with the job name taken from selection screen. How to submit a program by itself in background.
Please suggest.
Thanks
ShakirHi,
Press F9 from the program itself after entering the selection parameters
Or
Create a selection variant and go to SM36 and give some valid name , program name with variant and save and schedule.
Regards,
Nandha -
Problem in submitting job through Pl/sql
Hi,
I have a procedure with parameters as shown below.
Pkg1.Proc1(indate date, innum1 number, innum2 number)
I am trying to execute this procedure by submitting jobs through another procedure and passing the parameters dynamically. I found the jobs are not getting submitted. Please see the code inside the procedure as below.
dbms_job.submit(var1,'BEGIN pkg1.Proc1(''' || i_date||''','|| i_num1||','||i_num2||'); END;',SYSDATE);
I have tried as following also
dbms_job.submit(var1,'BEGIN pkg1.Proc1(''''' || i_date||''''','|| i_num1||','||i_num2||'); END;',SYSDATE);
both time the procedure is running fine but the job is not seen as submitted.
when I am executing it as follows in sql * plus, it is executing fine.
dbms_job.submit(var1,'BEGIN pkg1.Proc1(''15-aug-2007'',1,2); END;',SYSDATE);
Please let me know if I need to change anything in my code.
Regards,
PouloseHi Pls find the portion below.
process_id is of type number and having value 1001. v_business_dt is a date variable. and i_module is a number with value 1.
DBMS_JOB.ISUBMIT(CF_CRM.process_id,'BEGIN DBK_CRM_PROCESS_TRACKING.RUN_PROC(''' || v_business_dt||''','|| i_module||','||CF_CRM.process_id||'); END;',SYSDATE); -
How to run a job in background programatically after 10 sec
Hi Forum,
Can anyone tell me How to run a job in background programatically after 10 sec..
Thanks in advanceHi,
Here is the example code
*Submit report as job(i.e. in background)
data: jobname like tbtcjob-jobname value
' TRANSFER TRANSLATION'.
data: jobcount like tbtcjob-jobcount,
host like msxxlist-host.
data: begin of starttime.
include structure tbtcstrt.
data: end of starttime.
data: starttimeimmediate like btch0000-char1.
* Job open
call function 'JOB_OPEN'
exporting
delanfrep = ' '
jobgroup = ' '
jobname = jobname
sdlstrtdt = sy-datum " You need to give the Date for execution the Job
sdlstrttm = sy-uzeit " You need to give the Time for execution the Job
importing
jobcount = jobcount
exceptions
cant_create_job = 01
invalid_job_data = 02
jobname_missing = 03.
if sy-subrc ne 0.
"error processing
endif.
* Insert process into job
SUBMIT zreport and return
with p_param1 = 'value'
with p_param2 = 'value'
user sy-uname
via job jobname
number jobcount.
if sy-subrc > 0.
"error processing
endif.
* Close job
starttime-sdlstrtdt = sy-datum + 1.
starttime-sdlstrttm = '220000'.
call function 'JOB_CLOSE'
exporting
event_id = starttime-eventid
event_param = starttime-eventparm
event_periodic = starttime-periodic
jobcount = jobcount
jobname = jobname
laststrtdt = starttime-laststrtdt
laststrttm = starttime-laststrttm
prddays = 1
prdhours = 0
prdmins = 0
prdmonths = 0
prdweeks = 0
sdlstrtdt = starttime-sdlstrtdt
sdlstrttm = starttime-sdlstrttm
strtimmed = starttimeimmediate
targetsystem = host
exceptions
cant_start_immediate = 01
invalid_startdate = 02
jobname_missing = 03
job_close_failed = 04
job_nosteps = 05
job_notex = 06
lock_failed = 07
others = 99.
if sy-subrc eq 0.
"error processing
endif.
Regards
Sudheer -
Locking mechanism provided by the Web AS Java
Hi All,
I have a requirement to lock an object for a specific action
with using locks provided and managed by the Web AS Java (i have to use TableLocking API).
I have read about the locking mechanism in "SAP NetWeaver Developer Studio Documentation help" .
I need code samples (how it can be done).
How i should check data availability (is it locked?)?
Thanks.hi
new features added in WAS7.0 for ABAP stack
1.Webdynpro for ABAP
2.New Enhancement Framework
3.Switch Frame Work
4.Adobe Forms integeration
5.New features added to ABAP Editor.
Also note that MySAP Business Suite is also the part of WAS7.0 release.
For Java stack new features have been added to Netweaver Developer Studio,EP and KM areas.Also BI-Java is also the part of WAS7.0 Release.
Cheers,
Abdul Hakim
Mark all useful answers.. -
How to change white background with text to transparent background
Good afternoon,
I have a jpg file (part of our logo) white background with black text and I would like to change it to transparent background and keep the black text (to be able to insert it on a cup image).
I tried to change it in photoshop, however, when I slide the "opacity" and "fill", the text got ligther as well.
Do I need to have the original psd.file to be able to do that, or can you please lead me through with jpg file? (I tried to save the jpg to psd and png, but it did not help.)
I looked on one of your videos, but I could not find one of the features under "Select" tab.
My plan is to recreate the text to have the transparent background if necessary (It would be great if I can avoid that). However, how do I find out which font was originaly used? Does photoshop has this feature, or do I need to go trough each of the font one-by-one?
My last question is, how do I change space between letters (to have them more tight. I am not able to find it.
Thank you for your help,
KlaraIf you can get teh original PSD file get it, your task will be a lot easier.
I suspect that won't be an option to you.
If you know what fonts are being used, that also would be of benefit to you. In other word remake it using your image as a template.
If it going over an image, then a multiply blend might work for you.
All that fails then you are down to removing the white background. The problem this option is it will not look as good due to the thin lines on the fonts. But essentially, Load the image into photoshop, make sure the layer isnt locked, then try the magic eraser tool on the white background, bam it'll disappear, but leave the white inside the O white you will have to do seperately.
Messing with levels will help you with more of the white. Myself i'd rebuild it using the fonts. -
[abap] Running job in background
Hi !
When I am running a job in background using the functions :
'JOB_OPEN','JOB_SUBMIT','JOB_CLOSE'.
Eventually the job is in finished status, however
I get the following error popup message :
" classification locked (user username)
you cannot classify the batch
because the batch class is
currently being processed.
Do you want to try to carry out the
classification again ?
Please tell me what's the problem, and how to correct the problem ?.
Thanks
mosheMost likely you try to change data which is locked by another user to the same time in some cases - depending on what you were doing the locks are created by the same job in a previous step. In both cases there is only one scenario that works - check, resp. wait until the locks are released.
Christian -
Delivery in background with respect to SO number
Hi experts,
Anyone kindly help me for the following case...
In my workflow scenario, If sales order gets created, mail has to be sent to every user. Also for that sales order, delivery should be created in background and again mail has to be sent to all users...
I m clear with sending mail. but i m struggled while creating delivery in background. i dont know how to do this. I hav an idea that it can be created using BDC recording and this recording program can be called in our method which is created in our business object.
How to create a single BDC recording to create sales order as well as creating delivery in background... Is it possible to do like this. Or is there any function module to create delivery in background with respect to sales order number?
kindly give some suggestion and step by step procedure to do this...
Thanks in advance...
Regards
Raaams...Dear Raams,
You can create delivery background automatically by maintaing Batch Jobs.
The process of creating Batch Jobs:
1.Tcode: SM36 for define background job/batch job
enter job name, job class & click enter
enter ABAP program name, varient name(optional)
finally, u get message as batch job released
2. Tcode: SM37 for simple job selection
goto job log to check batch jobs are running or not(status)
3. Tcode: SA38 for creation of varients
If you have any concerns revert back the same
Regards
Amjath -
Downloading the file in our PC , when running the job in Background
Hi,
We have an enquiry for below requirment.
Our client runs some jobs in front end , but as the time taken to execute the JOB is more than 15 minutes , he is getting timeout problem, so we want to run the same program in background.
Generally the output of the report is to download the file into his desktop, so even when he is running
the same job in background he want it to be downloaded into his PC, instead of application servor.
We created a test program similar to the requirment, and ran the job in foreground and the file could easily be downloaded to desktop. Then we ran the program in backgound - The job failed with an error message Codepage could not be determined - Message no. FES025.
My Question is - is it possible to download the file into the desktop while running in background.
Please help me .
Thanks in advance.
Vengal Rao.Please search the forum. This question has been asked and answered many times before.
Rob
Maybe you are looking for
-
J2I9 program J_1I57AE Proforma Register ecs and sh ecs required
Hi All, I have a requirement to display the opening and closing balnace of ECS and SH ECS along with the opening and closing CENVAT balances for input and capital goods. Can anyone tell me what logic can be used to get ECS and SH ECS. As per my under
-
Manual posting for returnable packaging ( RL11)
Hi Iam supplier of OEM I have created returnable packaging account with following details Location - My plant Exchange partne - OEM (sold to party) In relationship -- Main -- Type plant Location plant number / Exchange partner---- type customer - so
-
How to handle event structures for two buttons and two counters.
*I have two buttons A and B, and have to compare the difference in hits between them. So do I place an event structure within a while loop for each button (2 buttons, 2 event structures, 2 while loops), or does it need to be one event structure
-
Acrobat Pro 9 crashes when OCR more than 50 pages
Can someone tell me why Acrobat Pro 9 would crash on page 50 of large docs?
-
I'm using a Flash slideshow on a Dreamweaver site (CS3) with six slide images (see code below). The first three images have a link to Adobe - not intended. I have not been able to remove the links. Is it possible that somehow the jpeg images themse