Problem in creating Batch job for programs in different servers.
Hi All,
I have a requirement like i have 2 different programs ( PRG1,PRG2 ) running in 3 different SAP servers (SER1,SER2,SER3).
I want to create a batch job for the programs.
Here When I run the PRG1 in Server SER1,it will create a file1 in SER1 as well as the other 2 servers (SER2 and SER3).
It just create a file and there is no content in the file.Once i start writing records to file1in SER1,the same record will be started writing in SER2 and SER3.This is using PRG1.
Once PRG1 will complete writing records in file,Next PRG2 will run in SER2 using file created by PRG1.
I want to create a batch job for PRG1.
How to trigger the PRG2 after completing job1 for PRG1 without any manual interaction.
Please help me for this.
Hi Ambili
You can set steps in these jobs in transaction SM36.
You can define that Job 2 starts after Job1 complete sucessfully and same game for other jobs.
Please, check attachment for detailed information about that
Kind regards
Edited by: Carlos Machado on May 27, 2010 6:01 PM
Similar Messages
-
Is it possible to create a batch job for program RPRCCC00
Dear All,
I want to create a schedul batch job for program RPRCCC00. Have you come across with this scenario.
Thanks in advance
Regards
ShanuHi,
Yes, you can create a batch job of the program RPRCCC00.
Using SM36 transaction, you can create a batch job.
Hope this helps.
Thanks,
Prashanth -
Problems creating background job for program (job open, submit and close)
Hi gurus,
im trying to start a background job using the FM BP_START_DATE_EDITOR to show the start date to the job or if it's imediate. this FM it's working fine, after call it im opening a job, submiting it and call the job close FM and the job close FM creates me the job.
The problem it's when i go to the sm37 to see the job status the job has been canceled, and the job log says that i have to give a start date to the job.
What i dont understand it's either the job is imediate or i choose a date to start the job always gives me this error...
Below goes my code,
any ideas will be rewarded
CLEAR: stdt_modify_type, stdt_output.
CALL FUNCTION 'BP_START_DATE_EDITOR'
EXPORTING
stdt_dialog = 'Y'
stdt_input = stdt_input
stdt_opcode = 14
IMPORTING
stdt_modify_type = stdt_modify_type
stdt_output = stdt_output
EXCEPTIONS
fcal_id_not_defined = 1
incomplete_last_startdate = 2
incomplete_startdate = 3
invalid_dialog_type = 4
invalid_eventid = 5
invalid_opcode = 6
invalid_opmode_name = 7
invalid_periodbehaviour = 8
invalid_predecessor_jobname = 9
last_startdate_in_the_past = 10
no_period_data_given = 11
no_startdate_given = 12
period_and_predjob_no_way = 13
period_too_small_for_limit = 14
predecessor_jobname_not_unique = 15
startdate_interval_too_large = 16
startdate_in_the_past = 17
startdate_is_a_holiday = 18
startdate_out_of_fcal_range = 19
stdt_before_holiday_in_past = 20
unknown_fcal_error_occured = 21
no_workday_nr_given = 22
invalid_workday_countdir = 23
invalid_workday_nr = 24
notbefore_stdt_missing = 25
workday_starttime_missing = 26
no_eventid_given = 27
OTHERS = 28.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
MOVE 'X' TO gv_flag.
ENDIF.
DATA jobname LIKE tbtcjob-jobname.
DATA jobcount LIKE tbtcjob-jobcount.
DATA job_release LIKE btch0000-char1.
DATA job_imediate TYPE c.
CLEAR: jobname, jobcount, job_release.
CONCATENATE 'MAPAEXEC' sy-uname sy-datum
INTO jobname SEPARATED BY space.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = jobname
IMPORTING
jobcount = jobcount
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE i003(zmapas).
EXIT.
ENDIF.
SUBMIT z_mapa_execucao_orcamental
VIA JOB jobname NUMBER jobcount
WITH ano EQ ano
WITH so_perio IN so_perio
WITH so_date IN so_date
WITH so_org EQ so_org
WITH so_num IN so_num
AND RETURN.
IF stdt_output-startdttyp EQ 'I'.
CLEAR job_imediate.
job_imediate = 'X'.
ENDIF.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
calendar_id = stdt_output-calendarid
event_id = stdt_output-eventid
event_param = stdt_output-eventparm
event_periodic = stdt_output-periodic "?
jobcount = jobcount
jobname = jobname
laststrtdt = stdt_output-laststrtdt
laststrttm = stdt_output-laststrttm
prddays = stdt_output-prddays "??
prdhours = stdt_output-prdhours "?
prdmins = stdt_output-prdmins "??
prdmonths = stdt_output-prdmonths
prdweeks = stdt_output-prdweeks "?
predjob_checkstat = stdt_output-checkstat
pred_jobcount = stdt_output-predjobcnt
pred_jobname = stdt_output-predjob
sdlstrtdt = stdt_output-sdlstrtdt
sdlstrttm = stdt_output-sdlstrttm
strtimmed = job_imediate
targetsystem = stdt_output-instname
start_on_workday_not_before = stdt_output-notbefore
start_on_workday_nr = stdt_output-wdayno
workday_count_direction = stdt_output-wdaycdir
IMPORTING
job_was_released = job_release
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 i003(zmapas).
EXIT.
ELSE.
MESSAGE i004(zmapas) WITH jobname.
ENDIF.
Thanks in advance,
Best Regards
João MartinsHello João.
In debug mode, check the value of variables you passed to parameters sdlstrtdt and sdlstrttm.
As aditional info, I usually achieve your goal without FM BP_START_DATE_EDITOR.
Check this code:
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = w_jobname
IMPORTING
jobcount = w_jobcount
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
CHECK sy-subrc = 0.
CLEAR seltab_wa.
MOVE: t_jobs-param TO seltab_wa-selname,
t_processar-line+34 TO seltab_wa-low.
APPEND seltab_wa TO seltab.
seltab_wa-selname = 'P_LOJA'.
seltab_wa-low = t_processar-ficheiro+7(4).
APPEND seltab_wa TO seltab.
*** Submete o programa para o JOB
SUBMIT (t_jobs-repid)
WITH SELECTION-TABLE seltab
USER sy-uname
VIA JOB w_jobname NUMBER w_jobcount
AND RETURN.
*** Encerra o JOB
l_hora = sy-uzeit.
ADD 60 TO l_hora.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = w_jobcount
jobname = w_jobname
sdlstrtdt = sy-datum
sdlstrttm = l_hora
targetserver = w_servidor
IMPORTING
job_was_released = l_liberado
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.
Regards.
Valter Oliveira. -
Help needed in creating a batch job for delivery
Hi gurus
Can somebody tell me the process of creating a batch job ..for creation of delivery.. is this the same process to create the batch jobs for invoices also?
thankyou
bjhello jaya ,gsl
thankyou very much for ur help .. I have tried creating a variant .. in vl10batch.. and ive assigned it a scheduled time .. i craeted a open order.. and when the scheduled time has arrived and is over,i went to the order and still i dont see any delivery doc created .. and in sm37 its shows that the job is finished ..i even tried sm36 .. of creating a job for the variant.that ive craeted in vl10batch .and then assigning the job in sm37.. i can see the job that ive created in sm37 it is changing its status from released to finished .. as per the scheduled time but the delivery is not created .. i tried vf06 for a billing variant.. and went to sm36 craeted a job for the variant..using the program name.. and next to sm37 i can see the created job in the spool also..but somehow it is not creating the billing doc also..
can u help me to find where it actually went wrong with me ?
thanksalot in advance.. -
How to create batch job via a program
hi
i need to know how to create batch job via a program please suggest
aroraWow!
> Total Questions: 234 (138 unresolved)
...and now you ask this?
Please accept our apologies for not pointing out to you way-back-when already that there is a search functionality here at SDN and that the correct forum should be used to post questions to.
Please read "the rules" at the top of the forum page, and search first => ask questions later.
I take the liberty of closing your question for you.
Kind regards,
Julius -
How to create Background job for Dialog program
Hi Experts,
I have copied Standard tcode to Z-tcode (CS12 tcode).
Now my requirement is to create background job for this program (but program is not a 'E' type its 'I').
How we can schedule Dialog program to Background.
Pls suggest me.
Regards
SKHi do as below :
Reefer below :
Bakcground Job Creation
You will have to submit your report using Submit statement ,
then inside the submitted report write open_job.
Regards,
Uma -
Email Address not visible for output device MAIL in created batch job
Issue in ECC6.0: Email Address not visible to display/change for output device MAIL in print parameter of each step in the created batch job.
User wants to periodically receive report file via send to his email, so I create the batch job running report and send the report in pdf file to his email.
Detail in the batch job
1) In print parameter screen of the step in the batch job
-Using output device MAIL (output type ZPDF1)
-inputting email address of receiver in the EMAIL ADDRESS field
2) After the batch job was saved, I tried to display/change the field EMAIL ADDRESS via Tx. SM37, but this field is invisible. The field can not be displayed or changed anymore. I also tried in SM36, but it is for creating new batch job, not changing the existing batch job.
4) User receives email with pdf file from the batch job.
How to change/display the email address of the receiver in the created batch job?
Note that we just changed to use SAP ECC6 from SAP 4.6c. In SAP 4.6c, we can change/display the
Email Address Field via Tx. SM37.
Pls kindly suggest, thank you very much in advance.Hi Srirompoti,
After saving the job if the job has not started then you can follow the below steps to change the Email address.
1. View the job from Txn SM37.
2. check the check box for your job that you want to change and goto menu path "Job->change
3. in the next screen goto "Edit->steps." or press "F6" key
4. place the coursor on the job and goto menu path "Step->change->print specifications.
5. here you can change the email address.
If you are not able change the data then you might not have authorization. -
Hello,
I need to create a batch job, which is having round about 90--100 steps, so is there any tool, by which i can create this quickly?
Please help me, this is little urgent.
Thanks,
Anand.Hi anand,
CATT/ECATT is the best tool for creating batch jobs.
For more information on how to use these tools, go through the below links.
http://www.*********************/tutorials/secat.htm
http://www.*********************/tutorials/scat.htm
Regards,
Bharath -
How to create a batch job for transaction SM13 or SM37
How to create a batch job for transaction SM13 or SM37?
I want to create a batch job for t-code SM13/SM37, the jobs will send a email to my inbox when the errors occurred in SM13/SM37.
How to do this? thanks in advance.Hi,
Check the link:
http://www.sdn.sap.com/irj/sdn/index?rid=/webcontent/uuid/30237989-0901-0010-70a4-944691eb5e52 [original link is broken]
Make sure the CCMS agent installation is in place as per the Monitoring setup guide.
Follow the link Central auto reactions for configuring alert mails.
Regards,
Srikishan -
Error in background job for program RSGET_SMSY error message No active job
Hello!
I would like to set up the Change Request Management functionality in SAP Solution Manager.
The only red warning by executing Test-button in Tcode SOLAR_ADMIN_PROJECT is:
<b>Error in background job for program RSGET_SMSY error message No active job found</b>
Can someone please tell me how to solve this problem?
(tcodes, technical steps)
Thank you very much!
regards
ThomThank you very much!
Can you also help me with the warning "Errors occurred during synchronization of the system landscape" in tcode SOLAR_PROJECT_ADMIN" --> System landscape --> Change requests --> "Refresh"?
The second issue I cannot see any projects in Tcode "/TMWFLOW/CMSCONF"
according to the SPRO-step "Set Project Assignment of Requests as Mandatory"
Thank you!
regards -
Set a batch job for LP21 transaction
How to set up a batch job for LP21 transaction.
first you call LP21.
enter your selection criteria
click save button
give name and a description for the variant and save.
leave LP21
call SM36
enter a job name e.g. "MY Replenishment run"
click start conditons button
click date/time button
enter a date and a time when the job shall run
click button for periodic value
click daily
click save
click save
now your back at define job
click step button
enter a user that has the rights to run this job (maybe your own user id, maybe a functional user id)
enter the ABAP name e.g. RLLNACH1
enter the variant name of the variant you created earlier in LP21 (you can use F4 to find it)
enter language
SAVE
now you are in the step list overview.
you can leave this screen
back on the job definition just click the SAVE button
thats all -
Creating a job for a procedure with an input parameter
Hi,
I want to create a job for a procedure ( sp_proc ) with a input parameter.
The input parameter is a date value.
As per the syntax for dbms_job.submit procedure;
dbms_job.submit (
job IN BINARY_INTEGER,
what IN VARCHAR2,
next_date IN DATE,
interval IN VARCHAR2 DEFAULT 'NULL',
no_parse IN BOOLEAN DEFAULT FALSE);
How should the procedure be declared in the 'what' parameter of the dbms_job.submit procedure ?
Please guide.
Thanks.Hi,
You are wright, I have found this thread [DBMS_JOB -- how to pass parameters to the job|http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:351033761220].
Regards, -
Creating a Job for publication in Sql Server with select statement for passing a parameter
I am creating a job for adding article to a publication. the second step (e.g. for adding article) gives me error. I pass the name of the table as follow:
EXEC sp_addarticle
@publication = 'TTB', --THE NAME OF MY PUBLICATION
'select top (1)' @article = 'Name from TableAdded Order by create_date Desc',
'select top (1)' @source_object = 'Name from TableAdded Order by create_date Desc',
@force_invalidate_snapshot = 1;
TableAdded is a table I have in my publisher which contains the name of the newly added table.
I believe it fails because the way I pass the name of the article to the store procedure is not correct. Can anyone please help me on that?
Kind regards
AminYes, the way you add article is wrong.
you may try the below and let us know if you have any issues:
while loop begin (Get the values from TableAdded with status IsAdded=0)
Assign the values to variables like @article = Select top 1 Name from TableAdded where IsAdded=0
Call the sp_addarticle assigning the variable
update the Isadded flag in tableAdded for the name to 1
end while
BTB, Article configuration is supposed to be a one time configuration. Having said, you can easily configure through API. Caution, not sure what are you trying here, for adding new article, you may need to synch the data first in the above approach and should
carried out in the downtime. -
Problem in creating new versions for existing DIR using CV01N
I am working in SAP ERP 6.0 EHP 4.0 system.
I have problem in creating new versions for existing DIR using CV01N
I create a DIR version 00 with functional location and mpd cycles. Then when i try to create a new version by copying the contents created from already created document.I change the MPD cycles in the new version and save it.
once when i display the first document created the mpdcycle specified in version 01 is copied to the 00 version.
The document is inconsistent where versioning of document doesnot work properly wrt MPDCYCLE and MP HEADER.
The problem which i found was the document identification guid remains the same for all the document versions getting created.
The same is working fine in SAP ERP6.0 EHP3.0 sytem.
Please someone help me in resolving the above issue.
Regards,
Prasad.BThere is a change in the standard code.The reason for the above problem was because of a missing Enhancemnet point in a standard function module 'CV110_DOC_CREATE_WITH_TEMPLATE'.
IS-ADEC-MPD - Enhancement to copy MPD data
ENHANCEMENT-POINT CV110_DOC_CREATE_WTEMPL_01 SPOTS ES_SAPLCV110.
+*$*$-Start: CV110_DOC_CREATE_WTEMPL_01----------------------------------------------------------$*$*+
+**ENHANCEMENT 1 ZSF_AD_MPD_SAPLCV110. "active version**+
+*** copy MPD relevant data from templ. doc to current doc**+
+**CALL FUNCTION 'MPD02_COPY_MPD_DATA'**+
+**EXPORTING**+
+**is_draw = ls_draw**+
+**TABLES**+
+**ct_drad = lt_drad.**+
+*ENDENHANCEMENT.**$*$-End: CV110_DOC_CREATE_WTEMPL_01----------------------------------------------------------$*$*+
Created a custom enhancement point similar to SAP ECC6.0 EHP 3.0 system.
The reason was the buffer was not getting cleared previously.After inserting the above code the DIR's are getting created withot any issues.
Regards,
Prasad.B -
Batch job for IDOC processing in 64 status
Hi experts ,
i want to know the name of Batch job for IDOC processing in 64 status.
I have configured the partner profiles as 'process immediatly'.
So with this configuration whenever an idoc comes in production it gets processed immediatly and automatically.
i want to know how they are getting processed automatically.
is there any job which looks for these idocs(in 64 status and process immediatly flag) and process it.
What is the trigger for thiese idocs processing???
Please guide me
thanks in advance
Anit gautamHi Thanks for ur reply.
=====Upon arrival, "process immediately" should fire that process =====
how it is getting fire?
means is there any batch job running which looks for idoc in 64 status or is there any event which get triggered when an idoc
comes in 64 status.
why we use OYEB transaction???
Regards
Maybe you are looking for
-
Node Refresh in Webdynpro ABAP
Dear Experts, I have a 'Back' Button in which I need to refresh a populated node. Could anyone provide me the code to refresh the already populated node ?? Regards, Parama Laha.
-
MacBook Pro 13" or 15" (Non Retina)
MacBook Pro 13" or 15" (Non Retina)? Which should I get 13" or 15" and it'll be non retina as IMO I think retina ain't good? Or am I wrong? I will be using it for: Docs Music (listening and dloading) Movies (Watching and dloading) Surfing the web and
-
I have had my IPOD mini for a couple of months but the last several weeks it will not update the new songs I have purchased from ITunes to my IPOD. The battery is being recharged when I connect my IPOD to my computer but nothing is being updated. I h
-
Computer is an iMac wit OS X 10.4.11. I have used this computer and printer for 2 years or more with no problems. Now it prints out lines in bold on a page but not lines in regular.I've tried copying text to a different page and restarting printer. W
-
Close the last tab without closing the firefox app
greetings! 1.I would like to close the last tab without closing the app. The behaviour I expect is the app to open a new blank tab when I close the last tab. Currently I cannot close the last tab which already has some website opened in it. 2. When I