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

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,

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

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

  • 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 for select option High value

    Hi ,
    Please help me in creating dynamic variable for a select option date field high value.
    II tried the following method:
    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 (i.e. D - Dynamic date calculation).
    5. Click on the down arrow button and select the option 'Current Date'.
    5. Save the variant.
    But it is saving the date value in Field LOW of select option( From value).
    I need it in TO field( High value).
    Please help.
    regards,
    Sheeba

    Hi Sheeba
        we can do it other way .. Select the same steps as you have done but after the assigning the value current date to low ..click on the selection option push button at the application bar and choose the 'less than or equal to' option to your select option value and try the same ....
    I guess this would throw you same results as that of the value in the high value button
    Cheers,
    Jacks.

  • 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

  • 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

  • Create Dynamic variant for date field

    Hello all,
    I need to have the current month year displayed in my selection screen in format MM.YYYY and the field is of type SPMON (Period to analyze - month).
    and while saving the variant it is showing only 'T' (entries from TVARVC table)  in  "selection variable" field and not showing 'D' (Dynamic selection) for the above field.
    So,please help me in resolving this issue.
    Thanks in advance.

    hi
    good
    go through this code,i hope this ll help you to create the dynamic variant.
    Please find the sample using RS_CREATE_VARIANT (FM).
    It make use of other FM also , just have a look .
    Hope this may help you.
    REPORT ZEXAMPLE.
    DATA: JVARI_DESC LIKE VARID,
    RC LIKE SY-SUBRC,
    VARIANT_TEXT LIKE VARIT-VTEXT,
    JVT LIKE VARIT OCCURS 0 WITH HEADER LINE,
    SELPA LIKE RSPARAMS OCCURS 0 WITH HEADER LINE,
    PARMS LIKE RSPARAMS OCCURS 0 WITH HEADER LINE,
    OBJS LIKE VANZ OCCURS 0 WITH HEADER LINE.
    PARAMETERS: P_VAR LIKE RSVAR-VARIANT. "NAME OF VARIANT
    JVARI_DESC-REPORT = SY-REPID.
    JVARI_DESC-VARIANT = P_VAR.
    JVARI_DESC-ENAME = 'EXAMPLES'.
    JVT-REPORT = SY-REPID.
    JVT-VARIANT = P_VAR.
    JVT-LANGU = SY-LANGU.
    JVT-VTEXT = 'FUNCTION EXAMPLES'.
    APPEND JVT.
    CLEAR SELPA.
    SELPA-SIGN = 'I'.
    SELPA-OPTION = 'EQ'.
    SELPA-KIND = 'P'.
    SELPA-SELNAME = 'P_VAR'.
    SELPA-LOW = P_VAR.
    APPEND SELPA.
    CHECK IF VARIANT EXISTS
    CALL FUNCTION 'RS_VARIANT_EXISTS'
    EXPORTING
    REPORT = JVARI_DESC-REPORT
    VARIANT = P_VAR
    IMPORTING
    R_C = RC
    EXCEPTIONS
    NOT_AUTHORIZED = 1
    NO_REPORT = 2
    REPORT_NOT_EXISTENT = 3
    REPORT_NOT_SUPPLIED = 4
    OTHERS = 5.
    IF RC = 0 AND SY-SUBRC EQ 0.
    DELETE OLD VARIANT
    CALL FUNCTION 'RS_VARIANT_DELETE'
    EXPORTING
    REPORT = JVARI_DESC-REPORT
    VARIANT = P_VAR
    FLAG_CONFIRMSCREEN = 'X'
    EXCEPTIONS
    NOT_AUTHORIZED = 1
    NOT_EXECUTED = 2
    NO_REPORT = 3
    REPORT_NOT_EXISTENT = 4
    REPORT_NOT_SUPPLIED = 5
    VARIANT_LOCKED = 6
    VARIANT_NOT_EXISTENT = 7
    NO_CORR_INSERT = 8
    VARIANT_PROTECTED = 9
    OTHERS = 10.
    IF SY-SUBRC NE 0.
    WRITE: 'UNABLE TO DELETE VARIANT:', P_VAR ,'STATUS=', SY-SUBRC.
    EXIT.
    ELSE.
    WRITE:/ P_VAR, 'DELETED'.
    ENDIF.
    ELSE.
    WRITE:/ P_VAR, 'DOES NOT EXIST'.
    ENDIF. " ALREADY EXISTS
    CALL FUNCTION 'RS_CREATE_VARIANT'
    EXPORTING
    CURR_REPORT = JVARI_DESC-REPORT
    CURR_VARIANT = P_VAR
    VARI_DESC = JVARI_DESC
    TABLES
    VARI_CONTENTS = SELPA
    VARI_TEXT = JVT
    EXCEPTIONS
    ILLEGAL_REPORT_OR_VARIANT = 1
    ILLEGAL_VARIANTNAME = 2
    NOT_AUTHORIZED = 3
    NOT_EXECUTED = 4
    REPORT_NOT_EXISTENT = 5
    REPORT_NOT_SUPPLIED = 6
    VARIANT_EXISTS = 7
    VARIANT_LOCKED = 8
    OTHERS = 9.
    IF SY-SUBRC EQ 0.
    WRITE:/ 'VARIANT', P_VAR, 'CREATED FOR PROGRAM', JVARI_DESC-REPORT.
    ELSE.
    WRITE:/ 'VARIANT', P_VAR, 'NOT CREATED FOR PROGRAM', JVARI_DESC-REPORT.
    EXIT.
    ENDIF.
    CALL FUNCTION 'RS_VARIANT_CONTENTS'
    EXPORTING
    REPORT = JVARI_DESC-REPORT
    VARIANT = P_VAR
    TABLES
    VALUTAB = PARMS
    OBJECTS = OBJS
    EXCEPTIONS
    VARIANT_NON_EXISTENT = 1
    VARIANT_OBSOLETE = 2
    OTHERS = 3.
    IF SY-SUBRC NE 0.
    WRITE : / 'ERROR READING VARIANT CONTENTS.'.
    ELSE.
    CALL FUNCTION 'RS_VARIANT_TEXT'
    EXPORTING
    LANGU = SY-LANGU
    CURR_REPORT = JVARI_DESC-REPORT
    VARIANT = P_VAR
    IMPORTING
    V_TEXT = VARIANT_TEXT.
    WRITE:/ 'VARIANT DESCRIPTION:', VARIANT_TEXT.
    LOOP AT PARMS.
    CHECK PARMS-LOW NE SPACE OR PARMS-HIGH NE SPACE.
    READ TABLE OBJS WITH KEY NAME = PARMS-SELNAME.
    WRITE : /2 PARMS-SELNAME, OBJS-TEXT,
    45 PARMS-KIND,
    PARMS-SIGN,
    PARMS-OPTION,
    PARMS-LOW,
    PARMS-HIGH.
    NEW-LINE.
    ENDLOOP.
    SKIP.
    ENDIF.
    some other approach....
    This function module selects the Selection Screen contents
    CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
    EXPORTING
    curr_report = sy-repid
    TABLES
    selection_table = loc_int_tab
    EXCEPTIONS
    not_found = 1
    no_report = 2
    OTHERS = 3.
    IF sy-subrc NE 0.
    MESSAGE i000 WITH 'Error in RS_REFRESH_FROM_SELECTOPTIONS'(029).
    LEAVE LIST-PROCESSING.
    ENDIF.
    Craete the variant VAR1
    CALL FUNCTION 'RS_CREATE_VARIANT'
    EXPORTING
    curr_report = sy-repid
    curr_variant = wf_variant
    vari_desc = loc_varid
    TABLES
    vari_contents = loc_int_tab
    vari_text = loc_varit
    EXCEPTIONS
    illegal_report_or_variant = 1
    illegal_variantname = 2
    not_authorized = 3
    not_executed = 4
    report_not_existent = 5
    report_not_supplied = 6
    variant_exists = 7
    variant_locked = 8
    OTHERS = 9.
    IF sy-subrc <> 0.
    MESSAGE i000 WITH 'Error while creating dynamic variant'(028).
    LEAVE LIST-PROCESSING.
    ENDIF.
    reward point if helpful.
    thanks
    mrutyun^

  • Dynamic Variant for Background Programs

    Hi,
    On a Std program, I have two parameter Settlement Period and Settlement Year.
    I want to run this std program in the background with VAriant.
    The values in these variable should change automatically for every new period/fiscal year.
    I tried to user Selection variable. But no success. May be I am doing something wrong.
    Can anyone suggest any solution??
    - Harshad

    Hi Harshad,
    Once u enter the values you require on the selection screen and click on the SAVE button to save a variant, the Variant attributes screen comes up where you can provide a variant name and description.
    On this screen there is a column called "Save field wthout values". If you check this option then the values to which the selection screen variables are defaulted will change dynamically.
    So basically you have to default the selection screen new period/fiscal year in your program to the present values using a function module which im sure your using(if you need it ask me). Once you default them while saving the variant check the "Save field without values" check box against those fields.
    Hope this helps you. Please award points if it does.
    Regards,
    Ganesh
    Message was edited by:
            Ganesh Chilakapati

  • How to set Dynamic variant  for a program

    Hello experts,
    I want to set variants dynamically on a selection screen. Please help me.
    Thanks,
    Ashwani.

    Hi Ashwani,
    The variant can be set using:
    SUBMIT program name [USING SELECTION-SET <var>]
    USING SELECTION-SET <var>
         This option tells the system to start the called program with the variant <var>.
    For further details you can refer the link below:
    http://help.sap.com/saphelp_nw04/Helpdata/EN/9f/dba51a35c111d1829f0000e829fbfe/frameset.htm
    Also refer,
    http://sapbrainsonline.com/sap-training/SAP-tutorial-pdf-material_425.html
    Regards,
    Soundarya.
    Edited by: K.Soundarya Singh on Mar 16, 2010 7:16 AM

  • Dynamic Variant for File with RUN ID and RUN DATE for F110 Transaction

    Hi Gurus,
    I have created DMEE and using this Iam creating a flat file using F110 t-code. File has naming convention
    TEST_<F110 run date>_<F110 run id>.TXT
    Ex:   If you execute program RFFOAU_T, we give input in the selection screen
      Program run date : 02.12.2010
      Identification feature : ABCD
    File should be created in AL11 like...   TEXT_20101202_ABCD.TXT
    File Name (for DME) is also exists in the same selection screen for the program.
    How to create dynamic as above. Iam not using custom program to concatenate run id and date.
    Please help me out.
    Thanks
    Krishna

    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 Variant for First Day of the Year

    Hello All,
    When I am trying to change the variant field related to date, i couldnot find out variant attribute for the FIRST DAY OF THE YEAR.
    Is it possible to add one more attribute FIRST DAY OF THE YEAR just like attributes which are existing.(Current date, First day of the month .. etc are already existing.)
    If it is possible,could anyone please post the procedure for this..?
    Thanks and regards,
    Mervin Mathew

    Hi,
    unfortunatelly there is not such option.
    If this is customer report, You can set initial date in INITIALIZATION event:
    INITIALIZATION.
      CLEAR: so_date, so_date[].
      so_date-sign = 'I'.
      so_date-option = 'GE'.
      so_date-low = sy-datum.
      so_date-low+4(4) = '0101'.
      APPEND so_date.
    Regards,
    Przemysław

