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

Similar Messages

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

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

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

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

  • 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

  • How to set the Default values for Info Objects in Data Selection of InfoPac

    Hi All,
    Flat file Extracion:
    How to set the Default values for Info Objects in Data Selection Tab  for Info Package
    ex: Fiscal Year Variant  Info Object having values 'K4' 'Y2' etc  in Flat file
    Initially  default value(not constant)  for this info Object value should be 'K4'  in Info Package
    If I set data selection value for this info object K4 it will retreive records with this selection only? how to handle
    Rgds,
    CV

    Hi,
    suppose as your ex. if you are having fiscalyear variant in the dataselection tab then specify K4 in the from column, again the ficalyearvariant row and click on insert duplicate row at the bottom . you will get another row . In that enter Y2 in the from column. now you can extract K4, y2 values .
    haritha

  • Current date - x in variant

    Hi,
    I want to use program RHALEINI (tcode PFAL) with a variant.
    In the field "Data selection period from" I want to have a value like current date - x.
    In the Variant Attributes I select "D" for Selection variable (Dynamic date calculation) and as Variable name I select Current date +/- 30.
    Then I get the message "Lower limit of interval is greater than upper limit"
    Could somebody help?
    Thanks and regards
    Patrick

    Hi,
    at the moment I have selected "Current date" for "Name of Variable" of the field "Data selection period from".
    If I try to select for example "First day of previous month" nothing happens.
    If I select "Current date - 30" I still have the same error message mentioned above "Lower limit of interval is greater than upper limit".
    But the lower limit should be less than before.
    I would be very thankful if someone could explain this behaviour.
    It works in ERP 5.0 but it's not working in ECC 6.0.
    Regards
    Patrick
    Edited by: Patrick Koehnen on Aug 28, 2008 3:28 PM

  • Dynamic Date selection inactive

    Hi,
    I am not able to give dynamic date selection in a variant. (D: Dynamic date calculation).The traffic light is displayed in red and there is no options such as
    current date etc. is there any need to do some settings to get these options.

    Hi,
    have a look at the below link..  ( they have mentioned the steps of customer exit variable fassigning for reporting agent)
    https://websmp110.sap-ag.de/~form/sapnet?_FRAME=CONTAINER&_OBJECT=011000358700003598422003E
    Regards,
    Siva.

  • 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

  • Dynamic selection screen variant

    Hi Gurus,
    There are two parameters in the selection screen of a report. One for Date, whose format is ww.yyyy and purchasing organization. Both the fields are mandatory fields.
    I have to create variants for this report in such a way that when user selects the variant, it should give current week in combination with year in Date parameter and Purchasing organization from the saved variant list.
    Suppose there are two variants created with purchasing organizations 0001 and 0002, if i select 1st variant today then date should be 22.2007 and purchasing organization as 0001... if i select 1st variant in next week then date should be 23.2007 with purchasing organization 0001...
    Thanks in Advance,
    Phani.

    Hi Sivapuram ,
      I am not sure we can create a varaint where we have some processing involved  .
    What i would suggest is if you want this to be done for a specific varaint , then you will have to write the processing code in the at selection-screen output event .
    This code must include the logic to calcuate the value as per your requirement , the code must be executed when the specific variant is loaded , the current varaint loaded in the system is stored in the system varaible sy-SLSET.
    This is a solution which is very specific to a varaint and not a generic solution.
    Regards
    Arun

  • 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

  • Dynamically generating selection screen variants

    Hi,
    I have a report for which i have to create a variant. This report will be executed in background. There is a parameter Planning Date on the selection screen of this report. The format of this date is week.year i.e., ww.yyyy. Week should change automatically based on the week it is executed. For example, lets suppose that the current planning date is 19.2007. When you execute this report in the next week, the date should be 20.2007.
    Please suggest me on how to do this.
    Best Regards,
    Phani.

    Hi,
    Create two variants for the below program say VAR1 and VAR2.
    For the variant VAR1 take the default values say 12 and 3.
    and for VAR2 take the values 10 and 5.
    Now execute the program by selecting the variants VAR1 and VAR2. You can see the difference.
    when you select VAR1 the parameters can be seen in disable mode.
    parameters: p_num1 type i default 12,
                      p_num2 type i default 3.
    at selection-screen output.
    if sy-slset = 'VAR1'.
    loop at screen.
      if screen-name = 'P_NUM1' or
         screen-name = 'P_NUM2'.
         screen-input =  0.
      endif.
      modify screen.
    endloop.
    endif.
    write:/5 p_num1, 35 p_num2.
    Edited by: Velangini Showry Maria Kumar Bandanadham on Apr 14, 2008 12:52 PM

  • Dump while selecting a variant in SE11

    When I select a variant for table EKKO in SE11, it dumps.
    Short text: Error when attempting to IMPORT object "I8".
    Error analysis
        An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_SY_IMPORT_MISMATCH_ERROR', was
         not caught in
        procedure "%_IMPORT_VARI_CLNT" "(FORM)", nor was it propagated by a RAISING
         clause.
        Since the caller of the procedure could not have anticipated that the
        exception would occur, the current program is terminated.
        The reason for the exception is:
        When importing the object "I8", the component no. 3 in the
        dataset has a different type from the corresponding component
        of the target object in the program "/1BCDWB/DBEKKO".
        The data type is "C" in the dataset, but "D" in the program.
    Any clues plz.
    Thanks,
    Kiran

    Hi Leandro,
    After generating the program in SE16, I could display the variant in one system. I tried the same in another system and its dumping again there. Is there any other solution that you are aware of.
    Thanks for your help.
    Kiran
    Edited by: kiran dasari on May 27, 2010 7:20 PM

  • Regarding dynamc assignment of dates in a variant

    hi,
    i know how to give dynamic values to the dates in a variant
    but when the same thng i am trying in ECC 5.0 then a diiferent screen is coming and while assigning dynamic values to the dates, whenever i am giving a date less than the system date its always saying
    <b>lower limit is greater than upper limit</b>
    even when in the date from i am giving ( system date - 60 ) and in date to i am giving  ( system date + 45 )
    its saying lower limit is greater than upper limit.
    Can anybody help me in this issue
    if anyone can try it out in ECC 5.0 and send me the screen shots that will be a great help
    waiting for your reply

    Hi Ashish,
    Following are the steps :
    1. While saving the variant, Goto the Selection Variable column in the table and specify the value as 'D' after selecting from the F4 Help given for the column.
    2. Then in the last column 'Name of Variable' , click on the F4 Help provided.
    3. In the given options select the option Current Date - xxx, current date + yyy.
    4. When u double click on the option it asks for the values of xxx and yyy.
    5. Give values say xxx = 3 and yyy = 4.This will display the current date - 3 days and current date + 4 days as the select-option parameters.
    6. Save the variant.
    Hope this helps u.
    Regards,
    Himanshu

