Date selection in a program variant

Hi,
        I would to like to set a variant for a program under ECC6.
         The date selection has to be dynamic, and i would like to put in the selection from a fix date (e.g 1.1.2009) to (today's date + 5 days).
         It is possible?
min

Hi,
Why don't you write a code for this in INITIALIZATION.
Second possibal way which I think you want is :
1. Give the fix date you want in From date field.
2 Press save ( variant maintinance screen will open
3 Go to your date filed and press F4 on selection variant forum, and choose D.
4 Go to last column name of variable and select F4.
6 Give the number of days from current date you want in field Currne date +/-??? days
7 save variant.

Similar Messages

  • Defining Selection variables for program variant, TVARV table Help - urgent

    Hi All,
    Can anyone tell me, what is the transaction to create new variables in table TVARV to use them in my variant for fiscal year and WIP period fields in selection screen of SAPKKA07 program.I used STVARV and it creates variables in table TVARVC table not in TVARV table and moreover in creating a variant the selection variables are defaulted as variables from TVARVC table as input help but not the variables in TVARV table however I see and understand different from SAP Help. The following is the link
    http://help.sap.com/saphelp_47x200/helpdata/en/25/c966398ae5c13ae10000000a114084/frameset.htm
    for selection variable creation.
    Can anyone help me on this this is very urgent. Your help is highly appreciated
    Thanks in advance
    Kumar

    Thanks Appana,
    I know we can create the variable that way but, that is something hardway to do it. I want to go about it from transaction not meaning to update the table directly and moreover if I update the TVARV table directly as u said I still dont see the variable I created in the list I get on input help for selection variables while creating a program variant.
    I hope u can suggest me better now.
    Thanks
    Kumar

  • EXIT FOR SELECTING AUTOMATIC PAYMENT PROGRAM VARIANT

    HI Experts,
    I want to fix the variant as per the payment method selected in automatic payment method parameter.
    ( Ex. i want to populate the variant CHECK  in print parameters if user enter C as the payment method )
    How it can be done? is there any exit available?
    it is urgent. Points will be rewarded.
    regards,
    MAHESH

    hi,
    check these badi's.
    FI_BSTM_MC_EXIT                         FI Account Statement: Exit from MultiCash Conversion
    FI_F110_SCHEDULE_JOB                    F110: Check before scheduling a proposal/update run

  • Program to regenerate user variants for dynamic date selection!

    Hello all:
           We upgraded to ECC6.0 from 4.6C and there are some variants that user created in 4.6C in which they set dates like date = date - 1day something like that (basically dynamic date selection). These variants are not working in ECC6.0 unless the user clicks on the variant button and resaves it!! Does anyone know if there is any SAP program  that I can run that does this automatically? Rewards assured.
    Thanks.
    Mithun

    Thanks for the reply Rob. We already ran RSVARDOC_610! Is there any specific program just for the issue I am having?
    Thanks.
    Mithun

  • BMBC Dynamic Date selection Variant

    Hello Team,
    I want to create variant in BMBC -Batch Information Cockpit with Dynamic Date Selection. But it do not find the screen the to set-up variant attributes
    This is the field where I want to have dynamic date selection, 1st Day of the month to Last day of the month.
    Field name and program
    I am using SE80
    As you can see screen number 0100 is not showing up. and I have gone though all available screen but i could not find the field.
    Please advise if dynamic date selection for this field is possible at all or there is other way.
    Thanks

    I don't think that it is possible to have dynamic date selection here. The whole selection screen is just dynamic, it has only place holders and you define in customizing which field is on the selection screen.
    You actually save a selection variant via this extra big button for selection variants, which is quite different to the disc icon where you usually save your selection variants and where  you have the option to define dynamic date fields.

  • Dynamic date selection in variants

    Dear Experts ,
    I require to make the dynamic selection for a date range in a particular report as under :
    From Date : Current date - 90 days
    To date : Current date - 60  days
    How can i achieve this in the variant ?
    Regards
    Anis

    this is an example on making a date field dynamic for transaction MICN, it is the same way for other transactions
    Create a variant by saving your selection.
    after clicking the save button, you are in the screen fro variant attributes.
    enter variant name and desciption
    Find the fields GIDAT and GBDAT.
    If you plan to run it e.g. every monday. then the monday will be your start date GIDAT and the next Sunday your to-date GBDAT.
    select GIDAT and find the column for selection variable, press F4 in that field and select D for dynamic selection.
    Then find field name of variable, press F4 and select current date.
    select GBDAT and find the column for selection variable, press F4 in that field and select D for dynamic selection.
    Then find field name of variable, press F4 and select current date +x days. then enter 7 in the pop-up.

  • Dynamic date selections in a variant

    Hi All,
    I need to dynamically change the date field of a report which runs every month end. Our working calendar is designed such that the last working day is the last Friday of the current period and hence the first working day is the last Saturday of the previous period. Now we have Fiscal Calendar variant which takes care of the last Friday part. I also know we have to select 'D' in the variant screen but my problem is in assigning the Last Saturday of the previous period in the date range field. Any hints or suggestions on this would be highly appreciated and of course rewarded generously.
    Thanks & Regards,
    Rajesh

    Hi Rajesh,
    After seecting Selection Variable "D" you have to carry out following things to cater your requirements;
    (a) Goto Name of Variable (input only using F4)
    (b) Select your variable depending upon your business requirement.
    Current Date
    From month start to today
    Current date +/- ??? days
    current date +/- ??? work days
    First day of current month
    <b>nth working day of current month</b>
    First day of next month
    First day of previous month
    Last day of previous month
    Last Day of the Current Month
    First quarter ????
    Second quarter ????
    Third quarter ????
    Fourth quarter ????
    Current date - xxx,current date + yyy
    Date - xxx, Date + yyy (work days)
    Previous month
    Current period
    (Beginning of mth-xx months, end of mth+yy months)
    I think nth working day of current month is suitable for your requirement.
    Bye,
    Muralidhara

  • Dyanamic Date Selection in variants

    Hi....
    In select-options i have declared one field for Posting Date.
    my requirement is
    in TO : Today - 1.
    based on that FROM : start of month date
    for that what i hv to change in variant.
    I hv select for date selection variable as D and
    Name of Variable :  what i hv to choose.
    or how can add my new formula in that.
    Regards,
    Arpit

    Hi Arpit,
    yes this is possible ... and this time i tried it out before i post..
    I used this little testreport:
    DATA: lt_range_date TYPE RANGE OF d,
          ls_range_date LIKE LINE OF lt_range_date.
    ls_range_date-sign   = 'E'.
    ls_range_date-option = 'BT'.
    ls_range_date-low    = '20071201'.
    ls_range_date-high   = '20071212'.
    APPEND ls_range_date TO lt_range_date.
    SUBMIT zdatetest  USING SELECTION-SET 'TEST'
                        WITH s_date       IN lt_range_date.
    It's calling a testreport zdatetest which has two parameters and a variant TEST.
    One parameter was set by the variante and the other for the date-selection was set from the lt_range_date.
    Stefan

  • How to debug an OLAP variant which is in Infopackage Data selection Tab

    Hi experts,
    How can I debug an OLAP variant used in the data selection tab for an infopackage? The loading is done via process chains. I am trying to debug the SAP delivered OLAP variant 0P_PPER3 of infoobject 0FISCPER3 (SAP exit). If I am not mistaken I believe the function module is RSVAREXIT_0P_PPER3. Thanks.

    Hi Mark !
    This method is always good (if you have authorization to work in SM50):
    put before your code an endless loop like this one:
    data flag type c.
    clear flag.
    do.
    if flag = ' '.
    exit.
    endif.
    enddo.
    then start your load...go to SM50 and here you will see your process looping on the same pgm...highlight the process and access into it in debug mode from the menu...
    here you can change flag in 'X', exit from the loop and continue all the process in debug !!!
    Hope it helps!
    Bye,
    Roberto
    ...and please don't forget to reward the answers...it's THE way to say thanks here !

  • Extraction problem - selection conditions for data load using abap program

    Hi All,
           I have a problem loading data over a selected period where the selection of date range is done using ABAP routine (type 6). Here though in the request header tab in monitor screen i'm able to see the selection date range populated correctly, no records are being extracted. But if i delete the abap filter and directly give the same date range for selection we are able to extract data. if any body has faced similar problem and have a solution for it please help me with yur suggestion.
    Thanks,
    nithin.

    It seems the the data range is not properly set in the routine.
    You can check the value of selection period generated by routine in the data selection tab-> execute button is there .
    Click it to to test the selection values generated by the ABAP routine..
    If the value here seems correct one then paste the code of the routine that u have written with brief logic details that u have applied.
    Sonal.....

  • Key Date a Customer Exit and Variant use

    Hello,
      I have a query and it includes time dependent data. The key date uses a  variable that is filled with the current date in a customer exit. Works nicely when the query is executed. However, if I save a variant with various values for variables on the starting/selection screen, the date is saved as a constant date and not dynamic based on the current date so that when the variant is selected to be used on a different day, the key date is the date the variant was saved and not the current date. This can be handled in R/3 ABAP report variants but I've not found a way to do it in BEx. Any help?
    Thanks,
    Diane

    Hi,
    If you are running on BI 7.0 you can maintain variants with the below code. make data sy-datum instead of user input.
    You can also chect the document. It also contains a method for bw 3.5 variants.
    You can schedule this program in a process chain or make variations of this as needed.
    [How To… Troubleshoot Information Broadcasting (BEx Workbooks)|http://www.sapadvisors.com/resources/HowtoInformationBroadcasting.pdf]
    *& Report Z_MASS_VARIANT_MAINTENANCE *
    *& Program to mass update BEx Variants within SAP NetWeaver 2004s *
    REPORT Z_MASS_VARIANT_MAINTENANCE.
    parameter variable like RSRVARIANT-VARI.
    parameter vname like RSRVARIANT-VNAM.
    parameter sign_01 like RSRVARIANT-SIGN.
    parameter opt_01 like RSRVARIANT-OPT.
    parameter low_01 like RSRVARIANT-LOW.
    parameter high_01 like RSRVARIANT-HIGH.
    tables: RSRVARIANT.
    select * from RSRVARIANT.
    if rsrvariant-VARI = variable AND rsrvariant-vnam = vname.
    rsrvariant-SIGN = sign_01.
    rsrvariant-OPT = opt_01.
    rsrvariant-LOW = low_01.
    rsrvariant-HIGH = high_01.
    elseif rsrvariant-vnam = vname.
    rsrvariant-SIGN = sign_01.
    rsrvariant-OPT = opt_01.
    rsrvariant-LOW = low_01.
    rsrvariant-HIGH = high_01.
    endif.
    update rsrvariant.
    if sy-subrc <> 0. insert rsrvariant. endif.
    endselect.
    regards,

  • F.27 get message no data selected

    When running F.27 , there is "no data selected". though we have configured sap13 correspondence. and maintained peridic statement in customer master data. also maintained variant for porgram RFKORD11. Is thera anythign i am missing? Do I need to maintain anythign in the variant that probably I am mising. all i entered is comoany code, correspondence sap13, form id

    Hello,
    Prerequisites:
    1.     Correspondence form assignment to the program RFKORD10 in the transaction OB96
    2.     Assign indicator in customer master data
    Mention Company code, Account type, indicator in the master data, key date for account statement, correspondence(SAP06) & execute F.27 it will work out.
    Regards,
    Venkat

  • Sort the Data Selection in TVARV Table

    hello...i wanted to run a SAP Standard Program and it is have a variant selection for me to select the variable from TVARV table. When this program run, I would like to have a selection of choosing the latest date to run the program based on the variant I save. I created a variables in the TVARV table but I cannot see any selection which can sort the selection based on the latest date. I can only choose to be EQ and etc. Is there any selection that I can make so that the program always choose to be run based on the latest date? thanksss alot!!!

    Look at table VARID.
    Rob

  • Is it possible to delete data selectively from Business content cubes

    Dear Experts,
             Requesting you to help me out to know, is it possible to delete data selectively from Business content cubes.
    When I'm trying to delete selectively from Business content cubes, the background job gets cancelled with ST22 logs stating
    A RAISE statement in the program "SAPLRSDRD" raised the exception  condition "X_MESSAGE".                                                                               
    Since the exception was not intercepted by a superior program, processing was terminated.  
    and i tried  with few more Technical content cubes but the same thing happens.
    Pls let me know how to selectively delete data from Business content cubes if it's possible?.
    Thanks in advance for your favorable assistance.
    Regards,
    Ramesh-Kumar.

    Hi Ramesh,
    Follow below steps for selective deletion:
    1.     Transaction code: Use the Transaction code DELETE_FACTS.
    2.     Generate selective deletion program:
    A report program will be generated of the given name, here .
    3.     Selection screen:
    Take the deletion program u201CZDEL_EPBGu201D to the transaction code SE38 to see/execute the program.
    After executing it will take you to a selection screen:
    As we need to carry out deletion selective on Calendar week, we need to get the screen field for the field Calendar week. For this, click on the Calendar week field and press F1.
    Click on the technical information button (marked in red box above) you will get below screen:
         ABAP program to carry out the Calendar week calculation
    Problem scenario: As stated earlier the requirement is to delete the data from the cube based on the calendar week. Thus a code must be developed such that the number of weeks should be taken as input and corresponding calendar week should be determined. This calendar week should be then passed to the deletion program in order to carry out the data deletion from the InfoCube.
         Transaction code: Use T-code SE38 in order to create a program.
    Logic: Suppose we need to delete the data older than 100 weeks.
    a.     Get the number of weeks and system date in variables and calculate the total number of days :
    lv_week = 100.      *number of weeks      
    lv_dte = sy-datum.     *system date
    v_totaldays = lv_week * 7.      *total days
    b.     Get the corresponding calendar day from the total days. This is obtained by simply subtracting the total no. of days from the system date.
    lv_calday = lv_dte - v_totaldays. *corresponding calday.     
    c.     Now in order to get the calendar week corresponding to the calculated calendar day we must call a function module 'DATE_TO_PERIOD_CONVERT'. This function module takes input as Calendar day and Fiscal year variant and returns the appropriate fiscal period.
    Get the sales week time elements
      call function 'DATE_TO_PERIOD_CONVERT'
        exporting
          i_date                      = lv_calday
          i_periv                     = lc_sales
        importing
          e_buper                     = lv_period
          e_gjahr                     = lv_year
        exceptions
          input_false                 = 1
          t009_notfound               = 2
          t009b_notfound              = 3.
      if sy-subrc = 0.
        ls_time-calweek(4)      = lv_year.
        ls_time-calweek+4(2)    = lv_period.
      endif.
    v_week = ls_boots_time-calweek.
    Note: We can pass the fiscal year variant which can be obtained from the table T009B.For e.g. here fiscal year variant lc_sales = Z2. LS_TIME will be any table with suitable time units.
    d.     Now we have obtained the required calendar week in the v_week variable. This calendar week is the week till which we need to keep the data. And older data than this week will be deleted. This deletion will be done by the deletion program
    Submitting the Data deletion program for ZEPBGC01 and key field
    SUBMIT ZDEL_EPBG WITH C039 LT v_week.
              Here the calendar week value is submitted to the deletion program ZDEL_EPBG with the screen field of calendar week.
    Hope ... this will  help you..
    Thanks,
    Jitendra

  • Associate Print Parameters with Program Variant

    Is there any standard way to associate a particular set of print parameters with a program variant?

    i think it is possible ? try to make use of
    <b>
    Selection Variables
        The following three types of selection variables are currently
        supported:
        o   Table variables from TVARVC
            You should use these variables if you want to store static
            information. TVARVC variables are proposed by default.
        o   Dynamic date calculations:
            To use these variables, the corresponding selection field must have
            type 'D' (date). If the system has to convert from type T to type D
            when you select the selection variables, the VARIABLE NAME field is
            no longer ready for input. Instead, you can only set values using
            the input help.
            The system currently supports the following dynamic date
            calculations:
            Today's date
             From beginning of the month to today
             Today's date +/- x days
             First quarter ????
             Second quarter ????
             Third quarter ????
             Fourth quarter ????
             Today's date - xxx, today's date + yyy
             Previous month
         o   User-specific variables
             Prerequisite: The selection field must have been defined in the
             program using the MEMORY ID pid addition. User-specific values,
             which can be created either from the selection screen or from the
             user maintenance transaction, are placed in the corresponding
             selection fields when the user runs the program.
         The SELECTION OPTIONS button is only supported for date variables that
         fill select-options fields with single values.
    </b>
    but thing is u have to maintain para/selection options for ur report.
    Regards
    Prabhu

Maybe you are looking for