Maybe you are looking for

  • Error while creating Maintenance Plan

    Hello, When I am creating a Maint Plan, I am getting error No packages have yet been assigned to the maintenance item 143 Message no. IP364 How do I solve this?? Narendra

  • Where is the sync key saved, is there a specific file in which it might be saved? prefs.js or user.js?

    Hey all, I really hope I can get an answer to this issue because it's been 3 days a-crackin' with absolutely nothing certain. I had decided to fresh install FF because it had been giving me some trouble and what I thought should be a breeze ended up

  • How to create Infocube in BI 7.0

    Hi Friends, I am creating new infocube in BI Netweaver 7.0 , I will get the data from Datastage. So Datastage is my Data Source. wht r the steps i want to follow in Infocube creation. pls guide me. Thanks in Advance Dora

  • Cannot Unzip gz file in AIX

    I am trying to unzip Oracle's client installable file 10gr2_aix5l64_client.cpio.gz. When i tried # gunzip 10gr2_aix5l64_client.cpio.gz I got the error gunzip: 10gr2_aix5l64_client.cpio: File too large Any thoughts on this?

  • My Mac says i do not have permission to upgrade software

    I am currently using Mac OS X version 10.7.2 and when i click software update it says i do not have permission to do it. I have tred going to dik utility and clicking on repair disk permission but it still wont let me! Any ideas on have to sort this