Maybe you are looking for

  • Doubt with raw partition ASM

    Hi Gurus, Have a doubt regarding the raw partitions being used in ASM. 1.Is raw partition being used  only applicable to linux platform , or can it be done on other plaform as well 2.Is it correct if I say if a diskgroup is created with single  raw d

  • Object Replication / Many objects

    What is the best approach to introduce a new object to replicate to a group after a previous object has been replicated? Imagine, peer A shared object A to the group using addhaveObjects(0, chunks(A)) and all peers successfully replicated that object

  • Hotspot behavior: restore image onMouseOut to previously-selected states?

    I have an image map and am using hotspots-linked events to trigger the swap image action. For example, imagine a map of Canada: The image map consists of a map of the entire country.  Each state/image (Fireworks state, that is) has an image showing a

  • Converting MPEG1 muxed

    I have a movie which is in MPEG 1 muxed format and want play this in my DVD player. Therefore I have to put it on DVD in a format that my DVD player can play: DVD or (S)VCD. The file is to large for CD, so I have to convert it to a DVD format. iDVD w

  • Error -40320. ¿A alguien le suena?

    Me dejó de funcionar iTunes y, después de desinstalarlo y no dejar en el PC ningún rastro de Apple volví a intentar instalarlo y no hubo manera. Finalmente opté por la restauración del sistema y conseguí volver a tener itunes, pero me da un código de