Schedule background job using system variant

Dear gurus,
We're planning to schedule background job using system variant, for example, current fiscal year and current posting period (transaction AFAB). Is it possible? So for example, for this month, "Posting Period" value will be 6, and then next month will be 7.
Can you tell me how to do this, if I want to set up the schedule only once?
Thanks for your help.
Best Regards,

done using abap

Similar Messages

  • Schedule Background job using transaction CATM

    Hi all,
    Since we cannot schedule a background job using transaction CATM, I have created a program calling the CATM transaction through batch-input.
    I have done a recording and entered the coding in a Z-program. For a vendor, I have recorded time in CAT2 for multiple purchase orders.
    After entering the vendor number in CATM, all the purchase orders showed up. I have clicked 'select all' and posted.
    When I run the program in the background, it posts only for one purchase order.
    When I  run the program in the foreground, using the Select All-button it only proceeds with the first line in my list of PO's.
    How to read the whole stack and post the whole stack of purchase orders? 
    Please help me out with this.
    Thanks
    Regards
    Srinivasan Desingh
    408 368 3837

    Hi,
    When I run the program in the background, it posts only for one purchase order.
    When I  run the program in the foreground, using the Select All-button it only proceeds with the first line in my list of PO's.
    See..it's a Z-program so Its difficult to answer without checking the program. But I think, you should check your BDC again from Debugging, with the help of your abaper. You will find, why its is processing only one entry.
    Regards
    Shishir

  • How to Execute RMDATIND inside another Background Job using a variant?

    Hi,
    It is only possible to start RMDATIND (direct input) in background from transaction BMV0 u2013 it is impossible just to place the program in another job in SM37 or SM36.
    In a related thead I saw : u201DSolved my self by using BI_START_JOB. If I use this function module along with RS_CREATE_VARIANT and RS_VARIANT_DELETE. u201C
    Following is the link to that thread
    Re: Problem in using JOB_OPEN, JOB_SUBMIT & JOB_CLOSE
    RS_CREATE_VARIANT (Creating a variant (not using a selection screen))
    RS_VARIANT_DELETE(Variant to be deleted)
    BI_START_JOB
    Can some one provide me with all the parameters required to execute the above Function Modules?

    Hi,
    Refer below thread:
    Process Control in Confirmation Parameters
    All the relevant details are explained in detail..
    Best Regards,
    Siva

  • How to schedule a background job using the Event concept..?

    Hi Folks,
    I have a requirement that, I need a schedule a background job.
    Once after the previous job successful only, new job should get triggered. How to go ahead with this..?
    For Eg, I am scheduling a job called ZTEST periodically for 1 minute. If the job is not get completing with in 1 minute, I dont want to start my new job. Only after the success of my old job, I want my new job to run.
    Waiting for ur replies.
    Regards,
    Savi.

    Hi,
    You can use events that have already been defined, or you can create new events for scheduling background jobs.
    If you wish to use new events, do the following to implement the event scheduling:
    Define and transport the event as a user event with transaction SM62.
    You must define only event IDs; event arguments are not defined in the R/3 System. Instead, you specify event arguments when you schedule a job to wait for an event and when you trigger the event.
    If you define a new event, you must also transport it to your production systems. The event transaction does not have a connection to the transport system. Instead, you must create a transport request for the event yourself.
    Do this to transport an event:
    Create a transport request.
    Start the editor in the transport request and enter the following:
    R3TR TABU <table name> where table name is BTCSEV for a system event ID, BTCUEV for a user event ID.
    Press F2 with the cursor on the table name to call up the screen for specifying the table entries to transport. In this screen, enter the event ID’s that you have created.
    Save and release the transport request. Ensure that it is imported into your production system(s).
    To trigger an event, add:
    – the function module BP_EVENT_RAISE to your ABAP program, or
    – the program SAPEVT to your external script, batch file, or program.
    When your programs execute these keywords, an event will be triggered in the R/3 background processing system. The event-based scheduler is started immediately. It in turn starts all jobs that were waiting upon the event, subject to normal background processing restrictions, such as the requirement that the job has been released to start.
    Schedule the jobs that are to run when your events are triggered.
    You can schedule jobs for one-time start or to be started whenever an event is triggered.
    Regards,
    Raj.

  • How to schedule the background job using current selection screen field val

    Hello Friends,
    How to schedule the background job using current selection screen field values.
    after completion of the job the spool should be sent as a mail to SAP Inbox.
    Is there any way to create the variant dynamically by reading the current selection screen values.
    Thanks,
    Ravi

    Hi,
    To get the variant details you can use teh following FM.
    'RS_VARIANT_CONTENTS'.
    Regards,
    Ankur Parab

  • Retain background jobs and its variants before system refresh activity

    Hello All,
    I am going to perform system refresh activity on quaity system on monday. Customer wants to retain the background jobs and its variants in the quality system. Please guide me and let me know the steps to retain the background jobs and its variants before starting the system refresh activity.
    Regards
    Subbu

    Dear Subbu,
    You have to export the TBT* Tables to retain the jobs. You can do this with R3trans:
    1. Make Export file
    2. Make Import file
    3. Make Export in Q System before Systemcopy
    4. Start Database and not SAP
    5. Make Import in Q after Systemcopy
    6. Start sap
    1. Make Export file /tmp/export_cmd
    export
    file='/tmp/export_Q.dmp'
    client=<your client>
    delete from TBTCA               
    delete from TBTCB               
    delete from TBTCCNTXT           
    delete from TBTCCTXTT           
    delete from TBTCCTXTTP          
    delete from TBTCI               
    delete from TBTCJCNTXT          
    delete from TBTCJSTEP           
    delete from TBTCO               
    delete from TBTCO_V01           
    delete from TBTCP               
    delete from TBTCPV              
    delete from TBTCR               
    delete from TBTCS               
    delete from TBTC_SPOOLID        
    delete from BTCEVTJOB
    select * from TBTCA             
    select * from TBTCB             
    select * from TBTCCNTXT         
    select * from TBTCCTXTT         
    select * from TBTCCTXTTP        
    select * from TBTCI             
    select * from TBTCJCNTXT        
    select * from TBTCJSTEP         
    select * from TBTCO             
    select * from TBTCO_V01         
    select * from TBTCP             
    select * from TBTCPV            
    select * from TBTCR             
    select * from TBTCS             
    select * from TBTC_SPOOLID 
    select * from BTCEVTJOB
    2. Make Import file /tmp/import_cmd
    import
    file='/tmp/export_Q.dmp'
    3. Make Export in Q System before Systemcopy
    R3trans -w /tmp/Q_export.log  /tmp/export_cmd
    4. Start Database and not SAP
    sqlplus "/as sysdba"
    SQL> startup
    or
    startsap
    stopsap r3
    5. Make Import in Q after Systemcopy
    R3trans -w /tmp/Q_import.log  /tmp/import_cmd
    If you want to undo this, start the export script in P system and the Import script in Q system.
    Don't be afraid of the delete statement but without delete it doesn't work!
    6. Start sap
    startsap
    Best regards
    Willi Eimler

  • How to transport variants and scheduled background jobs

    Hi all
       Could anyone let me know if  variants be transported .
       also can scheduled background jobs transported.
    Thanks in advance

    Hi,
    Run the program RSTRANSP and give the name of the program and the variant name.
    It will create a transport request for the variant.
    the rest of the process is the same as is the case with all other transport requests.
    Regards,
    Raghu
    Message was edited by:
            Raghu Reddy

  • Schedule Background Job whenever new message WVINVE

    Hi All,
    I have following requirment:-
    Schedule Background Job with a ABAP program,
    whenever new message type WVINVE posted in SAP inbound.
    I am confused in "Event" which i select in SM36.
    Or, is there any other method to trigger a background report, whenever WVINVE03 IDOC posted in SAP system & create physical Inventory document.
    regards
    Umesh

    For triggereing a background job, when ever a message type WVINVE is posted. You need to create a
    Background Job with the the program and mark the Job Event periodic. Secondly you need to trigger that event from the Inbound processing program or Function module which processes the message type using the Function module <b>BP_EVENT_RAISE</b>. so when ever a message type is processed it will trigger the event which inturns trigger the Job.
    Hope this will Help.

  • How to cancel scheduled background job?

    Hi,
    I have used FM 'HR_START_BATCHJOB_IN_OTHER_SYS' to schedule background job.
    Some mistake has happend and this FM calling has gone to infinite loop. So, now the system is keep on generating background job. I tried looking into SM36 to stop this background job but i failed.
    Can anybody help me how to stop scheduled background job please.
    Regards,
    Mukund.

    Hi,
    Check which background process your job is  running from the Job details and inform your Basis consultant to Kill the process. If you have sm50 acess or sm66 access you can do the same.
    Regards,
    Vijay v

  • Reg Super user for schedule background Jobs

    Hi Experts,
    I have created new user copied from DDIC with the same authorization. This is for scheduling Background Jobs. Now all the standard background Jobs are running fine. After scheduling the Jobs I have changed to system user. Now for audit purpose I need SAP note to do same. Please help me to get the sap note for the same. Please respond ASAP. treat this is as high priority.
    Thanks & Regards,
    Haseem.

    HI,
    It is not necessary for user having SAP_ALL authorization under which background job is running.
    Define specific users to use for background processing. Define them as system users (non-dialog) and give them only the necessary authorizations that are needed for the executed programs
    check  http://help.sap.com/saphelp_nw04/helpdata/en/db/f6f3393bef4604e10000000a11402f/frameset.htm
    also check Note 101146 - Batch: authorization object S_BTCH_JOB, S_BTCH_NAM
    regards,
    kaushal

  • Schedule Background Job :  Remove delivery Block in Sales order

    Hi Gurus,
    I have a requirement to select all sales orders as per a condition and remove delivery block at
    VA02-> Go to -> Header -> Status
    For that I have to write a program which will be run only in background and i have to schedule background job for the same.
    I have a parameter at selection - No of records
    If no of records = 500 , I have to submit 500 jobs ie one job each for each sales order for removing delivery block.
    I need to know
    1) Which function module/bapi I can use to remove delivery block at sales order header level.
        For blocked delivery the status is 'BSTK" . to remove block i need to change status to "RSTK".
    2) How to schedule a background job for my program and how to submit one job each for each sales   order.
    Regards
    Avi.

    Hi Avi,
    Would like to seek for your advice. I am facing the same scenario too which is to delete the delivery block but is deletion of the delivery block is done in the user exit MV45AFZZ. The subroutine which needs to have the extra logic of deleting the delivery block is USEREXIT_SAVE_DOCUMENT_PREPARE.
    Need your advice on how do you solve this scenario? Thanks in advance.

  • Schedule background jobs at OS level.....

    Hi All,
    Scheduling Background Jobs at SAP Level is a very simple task. Is there any way to schedule background jobs at OS level? Please lemme ASAP....
    Thanks
    Rhishabh

    Hi Rhishabh,
    Actually we can not completely schedule background at OSLevel but we can trigger a background job which has alreadyscheduled by using sapevt tool syntax as follows.
    sapevt <event name> nr=<instance name> name=<host name>
    or we have tool like
    In unix you use crontab.
    We can use different job scheduling softwares like IBM TIVOLI software MAESTRO JOB SCHEDULING CONSOLE, Control M
    Regards,
    Kiran M

  • Schedule Background Jobs

    Hi
    Gurus
    What is Schedule Background Jobs and whatu2019s the use of Schedule Background Jobs
    How it will worku2019s
    Please give me detail Information about Schedule Background Jobs
    Many Thanks
    Mahi

    Hello Mahi,
    The BackGround job - "Program" thats runs in SAP Server and not depend any user interface.
    like Antivirus program on your local station that runs (scaning your computer all the time)  without any user interface (becide tray Icon) and unless you going to Running Proccess on your computer you don't know that it working.
    Schedule BackGround Job its any backGround Job that you schedule to run any time you want and you can make it run recursivly.
    you can go to Transaction SM36 to schedule your Programs.
    Good Luck
    Eli Steklov
    Please Reward Points if it Helped

  • How to create a background job without a variant ?

    How to create a background job without a variant ?

    Hi,
    Go to se38.. specify the program name and execute Or use Tcode
    On the selection screen specify the variant...
    Then from the menu options choose program->excute in background...
    In this way we can crate a backgroup job with out crateing any varinat for the report...
    Satya.

  • Scheduling Background Jobs at OS level

    Hi all,
    How to schedule Background jobs at operating system level.
    Thanks
    vijay

    Hi,
    Create a event, create the job and schedule after this event has occurred and from OS call sapevt <eventname> name=sid nr=<instance name>
    Regards
    Umesh K

Maybe you are looking for