Background scheduling via Dynamic variant

Dear All,
  I got a requirement where i need to schedule a standard program in background which will run on weekly basis and the variant will change every week. So, how shall i pass the variant. it should be automated.
Please reply with a needful.
Thanks & Regards
NSK

1) Press SAVE button on selection screen, Give Variant name and Description.
2) Below that in "Field attributes", against "Selection variable" select the check box for "Posting date" and press button "Selection variables".
3) now "Selection criterion"  T    D    B    will appear, If under "D" the icon is yellow, turn it to green by clicking on the Icon.
4) Then click drop down for posting date and select "Current date - xxx,current date + yyy".
3) in XXX give "14" and for YYY give "-7".
5) Press SAVE button
6) Press Save again
and now u can schedule with the variant u just created.
Ask if u face any difficulties .

Similar Messages

  • Background Scheduling Via SE38

    Hello.
    I am trying to stop some transactions of being executed in dialog mode.
    My intention is to force the end user to use the background processing instead.
    But even with the background processing I have a problem. I must force the users just to use the night time window when scheduling the job.
    Do you know a way to pick up the information the user enters in the scheduler window and to return an error? Some kind of customer exit?
    Best Regards
    Rui Pinto

    Rui -
    There are some standard function modules which will allow you to schedule programs in bakground - programatically.
    Please refer the help documentation http://help.sap.com/saphelp_47x200/helpdata/en/fa/097720543b11d1898e0000e8322d00/frameset.htm
    You can use the module BP_JOBVARIANT_SCHEDULE, which has limited control or  JOB_OPEN, JOB_SUBMIT, and JOB_CLOSE for full fledged control.
    You may have to create a wrapper report to accomodate these function modules.
    Let me know if you need any help.
    Thanks
    KK

  • Change variant for background scheduled jobs

    Hi experts,
    I want to schedule the report RKO7KO8G in background.
    Two of the selection parameters of this report are Settlement period & Settlement year.
    This report should be executed in the background every month. For this the period parameter should change every month
    , like for example when the report executes in background in May then period should be 05, June - period should be 06
    and so on.
    i.e. the variant should change.
    For this how do i create a dynamic variant. I tried to create dynamic variant but it says that the parameter
    should be a date field. However, the settlement period field over has input from 001 to 999 & not date field.
    I want to schedule this report in background on a monthly basis and change its input parameter Settlement period
    as per the month.
    Please suggest.
    Regards,
    Priti.

    Links to sap.technical are NOT permitted. Even via Tiny.
    Hi,
    Have a look at the below tutorial;
    [Dynamic Variant|http://joyjitghosh.blogspot.com/2008_09_01_archive.html]
    Regards,
    Karthik D
    Edited by: Matt on May 27, 2010 10:57 AM - changed url to the source

  • 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

  • Dynamic variants for a background job

    Hi,
    I need to set up a background job for a dynamic variant. To elaborate my selection screen has date ranges which need to change dynamically , if the job is secheduled on weekly basis the selection date range should change automatically in the variant. I got to know that the same is possible through the table TVARV. Can I know about the method of setting up the same?
    Thanks,
    Shailaja

    You can set a dynamic date to today date or some other date without using the table TVARV.
    To set the dynamic date:
    Save variant on the selection screen.
    In the vairant screen, press F4 against your field in the column "Selection Variable"
    Select D here.
    In the column Name of the variable, press F4 to have the list of the possible rules.
    Here you can select "Current date - xxx,current date + yyy" if you want to have certain period.
    When you select this system will pop up to put the values for XXX and YYY.
    Say for last 7 days, you can set the values XXX as 7 and YYY as0.
    But the best way is to change the program, if possible, and fill the select option in the intialization event.
    Regards,
    Naimesh Patel

  • Creating a variant for background scheduling

    Hi All ,
    I have  3 seperate executable programs which take filename as an input on the selection screen ( from the application server ) . Now the requirement is to schedule these programs as background jobs using a variant , but the variant is not possible as there can be many files in the directory at the same time with different filenames.
    We need to execute all the avalaible files in the application server directory at that time .
    If someone can give any idea how it can be possible to schedule these in background  , I would appreciate the same .
    Thanks
    Ankit

    hi,
    One thing u can do is,
    Store the filename into one txt file,
    and through program read this file for your input purpose,
    that which prog. has to run....
    I hope this will help u.
    thanks
    Dharmishta

  • Background schedule process

    Hi
    I am new to Oracle 9iAS. Can someone tell me if there is any
    better way to implement a background scheduled process ?
    Currently, I am doing it via AT command. Just wondering if
    Oracle9iAS has any scheduler that I can make use of.
    Thanks
    CT

    You can set up the different step while schedule the back ground job. Each step will have the program name, variant.
    You can do his using transaction SM36 -> JOB WIZARD.
    Thanks,
    Srinivas

  • MINI_JOB_WIZARD & Dynamic variants

    Does anyone know how to create variants dynamically?
    On the selection screen of a report I am using a button to call the MINI_JOB_WIZARD to schedule a background job.  Input to this function module is a program name and a variant.  I don’t want the user to be saving the variants and then schedule the background jobs, I just want the user to enter the selection conditions and schedule the job. 
    Similar to the SAP functionality of menu path Program --> Execute in Background (F9).
    The SAP standard functionality of "Execute in Background" apparently creates a variant dynamically based on the user’s input in selection screen and schedules a background jobs using that dynamically created variant.  These variants are look something like "&0000000001234."
    I want to use the MINI_JOB_WIZARD function module because it’s functionality looks much better than the "Execute in Background."  Simply, its a lot more user friendly.
    Does anyone know of a better way of using the MINI_JOB_WIZARD function module?
    Thanks,
    Sumit

    Check out the function group
    <b>SVAR</b>
    RS_CREATE_VARIANT
    RS_VARIANT_DELETE
    RS_VARIANT_CHANGE
    Regards
    Raja

  • MC75 - background schedule option not available

    Hi
    i got a requirement to schedule the tcode MC75 in background mode.  But SAP has not given the option in the menu bar -> execute in background option like the tcode MD74. 
    Even the save button is disabled in the tcode MC75 hence not possible to save like a variant.
    I found a SAP notes relevant to that. The note no is 381061. But i am not able to implement the note in my system. I tried to customize the program by copying to zprogram using the code correction given In sap notes 381061. But could not find relevant to background scheduling.
    Can any one tell me how to customize the tcode for background scheduling.
    Regards
    Rajani Yeluri

    Hi Rajani,
    Could you please let me know how did you solve this issue? I am also looking for the same.
    I appreciate your response.
    Thank you.
    Murali

  • Background Scheduling tutorial

    Hi All ,
    I want step by step tutorial/links/docs for  background Scheduling .
    Thanks in advace

    Hi,
    ABAP Editor transaction SE38 can be used to execute program in the background. In SE38 selection screen click on Program -> Execute -> Background and specify the name of the variant. You can schedule the program to run once at a certain time or periodically every month, week, days, hours or minutes.
    Moreover Transaction SM36 can be used to Schedule Background Job without selections parameters.
    Click on the steps, A popup window will open, Click on ABAP/4 button. The fields ABAP/4 Program name, Variant and Language will become input enable. Type the program name and save it by pressing on save Icon. Now Click on start condition, a popu up will appear asking about start date or Immediate etc.. pls provide applicable details and press on save Icon. and now finally press on Save Icon
    Steps
    SM36
    Put in Job Name
    Click on Steps
    Put in the ABAP program name
    The variant for your program if you have a selection screen and want certain values on there
    Save
    Click on Start Condition
    Put in e.g. Start Date and Start Time and Click on Period Values
    Save
    Don't forget to Save on the Initial Screen as well (Define Background Job)
    this will create you background job
    Go through the following link
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c4/3a7f87505211d189550000e829fbbd/content.htm
    Reward me if it is helpful.

  • Background Scheduling for a webdynpro component

    HI,
    Please elaborate how can i background schedule my webdynpro component. I am not able to understand the flow logic.
    -Sid

    >
    Siddhartha wrote:
    > Thnax Thomas, One last thing ..how do I handle/create variant for it ?
    >
    > -Sid
    What, for the classic dynpro program?  Just go to SE38 and use the variants radio button to maintain the variants for the program in question.

  • Selection Screen Change & Impact on background scheduled reports

    Hi,
    I have modified the selection screen of a report program by adding additional selection criteria. This report is background scheduled and runs several times with different variants in a day. I am worried that the background jobs may fail in Production if the latest changes are moved. But I think, background jobs will not fails unless the selection criteria that are part of variants that used in the background jobs not modified. But not sure. I just want to make sure, I am doing correct thing.
    Please let me know your thoughts. Appreciate your help!
    Thanks,
    Kannan.

    >
    Advait Gode wrote:
    > When you transport the program to production after changing the selection screen, you will have to re-create all the variants once again. Otherwise the scheduled jobs will fail.
    >
    > regards,
    > Advait
    I don't think so.
    But of course you will have to update the variants to reflect the new selections.
    Rob
    Edited by: Rob Burbank on Jan 14, 2009 10:56 AM

  • Dynamic variant at job - selection options

    Hi Experts,
    Could any of You pls help me to find out the original selection for a job, if the selection variant was not saved previously?
    There are a couple of user report, which could be run at the background with an ad-hoc selection variant, such as RM07DOCS (MB51). Here the user could set the actual selection and run the report at background by creating a job. But in this job the selection variant has a dinamic identification code such as &0000000000001.
    After the job is set, run and have a result, I could find no way to check what had been the original selection represented by this varian code.
    Is there a way to find out what was the selection for the job, if I only have a dynamic variant parameter?
    Answers will be appreciated

    thanq.
    and pls. let me further clarify that,
    programitically am populating the date as current date minus 1 in the field of my_date in the selection screen.
    now, they wanna to run the report in back ground, daily.
    now, I followed ur tip/link and saved with_date_variant, fine.
    so, pls. let me know that,
    1) if the report runs in back ground tomorrow with with_date_variant(which is i created by seeing ur link), Is the selection screen my_date(prog. populates as June 5th) will be override with current date(i.e. June 6th)?
    In broad, Is the selection criteria wuld be over writes with the Dynamic varints?
    thanq

  • Problem in background scheduling

    Hi All ,
    Requirement : When I run Report  ZBKSCHD It will SCHEDULE another program  for ex (ypr_range_rb2) .
    Here I am passing program name & varint which I want to schedule
    Input Field
    Program Name  : ypr_range_rb2
    Varint               :  ypr_rb2
    Getting errror
    *********ERROR ****** ********
    Short text                                            
        Exception condition "INVALID_STARTDATE" raised. 
    and  Report ZBKSCHD scheduling ypr_range_rb2 many times not single time .( in sm36 )
    ******This is my background schedule program
    REPORT ZBKSCHD NO STANDARD PAGE HEADING LINE-SIZE 170 LINE-COUNT 58 .
    DATA: ZCOUNT LIKE SY-TABIX,
    JOBNAME LIKE TBTCJOB-JOBNAME,
    PARAMS LIKE PRI_PARAMS,
    JOBCOUNT LIKE TBTCJOB-JOBCOUNT,
    AUTHCKNAM LIKE TBTCJOB-AUTHCKNAM,
    SDLSTRTTM LIKE TBTCJOB-SDLSTRTTM,
    SDLSTRTDT LIKE TBTCJOB-SDLSTRTDT,
    VARIANT LIKE RALDB-VARIANT,
    REPORT LIKE SY-REPID,
    ZTIME LIKE SY-UZEIT,
    PREDJOB_CHECKSTAT LIKE TBTCSTRT-CHECKSTAT,
    PRED_JOBCOUNT LIKE TBTCJOB-JOBCOUNT,
    PRED_JOBNAME LIKE TBTCJOB-JOBNAME,
    RELEASED LIKE BTCH0000-CHAR1.
    SELECTION-SCREEN: BEGIN OF BLOCK A1 WITH FRAME TITLE TEXT-001.
    PARAMETERS:
    NAME LIKE RS38M-PROGRAMM OBLIGATORY,
    VAR LIKE RS38M-SELSET OBLIGATORY,
    JOB LIKE TBTCJOB-JOBNAME,
    FRQ1 LIKE SY-INDEX,
    FRQ2(2) TYPE C.
    SELECTION-SCREEN END OF BLOCK A1.
    SELECTION-SCREEN: BEGIN OF BLOCK A2 WITH FRAME TITLE TEXT-002.
    PARAMETERS: ZDATE LIKE SY-DATUM DEFAULT SY-DATUM OBLIGATORY.
    SELECT-OPTIONS:
    TIME1 FOR SY-UZEIT OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK A2.
    AT SELECTION-SCREEN ON FRQ2.
    IF FRQ2 NE 'H' AND FRQ2 NE 'M' AND FRQ2 NE 'S'.
    MESSAGE E001(Z1) WITH 'Time Unit must be H or M or S'.
    ENDIF.
    AT SELECTION-SCREEN ON ZDATE.
    IF ZDATE < SY-DATUM.
    MESSAGE E001(Z1) WITH 'Date must be greater than current date'.
    ENDIF.
    AT SELECTION-SCREEN ON TIME1.
    IF ZDATE = SY-DATUM AND TIME1-LOW < SY-UZEIT.
    MESSAGE E001(Z1) WITH 'Time must be greater than current time'.
    ENDIF.
    AT SELECTION-SCREEN OUTPUT.
    IF JOB IS INITIAL.
    JOB = NAME.
    ENDIF.
    $$* Start of selection
    START-OF-SELECTION.
    IF JOB IS INITIAL.
    JOB = NAME.
    ENDIF.
    clear params.
    call function 'GET_PRINT_PARAMETERS'
    EXPORTING
    mode = 'CURRENT'
    no_dialog = 'X'
    IMPORTING
    out_parameters = params.
    params-paart = 'X_PAPER'.
    ZTIME = TIME1-LOW.
    JOBNAME = JOB.
    VARIANT = VAR.
    REPORT = NAME.
    AUTHCKNAM = SY-UNAME.
    PARAMS-PRIMM = SPACE.
    SDLSTRTDT = ZDATE.
    CLEAR: ZCOUNT.
    WHILE ZTIME LE TIME1-HIGH.
    SDLSTRTTM = ZTIME.
    CALL FUNCTION 'JOB_OPEN'
    EXPORTING
    JOBNAME = JOB
    IMPORTING
    JOBCOUNT = JOBCOUNT
    EXCEPTIONS
    OTHERS = 4.
    CALL FUNCTION 'JOB_SUBMIT'
    EXPORTING
    AUTHCKNAM = AUTHCKNAM
    JOBCOUNT = JOBCOUNT
    JOBNAME = JOB
    PRIPARAMS = PARAMS
    REPORT = REPORT
    VARIANT = VARIANT.
    CALL FUNCTION 'JOB_CLOSE'
    EXPORTING
    SDLSTRTDT = SDLSTRTDT
    SDLSTRTTM = SDLSTRTTM
    JOBCOUNT = JOBCOUNT
    JOBNAME = JOB
    IMPORTING
    JOB_WAS_RELEASED = RELEASED.
    IF RELEASED = 'X'.
    WRITE: / 'Job', JOBNAME, '(' ,JOBCOUNT, ')' ,'will run at', ZTIME,
    'on', ZDATE, 'with program',NAME, 'and variant', VAR.
    ELSE.
    WRITE: /
    'Unable to release job', JOBNAME, '(' ,JOBCOUNT, ')' ,'at', ZTIME,
    'on', ZDATE, 'with program',NAME, 'and variant', VAR.
    ENDIF.
    CASE FRQ2.
    WHEN 'H'.
    ZTIME = ZTIME + ( 60 * 60 * FRQ1 ).
    WHEN 'M'.
    ZTIME = ZTIME + ( 60 * FRQ1 ).
    WHEN 'S'.
    ZTIME = ZTIME + FRQ1.
    WHEN OTHERS.
    ENDCASE.
    ENDWHILE.
    Thanks for your time
    Rahul

    Sloved

  • Dynamic variant type B

    How i use the selection variable type B in dynamic variant??
    I have 2 parameters: month and year. Both have been filled with currenth month and year in background job that will be run every day.
    In sap help, is mentioned something about memory ID for to do that but i didn´t understand.
    Please, help me!

    Check this
    report zaRs
           no standard page heading line-size 255.
    parameters : p_month(2) type c.
    parameters : p_year(4) type c.
    Initialization.
    p_month = sy-datum+4(2).
    p_year = sy-datum+0(4).

