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

Similar Messages

  • How to set up Dynamic Variants for job which is based on Pay Period

    Hi,
    We need to set up dynamic variant for payroll interface.  This interface is based on Pay periods and that is why we need to use different variant for each month.  Letus know how to set up dynamic variant which will take care of Pay Periods

    Hi,  Thnx for reply.
    We are not changing the control records, current period will be some old period in system. 
    payroll is not processed in SAP,

  • Trigger substitution rule for a background job

    Hi all,
    I ve written a subroutine in Substitution rules for FI in GGB1 tcode for F110 transaction to replace the section code (bseg-secco) while posting a fi document.
    but the substitution rule is not getting triggered as F110 runs a background job to post the document...
    The substitution is active and the activation level is active all the time.
    Could u please suggest how to get it triggered for a background job...

    Measuring External Processes
    Use
    The runtime analysis allows you to switch into work processes that are already running and to measure the runtime of dialogs running in them as though they were running in the current session. You can have up to ten external sessions, which may be of any type – for example, dialog, update, or spool. This runtime analysis variant is ideal for monitoring long-running background jobs.
    Filename and Directory
    If you do not want to use the default filename and directory to store files, you can change them using the profile parameter abap/atrapath. If the profile parameter does not contain an entry at all, an error occurs when you start the runtime analysis.

  • Runtime analysis(SE30) for a Background job

    Hi Experts,
    How to get runtime analysis for a Background job in SE30 transaction. Please advise.
    Thanks in advance,
    Vivenchandar R

    Measuring External Processes
    Use
    The runtime analysis allows you to switch into work processes that are already running and to measure the runtime of dialogs running in them as though they were running in the current session. You can have up to ten external sessions, which may be of any type – for example, dialog, update, or spool. This runtime analysis variant is ideal for monitoring long-running background jobs.
    Filename and Directory
    If you do not want to use the default filename and directory to store files, you can change them using the profile parameter abap/atrapath. If the profile parameter does not contain an entry at all, an error occurs when you start the runtime analysis.

  • Set dynamic variant for time

    Hi,
    I have selection options for field as defined as TIME . I need to set dynamic variant for this field as
    TIME should be "from"='current time-30 minutes' and "to"='24:59:59'.
    This report going to run in 00 hours and 30 hours (48 times ie 24 X 2)
    PS : Pl. remember this is for a SAP standard report
    Any Info?

    Naimesh Patel wrote:
    > I digged more deeper and found one FM RS_VARI_V_INIT_TIME which fill the options like Current Time, Current Time +/- ???, From Start of Day to Now etc. and Surprisinly all 3 options are hardcoded in it..!!
    As you suggested due to hardcoded values here , we could not able to do much on this.
    So i came in round away solution. Whenever program A called ( program with TIME selection input) i have called another custom program C . (This custom program will using the following function module RS_VARIANT_CONTENTS, and RS_VARIANT_CHANGE , So get the DEFAULT variant content of program A and change the variant content with LOW as current time - 30 and HIGH with 24:59:59)  as preceding job.
    In PI 7.01 system program A always called in JOB mode
    Thanks for info.

  • Dynamic Variant for Date filed

    Hi All,
    I need to create a dynamic variant for date fields for standard report.
    in date Low field...value will be harcoded as '01.01.2011' and S_Date-high date field should be current date - 1.
    I dnt want to go for code in report to handle this.
    I tried with many option but could not able to see up the dates like as above.
    Kindly help.
    Piyush

    Hi,
    try this code
    data prevday like sy-datum.
    SELECT-OPTIONS s_date for sy-datum DEFAULT '20110101'   .", sy-datum-1.
    INITIALIZATION.
    AT SELECTION-SCREEN OUTPUT.
    *  S_DATE-HIGH = PREVDAY.
      prevday = sy-datum.
    s_date-high = prevday.
    modify s_date index 1.
    Hope the help
    Edited by: j.ortiz on Jan 27, 2011 3:01 PM

  • Dynamic Variant for Report

    Hi,
    How to put current date in report output through variants.
    I should not use events, when user selects variants then i should place the current date in my selection-screen.
    help full information will be appreciated.

    Hi Rams,
    U have to create a dynamic variant for this.
    Fallow these steps.
    1. Fill all the selection screen values including date(Current date).
    2. Save it as variant(ctrl+S), give variant name and description.
    3. In the same screen u can see some check boxes corrosponding to each selection screen parameter.
    Now for the date field select the check box under
    L Selection variable and then press the push button selection variables in the tool bar.
    4. Now u will get the date range in the next screen.
    5. Here press the yellow light under D, it will become green colour.
    5. Next press drop down(Small arrow pointing down at the end of date)
    6. Now u will get a list of options for calculations.
    7. Here select current date.
    8. Now save the variant.
    This completes setting up of dynamic variant.
    Now when ever u select this variant it will populate the selection screen with current date and remaining fields with the data u save while creating the variant.
    Hope this will solve ur problem.
    Thanks,
    Vinod.

  • Workprocess for Infinite background job in ABAP

    Dear all,
    I have a background job which has an infinite loop i.e. WITHOUT any exit condition. The loop contains WAIT UPTO x mins statement.
    So my query is if I run this program in background then will the Background Work process which executes this job, always be occupied and cant be used for other background jobs ?  In other words,  will I be wasting 1 BG workprocess for this job since it will never be freed to be used for other background jobs?
    LOOP AT ITAB
    WAIT UP TO x MINS.
    ENDLOOP.
    Requesting your expert insights .
    Thanks in advance.
    BR
    Nilesh

    I am not so sure if this is correct. To my knowledge, BTC processes, as opposed to DIA, never perform "roll out" (e.g. during an RFC call) but just wait until processing continues. I just made a quick test in NW 740 release, there the BTC process remains occupied by my job when it does WAIT UP TO xxx SECONDS. So you occupy one BTC process as long as your job runs.
    Please try out yourself and then award points to whoever is right, please.
    Regards,
      Alex

  • Trigger a substitution rule for a background job

    Hi all,
    I ve written a subroutine in Substitution rules for FI in GGB1 tcode for F110 transaction to replace the section code (bseg-secco) while posting a fi document.
    but the substitution rule is not getting triggered as F110 runs a background job to post the document...
    Could u please suggest how to get it triggered for a background job...

    Hi,
    Please mainatain another substitution rule.
    PREREQUISTE : 40(POSTING KEY )=SPARE PARTS(gl) and 50(posting key )=Inventory write off
    Sustitute : Dtype = VA
    Regards
    jabeen

  • Dynamic VARIANT FOR Fiscal Period and dates

    Hi
    We have a custom transaction with date and fiscal period as vairable parameters and need to know if we can generate a DYNAMIC VARIANT for these based on FISCAL PERIOD.
    Replies will rewarded

    Hi,
              Use transaction OB29, this is in the IMG.
    Or
    Path..
    SPRO -> SAP REFERENCE IMG -> FINANCIAL ACCOUNTING -> FINANCIAL ACCOUNTING GLOBAL SETTINGS -> FISCAL YEAR -> MAINTAIN FISCAL YEAR...
    <b>Reward points</b>
    Regards
    Message was edited by:
            skk

  • Dynamic Variants for RSEXARCA

    Dear All,
    Please let me know how to create Dynamic Variant for
    the report RSEXARCA.
    Kindly let me know the procedure.
    Regards,
    KCR.

    Hi,
      Use this function Module  : RS_VARIANT_ADD
    U can even get list of Variant Related function module
    like RS_VARIANT_CHANGE.
    Just go se37 enter RS_VARIANT* and press F4.
    One Ex.
    U can use RS_VARIANT_CONTENTS for find out the values for the varient fields.
    U can use RS_VARIANT_ATTR_SAVE to save changes to the variants
    Mark the Helpfull answers & close the thread.
    Regards
    Manoj
    Message was edited by: Manoj Gupta

  • 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

  • Can we change the selection criteria for RV60SBAT Background Job for Billin

    We have a requirement to add a new selection criteria for RV60SBAT Background Job for Billing. We want to process back order invoices first. So we want a specific background job to select these. So we want to select any orders that are eligible to be invoiced where order date < the date of background job(r sy-datum ). Any ideas where we can introduce this logic for selection criteria?
    Thanks,
       Matt

    Hi Matt
    For your requirement , copy the standard  RV60SBAT program to Z program and in that copied RV60SBAT program , maintain the logic that the backorder invoices should be first processed.Then after that regular background job for billing should take happen .Then your requirement can be fulfilled
    Regards
    Srinath

  • Dynamic Variant for Date Range

    Making the Variant for Date or Date Range Dynamic in the Selection Screen of any Program.
    There are actually many ways you can make the Variant for Dateu2019s Dynamic.
    1.     Providing he Values in the Variant Variables.
    2.     By creating the variables in the table TVARVC
    3.     By Initializing the values in the program itself.
    I saw many posts with respect to these and found that everyone has their own way of dealing. Even I wrote code in the program initialization to get this done.
    Here in this post I am showing you the easiest option which is available in the Variant creation.
    EX : If you want to execute the batch job based on a date range.
         SY-DATE u2013 60 days , that means always your program should execute the batch job based on System Date. And the variant should change accordingly.
    Following are the step by stop to do that.
    1. Select your program and select the Variant Radio button and then Click on Display.
    2. It will pop up a screen with variant option below the program name.
    3. Enter the Variant name and click on Create
    4. You will see a screen, with the Attributes button.
    5. Once you click on the Attributes button, it will take you a screen with selection option.
    6. In my scenario my input is based on Calender Day, so select the Selection Variable for Calender Day: You will find 2 options T & D.
    7. Select D: Dynamic date Calculation, then select the Name of Variable (input using f4). You can find many options.
    8. Scroll down the Variant Attributes and select current date u2013 xxx, current date + yyy
    9.Though it seems to be inactive, just double click on the row to provide the date range.
    10. Just enter the value for xxx and yyy to get you dynamic range based on number of days
    11. In my scenario I have to consider System Date u2013 60 days. 0 means current day.
    12. Click on OK to check the range has been reflected or not. Then save the Variant and check the value by executing the program with saved Variant.
    You can check the same in blog with all the screen shots attached but this thing is so easy you don't require screen shots.
    Regards
    Shankar Chintada

    Hi Shankar,
    It would be great if you can put this information in Wiki .
    Pravender

  • 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

