Regarding dynamic variants

Hi all ,
      i have code where i have created a selection screen.
      like :
<code>
DATA: v_date TYPE sy-datum,
      v_next TYPE sy-datum.
SELECT-OPTIONS: s_date1 FOR v_date,
                s_date2 FOR v_date.
INITIALIZATION.
  s_date1-low  = sy-datum + 1.
  s_date1-high = s_date1-low + 60.
  APPEND s_date1.
  s_date2-low  = s_date1-high + 1.
  CALL FUNCTION 'MONTH_PLUS_DETERMINE'
    EXPORTING
      months  = '6'
      olddate = s_date2-low
    IMPORTING
      newdate = s_date2-high.
  APPEND s_date2.
START-OF-SELECTION.
</code>
i want to create dynamic variants , how to create that and can anyone suggest any function module.
regards,
karan

Please follow these steps
1. Enter the values in the selection screen
2. Save the variant using the SAVE button
3. In the next screen for the date variable select the 'Selection variable' checkbox (L) and click on the button 'Selection variable' in the toolbar.
4. Now you will see this variable in the next screen with 3 types of buttons. Click on the middle button (ie. D - Dynamic date calculation).
5. Click on the down arrow button and select the option 'Current Date'.
6. Save the variant.
Also check the thread.
Dynamic Variants

Similar Messages

  • 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

  • How to set a dynamic variant for date in select-options in the upper field

    Hi  Variant experts Good Evening!
           I have the following problem while setting up a dynamic varinat .
    Ex: select-options: dat for sy-datum.  
    I am able to save the lower limit as a dynamic value but not able to save the upper values as dynamic in the select-options. Could any of you please help me in this.
    Regards
    Ravi.

    i hope dynamic variant concept is not there,
    but u can use the fn module DYPRO_GET_VALUES  and
    DYNPRO_SET_VALUES
    DYNPRO_GET_VALUES gets the values in the screen,
    DYNPRO_SET VALUES sets the values.
    first get the values, compare and set the values as u want

  • Dynamic variant create for select option High value

    Hi ,
    I would like to set a dynamic variant for Date filed in selection screen as lower limit as 01/01/2009 and Last day of previous month as hiher limit. For examplae: Lower limit = 01/01/2009 and higher limit as 02/28/2011.
    Please help me in creating dynamic variant as mentiond above.
    Thanks & Regards,
    Venkat N.

    Hi,
    Thank you for your reply and could you please provide if you have any code.
    Thanks & Regards,
    Venkat N.

  • Create dynamic variante in report

    hello masters, im trying to create a dynamic variant for a report, im following the instructions of document that exists in <blocked site removed by moderator> but the option D- Dynamic date calculation doesnt appear to me in the field that i want to calculate date... the field it is of type S - selection-option... someone have any clue that could be.
    regards and thanks in advance
    Mario
    Edited by: Thomas Zloch on Jul 11, 2011 2:34 PM

    hello Alvaro, thanks for your answer.
    you are right, my field isnt DATE it is CHAR.
    thanks for your help.
    Mário

  • Dynamic variant

    hi all,
      i created a report and that report has to be execute in back ground daily with variant,but my report contains some date field, so i need to change the date value in that varient,how can i do it.How can i create dynamic variant,could you please help me.
    regards,
    Bujji.

    Hi Murali,
    You can do this in the variant itself.
    Please follow these steps
    1. Enter the values in the selection screen
    2. Save the variant using the SAVE button
    3. In the next screen for the date variable select the 'Selection variable' checkbox (L) and click on the button 'Selection variable' in the toolbar.
    4. Now you will see this variable in the next screen with 3 types of buttons. Click on the middle button (ie. D - Dynamic date calculation).
    5. Click on the down arrow button and select the option 'Current Date'.
    6. Save the variant.
    Kindly assign points if this is helpful.
    Cheers
    Vinod
    Message was edited by: Vinod C

  • BEx Broadcasting through e-mail, using dynamic variant

    Dear SAP Gurus,
    I'm new to SAP-BI, I came across the following situation:
    I've a query based on which the reports are being generated.
    My client wants to broadcast it every month, as they don't have any portal, so it has to be done through e-mail.
    the query has 3 system variable which are FISCALYEAR and CALDAY, i dont remember 3rd.
    So, I've to create DYNAMIC VARIANT, I tried the following procedure but its not working.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/9075b11a-6e43-2c10-b7be-cfa0e97ec0cc?QuickLink=index&overridelayout=true
    please help me.

    Hi shivsam  ,
    1. What you need is dynamic filling the variant value.
    2. In transaction SE38 enter the variant name
    3.choose the attributes  button.
    4. Here you can set the field to u201Cselection variable.u201D
    5.Then you can define something like  SY-DATUM(4)  for fiscal year and in the same way for calday SY-DATUM+6(2) .
    Hope this will help .
    Regards,
    Jaya Tiwari

  • 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

  • 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

  • Diifernece b/w varinats & dynamic variants

    Hello Abapers,
    Could you guys help me out in explaining the diff b/w variant & dynamic variant ...where it is used in what scenarios...
    it will be appreciated with lots of points if you cld able to explain with an example.
    awaiting for your replies....
    Regards,
    Ravi V Ganji

    Hi,
    <b>Varinats</b>
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/62/2e5ed7f50d2d4085c1d6bed67b24c0/frameset.htm
    <b>Dynamic Variants:</b>
    Dynamic varaints possible in 2 ways.
    - Dynamic declaration by System defined variables
    - Dynamic declaration by custom defined variables
    the first one is defined by the variant management screen. The second one is defined using STVARV and STVARC tcode.
    In STVARV you define a variable which will be available as drop down in the varaint management screen.
    Please follow these steps:
    1. Enter the values in the selection screen
    2. Save the variant using the SAVE button
    3. In the next screen for the date variable select the 'Selection variable' checkbox (L) and click on the button 'Selection variable' in the toolbar.
    4. Now you will see this variable in the next screen with 3 types of buttons. Click on the middle button (ie. D - Dynamic date calculation).
    5. Click on the down arrow button and select the option 'Current Date'.
    6. Save the variant.
    Reward if it helps
    Regards,
    Santosh

  • Extract Dynamic Variant Contents

    Hi
      I have the requirement where I need to extract the vlaues of variants(Dynamic Variants).The contents of dynamic variants
      can be extracted using the FM 'RS_VARIANT_CONTENTS' but only for programs where Logocal Databases(LDB) are used.
      There are some of programs in SAP where LDB's and they have the dynamic selection screen.In this case the FM doesn't return
      the contents of dynamic variant.
    Could you please provide any FM or class which could return the contents of dynamic variants?
    Thanks in advance
    Davinder Singh

    Please, post your solution.
    Best regards,
    Leandro Mengue

  • 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

  • Redwood Cronacle - dynamic variants

    Would like to better understand dynamic variants.  I have looked in Cronacle on-line help and cannot find anything there.  Only information I have is that is needed to run RSI_GENERATE_VARIANT and then in a job chain...
       step 1 to set the variant using generated script and
       step 2 to executes the ABAP using template or imported script
    Would like to obtain better understanding of what situations one would use dynamic variants in and maybe short list of steps to do to acccomplish same.
    Best Regards,
    Dean Atteberry.

    Hello Dean,
    Yes indeed, there is no help available for dynamic variants in Redwood. Dynamic variants are those variants that are dynamically picked up from the SAP database. They are supposed to be automatically generated nightly via job RSI_GENERATE_VARIANTS. Unfortunately in Redwood, it often fails on individual jobs.
    Regards,
    Atul Lotlikar

  • 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,

  • Using dynamic variants in ABAP

    Hi,
    I have an issue. I want to use dynamic variants in my program. On the selection screen of my program, I have a parameter called Planning date which takes in the current week of the year as input value, i.e lets say today we are Monday 14th of May 2007, so the current week is 20. I want to make this parameter dynamic, i.e to change automatically so that next week the value is week 21.
    Also is setting dynamic variants version dependent? My version is 5.0 SR1 and I don't have the option of save my variant using the 'D' traffic signal.
    Please help me out.
    Thanks

    Hi,
    you can fill your parameter in the initialization event of your report. In order to get the week you can use the function DATE_GET_WEEK.
    Kostas

