Parallel batch jobs from ABAP
Hi all -
Any good suggestions regarding the simplest way to submit and track parallel batch jobs from ABAP? I have used the function modules in function group BTCH (E.g. BP_JOB_CREATE, etc.) in the past with good results but are there any more current and simpler approaches (E.g. class based)? Running WAS 7.0 / ECC 6.0.
Thanks,
Pat
This may not be the right forum for such a query. Post the query on the Managing oracle Applications forums.
I am not aware of the GL jobs, but if a concurrent program is not uncompatible with itself, there is no problem running multiple jobs at the same time.
Thanks
Similar Messages
-
Hi,
I am currently working in project where we need to migrate/point batch jobs to SQL server 2005. At this moment they are pointing to Sybase. Batch jobs are in .bat and .exe format. These jobs read in an external file, does some reformatting,
and then loads it into 2 sybase tables. These jobs are auto scheduled through Control-M application.
Any idea please ?
Thanks,
Chirag PatelChange your post to type 'Question' Chirag
You would need to at least change the connection strings, and how you access SQL Server, but typically code changes are necessary.
You unfortunately don't provide enough details. But it is not as trivial to just 'point' a bunch of jobs to a new target.
Arthur My Blog -
Call batch program from ABAP program
hai guys,
I have created one batch file in WINDOWS NT.
Now i want to call this file from my ABAP program.
How can i do this..is there any FM here..pls let me know.
ambichan.Hi ambichan,
To execute a program on the application server, it really is best if you create an external command (using SM69).
Here is an example call of the program:
* call executable
CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
EXPORTING
COMMANDNAME = command " Your external program
ADDITIONAL_PARAMETERS = param " Your parameters
OPERATINGSYSTEM = 'WINDOWS NT'
* TARGETSYSTEM = sy-host
* DESTINATION = destination
* STDOUT = 'X'
* STDERR = 'X'
* TERMINATIONWAIT = 'X'
* TRACE =
IMPORTING
STATUS = status
EXITCODE = exitcode
TABLES
EXEC_PROTOCOL = exec_protocol
EXCEPTIONS
NO_PERMISSION = x_no_permission
COMMAND_NOT_FOUND = x_command_not_found
PARAMETERS_TOO_LONG = x_parameters_too_long
SECURITY_RISK = x_security_risk
WRONG_CHECK_CALL_INTERFACE = x_wrong_check_call_interface
PROGRAM_START_ERROR = x_program_start_error
PROGRAM_TERMINATION_ERROR = x_program_termination_error
X_ERROR = x_x_error
PARAMETER_EXPECTED = x_parameter_expected
TOO_MANY_PARAMETERS = x_too_many_parameters
ILLEGAL_COMMAND = x_illegal_command
WRONG_ASYNCHRONOUS_PARAMETERS = x_wrong_async_parameters
CANT_ENQ_TBTCO_ENTRY = x_cant_enq_tbtco_entry
JOBCOUNT_GENERATION_ERROR = x_jobcount_generation_error
OTHERS = x_others.
if sy-subrc <> 0 or exitcode <> 0.
* error dialog only, if caller is a dialog user
if sy-batch is initial.
call function 'DB6_SHOW_SXPG_ERROR'
exporting
command = 'DB6CLP'
parameters = param
server = sy-host
return_code = sy-subrc
exitcode = exitcode
tables
exec_protocol = exec_protocol.
endif.
endif.
With this code, if the user is in dialog mode the output from the external command is displayed to them. Otherwise, you can do what you want with the EXEC_PROTOCOL table which contains the output from the external program.
Hope that helps.
Cheers,
Brad -
BODI XI R2: downgrade batch job from 11.5.x to 11.0.x
Situation:
Job with similar required functionality is in a repository with version 11.5.x
Same functionality is required in a different project with repository version 11.0.x
Technical build, political reasons and split in organisation divisions prevents from using the 11.5.x repository. Upgrading to the newest environment (11.7.3.x) is not possible as not all jobs are signed off.
Due to the complexity of the job it is not really preferred to manually recreate the job in the 11.0.x environment. Estimate is at least 3 build days and the risk at mistakes.
Preferred is the same trick as upgrading jobs in a repository, but now to downgrade. But that seems not possible.
Any clues if there is a possibility to do this?Kick.
As we progress we are going to recreate the interface in the 11.0.x environment.
I have not found any resolution to downgrading BODI code.
ATL files do have the version number listed, but also the content of the ATL file is different between the versions. -
We have a need of using customer and vendors created in abap and each customer (approx 70K) and vendors (around 30k) will have corresponding users. Requirement is once the users are created in backend they want to provision those users to corresponding portal and cFolders/cProjects within very short time. But in dev when we did initial load it takes almost 25 mins for 10k users which will not meet customer requirements in production as it might take too long to do the job with 80k to 100 k users. What is the best way to optimize my update job so users can be provisioned in less then half hour to corresponding systems. (Remember we are not creating users in IdM, But creating users in ABAP first and then IdM is picking up to provision it to corresponding system). Secondly depending on the roles they have in backend we have to assing those users in corresponding roles in portal and cFolders/cProjects.
What is the best way to do this ? ThanksAmar,
Here are two other useful threads related to coding in Proxies (in OO context):
Re: In a server proxy how can I use a INCLUDE STRUCTURE?
Re: Problem with a method.
Cheers,
Bhanu -
ABAP query to schedule through batch job
Hi
i have requirement to schedule batch job for ABAP query report and download the report data to local drive throuh batch job.
we have created ABAP query report, and this report should run through batch job and download the report data to local drive,,
please help, how we can solve this.
Regards
VanrajHi Vanraj,
I have two topics to talk about:
1st: in order to schedule a background job, try to do the following:
- Go to transaction SQ01 and select your query
- Check that you've already created a variant, containing the required selection data.
- Instead of running in online, go to "Query > Execute > Exec.in background"
- This will allow you to schedule the background job.
2nd: it is NOT possible for a background job to download a file to a local PC.
I hope it helps.
Kind regards,
Alvaro -
How to create a batch-job dynamically?
Hello,
I would like to create a batch-job from within my abap code.
Therefore I want to determine a abap-report to be executed every X-Hours.
Do you have some sample code for creating a batch job?
I need to do it in abap because I want to create a TN to trigger the code creating the job.
So the user interaction will be minimal to start a periodic batch job.
thanks.Hi Daniel,
select options could be stored by export/import to/from database:
DESCRIBE TABLE t_vkpos LINES n.
READ TABLE t_vkpos INDEX n.
lastmaxvbeln = t_vkpos-vbeln.
PERFORM get_varimemkey USING p_vari CHANGING vkposmemkey.
EXPORT lastmaxvbeln TO DATABASE indx(zk) ID vkposmemkey.
IF NOT sy-subrc IS INITIAL.
PERFORM get_varimemkey USING p_vari CHANGING vkposmemkey.
IMPORT lastmaxvbeln FROM DATABASE indx(zk) ID vkposmemkey.
IF sy-subrc IS INITIAL.
ls_vbeln-sign = 'I'.
ls_vbeln-option = 'GT'.
ls_vbeln-low = lastmaxvbeln.
APPEND ls_vbeln.
ENDIF
FORM get_varimemkey USING vari TYPE raldb_vari
CHANGING memkey TYPE char22.
IF vari IS INITIAL.
RAISE get_varimemkey_unexepected.
ENDIF.
CONCATENATE 'Z_VKPOS_' vari INTO memkey.
ENDFORM. "
regards
Walter Habich -
Batch job for shipment and shipment cost doc
Dear all,
In case of our client, shipment docs and shipement cost docs are created using a batch job. There are some documents that have not been processed with this batch jobs as expected. Now i want to analyse the job log for thosse failures. For this i want to know the batch job names which i am unaware of. In SM37 i am unable to trace in a generic way.
I know that we can filter batch jobs using ABAP Prog. My question is that which programs have to be used here. are these RV56TRGN for shipment docs and RV56TRSL fir shipment cost docs?? Plz help as the issue needs serious attention ffom my side. also suggest how further i have to rectify this issue.
Regds,
RaghuHello,
The ABAP programs you have mentioned are correct and you can enter these in SM37 to check the job names, status etc.
RV56TRGN - creating shipment docs
RV56TRSL - Shipment costs
Check the spool for messages which will have the error docs.
Cheers ! -
Hi Abappers,
I have a peculiar scenario.
My report has 2 PERFORMS lets say
PERFORM1:
PERFORM2:
I have a DATE criterion in PERFORM 1.
Based on that date only I have to execute my PERFORM2.
Ex: The Date consideration is Suspension of a Contract Date: which is 01/12/2010.(dd/mm/yyyy)
Now based on the this date I have to execute the 2nd PERFORM.
I mean I have to create a Sales Order on this date only.
To summarize,Execution of a program in a future date whose date is dynamic in nature
Can i achieve this using a BATCH JOB.
Please tell me how to schedule a BATCH JOB for a future date.
Can i call a BATCH JOB froma REPORT.
Please your inputs shall be of great help to me in solving my problem.
Thanks and Regards
Srikanth.PHi Sakshi,
In that case of using the FM
g_date is sy-datum.
g_time is sy-uzeit.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
* DELANFREP = ' '
* JOBGROUP = ' '
JOBNAME = 'Z_BATCHJOB_TRGT'
SDLSTRTDT = g_date
SDLSTRTTM = g_time.
* JOBCLASS =
* IMPORTING
* JOBCOUNT =
* CHANGING
* RET =
* EXCEPTIONS
* CANT_CREATE_JOB = 1
* INVALID_JOB_DATA = 2
* JOBNAME_MISSING = 3
* OTHERS = 4
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
In the above case how would the Job name get mapped to the Report. / Or / How can we assign the Job Name to the Report.
There is no scope of giving the Report name in the FM.
Can you please elucidate.(EXP parameters)
By the way Thanks for your quick response.
Thanks and Regards
Srikanth -
Scheduled Batch jobs error : ora-01031 insufficient privileges
I have created a batch job that runs my database backups on a windows 2000 server. This job works perfect from the command line with the following syntax:
coldbackup.bat PROD
I have tried to schedule this backup to run every evening as follows:
at 01:00 /every:M,T,W,Th,F,S C:\coldbackup.bat PROD
The batch job does run every morning but generates an error when trying to shutdown the database. The error is ora-01031 insufficient privileges and seems to be related to the 'connect / as sysdba' command. The job has been scheduled using the local 'Administrator' user, which have been added to the ORA_DBA group.
I have thought of one solution and that entails hard-coding the username and password into the script, but that creates a security risk.
Can someone explain this behaviour and possible provide a good solution.
Thank youSolution: Yes, I have found the solution to my problem.
I was trying to schedule the batch job from the command line and in doing so the job was running in a 'system' user.
When I scheduled the job from the control panel --> schedule tasks I was able to enter the 'run as' username and password. -
Is there a way to access ABAP OO instances from a batch job report
Hello,
I am looking for a way to access ABAP OO instances from a batch job report. My circumstances are the following:
I have got some ABAP OO coding that identifies other objects (class instances) that have to be processed (they have a DoIt method that does some calculation). As this processing is time consuming and performace relevant I have to parallelize this in batch jobs. This batch jobs however can only be "simple" ABAP reports according to SM36. The problem is now that I dont really know how to tell the batch job report what objects to process. Somehow I have to access theses instances from that batch job report.
Does anybody have an idea?
Greetings
MatthiasHi David,
thanks a lot for your help. After a lot of searching on the net this seems to be the only way to cope with it. However I am not sure about the locking mechanisms and if its suitable for mass data processing. In the help page you suggested the following is stated which I do not fully understand::
"The current lock logic does not enable you to set specific locks for the following requirements:
· Many parallel read and write accesses
· Frequent write accesses
· Division into changeable and non-changeable areas
Although the lock logic makes the first two points technically possible, they are not practical because most accesses would be rejected."
Does this mean
a) if I dont want to set "specific locks" for frequent write accessess I am fine
or
b) I am discouraged from use shared memory technics for frequent write accessess?
In the latter case I will have a problem...
What do you think?
Greets
Matthias -
Automatically output report to excel from a batch job
We have business users who require that a standard report be run daily as a batch job and output to a printer, which is using a large pile of paper every day. I have challenged the rationale for this without success, and am trying to find a way to continue to run the batch job but output the report to an excel file and e-mail it to a manager. I know that this can be done by a good ABAP programmer, but I am trying to find a way to set up the batch job to do this without additional ABAP, as programming resources are very limited. I would appreciate input from anybody who knows how to do this.
Likely because your user is continuing to call the service in a Windows (classic) DOMAIN\username format, and not in the Claims identity it should be.
Trevor Seward
Follow or contact me at...
  