Maybe you are looking for

  • How can I use an IF ELSE statement and the xdoxslt: get_variable together?

    First of all, I'm a big fan of this forum and I just want to thank the community for helping make the BI Publisher world a better place. I'm trying to populate a table with a years worth of data with the column=PRODUCT and row=month of DATE. Here's t

  • Error IN ABAP PROGRAM AT PRINT PREVIEW

    Dear All experts. i got an error at gone to print preview of sales order delivery ALV reports. it gives an error follwing. GETWA_NOT_ASSIGNED. FIELD SYMBOL HAS BEEN NOT ASSIGNED. BHAVESH PANCHAL

  • Unable to upload or attach files

    I have a quick question. I was trying to upload photos via facebook or myspace and once I get to the upload page and select the file I want the program freezes and I have to force quit. I tried attaching a file via hotmail (word document) and once ag

  • Trouble opening PDF's with Adobe reader 10 installed message says in firefox that Adobe is already running

    when clicking to this location from an email http://www.kintera.org/atf/cf/%7B44A7E79F-5565-4339-80EA-4F48AC5FD4AC%7D/GUIDETOFUNDRAISING.PDF received the following error message that site was busy and it would not complete the load of the document. I

  • JSF, tiles, xml and xsl

    Good days people, I am employed at an app that wants to integrate JSF, tiles, xml and xsl. Basically the app receives information of the user's interfaz, builds an url with the above mentioned information and invokes to a service web that a xml retur