Dynamic creation of date in selection variant

Hi All,
I have a Z program for updating a field in BOM item. One of the input field in the report is "Valid From Date". Actually the current date is automatically fetched through a function module and it is defaulted in that field. 
Our client is using selection variant for ease of use. The problem here is old date in the selection variant  is replacing the current date. I want current date to be created automatically during insertion of variant also. How can i solve this problem. Is there any selection variable inside the variant for dynamic creation of Date?
Thanks
Sankar

As I know there is no setting for this. For any std or Z report variant function with L should act same way...anyway you discuss with your ADABer.
See the help for variables
Selection Variables                                                                               
The following three types of selection variables are currently          
    supported:                                                                               
o   Table variables from TVARV                                          
        You should use these variables if you want to store static          
        information. TVARV 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.                         
i.e means we can do that with D also.

Similar Messages

  • Dynamic LOV with dates and selected default value

    Hello,
    I have a dynamic lov with dates. Query looks like this:
    select distinct concat(to_char(b.send_day_time,'YYYY.MM.DD HH24'),':00') display_value, to_char(b.send_day_time,'YYYY.MM.DD HH24') return_value
    from ...
    No I want to select a specific date as the default value. I put the following code for the default value:
    declare
    begin
    return to_char ('2008.02.19 10:00');
    end;
    But it doesn't work.The date (string) exists in the lov but it is not selected.
    Can someone tell me where the problem is?
    Thx in advance.
    Greetings,
    hamburger

    Hi hamburger,
    As return value you specified to_char(b.send_day_time,'YYYY.MM.DD HH24'),
    so your default value should be like to_char('2008.02.19 10'). Also pay attention to select the "Default Value Type".
    Hope this helps.
    chrissy

  • Dynamic Creation of Data Tables and Fields

    Hello all. I am currently working with a system that contains a bunch of windows. These windows are divided into two groups that represent their presentation style: Columns (such as a table) and Free (such as in a form). I created two tables in database to describe each and every window. These tables describe the type of presentation style, the fields of each window (title of the field, size of the field, position in window, and many more...)
    I did this to make the creation of the windows more effective. In this way that I have, I only have to make one window to display all the thousands of windows that I have in my database because the values of presentation are taken from the description in the tables.
    I was able to do this through TextFields and JTables in Swing. But now I run into JSC. Is this possible with JSC? Say in case the presentation style of the window is Column, can I tell the data table to go read the description of the window that needs to be opened to obtain the amount of columns, the column names, the size of each column... then create the tables and present the values?
    Or say the presentation style is Free... I need to go find how many fields need to be created and their positions in the form, and then the titles of each field. Any ideas how this can be performed?
    Thank you.
    Franklin Angulo

    >
    I was able to do this through TextFields and JTables
    in Swing. But now I run into JSC. Is this possible
    with JSC? Say in case the presentation style of the
    window is Column, can I tell the data table to go
    read the description of the window that needs to be
    opened to obtain the amount of columns, the column
    names, the size of each column... then create the
    tables and present the values?
    Or say the presentation style is Free... I need to go
    find how many fields need to be created and their
    positions in the form, and then the titles of each
    field. Any ideas how this can be performed?
    Creator won't help you with the graphical design, but it's definitely possible to dynamically compose the set of components that are children of a particular component. Doing so leverages the basic component APIs of JSF (javax.faces.component.UIComponent), so you'll want to grab yourself a copy of the JSF Javadocs (or use Creator's lookup facilities as you type your code) to understand what's possible.
    The most important detail is that all components have a getChildren() method that returns a java.util.List of the child components for that component (as well as a getParent() to get the parent component). Any manipulation you do on this returned list is reflected in the structure of the overal component tree.
    As a simple example, assume you want to add an input text component as a child of the form. You'd do something like this:
    HtmlInputText input = new HtmlInputText();
    input.setXxx(..); // Set properties as needed
    form1.getChildren().add(input); // add new childCraig McClanahan

  • Dynamic creation of data slices by admin users in BPS

    hi
    Can we create planning function so that administrative users can create data slices  as per their timings.
    kind regards
    Sarah

    Dear Sarah,
    I donot have any sample code as of now as I am not able to access a BPS system. But let me tell you that this is simple. Create a exit planning function. Then create a FM and assign this FM in exit function INIT FM. In the FM do the following insertions to the data slice tables.
    First have a look at the tables UPC_DATASLICE, UPC_DATASLICET and UPC_OPTIOS. Create a 22 character unique GUID. You can use the standard function modules for this. Let this guid be guid_new. Then get the maximum sort id of data slices for your planning area from the table UPC_DATASLICE. Now add 1 to this maximum sort and have it as sort_new. Now insert this guid_new, sort_new, your planning area name as a new row in the table UPC_DATASLICE.
    After that insert sort_new, your planning area name, your new data slice name to the table UPC_DATASLICET.
    The characteristic value restrictions of the data slices are held in the table UPC_OPTIOS. For the particular GUID each characteristic restriction has one row each. Consider that you are creating data slice for the year 2008 and material 'M'. So in table UPC_OPTIOS there will be 2 records with GUID guid_new. One will be for '0FISCYEAR' and the next record will be for '0MATERIAL'. See table UPC_OPTIOS for the structure of the records. You should use function module 'UPC_OPTIOS_INSERT' to insert into the table UPC_OPTIOS. Goto se37 and have a look at the function module for the structure.
    Dynamic refresh of the buffer:
    If u are creating only 1 data slice in 1 transaction then you should do the following:
    PERFORM BUFFER_DATASLICE_GET
    IN PROGRAM SAPLUPC_DATASLICE
    USING DS_AREA_NAME "insert your data slice area name here
    'E'
    CHANGING ES_AREA_SLICE.
    PERFORM BUFFER_DATASLICE_UPDATE
    IN PROGRAM SAPLUPC_DATASLICE
    CHANGING ES_AREA_SLICE.
    CALL FUNCTION 'UPC_DATASLICE_COMMIT'.
    CALL FUNCTION 'UPC_DATASLICE_SAVE'.
    This will refresh the data slice buffer!
    I think this is sufficient enough for ur requirement. You should be able to do it easily now! Feel free to ask if u have more doubts.
    Regards,
    Ares!

  • 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 variant creation, Current date "-NNNN" *(4 digit number)*

    Hi,
    Is there any way of creating "-NNNN (4 digit number)" for dynamic date calculation in variant variables?
    I need to set 4 digit number in the "DLFL to Change Date (Old ver: To Change date)" field but system only allow total 4 digit including +/-.   I'll be using the "Current date +/- ??? days" option to set date dynamically.
    In order to set deletion flag for PM orders older than 6 years, I need "Current date -2190".
    Or is there other way to set it as MONTH when calculating the change date?
    I'm using PM order initial archiving job whose report name is RIARCORV.
    Thanks in advance,
    Alex
    Edited by: Alex Kwon on Jul 16, 2009 2:44 AM
    Edited by: Alex Kwon on Jul 16, 2009 2:45 AM

    Alex,
    I dont think its possible to do the same using the variant functionality. You will have to do some workaround to accomplish the same by either using other fields like Order number.You could also look at enhancing the code implicitly in the RIARCORV program, if you are in ECC6.0 or above versions.
    Regards
    Narasimhan

  • Dynamic Date calculation in Variants

    Dear SAP Guru's,
    I am creating variant for Planning Run by maintaining the . I n this, I want to select the horizon as from 1st day of next month and to date as last day of next month. But I am not finding the Last day os next Month in the F4 list.
    Please any one explain me the way of creating the "Last day of Next month".
    The available list is like below..
    Current Date
    Current date +/- ??? days
    current date +/- ??? work days
    First day of current month
    nth working day of current month
    First day of next month
    First day of previous month
    Last day of previous month
    Last Day of the Current Month
    How can I create, one more like 'Last day of Next month'?
    Regards,
    Sree

    In the dynamic date period selection options there is also an option for " (Beginning of mth-xx months, end of mth+yy months)"  You can double-click on this line and enter in a value for xx and yy.  If you enter "1" in for the yy value, then the end of the range should be the end of the next calendar month.

  • Delivery creation select variants must be checked

    Hi Gurus,
    in selection variants for delivery creation by batch were wrong on 2 points :
    date selection was too large (till D30 instead of D5)
    shipping point was incorrect.
    Please help me

    Goto T.Code SE38 and give the program name. You will find 4 options below and choose the variant and click the Change Button.
    You will be in the next screen, here you will have the option to change the variant, now click the change button and change the Shipping point.
    Once done save and back to the previous screen. Now press the Attributes button, this will take you to the screen where they have defined the Selection variable. You will find a Selection variable button on top of your screen, press that and this will take you to the next screen here you will find that the date has been maintained as D30, change this to D5 and save the variant.
    Lo! you are done. verify the date one more time before you run the job and that's it.
    Regards,
    Mani.

  • Dynamic Creation of Columns based on Date from variable screen

    Hi Experts,
    Is it possible to create the Columns dynamically?
    My requirement is,
    for eg if the user selects the dates from 23Aug2008 to March2010 in variable screen, then in the output I should be able to drilldown and see the individual months data i.e., from Aug2008 to March2010 (20 columns).
    If the user selects March2009 to November2009 (9 columns)
    Is it possible to display in output like this?
    Is it possible to create columns dynamically(based on the period selected) in the output?
    Kindly help.
    Thanks,
    Guru
    Edited by: hi2guru on Aug 3, 2010 12:07 PM

    Hi Shanthi,
    Thanks for replying.
    And sorry If i havnt elaborated my requirement.
    I used a new structure->new selection with 0CALDAY restricted by 0I_DAYS periodFrom/to variable in Columns.
    Its displaying the total of the selected period in a single column.
    My requirement is to drilldown the same into individual months values in seperate columns.
    If the selected period has 8 months, then 8 columns. if the selected period has 15 months, then 15 individual columns.
    Pls help me.
    Guru
    Edited by: hi2guru on Aug 3, 2010 12:24 PM

  • Activating dynamic date calculation in variant

    Per the link below, I used to be able to activate "dynamic date calculation" in variant.
    <link to blocked site removed by moderator>
    Our system has been upgraded to 6.0 and now we do not the same variant attribues screen where I can activate the "D" variable.  It brings me to program/screen SA38/281. 
    Any suggestion how I may activate the "D" dynamic date calculation variable in a variant?
    Edited by: Thomas Zloch on Oct 14, 2011 11:34 AM

    Actually I meant the relevant code of your custom report, you just provided me with the info of the standard variant screen.
    You can go to SE38, enter your custom report name, display the code, and paste the definition of that parameter. (It would be something like
    PARAMETERS: P_DATEHG TYPE XXX_TYPE.
    What I am interested in is to know which data type is being used, since this functionaliy will only apply to date type fields. So, bottom line: this field must definitely be a date, which makes me think that either something has changed in the custom report or after the upgrade to ECC 6.0 this data type might have changed as well.
    Best regards.
    Edited by: Jose Maria Otero on Oct 14, 2011 5:26 PM

  • Regarding dynamic values of dates in variant

    hi,
    i am assigning dynamic values to the dates in my variant
    but i am unable to give the date more than the system date,if am am giving dates less than the system date it is accepting but when i am givng a date that is greater than the system date then it is not taking the values and saying please assign a numeric value.
    so please can anyone help me in this

    its now was doing a silly mistake
    but now its working fine

  • Relative date as selection option

    Hi Experts,
    could any of You pls help me to define a relative date as selection options?
    I have a program about production order selection with a start date as selection option (AKFO-GSTRP). I would like to run this program daily as a background job with dynamic selection: ex. always select orders start date: -5 days form today up till +5 days from now.
    So,I want to define a selection options, which will give possibilit to user define only the number of days, and based on this and sy-datum can calculate the actual value for the selection.  But in so_xxx definition up till now I only referred to a real value, and I  can not do it this time with FOR string. ( My selection field has data element CO_DAT_REL).
    Could any of You pls help me - as being beginner at programming-, how to define this relative date selection option?
    Thanks in advance

    Some solutions (if I understood)
    - define a variant for the report, use this variant in the transaction definition (define this variant as a [system variant|http://help.sap.com/saphelp_nw70/helpdata/en/c0/980389e58611d194cc00a0c94260a5/frameset.htm] (start with CUS& or SAP&) so it will be transported automatically, in this variant define the range of date as a selection variant of type D: Dynamic date calculation and select one of the available variable by F4
    - define a parameter field of type integer, and build yourself the range by subtracting or adding this field to current date, you can define the result range as a select-options, just protect it in the PBO (AT SELECTION-SCREEN OUTPUT with a classical LOOP AT SCREEN/MODIFY SCREEN/ENDLOOP)
    Regards,
    Raymond

  • Set Dynamic Default Delivery Date in ME21n

    Hi!
    Under personal settings in ME21n, it is possible set a default delivery date. However, as I see it one can only set a fixed date like 2011-08.-12, which would quite useless in a couple of weeks. Is there any way to set this date dynamically as it is possible in normal selection variants.
    I am grateful for all input.

    yes this field is pretty useless, except for hundreds of items within one PO.
    usually delivery dates are defined by the requisitioners  and not by a default value of a buyer.

  • 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

  • How can we get Dynamic columns and data with RTF Templates in BI Publisher

    How can we get Dynamic columns and data with RTf Templates.
    My requirement is :
    create table xxinv_item_pei_taginfo(item_id number,
    Organization_id number,
    item varchar2(4000),
    record_type varchar2(4000),
    record_value CLOB,
    State varchar2(4000));
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'USES','fever','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'HOW TO USE','one tablet daily','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'SIDE EFFECTS','XYZ','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'DRUG INTERACTION','ABC','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'OVERDOSE','Go and see doctor','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'NOTES','Take after meal','TX');
    select * from xxinv_item_pei_taginfo;
    Item id Org Id Item Record_type Record_value State
    493991     224     1265-D30     USES     fever     TX
    493991     224     1265-D30     HOW TO USE     one tablet daily     TX
    493991     224     1265-D30     SIDE EFFECTS     XYZ     TX
    493991     224     1265-D30     DRUG INTERACTION     ABC     TX
    493991     224     1265-D30     OVERDOSE      Go and see doctor     TX
    493991     224     1265-D30     NOTES     Take after meal     TX
    Above is my data
    I have to fetch the record_type from a lookup where I can have any of the record type, sometime USES, HOW TO USE, SIDE EFFECTS and sometimes some other set of record types
    In my report I have to get these record typpes as field name dynamically whichever is available in that lookup and record values against them.
    its a BI Publisher report.
    please suggest

    if you have data in db then you can create xml with needed structure
    and so you can create bip report
    do you have errors or .... ?

Maybe you are looking for

  • Intial stock update

    hi gurus, i have a queston?,i need to update stock of a particular material,plant,and storage location, is there any way i can maintain the stock thro some direct table entries? if there is any?pls send me the table name,from where i can update my st

  • External HD issue. Finder cannot complete the operation because some data..

    Last night I had a drive throw the error "finder cannot complete the operation because some data in "<file>" could not be read or written. Error code-36". I thought it was a bad disk. Then tonight I plugged in a flash drive, formatted it on the machi

  • IPhone got repaired by apple but when it came from the repair, the same problem was still there?

    So yesterday i found out that my iPhone's screen is making a creepy sound when i push the upper right corner of the screen (loud and cracky) so i immediately took it to apple, the genius told me she can definitely hear the sound, she opened the iPhon

  • Retrieve the host name behind the radware url

    Hi, Is it possible to retrieve the host name behind the radware url in BI Publisher template? Thanks, R.

  • Reuse of same tab when using same link

    Hi, I got a new third question... Safari 3.1.2, Windows XP Pro SP2 On one of the web pages I use, there is a listing of topics to which I can link. In IE and Firefox, if I right click on one of the topics and select "Open link in new tab", then once