Creating a Parameter with pre-defined date ranges.

How can I create a parameter that will allow the user to select a specific date range for a report (i.e. YTD, MTD, WTD...)? Any suggestions? Thanks...
Matt Johnson

You can create & define Parameters in SSRS Report and provide possible values (MTD, YTD or WTD) as drop-down options, the user can then select which one to pick and you can write your T-SQL logic to capture this option and take further query action
on it
Good Luck! Please Mark This As Answer if it solved your issue. Please Vote This As Helpful if it helps to solve your issue

Similar Messages

  • Fail to create web service with user-defined data type using jwsc Ant task!

    Hello every body!
    I used JAXWS to create WSDL from a jws file.
    This is my jws:
    package ws;
    import javax.jws.WebService;
    import javax.jws.WebMethod;
    import ws.MyDataType;
    *@WebService*
    *public class MyWebService {*
    public MyWebService()
    *@WebMethod*
    public MyDataType MyWebMethod(MyDataType mdt)
    *// mdt.setS("I got it!");*
    return mdt;
    and this is my data type:
    package ws;
    *public class MyDataType {*
    String s;
    public MyDataType()
    *public String getS() {*
    return s;
    *public void setS(String s) {*
    this.s = s;
    and this is my Ant build.xml
    *<project default="all">*
    *<property name="weblogic.jar.classpath" value="D:/Projects/bea103/wlserver_10.3/server/lib"/>*
    *<taskdef name="jwsc" classname="weblogic.wsee.tools.anttasks.JwscTask">*
    *<classpath>*
    *<path id="weblogic.classpath">*
    *<pathelement path="WEBLOGIC_HOME"/>*
    *<fileset dir="${weblogic.jar.classpath}">*
    *<include name="weblogic.jar"/>*
    *</fileset>*
    *</path>*
    *</classpath>*
    *</taskdef>*
    *<target name="all" depends="clean,build-service"/>*
    *<target name="clean">*
    *<delete dir="output"/>*
    *</target>*
    *<target name="build-service">*
    *<!--add jwsc and related tasks here -->*
    *<jwsc srcdir="" destdir="wsoutput">*
    *<jws file="MyWebService.java" type="JAXWS"/>*
    *</jwsc>*
    *</target>*
    *<!--<target name="deploy"> --><!--add wldeploy task here --><!-- </target>-->*
    *</project>*
    I run the Ant task but I get this error:
    Buildfile: build.xml
    clean:
    build-service:
    [jwsc] JWS: processing module /MyWebService
    [jwsc] Parsing source files
    [jwsc] Parsing source files
    [jwsc] 1 JWS files being processed for module /MyWebService
    *[jwsc] [JAM] Warning: failed to resolve class MyDataType*
    [jwsc] JWS: C:\Documents and Settings\samimi\IdeaProjects\SampleWebService\src\ws\MyWebService.java Validated.
    [jwsc] Processing 1 JAX-WS web services...
    *[jwsc] error: Could not get TypeDeclaration for: MyDataType in apt round: 1*..........
    BUILD FAILED
    C:\Documents and Settings\samimi\IdeaProjects\SampleWebService\src\ws\build.xml:
    19: weblogic.wsee.tools.WsBuildException: Error processing JAX-WS web services
    Please help me to solve this issue.
    Thank you,
    Mojir

    Thank u very much Jay SenSharma this was helpful
    and thank u sandeep_singh this is the answer,
    I find another answer too :
    adding my class files to the path remove the error:
    <project default="all">
    <property name="weblogic.jar.classpath" value="D:/Projects/bea103/wlserver_10.3/server/lib"/>
    <taskdef name="jwsc" classname="weblogic.wsee.tools.anttasks.JwscTask">
    <classpath>
    <path id="my.path">
    <pathelement path="D:/Projects/bea103/jdk160_05/lib/tools.jar"/>
    <pathelement path="D:/Projects/bea103/wlserver_10.3/server/lib/weblogic.jar"/>
    *<pathelement path="D:/Projects/LifeInsurance Project Original/BusinessModule/classes/"/>* adding this line solved my problem.
    <pathelement path="${java.class.path}"/>
    </path>
    <path id="weblogic.classpath">
    <pathelement path="WEBLOGIC_HOME"/>
    <fileset dir="${weblogic.jar.classpath}">
    <include name="weblogic.jar"/>
    </fileset>
    </path>
    </classpath>
    </taskdef>
    <target name="all" depends="clean,build-service"/>
    <target name="clean">
    <delete dir="output"/>
    </target>
    <target name="build-service">
    <jwsc sourcepath="mytype" classpathref="my.path" debug="true" srcdir="" destdir="wsoutput">
    <jws file="NegotiationService.java" generatewsdl="true" type="JAXWS"/>
    </jwsc>
    </target>
    </project>
    Thank u very much,
    Mojir

  • How can I create a query with web service data control?

    I need to create a query with web service data control, in WSDL, it's query operation, there is a parameter message with the possible query criteria and a return message contains the results. I googled, but cannot find anything on the query with web service. I cannot find a "Named Criteria" in web service data control like normal data control. In Shay's blog, I saw the topics on update with web service data control. How can I create a query with web service data control? Thanks.

    Hi,
    This might help
    *054.     Search form using ADF WS Data Control and Complex input types*
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html

  • [MDX] Define date range based on user selection

    Hi All,
    I'm trying to define date range (of 3 months) using mdx based on user selection.
    This is what I'm trying to do:
    - If user select 2013, I would like range to be: from
    1 Oct 2013 to 31 Dec 2013
    - If user select Aug 2013, I would like range to be: from
    1 Jun 2013 to 31 Aug 2013
    - If user select 15 Sep 2013, I would like range to be : from
    15 Jul 2013 to 15 Sep 2013
    It is not a problem to get the upper bound of the range like this:
    ClosingPeriod(
    [Date].[Calendar].[Date],
    [Date].[Calendar].CurrentMember
    But I'm not able to get the lower bound of the range:
    OpeningPeriod(
    [Date].[Calendar].[Date],
    ParallelPeriod(
    [Date].[Calendar].[Month Number],
    2,
    ClosingPeriod(
    [Date].[Calendar].[Date],
    [Date].[Calendar].CurrentMember
    Error:If user selection is
    15 Aug 2013, I get
    14 Jun 2013
    If user selection is Apr 2013, I get
    (null)
    And even more strange, if user selection is
    2013, I get 28 Oct 2013
    Any idea of how to solve this ?
    Thanks,
    Guillaume

    Hello Guillaume,
    Can you please check if the following works for you? By the way, the performance will suffer due to all these IIF, the solution is very complex in order to avoid null in ParallelPeriod.
    with member measures.high as MemberToStr(ClosingPeriod(
       [Date].[Calendar].[Date],
       [Date].[Calendar].CurrentMember
    member measures.low as
    MemberToStr(
    iif(ClosingPeriod(
       [Date].[Calendar].[Date],
       [Date].[Calendar].CurrentMember
    ) IS ClosingPeriod(
       [Date].[Calendar].[Date],
       [Date].[Calendar].CurrentMember
    ).Parent.LastChild  --last date of the month
    OpeningPeriod(
       [Date].[Calendar].[Date],
    Ancestor(ClosingPeriod(
       [Date].[Calendar].[Date],
       [Date].[Calendar].CurrentMember
    ), [Date].[Calendar].[Month]).lag(2)
    iif([Date].[Calendar].CurrentMember.level is
    [Date].[Calendar].[Date]
    and
    Right(CSTR([Date].[Calendar].CurrentMember.Properties("KEY0")),4)="0429" --take care of 4/29
    OpeningPeriod(
       [Date].[Calendar].[Date],
    Ancestor(ClosingPeriod(
       [Date].[Calendar].[Date],
       [Date].[Calendar].CurrentMember
    ), [Date].[Calendar].[Month]).lag(2)
    OpeningPeriod(
       [Date].[Calendar].[Date],
       ParallelPeriod(
          [Date].[Calendar].[Month],
          2,
          ClosingPeriod(
             [Date].[Calendar].[Date],
             [Date].[Calendar].CurrentMember
    select  {measures.low,measures.high } on 0
    from [Adventure Works]
    where
    --[Date].[Calendar].[Date].&[20070815]
    --get [Date].[Calendar].[Date].&[20070615]
    --[Date].[Calendar].[Date].&[20070530]
    --get[Date].[Calendar].[Date].&[20070330]
    --[Date].[Calendar].[Date].&[20070429]
    --get [Date].[Calendar].[Date].&[20070201]
    --[Date].[Calendar].[Calendar Year].&[2007]
    --get [Date].[Calendar].[Date].&[20071001]
    --[Date].[Calendar].[Month].&[2007]&[4]
    --get [Date].[Calendar].[Date].&[20070201]
    --[Date].[Calendar].[Month].&[2007]&[5]
    --get [Date].[Calendar].[Date].&[20070301]
    --[Date].[Calendar].[Date].&[20070228]
    --get [Date].[Calendar].[Date].&[20061201]
    --[Date].[Calendar].[Date].&[20070831]
    --get [Date].[Calendar].[Date].&[20070601]
    If this does not work for you, I would suggest opening a ticket with Microsoft Support, with an advisory type of request.
    Hope this helps.
    Thanks.
    Meer Al - MSFT

  • Identify all Quarters associated with a Given Date Range

    Hi,
    I am trying to create a Crystal Report that shows all Quarters data for a give date range. For E.g. the user defined date range is 02/20/2013 - 01/15/2014, the report should include the data for Q1-2013 till Q1-2014. Is there a simpler way to achieve this functionality.
    I will really appreciate your help/guidance on this.
    Regards,
    acb

    Hi Chandra,
    Do you have a Date Range prompt or two separate prompts for Start Date and End Date? If it's a Date Range prompt, use this as the Record Selection Formula:
    datevar start := Minimum({?Date_Range_Prompt});
    datevar end := Maximum({?Date_Range_Prompt});
    {Date_Field_in_Database} >=
         If start in Calendar1stQtr then
             Minimum(Calendar1stQtr)
         else if start in Calendar2ndQtr then
             Minimum(Calendar2ndQtr)
         else if start in Calendar3rdQtr then
             Minimum(Calendar3rdQtr)
         else if start in Calendar4thQtr then
             Minimum(Calendar4thQtr)
    AND
    {Date_Field_in_Database} <=
         If end in Calendar1stQtr then
             Maximum(Calendar1stQtr)
         else if end in Calendar2ndQtr then
             Maximum(Calendar2ndQtr)
         else if end in Calendar3rdQtr then
             Maximum(Calendar3rdQtr)
         else if end in Calendar4thQtr then
             Maximum(Calendar4thQtr)
    -Abhilash

  • Windows 2003 - create folder name with yesterday's date

    Hello friends..
    please advise,
    I want to create folder name with yesterday's date and then move yesterday's date files to this folder...so for example;
    if today is 2014_07_17 then create folder as below (2014_07_16)
    d:\test\214_07_16
    then move all files extension .txt from d:\test\*.txt to d:\test\2014_07_17
    thanks in advance...

    These ones may help.
    Use PowerShell to Create a Bunch of Folders Based upon the
    Date
    Using the Move-Item Cmdlet
    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]
    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

  • How to select Months with in a date range

    Hi
    I am working on a report which will list out Month wise totals in each row.
    How should i select the Months with in a date range and do the sum ( User may select the date range for  N number of  years also. Example :  01/10/2000 to 01/01/2010 )
    Thanks in advance
    Thanks&regards
    Mrudula

    Hi
       Use the following code:
    data: l_date(8) value '03042007',
            l_mname   type   t247-ktx,
            l_c(25).
      select single ktx from t247
      into l_mname
      where spras = sy-langu
      and mnr = l_date+2(2).
      concatenate l_mname l_date+6(2)
      into l_c." SEPARATED BY space.
      data: g_date(10) type c. " Processing date of Report
      g_date = sy-datum.
      concatenate g_date0(4)  g_date4(2)  g_date+6(2) into g_date.
      data: g_date1(10) type c.
      g_date1 = so_verab-high.
      concatenate g_date10(4)  g_date14(2)  g_date1+6(2) into g_date1.
    Regards,
    Sreeram

  • How to export multiple copies reoprts based on parameters and with pre-defined naming

    Hi All:
    I have a problem of using SSRS 2012, we have multiple clients and they wanted us to deliver the pre-defined excel reports to different branches based on selecting the "branch name" parameter, also they have a naming rule for the excel
    report file.
    We cannot use the subscription as they need to do it in one batch and upload to an FTP file, therefore we are doing this manually for over 300 reports. Is this a convenient way to generate them in one batch as well as customising their file names?
    Thanks a lot for your help.
    Cheers
    Johnny

    Hi JohnnyKahWang,
    As per my understanding, there are multiple clients, you want to deliver reports to clients according to branch name parameter, and naming the excel file according to the rule. If that is the case, we can use data-driven subscription to achieve your goal.
    Reporting Services provides data-driven subscriptions so that you can customize the distribution of a report based on dynamic subscriber data. Data-driven subscriptions use query results to determine the recipients of the subscription, delivery settings,
    and report parameter values. At run time, the report server runs a query to get values used for subscription settings. We can use the Create Data-driven Subscription pages to define the query and assign query values to subscription settings. For detail information,
    please refer to the following steps:
      1. Open Report Manager, and locate the report for which you want to create a data-driven subscription.
      2. Hover over the report, and click the drop-down arrow.
      3. In the drop-down menu, click Manage. This opens the General properties page for the report.
      4. Select the Subscriptions tab, and then click New Data-driven Subscription.
      5. Choose a method of delivery, then select data source for the subscription.
      6. Specify a query that retrieves subscriber data like below:
    CREATE TABLE Name (
    BranchName varchar(20),
    ExcelFileName varchar(20),
    Email_to varchar(50)
    INSERT INTO Name values
    ('Branch1', 'Name1', '[email protected]'),
    ('Branch2', 'Name2', '[email protected]'),
    ('Branch3','Name3', '[email protected]');
      IF we chose Windows File Share delivery extension, we can define path in the query.
      7. Specify delivery extension options like below:
      8. Specify report parameters to BranchName.
      9. Specify when the subscription is processed, then click Finish to save the configuration.
    For more information about Data-driven Subscription, please refer to the following documents:
    http://msbimentalist.wordpress.com/2013/08/26/how-to-create-data-driven-subscription-in-ssrs/
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu

  • Single Date Parameter, but using a date range for selection

    Post Author: fireman204
    CA Forum: Formula
    I'm fairly new to Crystal Reports, so be gentle with me.  I have a report that has 4 parameters.  The report asks for data for a specific month, the YTD data to the end of the selected month, and the same data from the previous year.  It seems there should be a way to enter a single parameter (ie., 2007-4-1), and off that date select all the data for the month, the current year to the end of that month, and then the data from the previous year for the same period.  I know this will be a formula field needed to select the data, but not sure how to get there from here.  Any ideas?  Thanks in advance!

    Post Author: SKodidine
    CA Forum: Formula
    It should be possible for you to create just one parameter to have the user input a single date and then create formulae to create the begin and end dates for the month, YTD and PYTD.  You can then use these formulae for record selection criteria.
    For example, if the user inputs a date of 2007-04-01 for the single parameter then create formulae such as:
    beginmonth
    datevar beginmonth;
    beginmonth := date(year({?My Parameter}),month({?My Parameter}),01);
    endmonth
    datevar endmonth;
    endmonth := cdLastDayOfMonth ({?My Parameter});
    To use the cdlastdayofmonth function, In the formula workshop window, click on "Repository Custom Functions" then under CRYSTAL and DATE right click on cdlastdayofmonth and click on ADD TO REPORT.  Once that is done, then create the above "endmonth" formula.  You should see this new function in your formula workshop window in the FUNCTIONS window under CUSTOM FUNCTIONS.
    beginytd
    datevar beginytd := date(year(currentdate),01,01);
    endytd
    datevar endytd;
    endytd := cdLastDayOfMonth ({?My Parameter});
    beginpytd
    datevar beginpytd := date((year(currentdate)-1),01,01);
    endpytd
    evaluateafter({@endytd});
    datevar endytd;
    datevar endpytd;
    endpytd := date(year(endytd)-1,month(endytd),day(endytd));
    In your record selection criteria, you can use the above formulae like this:
    in {@beginmonth} to {@endmonth}
    or
    in {@beginytd} to {@endytd}
    or
    in {@beginpytd} to {@endpytd};
    This is one way of doing it, perhaps others might pitch in with a more efficient way.

  • How to create a Parameter with LOV

    Hello All,
    I am having the follwoing custom query.
    SELECT concatenated_segments, (SUM(PERIOD_NET_DR)-SUM(PERIOD_NET_CR)) MOVEMENT
    FROM gl_balances a, gl_code_combinations_kfv b
    where period_name='Apr-08'
    and a.code_combination_id = b.code_combination_id
    and set_of_books_id=1010
    and currency_code='USD'
    gROUP BY concatenated_Segments
    HAVING (SUM(PERIOD_NET_DR)-SUM(PERIOD_NET_CR))<>0.
    Instead of hard coding the values I have created the custom folder
    with the follwoing query.
    SELECT concatenated_segments, (SUM(PERIOD_NET_DR)-SUM(PERIOD_NET_CR)) MOVEMENT
    FROM gl_balances a, gl_code_combinations_kfv b
    where a.code_combination_id = b.code_combination_id
    gROUP BY concatenated_Segments
    HAVING (SUM(PERIOD_NET_DR)-SUM(PERIOD_NET_CR))<>0.
    Now I have to create three input parameters period_name,set_of_books_id,currency_code.
    The parameter set_of_books_id should have list of values so that the user will select one from it at run time. But when I tried to create the parameter
    I am unable to create list of values for this parameter. (i.e in Parameter dialog box the For Item filed doest not have any field like set_of_books_id as it is custom query)
    So how Can I add LOV for this parameter.
    Kind Regards,
    PRaveen.

    Hi,
    You custom folder needs to contain a statement like :
    SELECT concatenated_segments, period_name,set_of_books_id,currency_code, (SUM(PERIOD_NET_DR)-SUM(PERIOD_NET_CR)) MOVEMENT
    FROM gl_balances a, gl_code_combinations_kfv b
    where a.code_combination_id = b.code_combination_id
    gROUP BY concatenated_Segments, period_name,set_of_books_id,currency_code
    HAVING (SUM(PERIOD_NET_DR)-SUM(PERIOD_NET_CR))<>0.
    The you will have the period_name,set_of_books_id,currency_code items in the folder and can create parameters using these columns.
    To define the LOV you will need to create separate folders that return the list of values required e.g.
    SELECT set_of_books_id, name
    FROM GL_SETS_OF_BOOKS
    Use this folder to define an item class and then include the set_of_books_id from the first folder into the item class.
    Rod West

  • Creating report based on user selected Date Range

    Hello.
    I am trying to display an Apex report that selects data for the report based on a user entered date range.
    It's a simple page with two date picker fields (p18_start and p18_end).
    The report region SQL looks like this:
    SELECT *
    FROM prj_items
    WHERE LM_DT BETWEEN :p18_start AND :P18_end
    One table, one field on the table to search and two Apex variables.
    I thought this would be fairly simple, but I am obviously missing something.
    I not even sure what other information is needed to help me figure this out.
    -Jody

    Hi,
    You can set defaults for the datepickers if you need to - this could be done in a computation on the page for each item and conditional on the item being null.
    When I've done something similar to this, I've created two hidden page items - eg, :P19_FIRST_DATE and :P19_LAST_DATE and populated these with the earliest/latest date that the user could reasonably select (perhaps, in your case, the MIN(LM_DT) and MAX(LM_DT) values).
    Then your SQL would be:
    select * from PRJ_ITEMS
    where LM_DT BETWEEN TO_DATE(NVL(:P19_START,:P19_FIRST_DATE), 'DD-MON-YY')
    AND TO_DATE(NVL(:P19_END,:P19_LAST_DATE), 'DD-MON-YY')If you don't want to set default dates, you could do something like:
    SELECT * FROM PRJ_ITEMS
    WHERE (:P19_START IS NULL AND :P19_END IS NULL)
    OR (:P19_START IS NOT NULL AND :P19_END IS NULL AND LM_DT >= TO_DATE(:P19_START,'DD-MON-YY'))
    OR (:P19_START IS NULL AND :P19_END IS NOT NULL AND LM_DT <= TO_DATE(:P19_END,'DD-MON-YY'))
    OR (LM_DT BETWEEN TO_DATE(:P19_START,'DD-MON-YY') AND TO_DATE(:P19_END,'DD-MON-YY'))There are various reasons why your two dates are being cleared when the page is reloaded. Firstly, you should check the branch that returns to the same page - make sure you are not clearing the cache for the page. Then, have a look to see if there is a "reset page" process (usually created for you when you create a form page). Then, check the Source settings for the items. Typically, these would be "Only when current value in session state is null" and a Source Type of "Static Assignment" with the "Source Value or Expression" left empty.
    Andy

  • Query with variable defined date no idea how

    Hello to all,
    i have a problem with a query, in this query i need a variable date that can be entered in the SQL statement.
    If the CREATE TABLE and INTO Values are needed, they can be found here:
    Re: Need Help with complex query for productio database
    with t2 as (
                select  t.*,
                        lead(step_date) over(partition by order_nr order by step_date) next_step_date
                  from  table_2 t
    select  t1.*,
            nvl(
                max(
                    case t2.wo_step
                      when 'U' then t2.step_date
                    end
               sysdate
              ) - t1.create_date age_1,
            nvl(
                max(
                    case t2.wo_step
                      when 'R' then t2.step_date
                    end
               sysdate
              ) - t1.create_date age_2,
            sum(
                case
                  when t2.wo_step in ('B','5') then t2.next_step_date - t2.step_date
                end
               ) step_b_5,
            sum(
                case t2.wo_step
                  when 'C' then t2.next_step_date - t2.step_date
                end
               ) step_c,
            sum(
                case t2.wo_step
                  when 'K' then t2.next_step_date - t2.step_date
                end
               ) step_k,
            sum(
                case t2.wo_step
                  when 'E' then t2.next_step_date - t2.step_date
                end
               ) step_e,
            sum(
                case t2.wo_step
                  when 'F' then t2.next_step_date - t2.step_date
                end
               ) step_f,
            sum(
                case t2.wo_step
                  when 'S' then t2.next_step_date - t2.step_date
                end
               ) step_s,
            sum(
                case t2.wo_step
                  when 'R' then t2.next_step_date - t2.step_date
                end
               ) step_r
    ,          CASE
                   WHEN      t1.priority = '02'
                   AND          nvl(
                               max(
                                   case t2.wo_step
                                     when 'U' then t2.step_date
                                   end
                                        sysdate
                             ) - t1.create_date >= 5
                   THEN     'FALSE'
                   WHEN      t1.priority = '05'
                   AND          nvl(
                               max(
                                   case t2.wo_step
                                     when 'U' then t2.step_date
                                   end
                                        sysdate
                             ) - t1.create_date >= 8
                   THEN     'FALSE'
                   WHEN      t1.priority = '12'
                   AND          nvl(
                               max(
                                   case t2.wo_step
                                     when 'U' then t2.step_date
                                   end
                                        sysdate
                             ) - t1.create_date >= 30
                   THEN     'FALSE'
                   ELSE     'TRUE'
              END AS "IN MPD"                                  
      from  table_1 t1,
            t2
      where t2.order_nr = t1.order_nr
      group by t1.order_nr,
               t1.priority,
               t1.create_date,
               t1.act_step,
               t1.step_date,
               t1.employee,
               t1.descriptionIn this query i want to replace sysdate with a variable date that i want to define one time, maybe in the first line of the SQL query or one of the Top lines.
    The reason for this is, i want my results to an specific date, well i can change da system time but i want to solve that in the query.
    Or if there is a way to get promted for this variable each time when the qury runs, that would also be fine.
    I tried already DEFINE BEGIN END, but i get only a bunch of errors. I thins i do a basic mistake.
    Thank You all.

    Hi,
    To create and set a bind variable in SQL*Plus, you can do this:
    VARIABLE  base_date_text   VARCHAR2 (20)
    EXEC     :base_date_text := '01-Mar-2013 00:00:00';:base_date_text can now be used anywhere in your query where a string is allowed. Unfortunately, you can't have DATE bind variables, so that means it's only useful in calls to TO_DATE.
    You could calll TO_DATE everywhere you are now calling SYSDATE, or you could do something like this:
    with t2 as (
                select  t.*,
                        lead(step_date) over(partition by order_nr order by step_date) next_step_date
                        TO_DATE (:base_date_text, 'DD-Mon-YYYY HH24:MI:SS')   AS base_date
                  from  table_2 t
               )  ...This adds a column to t2 called base_date, which is a real DATE. Anywhere in the main query, you can reference t2.base_date instead of SYSDATE.
    If you want to be prompted to enter the value at run-time, then you can use SQL*Plus substitution variables, like this
    ACCEPT  base_date_text  "Please enter the date to use (DD-Mon-YYYY HH24:MI:SS format): "
    with t2 as (
                select  t.*,
                        lead(step_date) over(partition by order_nr order by step_date) next_step_date
                        TO_DATE ('&base_date_text', 'DD-Mon-YYYY HH24:MI:SS')   AS base_date
                  from  table_2 t
               )  ...Again, t2.base_date (a DATE) is now available anywhere in the main query.

  • IDOC to CSV file getting created in Target with out any data

    Dear All,
    Scenario:IDOC to CSV
    We have developed a ID part and reused the IR part.Interface is successfull end to end in both ABAP and Java Stack and file has been created in Target but without any data.
    I think we need to do changes in Content Conversion.
    Below are the details which we have using in Content Conversion.
    Name                                                              Value
    ListPrice.fieldSeparator                                     ,
    ListPrice.ProcessFieldNames                        fromConfiguration
    ListPrice.fieldNames                                      CompanyID,SalesOrg,ProductID,ValidFrom,ValidTo,UOM,ListPrice,RecordType
                                                                         ,LineID,UpdatedDate
    can you please give me the parameter which we need to use other than above and give me the proper reason why target file has no data.
    Note:We are Re-Using IR part and we have given the field name in Content conversion as correct order with proper case sensitive
    Thanks and regards,
    Manikandan

    Hi Abhishek and Rahul,
    I m sorry i have given the sender Payload early. please find the receiver payload.
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:SendListPriceToHub xmlns:ns0="http://tempuri.org/"><ns0:XMLData><ns0:ListPrice><ns0:CompanyID>1525</ns0:CompanyID><ns0:SalesOrg>A001</ns0:SalesOrg><ns0:ProductID>20002648</ns0:ProductID><ns0:ValidFrom>2009-11-12T00:00:0010:00</ns0:ValidFrom><ns0:ValidTo>9999-12-31T00:00:0010:00</ns0:ValidTo><ns0:UOM>PC</ns0:UOM><ns0:ListPrice>111.00</ns0:ListPrice><ns0:RecordType>U</ns0:RecordType><ns0:LineID>22158</ns0:LineID><ns0:UpdatedDate>0000-00-00T00:00:0000:00</ns0:UpdatedDate></ns0:ListPrice><ns0:ListPrice><ns0:CompanyID>1525</ns0:CompanyID><ns0:SalesOrg>A001</ns0:SalesOrg><ns0:ProductID>100000001</ns0:ProductID><ns0:ValidFrom>2009-11-23T00:00:0010:00</ns0:ValidFrom><ns0:ValidTo>2199-12-31T00:00:0010:00</ns0:ValidTo><ns0:UOM>PC</ns0:UOM><ns0:ListPrice>1000.00</ns0:ListPrice><ns0:RecordType>U</ns0:RecordType><ns0:LineID>22363</ns0:LineID><ns0:UpdatedDate>0000-00-00T00:00:0000:00</ns0:UpdatedDate></ns0:ListPrice><ns0:ListPrice><ns0:CompanyID>1525</ns0:CompanyID><ns0:SalesOrg>A001</ns0:SalesOrg><ns0:ProductID>100000003</ns0:ProductID><ns0:ValidFrom>2009-12-01T00:00:0010:00</ns0:ValidFrom><ns0:ValidTo>9999-12-31T00:00:0010:00</ns0:ValidTo><ns0:UOM>PC</ns0:UOM><ns0:ListPrice>230.00</ns0:ListPrice><ns0:RecordType>U</ns0:RecordType><ns0:LineID>22572</ns0:LineID><ns0:UpdatedDate>0000-00-00T00:00:0000:00</ns0:UpdatedDate></ns0:ListPrice><ns0:ListPrice><ns0:CompanyID>1525</ns0:CompanyID><ns0:SalesOrg>A001</ns0:SalesOrg><ns0:ProductID>20002901</ns0:ProductID><ns0:ValidFrom>2000-12-04T00:00:0010:00</ns0:ValidFrom><ns0:ValidTo>2009-11-30T00:00:0010:00</ns0:ValidTo><ns0:UOM>PC</ns0:UOM><ns0:ListPrice>20.00</ns0:ListPrice><ns0:RecordType>U</ns0:RecordType><ns0:LineID>22673</ns0:LineID><ns0:UpdatedDate>0000-00-00T00:00:0000:00</ns0:UpdatedDate></ns0:ListPrice><ns0:ListPrice><ns0:CompanyID>1525</ns0:CompanyID><ns0:SalesOrg>A001</ns0:SalesOrg><ns0:ProductID>20002647</ns0:ProductID><ns0:ValidFrom>2009-12-04T00:00:0010:00</ns0:ValidFrom><ns0:ValidTo>9999-12-31T00:00:0010:00</ns0:ValidTo><ns0:UOM>PC</ns0:UOM><ns0:ListPrice>90.00</ns0:ListPrice><ns0:RecordType>U</ns0:RecordType><ns0:LineID>22674</ns0:LineID><ns0:UpdatedDate>0000-00-00T00:00:0000:00</ns0:UpdatedDate></ns0:ListPrice><ns0:ListPrice><ns0:CompanyID>1525</ns0:CompanyID><ns0:SalesOrg>A001</ns0:SalesOrg><ns0:ProductID>100000007</ns0:ProductID><ns0:ValidFrom>2009-12-01T00:00:0010:00</ns0:ValidFrom><ns0:ValidTo>2010-01-19T00:00:0010:00</ns0:ValidTo><ns0:UOM>PC</ns0:UOM><ns0:ListPrice>900.00</ns0:ListPrice><ns0:RecordType>U</ns0:RecordType><ns0:LineID>22715</ns0:LineID><ns0:UpdatedDate>0000-00-00T00:00:0000:00</ns0:UpdatedDate></ns0:ListPrice><ns0:ListPrice><ns0:CompanyID>1525</ns0:CompanyID><ns0:SalesOrg>A001</ns0:SalesOrg><ns0:ProductID>100000010</ns0:ProductID><ns0:ValidFrom>2009-12-11T00:00:0010:00</ns0:ValidFrom><ns0:ValidTo>9999-12-31T00:00:0010:00</ns0:ValidTo><ns0:UOM>PC</ns0:UOM><ns0:ListPrice>14.00</ns0:ListPrice><ns0:RecordType>U</ns0:RecordType><ns0:LineID>22831</ns0:LineID><ns0:UpdatedDate>0000-00-00T00:00:0000:00</ns0:UpdatedDate></ns0:ListPrice><ns0:ListPrice><ns0:CompanyID>1525</ns0:CompanyID><ns0:SalesOrg>A001</ns0:SalesOrg><ns0:ProductID>20002655</ns0:ProductID><ns0:ValidFrom>2009-12-16T00:00:0010:00</ns0:ValidFrom><ns0:ValidTo>9999-12-31T00:00:0010:00</ns0:ValidTo><ns0:UOM>PC</ns0:UOM><ns0:ListPrice>350.00</ns0:ListPrice><ns0:RecordType>U</ns0:RecordType><ns0:LineID>22985</ns0:LineID><ns0:UpdatedDate>0000-00-00T00:00:0000:00</ns0:UpdatedDate></ns0:ListPrice><ns0:ListPrice><ns0:CompanyID>1525</ns0:CompanyID><ns0:SalesOrg>A001</ns0:SalesOrg><ns0:ProductID>20002901</ns0:ProductID><ns0:ValidFrom>2009-12-01T00:00:0010:00</ns0:ValidFrom><ns0:ValidTo>9999-12-31T00:00:0010:00</ns0:ValidTo><ns0:UOM>PC</ns0:UOM><ns0:ListPrice>80.00</ns0:ListPrice><ns0:RecordType>U</ns0:RecordType><ns0:LineID>23196</ns0:LineID><ns0:UpdatedDate>0000-00-00T00:00:0000:00</ns0:UpdatedDate></ns0:ListPrice><ns0:ListPrice><ns0:CompanyID>1525</ns0:CompanyID><ns0:SalesOrg>A001</ns0:SalesOrg><ns0:ProductID>20003027</ns0:ProductID><ns0:ValidFrom>2010-01-04T00:00:0010:00</ns0:ValidFrom><ns0:ValidTo>9999-12-31T00:00:0010:00</ns0:ValidTo><ns0:UOM>PC</ns0:UOM><ns0:ListPrice>120.00</ns0:ListPrice><ns0:RecordType>U</ns0:RecordType><ns0:LineID>23309</ns0:LineID><ns0:UpdatedDate>0000-00-00T00:00:0000:00</ns0:UpdatedDate></ns0:ListPrice><ns0:ListPrice><ns0:CompanyID>1525</ns0:CompanyID><ns0:SalesOrg>A001</ns0:SalesOrg><ns0:ProductID>20003028</ns0:ProductID><ns0:ValidFrom>2010-01-06T00:00:0010:00</ns0:ValidFrom><ns0:ValidTo>9999-12-31T00:00:0010:00</ns0:ValidTo><ns0:UOM>PC</ns0:UOM><ns0:ListPrice>12.00</ns0:ListPrice><ns0:RecordType>U</ns0:RecordType><ns0:LineID>23428</ns0:LineID><ns0:UpdatedDate>0000-00-00T00:00:0000:00</ns0:UpdatedDate></ns0:ListPrice><ns0:ListPrice><ns0:CompanyID>1525</ns0:CompanyID><ns0:SalesOrg>A001</ns0:SalesOrg><ns0:ProductID>20002924</ns0:ProductID><ns0:ValidFrom>2010-01-07T00:00:0010:00</ns0:ValidFrom><ns0:ValidTo>9999-12-31T00:00:0010:00</ns0:ValidTo><ns0:UOM>PC</ns0:UOM><ns0:ListPrice>96.00</ns0:ListPrice><ns0:RecordType>U</ns0:RecordType><ns0:LineID>23469</ns0:LineID><ns0:UpdatedDate>0000-00-00T00:00:0000:00</ns0:UpdatedDate></ns0:ListPrice><ns0:ListPrice><ns0:CompanyID>1525</ns0:CompanyID><ns0:SalesOrg>A001</ns0:SalesOrg><ns0:ProductID>20091001</ns0:ProductID><ns0:ValidFrom>2010-01-14T00:00:0010:00</ns0:ValidFrom><ns0:ValidTo>9999-12-31T00:00:0010:00</ns0:ValidTo><ns0:UOM>PC</ns0:UOM><ns0:ListPrice>123.00</ns0:ListPrice><ns0:RecordType>U</ns0:RecordType><ns0:LineID>23647</ns0:LineID><ns0:UpdatedDate>0000-00-00T00:00:0000:00</ns0:UpdatedDate></ns0:ListPrice><ns0:ListPrice><ns0:CompanyID>1525</ns0:CompanyID><ns0:SalesOrg>A001</ns0:SalesOrg><ns0:ProductID>100000007</ns0:ProductID><ns0:ValidFrom>2010-01-20T00:00:0010:00</ns0:ValidFrom><ns0:ValidTo>9999-12-31T00:00:0010:00</ns0:ValidTo><ns0:UOM>PC</ns0:UOM><ns0:ListPrice>10.00</ns0:ListPrice><ns0:RecordType>U</ns0:RecordType><ns0:LineID>23681</ns0:LineID><ns0:UpdatedDate>0000-00-00T00:00:0000:00</ns0:UpdatedDate></ns0:ListPrice></ns0:XMLData></ns0:SendListPriceToHub>

  • Custom UME attribute with pre-defined values

    All,
    Is it possible to define a custom UME attribute which will have pre-defined values so that it appears as dropdown select when the admin creates a user?
    Your help is appreciated.
    Thanks

    Hi Aakash,
    I am not a software developer so I cannot really give you details. I can point you to our documentation: [SAP NetWeaver Developer's Guide|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/8b/0b674240449c60e10000000a1550b0/frameset.htm]
    This guide should point you in the right direction. The UME has a public API with which you access the attributes in question programmatically. What you do from there depends what you as a programmer want to do.
    -Michael

  • Create a node with the newest date only

    Hi, I want to create a node in the target, only by the newest date from the source. The source is an Idoc with, say, 3 segments of the same kind, with different dates. Only the segment with the newest date, should be created in the target.
    Any Ideas?

    Hi,
    it's easy but with user defined functions:
    - put all segments into the UDF
    - then inside this UDF choose the one with the
    latest date and put it into the array (global variable)
    - then take the values from the global variable
    to fill the sements (from new UDFs)
    you could also try with
    DateBefore and DateAfter functions
    and try to do it without UDFs
    with logic like
    if date1 DateBefore date2 then ....
    Regards,
    michal

Maybe you are looking for

  • Vendor Info Record in SAP CRM

    Hi, Can you please help me in suggesting if I can download vendor info records created in ME13 transaction in ECC can be downloaded to CRM?If yes then how will i maintain my material master in CRM w.r.t. vendors?

  • Disable overscan

    I just did a clean install of Mountain Lion on my Late 2009 Mini.  I use a 55" TV as the only monitor connected to the Mini and it is overscanning pretty badly.  I do not have the option button to turn off the overscan feature.  There has to be a way

  • Screen of new iMac goes black

    I was amazed when the screen of this intel based iMac went black after trying to open a Word document. Since then it has happened several times when I have inadvertently tried to open such messages. I then have to shut it down and restart in order to

  • When syncing my iphone stores all of my pictures that are on my computer as "Camera Albums" How do I: a)delete these off of my phone (they are hogging my available space)

    When syncing my iphone all of the pictures on my computer are saved onto the phone as "Camera Albums" .  As they are taking up too much space I want to delete them from the phone but don't see how to do this. Also, how do I prevent the pictures from

  • Itunes library changing information

    My iTunes library does not keep information once it's been altered.  This plays havoc with playlists and trying to sort music chronologically.  Very frustrating...is there a solution? For example the album 'The Beatles Bootleg Recordings 1963' was pl