Maybe you are looking for

  • How do I make it stop automatically building loops when I record?

    So I just downloaded Garage Band 10 and I can't find answers to my many questions about all of the changes from the previous Garage Band I had installed. The two main snags I am hitting right now are: 1. In the previous garage band you were able to a

  • STILL having problems with 1.2

    I am one of the people whose iPod died as soon as they got the iPod software 1.2 update loaded on. Now, 3 months later... Yes, three months, later, I took a chance and updated it again (after reverting back to 1.1.2) and the same **** thing happens.

  • HP Deskjet 3150 not connecting to Airport Express

    I just purchased an HP 3150 Photsmart printer and try as I may I can't get it to print wirelessly via my Airport Express. I went to the HP website and downloaded their driver, tried re-installing from the CD, repeated both several times--nothing. Wha

  • Setting up a coldfusion project in Flex

    This is my first time using flex to connect to coldfusion. I've got the following configuration: 1) Development XP with Flex 3/Adobe CS3 2) Linux webserver running coldfusion 8/MySQL Up until this point, I have been doing my development on the XP box

  • Need help on ANSI sql conversion

    Existing Query: select (list of columns from list of tables) from EMPANS A,EMPANS_MEMO M,QSTLINK L,QSTN Q WHERE A.FLDCOMMENT =M.FLDREC_NUM(+) AND L.FLDFORM = ? AND L.FLDQUESTION = A.FLDQUESTION AND L.FLDROLLOVER = 'y' AND Q.FLDCODE = L.FLDQUESTION AN