Maybe you are looking for

  • EFI update went well.  Am I crazy or do things seem snappier

    I just updated my iMac with the EFI update. Very smooth. Subjectively, the machie seems much more responsive and quick. Is this just me or have others noticed what appears to be this increase in responsiveness. For example, applications just seem to

  • How can I burn a MP3 CD in itunes

    I bought an Asus DVD/CD burner to plug into my MBA in hopes that I could burn an MP3 CD for my car stereo. When I try to burn the CD iTunes tells me it can't find the burner. How do I mount, or setup, the burner so iTunes will see it. I can play a DV

  • Error in Consuming webservice proxy in SAP

    Hi, I have a webservice which I am not able to consume in SAP. I get an error 'Cannot generate Proxy (object <attribute name="arrayType"> missing in WSDL, see long text'). When i tried to search in SDN, I found a post which says that SAP doesnt suppo

  • In F-53 system listing out wrong open item

    Hi Guru's, while making outgoing payment in F-53 system listing out 'A001' & 'B001' company code open item rather than 'A001' company code open item. In the selection screen we are giving only company code 'A001'. This vendor has been extended for bo

  • Flash Player Vulnerability

    When do you think apple will solve the flash player vulnerability problem with snow leopard? Is it worth installing before they make the patch? http://www.forbes.com/2009/09/03/apple-snow-leopard-technology-security-flash.ht ml?partner=artctrlinboxma