Job with dynamic variant

Hello everybody,
  Could somebody help me to run a job with a dynamic variant (for instance a report with the changes for the last N days).
  I read things about SAP_StoreVariant and RedwoodScript but I'm not able to perform the job...
  Thanks for your help.

Go through this link...
http://help.sap.com/saphelp_47x200/helpdata/en/d1/802cfc454211d189710000e8322d00/frameset.htm
In this page
ABAP Workbench tools -->
                  VARIANTS  -->
                        VARIABLE VALUES IN VARIANTS.
Hope this helps u a lot...
reward if it helps u...
sai ramesh.

Similar Messages

  • Job with multiple variant

    Dear Friends,
    I have some jobs which has many variants. So it possible to create a job with multiple variants or only option is to create job chain.
    Please suggest.
    Thanks in advance.
    Regards,
    Jiggi

    Hi,
    You can submit the same job with different variant, but that is your runtime.
    Limitation is that you can't migrate all these runtime jobs.
    It is better you create different jobs with different variants, so that you have frexibility to run them independently, monitor and troubleshoot them, also migrate them to next environment (QA or PRD). And you can still create a job chain using all these independent jobs if require.
    Only creating Job Chain would be useful only if you want to run them in parallel or in sequence. (Not if you want to run them independently).
    Hope this help.
    regards,
    Sunil Rohit

  • Table name for background job with report, variant and step user id list.

    Hello All,
    I need to generate the list of scheduled backgroung job with the list of Report Name, Variant, Step User Id called. Please any one tell the SAP Table name from which I can get these data.
    Thanks in Advance,
    Amit

    Hi Rohit,
    Thanks for your reply. But from TBTCO, i can't find program/report name and variant. Just the list of background job i can see.
    Regards,
    Amit

  • Can I schedule a program as a periordic background job with dynamic viarent

    Hello experts, Can I schedule a progarm as a periodic background job run every day with dynamic condition (current day), if can,how?
    Best wishes,
    Evan

    Hi,
    You can do this to get desired results:
    Write a small new program that calls the program that you need to run daily by using submit .
    The new program can give input of current date to the called program.
    Now you can schedule the new program as a daily batch job.

  • Defining variant for report for job with dynamic date Gui 6.40 patch 21

    The system does not take over my choice for the dynamic date.
    I choose in the variant-attirubute-screen for a certain parameter: "type selection variable": D and then in the column "name of the variable" > I choose via F4: current date +/- days. OK and then I fill in 1 or 1- or whatever.  The system however does only react with the message "Upper date of the interval is > than upper date". It does not matteer what I choose.
    In the initialization I do not have any initialization of that parameter.
    I connot save the variant.

    Go through this link...
    http://help.sap.com/saphelp_47x200/helpdata/en/d1/802cfc454211d189710000e8322d00/frameset.htm
    In this page
    ABAP Workbench tools -->
                      VARIANTS  -->
                            VARIABLE VALUES IN VARIANTS.
    Hope this helps u a lot...
    reward if it helps u...
    sai ramesh.

  • Background Jobs with Dynamic Dates

    I am looking for how to run a job in the background on a Daily basis where the data time range is always Yesterday - specifically, I want to run a Notification report daily to see the previous day's notifications.
    I have established a Variant with the Dynamic Dates to be "Current Date - 1 days", and schedule it to run in the background Daily.  The report runs daily as scheduled, but the dates are not changing (i.e. it always runs the report for the same date).

    Dear Richard,
    It appears that the date that you generated by "Current Date - 1" is not used for running notification report or not passed from variant.
    You can actually code the same in your program.
    I suggest you to expecute the report in SE38 with debugging by putting a break-point.
    v_date = sy-datum - 1.
    v_date should be used for notification report. (not sy-datum)
    Reward points if this is helpful.
    Regards,
    Naveen.

  • Creating a background job with out Variant.

    Hi Experts,
    I'm developed one ALV report which is not having any selection-screen and Variant.
    We can execute the program in fore ground but the user wants to be run in back ground and he wants to be created a spool requet for that report.
    My Question is ...the above requirement is possible or not.
    if your answer is yes then
    How to create a variant for a report which is not having any selection-screen?
    Can we creat a spool request manually ..means with in the report only through coding?
    Thank you ,
    Venky.

    try this one...
    you can submit your report in background and create spool...
    An ALV report can be executed in background.. but if its an ALV Grid then spool will contain ALV list output. You can directly select execute in background even if you dont have any parameter on selection screen. or try below code...... if you want to create a spool from the report itself.....
    I hope its useful
    DATA: number           TYPE tbtcjob-jobcount,
          name             TYPE tbtcjob-jobname VALUE 'JOB_TEST',
          print_parameters TYPE pri_params.
    CALL FUNCTION 'JOB_OPEN'
      EXPORTING
        jobname          = name
      IMPORTING
        jobcount         = number
      EXCEPTIONS
        cant_create_job  = 1
        invalid_job_data = 2
        jobname_missing  = 3
        OTHERS           = 4.
    IF sy-subrc = 0.
      SUBMIT report TO SAP-SPOOL
                        SPOOL PARAMETERS print_parameters
                        WITHOUT SPOOL DYNPRO
                        VIA JOB name NUMBER number
                        AND RETURN.
      IF sy-subrc = 0.
        CALL FUNCTION 'JOB_CLOSE'
          EXPORTING
            jobcount             = number
            jobname              = name
            strtimmed            = 'X'
          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.
        ENDIF.
      ENDIF.
    ENDIF.

  • Scheduling a job with different variants

    i have a program to be run daily for three company codes and different materials. If i give all the three company codes at a time then the program is taking a lot of time and giving a run time error 'time limit exceeded' .Can i create variants for that program and make it run sequentially with all the variants.

    hi Deepthi,
    Yes you can do that .. i even suggest to modify your select statements to reduce the processing time .
    Refer
    http://www.sap-img.com/abap/performance-tuning-for-data-selection-statement.htm
    Regards,
    Santosh
    Message was edited by:
            Santosh Kumar Patha

  • In EP, call R3 transaction with dynamic variant name

    Hello
    I know that I can call a R3 transaction with a dedicated variant thanks to the process below:
    Create a transaction iview , Tcode = "START_REPORT"
    In application parameters pass these values separated by '&' sign.
    D_SREPOVARI-REPORT - your report
    D_SREPOVARI-VARIANT - your saved variant.
    choose skip inital screen in the parameters.
    But do you have a tip to call a different variant for every user.
    For example, I have users "1111" and "2222". In R3 I have created the variant "1111" and "2222" for a transaction.
    In EP, I would like that when I call this transaction connected as "1111", the variant "1111" is used, and when I'm logged as "2222", the variant "2222" is used.
    Do you know how I can do that ?
    Thank you !

    Hello,
    where is the information which user has to call which variant stored? If it's in R/3 then you can write an wrapper report which is called from the Portal, adds the Variant information and then calls the original report.
    Regards
    Gregor

  • Dynamic Variant -Current date  in selection screen - for batch jobs

    Hi Experts,
    My report runs in batch job with a variant, daily.
    One of the filed in selction screen should hv CURRENT DATE, with out providing as input explicitly by user.
    So, How Can I get it done?
    Its some thing with Dynamic variants + Selection Variables +  date selection, but, I forgot the navigation etc.
    pl. let me know
    thanq

    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 to run ABAP job with VARIANT in Redwood

    Hi,
    I am new to SAP, Redwood and this forum so if this topic has been covered earlier I apologize.
    My problem is that I have a SAP job with a VARIANT in SAP that I want to have working in Redwood.
    I import the job with RSI_IMPORT_ABAP_PROGRAMS and the variant with RSI_IMPORT_VARIANTS. At this
    stage I am relatively sure I was able to run the job once by submit RSI_ABAP_RUN with variant.
    I use the RSI_GENERATE_VARIANT to generate the VAREDIT script to be able to change the parameters
    for the ABAP job. Modify the parameters, run the VAREDIT script.
    When I now try to run the RSI_ABAP_RUN with the variant I enters values for instance, client, jobclass,
    ABAP program (from dropdown list), ABAP variant (from dropdown list), Job name (get filled automatically)
    then tries to goto "next" or "submit" I get a popup window.
    Error
    Enter a valid value for the ABAP_VARIANT_NAME.
    I am still able to run the job in SAP with VARIANT and in background.
    Does anyone have any ideas?

    Hi Henrik,
    One of the parameter checks apparently is failing, and in some special cases the issue may be with another (related) parameter.
    Can you tell me exactly which version you are using (6.0.2.x or maybe 7.0.x.y) ?
    You can find this in the view JCS_PRODUCT_COMPONENT_VERSION or by running the RW_SHOW_INSTALLED_COMPONENTS script. I would need to know the repository and the rsi version.
    Have you tried entering a (different) jobname manually ? And if the client number you use below 100, does it have leading zeros or not ?
    Anton.

  • 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

  • How to save a variant with dynamic selections parameters

    Anybody knows how to save a variant for an ABAP that uses a Logical database with Dynamic Selections?
    Have a look for example to the following:
    SE38 - DEMO_PROGRAM_GET - Execute - Shift F4 - Connection Number.
    How to save 0820 as Connection Number?
    Function Group SVAR seems good but FREE SELECTIONs are not easy to manage...

    Hello,
      I tried to save the variant of DEMO_PROGRAM_GET with dynamic selection field (Connection Number) filled. It gets saved without any problem. Just click 'SAVE' and enter the variant name and description.
    Thanks,
    Venu

  • How to create a multipage PDF with same template but dynamically varying data?

    Hello,
    I need to create a multi-page PDF where I need to use the same template but dynamically varying data.
    Eg Scenario:
    1. I have data for 5 material in my ABAP program.
    2. I have a PDF template in SFP which has a 2 page structure.
    3. Based on the number of materials (5 in this case), I need to generate a PDF which will have 10 pages (2 for each material).
    4. the generated PDF should be like the one shown below:
    e.g.  MATERIAL_PDF (pdf name)  
          |  Page1(Mat1[View1].data)
          |  Page2(Mat1[View2].data)
          |  Page3(Mat2[View1].data)
          |  Page4(Mat2[View2].data)
          |  Page5(Mat3[View1].data)
          |  Page6(Mat3[View2].data)
             .. and so on...
    Thanks,
    Aniket

    Isn't it just by setting the two pages into a form ( like an subform in the content ) and put the settings in a proper way?
    There is this setting, that the masterpage comes up everytime the pagecount is done.
    Example
    Page 1 3 5 --> Masterpage 1
    Page 2 4 6 --> Masterpage 2
    And the designview with the flowing data, you can do it by scripting to get to the next page after the pos is finished.
    Unfortunaly I do not got a system atm, so I hope the explaination give you a clue, where to search.
    Regards
    Florian

  • 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

Maybe you are looking for