This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs. -
How to set a Executable ABAP Program to run as a Background Batch Job
Hi
Currently I had a Executable ABAP Program which when executed prompts for user to enter selection once entered and executed it will delete user entered selections from a Table.
Now my requirment is to enhance that program to run it as a BACKGROUND BATCH JOB so that there will be an entry in SM37 when the program is executed
How can i achieve thisHi,
Please refer this link .
It has the steps.
http://sapient.wordpress.com/2007/06/19/how-do-you-set-up-background-jobs-in-sap/
Regards,
SuryaD. -
How to run a ABAP Program in Batch JOB
How to run a ABAP Program in Batch JOB ?
Hello Manish,
Using transaction SM36 you can define the batch job along with the start conditions for that job.
1. Transaction SM36.
2. Give the Z name of the job in the 'Job Name' input field.
3. Click on 'Steps' button from the application toolbar.
4. On the 'Create Step 1' dialog box, give the name of the ABAP program in the 'ABAP Program' section' along with the variant.
5. Click on 'Check Input' button from the dialog box.
6. Click on 'Save' button from the dialog box once the check is successful.
7. One list will be shown. Click on Back button from the standard toolbar.
8. Click on 'Start Conditions' button from the application toolbar. Specify the start condition e.g. immediate. Click on save.
9. The job staus is now scheduled.
10.Click on Save button from the standard toolbar of SM36. The job status will be released.
Using SM37 you can monitor the status of the job.
This will sort out your problem.
PS If the answer solves your query, plz reward points.
Regards -
Printing to the wrong Printer from the Batch Job
Hi,
Morning every one!
I am facing a problem with Print which is coming from Batch Job. The Batch job contains 10 steps. Previously all steps out put has configured to one printer. Recently I changed one step out put to the another printer with the request. But the print is going to the old printer still.
When I am checking at the batch job -> Steps -> Specific step ->Print Specifications -> Output Device .. able to see New Printer.
But batch job -> Steps-> Select Specific step -> Spool -> Doble click .. There spool is going to the old printer. I am facing this problem for only one step.
The issue is dragging from past one week.. I tried couple of options..No luck
I appreciate any inputs/Solution for this.
Env: ECC5.0/Solaris/Oracle
Thanks,
Sri.I got the solution finally from ABAP team. The printer is maintained in the Condition records of the Variant for the particular step. Even though I assigned the printer in Batch job..It is taking the printer from Condition record.
Thanks,
Sri.
Maybe you are looking for
-
Multiple Discovery Systems on the same network
Is anybody successfully running more than one DS on the same network? We have edited the hostname of the DS but their still seems to be a conflict between the two servers and the SID names cannot be the same as well.
-
V6 quiz report LMS as completed after 3 failed attempts
I have a pure quiz in captivate 6 that allows the learner to take it 3 times only eg Attempt 1 = fail = report LMS incomplete Attempt 2 = fail = report LMS incomplete Attempt 3 = fail = report LMS incomplete What i need is not logical but......... I
-
Dear All, My Nokia N79 is 2 months old now. Since the last two days i have been facing a weird problem with it. even with my Bluetooth turned on and phone visibility set to Shown to all, My N79 does not get detected by either my PC nor by any other
-
What is the best books for MCSA 2012
pleas can you advice me what are the best books and materials for pass MCSA 2012? thank you.
-
ITunes won't add folder or file(s) to library.
Okay, well this started off when an album in my library wouldn't play. I clicked on the songs in the album and none of them would play. So, I deleted the album. I went to File>Add Folder to Library... selected the folder that had the album, (Files an