Batch Job creation by adding entries to SAP tables
Hi Experts,
I understand there are at least 4 SAP tables involved with Batch Jobs.
I need to create many variants and manually creating them using sm36 is tedious.
If I add entries in the TBTC* tables, can the batch jobs be created without causing inconsistency ?
The batch jobs are all similar, based on a zprogram that selects from sap tables data and updating to a ztable. There are many variants I need to create and assign to the batch jobs. So, if I can update the entries in the tables to achieve the same, it would be much quicker and reduce human error and make checking the job setup faster and easier.
Please advise.
regards
M Russo
Hi,
There are many function modules which helps you to create the variants.
You need to create a simple report to automate your variant creation and batch submission.
use function module RS_CREATE_VARIANT to create variant use the structure RSPARAMS to specify the value of your selection screens
Go to the function group BTCH . Use JOB open close to submit the batch jobs with variants anor any ther fm in the BTCH function goup.
Hope this helps rather than directly writing to tables.
Thanks
Similar Messages
-
Batch job creation for sending email if the invoice is aged
Positive confirmation: Send system notification to the requestor if:
a) An invoice is received and GR is not yet posted in the ECC system.
b) An 'aged' invoice and GR is not yet posted in the ECC system.
This requirement is for USA only. i.e., we have only one company code which is 8960.
Identifiers of the invoice are
Company Code = u20188960u2019
Invoice Document Type = u2018R9u2019
Use table EKBE for relationship between Invoice, Goods Receipt and Purchase Order.
The field EKPO-BEDNR contains the Shopping Cart Number
Implementation Strategy
1. To send email if the invoice is aged.
Create a program that will run as a job. This job will frequently check for invoices related to SRM Shopping Carts received from E2OPEN. If an invoice is aged and there is no Goods Receipt posted through confirmation from SRM, then an email will go out from ECC system to the requestor. Using the Shopping Cart number on PO, find the requestor information (email ID) from SRM through an RFC call. This job will run once in a day and should have a parameter in the program for the age of the Invoice.
Both the emails should contain a link (To be taken from SRM system, to be supplied) to log into SRM system. The email will also contain the Shopping Cart number and the Description of the item, and a message to Confirm this, including age of the invoice if aged.
Please let me know how to create the batch job.
Regards,
Venkat
Edited by: VenkatG on Sep 1, 2009 3:14 PMDo not pass the COMMIT_WORK flag... Leave it blank. Any transaction for the data integrity, one should never use COMMIT WORK related statements. Normally SAP transactions will have the COMMIT WORK at the end of transaction which is enough for any thing that is added part of the customer exits...
Hope this helps.
Regards
Anjaiah -
Good morning,
I have been out of the loop for a while in R/3 MRP.
I need to create some MRP batch jobs,
1 will run 6 nights a week for approx 26 weeks
1 will run on a Sunday night for the total horizon.
How do I set these up :o)
Thanks in advance.> Good morning,
>
> I have been out of the loop for a while in R/3 MRP.
> I need to create some MRP batch jobs,
> 1 will run 6 nights a week for approx 26 weeks
> 1 will run on a Sunday night for the total horizon.
>
> How do I set these up :o)
>
> Thanks in advance.
Hi,
You can go to MDBT, define a variant and maitain it. Schedule the variant. Here you can schedule a varinat on daily basis or weekly basis. So if you give a start date and time on Sunday then the job will run on all the Sundays at the specified time. You can schedule the job every day also on a specified time. I did not find a way to schedule a job for week days only, you may need to take the help of third party job schedulars.
Regards
Vineet -
Hi,
I have a couple of invoice documents which seems to be created by batch job. The created by field in the invoice shows batchuser.
Now when i see in SM37 for that particular date, i am unable to see any batch jobs for billing.
Hence i am wondering what event could possibly have triggered these billing docs.
These are rebate related billing.
Could anyone suggest any pointers as to how to identify how these docs were created.
Regards,
RameshGenerally Bach jobs list is archived after few days. If the log is archived you can see the list in SM37.
You can check with your BASIS consultant for setting Archiving dates for the Background jobs. -
How to schedule a job poles for a entry in a table.
Hi All ,
I have to schedule a job which runs somw stored procedures only on sunday and monday of a week at 3 AM in the morning.
The condition is that another application puts an entry into a table around 3 AM (some times before and some times late), now my should query
count in the table and runs the procs , however once its done ,it should do it monday and then it should not run till next sunday.
I have successfully created a job which keeps failing till it receives the entry and successfully runs the proc once the entry is there...
However how to schedule this thing ..correctly I need help , I want this job to disable itself on sunday once the procs are run wake up next morning
run again..and then next week ..
Following is the job ,
BEGIN
-- Job defined entirely by the CREATE JOB procedure.
DBMS_SCHEDULER.create_job (
job_name => 'TESTING_FIRST_JOB',
job_type => 'PLSQL_BLOCK',
job_action => 'BEGIN SEODS.test_procedure_11292011(); END;',
start_date => SYSTIMESTAMP,
repeat_interval => 'freq=minutely; byminute=5',
end_date => NULL,
enabled => TRUE,
comments => 'Job defined entirely by the CREATE JOB procedure.');
end;
=====================================================
and following is the proc...
create or replace
procedure
test_procedure_11292011 as
var number;
begin
insert into SEODS.job_status
values (systimestamp, 'JOB TEST_PROCEDURE_11292011 HAS STARTED SUCCESSFULLY');
commit;
SELECT COUNT(*)
INTO var
FROM seods.student_weekend_status;
if var=0 then
raise_application_error(-20101, 'There is no record in the student_weekend_status table');
else
all_realtime();
end if;
insert into SEODS.job_status
values (systimestamp, 'JOB TEST_PROCEDURE_11292011 HAS FINISHED SUCCESSFULLY');
commit;
end;
Thanks in advance , please helpHi,
This is a known issue in the previous SQL Server version and has been fixed in SQL Server 2012. You should be able to set 90 minutes and the change would be saved in SQL Server 2012.
http://connect.microsoft.com/SQLServer/feedback/details/346786/ssms-does-not-support-job-schedule-frequencies-greater-than-60-minutes
Currently, you may schedule the job to occur every 1 hour or you may refer to the suggestion by Latheesh to get around this.
Thank you for your understanding.
Tracy Cai
TechNet Community Support -
Who mainatined the entries in sap table
Hi,
Can someone please tell me how do I find which user mainatined the entries in table B006 or any sap table.
Also how will I know who has authorization to maintain the entries.hi
first go to SE16n and enter the table name as CDPOS and in the selection screen enter the table name as B006 and execute now you will get the following
change doc object
object value
document number
make a note of the above and now goto se16n and enter the table name as cdhdr and enter the above values which you got in CDPOS
like change doc object or object value and execute now you will get the user name who had maintained or changed the entries for that table
regards -
Background job error No appropriate entry found in table ADRT
Hi,
I have developed a report to sent mail in background. My background job is getting cancelled in background. but it runs in foreground.I have used leave to transaction statement in my report.
In my development server job cancellation occurs.but mails are being sent.whereas in production server job cancellation ocurrs but mails are not sent.
It shows the below error also...
27.12.2010 17:00:00 Job started
27.12.2010 17:00:00 Step 001 started (program YSD_OUTSANDING, variant &0000000000094, user ID ABAPER)
27.12.2010 17:00:01 No appropriate entry found in table ADRT
27.12.2010 17:00:01 Job cancelled after system exception ERROR_MESSAGE
please help me to overcome this error...
Thanks & Regards,
A. JeniferI don't see how either of those replies are helpful...
To the OP, you haven't given much information. That's a custom program but the failure is being triggered most likely by your attempt to generate the email by the standard code. You need to get the error message ID and number from the log and find the codepoint (from a where-used analysis or debug) and analyze the condition that's triggering the message. Most likely, it's a simple fix - there appears to be a missing remakrk entry but sometimes those messages are misleading and the message issued isn't actually the problem. -
Batch job creation for sales order
Hi,
How to create a job and schedule it so that it assigns reason of rejection to sales order line items for a particular sales org which are not delivered and after doing so, the status of the sales order is set to complete.
regards
sachinHi,
Execute transaction SM36
Define Job name, Job class, Target server
Click on 'START CONDITION' button
Click on 'Date/Time' button
Enter Scheduled start DATE & TIME. Check mark 'Periodic Job' field. Click on 'Period values' button and select 'Hourly' or 'Dialy' or 'Weekly' or 'Monthly' or Other period and SAVE. Go back to main screen.
Click on 'STEPS' button and enter Program name and Variant under box 'ABAP Program'. Click on 'Print Specification' button and enter Printer name under 'Output device' and SAVE
Click on SAVE button until you get message on bottom of the screen that describes 'Job XYZ saved with status: Scheduled'.
Click on 'Job overview' button or execute SM37 transaction.
Select the appropriate 'Job name', 'User name', 'Job Status' & Schedule date under 'Job start condition' and click on 'Execute' button or press F8.
You will now see all your scheduled JOBS.
regards,
mahantesh -
Delete entry or change entry in sap table
Hi Gurus,
i want to change or delete entry in VBEP.
points sure!
Rahulhi guys ,
its very easy ,
go for se16 , fetch all the records which are required to delete ( use only se16 lay out)
after fetching the records just enter ' /H ' in the command bar
and then double click on any of the enter , then u fill go to debugging screeen and then just press F7
u will find the following code
form set_status_val tables ntab structure x031l
using code name next for_lines.
field-symbols: .
refresh exclude_tab.
if code = 'SHOW'.
set titlebar 'TAB' with name 'anzeigen'(100).
elseif code = 'EDIT'.
set titlebar 'TAB' with name 'ändern'(101).
elseif code = 'INSR'.
set titlebar 'TAB' with name 'einfügen'(102).
elseif code = 'ANVO'.
set titlebar 'TAB' with name 'einfügen'(102).
elseif code = 'DELE'.
then just click on CODE and pass value as DELE and press F8
AND THEN U CAN DELETE ALL THE ENTRIES -
Adding entries to Custom table from IDOC User-Exit
Hi All,
I need to add an entry into a Ztable, based on the entries in the IDOC.. The user-exit available to me is EXIT_SAPLVEDF_002. But it is called a number of times... Is there any way to update the Ztable getting the data from different segments?..
Please help..
Regards.
AshaThe table INT_EDIDD type EDIDD conatined the interface tables of the FM contain all the segmanent data, you can read that and populate the Z table respectively ...
Thanks,
Adi. -
How to do debugging for a batch job?
Hi Colleague,
I created a batch job via t-code sm36 in SAP GUI, and added a report to this batch job, there is no problem to run this report directly, but fails to run the batch job. How can I do debugging for this batch job?
Kind Regards
AndieHi Arun VS,
Now I can do debugging, when I invoke the following standard function module, there is a dialog box popped up for doing security check. How can I prevent it from being popped up in a batch job?
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = lv_full_path
filetype = 'ASC'
codepage = lv_codepage
write_bom = ip_bom
IMPORTING
filelength = lv_file_length
TABLES
data_tab = gt_xml
EXCEPTIONS
file_write_error = 1
no_batch = 2
Kind Regards
Andie -
Regarding Batch Jobs for migration of data from client DB to our local DB
Hi Folks,
GoodDay, Previously I worked as a Oracle Developer and recently shifted into a BIG organisation as PL?SQL developer. Here my base work is with INTERFACES(Stored Procedure). That is retrieving data from client DB and need to put the data in our staging tables. For that i created 2 INTERFACES(stored procedures). One is for one time migration. No need to run on regular basis. The second one is to run regularly why because if any updations are done in client DB that should be replicate to our DB. For that we need to run a BATCH JOB regulary 24X7 basis.
But i dont have any working knowledge on BATCH JOB creation and running. Please let me guide on this issue ASAP.
Regards,
Ramesh.You can try
dbms_job(9i)
or
dbms_scheduler(10g)
just out of curiosity.. tell me if you are interested...
what you were doing as a "oracle developer" ( is it like writing only "sql" )... -
Using Rules Engines, & Batch jobs
So, we're looking into the best method for storing our business rules. So far, we're investigating Rules Engines (Drools), using database Triggers, SOA, or coding those rules into the application itself.
Currently, the bulk of our business rules are in table triggers. So, when our batch jobs execute, they pick up all of the business rules as they go.
I like the concept of using a Rules Engine, though, especially if we could give some control over maintaining those rules to the customer.
So here's my question, if we went to a Rules Engine approach, or chose one of the non-Trigger approaches, would our batch jobs now have to plug into those rules that applied to that particular process? I'm worried about losing those automatic business rule checks when the trigger executes for any interaction with the underlying table data. With a rules engine, it would seem, you'd have more planning b/c the batch job now has to call all rules that may apply.
Am I missing the point of a Rules Engine, or is this the case?
--=Chuck1) Oracle 10g includes a rules engine, so if you're going do that path, I'd consider strongly keeping everything in Oracle.
2) What is the nature of the business rules? Are these validations? Calculations? Something else?
3) Depending on the rules, and whether your batch process has to do anything to react to a rule (i.e. if you have a validation rule that indicates the batch job inserted an invalid entry, does the job need to do something? Or could a subsequent query alert the user to the problem), you can generally have the rules engine run all the rules at the end of the load (that's generally 1 command from the batch process to the rules engine). Or you could have the rules engine run everything periodically. With the internal Oracle rules engine, I believe you can also have things evaluate synchronously.
Justin -
Batch job for technically completing a production order
Is there a way I can run COHV in batch mode for TECO ing orders
thanks a lotHi
I assume you mean have a program run at pre-defined intervals to TECO your production orders.
Easiest is to use SM36 --> batch job creation wizard to setup your batch job.
The ABAP program you want to execute is PPIO_ENTRY (create a variant for the program first via SE38).
Rgds -
In which SAP table Jobname and Jobnumber data was stored.
Hi Experts,
when we are executing the job_open FM one Job Number was generated,In which SAP table this job number was stored.
Thanks in advance.
Regards,
BhaskarCheck..
SELECT JOBNAME JOBCOUNT STEPCOUNT STRTDATE STRTTIME
FROM TBTCO
INTO TABLE IT_JOB_ID
WHERE JOBNAME IN S_JOB
AND STATUS = 'F'
ORDER BY STRTDATE DESCENDING STRTTIME DESCENDING.
Maybe you are looking for
-
Purchasing A New Hard Drive For Old Macbook
Hey everyone! I'm new here. I found an old Macbook of mine-a black Macbook about 12 3/4" across. I got it a while ago, and the hard drive stopped working so I just bought a new computer. But now I would like to have two computers, and I would like to
-
Warning when deleting flickr account
I want to cease use of Aperture 3's flickr integration. Currently running Aperture 3.1.2. I have already disabled Aperture on the flickr web site. When I go to delete the account from Aperture->Preferences/Web, I get a warning: Are you sure you want
-
Hello , We are facing an issue when checking out a project from Master Repository configured in MUD environment. Empty presentation folders in subject area's are disappearing when a project is checked out. I confirmed Master repository has all the em
-
Constant freezing. HELP
Hi, I am living in Egypt this year, and thus do not have access to a mac store, so this is where I turn to. Recently, my macbook has been acting up. It has been freezing up to 3 or 4 times a day. Usually this happens when I have a few programs runnin
-
Dear gurus, Im working with billing plan. There you have billing date in order to determinate when sales document have to be created. I need a report which showm me sales documents with billing date near to due date. Please let me know if im not very