Return latest transaction data, based upon transaction dates.

I appreciate I'm being a little dense here, and I have searched, read, and tried out a few different solutions I've seen give around the place. However; I think I'm struggling more with the naming conventions and logic of other people queries than you might in understanding mine (here's hoping!)
I have a huge table, which contains a record for every transaction which has an effect on our inventory (yup - BIG table!)
For a given transaction type 'CHC' (CHange Costs) I want to return the Part code, Transaction Date and Transaction cost of the LAST TWO changes.
Because its to be used for tracking updates to the cost of materials, and further for calculating the ongoing effect of these, I just need the two for now.
So,
Table is I50F
Columns required are
I50PART - [Part Code|http://forums.oracle.com/forums/]
I50TDAT - [Transaction Date|http://forums.oracle.com/forums/]
I50UCOST - [Price changed to|http://forums.oracle.com/forums/]
I50TRNS - [Transaction Type - we just want CHC]
Sample Data (Including just columns we are interested in)
I50PART              I50TDAT             I50UCOST         I50TRNS
BACCA001             08/03/2006 07:34:51 0.08829          CHC    
BACCA001             25/07/2007 08:26:30 0.10329          CHC    
BACCA001             10/04/2008 16:29:02 0.10639          CHC    
BACCA003             20/06/2006 12:22:30 0.16814          CHC    
BACCA003             25/07/2007 08:26:54 0.17024          CHC    
BACCA003             10/04/2008 13:30:12 0.17535          CHC    
BACCA004             28/08/2007 15:46:03 0.06486          CHC    
BACCA004             28/08/2007 15:49:15 0.06328          CHC    
BACCA004             30/10/2008 09:22:40 0.06952          CHC    
BACCA004             13/01/2009 09:09:07 0.06867          CHC    
BACCA005             25/07/2007 08:27:24 0.06715          CHC    
BACCA005             10/04/2008 15:45:14 0.06916          CHC    
BACCA005             30/10/2008 09:05:17 0.07453          CHC    
BACCA005             13/01/2009 09:06:49 0.07275          CHC     To take a part in isolation, BACCA005;
I'm interested in the last two records.
It makes sense for there to be two records output per part at this stage, as it may be that the powers that be decide that they want the last 3, or 4, or whatever (I'm sure everybody has similar experiences with beancouters)
Is it A) Easy, and B) relatively efficient. There are 2.4m records in the table.
If I've been stupid and not included enough info, please do [metaphorically] poke me in the eye, and I'll pad out a bit.
Thanks ever so much for reading - and even more so if you can help!
Cheers
J

Analytic functions FTW!
with I50F as (select 'BACCA001' I50PART, to_date('08/03/2006 07:34:51', 'dd/mm/yyyy hh24:mi:ss') I50TDAT, 0.08829 I50UCOST, 'CHC' I50TRNS from dual union all
              select 'BACCA001' I50PART, to_date('25/07/2007 08:26:30', 'dd/mm/yyyy hh24:mi:ss') I50TDAT, 0.10329 I50UCOST, 'CHC' I50TRNS from dual union all
              select 'BACCA001' I50PART, to_date('10/04/2008 16:29:02', 'dd/mm/yyyy hh24:mi:ss') I50TDAT, 0.10639 I50UCOST, 'CHC' I50TRNS from dual union all
              select 'BACCA003' I50PART, to_date('20/06/2006 12:22:30', 'dd/mm/yyyy hh24:mi:ss') I50TDAT, 0.16814 I50UCOST, 'CHC' I50TRNS from dual union all
              select 'BACCA003' I50PART, to_date('25/07/2007 08:26:54', 'dd/mm/yyyy hh24:mi:ss') I50TDAT, 0.17024 I50UCOST, 'CHC' I50TRNS from dual union all
              select 'BACCA003' I50PART, to_date('10/04/2008 13:30:12', 'dd/mm/yyyy hh24:mi:ss') I50TDAT, 0.17535 I50UCOST, 'CHC' I50TRNS from dual union all
              select 'BACCA004' I50PART, to_date('28/08/2007 15:46:03', 'dd/mm/yyyy hh24:mi:ss') I50TDAT, 0.06486 I50UCOST, 'CHC' I50TRNS from dual union all
              select 'BACCA004' I50PART, to_date('28/08/2007 15:49:15', 'dd/mm/yyyy hh24:mi:ss') I50TDAT, 0.06328 I50UCOST, 'CHC' I50TRNS from dual union all
              select 'BACCA004' I50PART, to_date('30/10/2008 09:22:40', 'dd/mm/yyyy hh24:mi:ss') I50TDAT, 0.06952 I50UCOST, 'CHC' I50TRNS from dual union all
              select 'BACCA004' I50PART, to_date('13/01/2009 09:09:07', 'dd/mm/yyyy hh24:mi:ss') I50TDAT, 0.06867 I50UCOST, 'CHC' I50TRNS from dual union all
              select 'BACCA005' I50PART, to_date('25/07/2007 08:27:24', 'dd/mm/yyyy hh24:mi:ss') I50TDAT, 0.06715 I50UCOST, 'CHC' I50TRNS from dual union all
              select 'BACCA005' I50PART, to_date('10/04/2008 15:45:14', 'dd/mm/yyyy hh24:mi:ss') I50TDAT, 0.06916 I50UCOST, 'CHC' I50TRNS from dual union all
              select 'BACCA005' I50PART, to_date('30/10/2008 09:05:17', 'dd/mm/yyyy hh24:mi:ss') I50TDAT, 0.07453 I50UCOST, 'CHC' I50TRNS from dual union all
              select 'BACCA005' I50PART, to_date('13/01/2009 09:06:49', 'dd/mm/yyyy hh24:mi:ss') I50TDAT, 0.07275 I50UCOST, 'CHC' I50TRNS from dual)
select I50PART, I50TDAT, I50UCOST, I50TRNS
from   (select I50PART, I50TDAT, I50UCOST, I50TRNS, row_number() over (partition by I50PART order by I50TDAT desc) rn
        from   I50F
        where  I50TRNS = 'CHC')
where  rn <= 2
order by I50PART, I50TDAT desc;
I50PART  I50TDAT               I50UCOST I50
BACCA001 10/04/2008 16:29:02     .10639 CHC
BACCA001 25/07/2007 08:26:30     .10329 CHC
BACCA003 10/04/2008 13:30:12     .17535 CHC
BACCA003 25/07/2007 08:26:54     .17024 CHC
BACCA004 13/01/2009 09:09:07     .06867 CHC
BACCA004 30/10/2008 09:22:40     .06952 CHC
BACCA005 13/01/2009 09:06:49     .07275 CHC
BACCA005 30/10/2008 09:05:17     .07453 CHC

Similar Messages

  • Non serial Invoice data based upon GRPO

    Hello Experts,
    I want to made report on non serial based items.
    Means i want data based upon the following way.
    Suppose GRPONo 400 have three items  Item A, Item B and Item C.
    and suppose Item C is non serial based item,
    so i have to get sales data(A/R) of Item C for GRPONo 400 only not the different GRPONO of Item C.
    Ex:-
    GRPONO     GRPODate     ITEMCode     ItemQty      SaleInvoiceNO            SaleInvoiceDate     SaleInvoiceQty
    400     12/12/2009     Item C     50                 900            15/02/2010     30
                                                                                    600            12/02/2010     20
    I want only those Invoice sales data which is actually raised against particular GRPONo.     
    Thanks,

    Hello Gordon,
    Thanks for the reply.We are basically used FIFO method for items.
    I can able to discover the solution of Serial based items from OSRI and SRI1 table.
    But for non serial based items there is no way to discover that particular GRPO Item quanity has been sale against which Invoice NO???????
    I want the sales data of Non serial items for particular GRPO Item quantity.
    I want to show that particular GRPO qty is sold against which which invoices..
    I hope you are more clear about my requirement.
    Regards,

  • Age Calc based upon b'date

    I'm seeking a Current Age calc based upon B'date and a set date in the future (5-5-2012) for a registration form.  I have zero Java or FormCalc background.  Many thanks for any assistance.

    If you don't much response in the LiveCycle Forms forum you posted to, you might try the more active and equally appropriate one here: http://forums.adobe.com/community/livecycle/livecycle_es/livecycle_designer_es

  • FM to get the previous sunday date based on current date(sy-datum)

    hi all,
    Is there any function module to get the previous sunday date based on current date(sy-datum)?
    Regards,
    Kapil Sharma
    Moderator Message: Basic date related questions are not allowed
    Edited by: Suhas Saha on Sep 19, 2011 11:39 AM

    Hi,
    There are function modules to find out the current day of the week depending on sy-datum. These are as below:
    1. DATE_COMPUTE_DAY - Returns a number indicating what day of the week the date falls on. e.g. Monday is returned as a 1, Tuesday as 2,...., Sunday as 7.
    2. RH_GET_DATE_DAYNAME  - Returns the day based on the date provided, e.g. Monday, Tuesday,..., Sunday.
    Using any of the above, if you can find out the current day, then you can calculate and compute the date of the previous Sunday.
    My observation is that using the first FM might make the calculation simpler.
    Hope this is of help to you.
    Regards,
    Shayeree

  • FM to get previous sunday date based on current date(SY-DATUM)

    hi all,
    Is there any function module to get the previous sunday date based on current date(sy-datum)?
    Regards,
    Kapil Sharma

    Hi Kapil,
    You can follow the logic below:
    data:
    l_date like sy-datum, **TODAY
    l_date2 like sy-datum, **Previous Sunday
    data:
    l_daynr like HRVSCHED-DAYNR.
    *Get today's date
    l_date = sy-datum.
    *Gey today's day (Monday, Tuesday, etc.)
    CALL FUNCTION 'HRIQ_GET_DATE_DAYNAME'
    EXPORTING
    langu = 'EN'
    date = l_date
    IMPORTING
    daynr = l_daynr.
    CASE l_daynr.
    *If it is Monday
    WHEN 1.
    -Subtract 2 days for the previous Sunday
    CALL FUNCTION 'HR_SEN_CALE_DAYS_DATE'
    EXPORTING
    id_date = l_date
    id-operator = '-'
    is_duration = 2
    IMPORTING
    ed_date = l_date2.
    *If it is Tuesday
    WHEN 2.
    CALL FUNCTION 'HR_SEN_CALE_DAYS_DATE'
    EXPORTING
    id_date = l_date
    id-operator = '-'
    is_duration = 3
    IMPORTING
    ed_date = l_date2.
    *If it is Wednesday
    WHEN 3.
    CALL FUNCTION 'HR_SEN_CALE_DAYS_DATE'
    EXPORTING
    id_date = l_date
    id-operator = '-'
    is_duration = 4
    IMPORTING
    ed_date = l_date2.
    *If it is Thursday
    WHEN 4.
    CALL FUNCTION 'HR_SEN_CALE_DAYS_DATE'
    EXPORTING
    id_date = l_date
    id-operator = '-'
    is_duration = 5
    IMPORTING
    ed_date = l_date2.
    *If it is Friday
    WHEN 5.
    CALL FUNCTION 'HR_SEN_CALE_DAYS_DATE'
    EXPORTING
    id_date = l_date
    id-operator = '-'
    is_duration = 6
    IMPORTING
    ed_date = l_date2.
    *If it is Saturday
    WHEN 6.
    CALL FUNCTION 'HR_SEN_CALE_DAYS_DATE'
    EXPORTING
    id_date = l_date
    id-operator = '-'
    is_duration = 7
    IMPORTING
    ed_date = l_date2.
    *If it is Sunday
    WHEN 7.
    CALL FUNCTION 'HR_SEN_CALE_DAYS_DATE'
    EXPORTING
    id_date = l_date
    id-operator = '-'
    is_duration = 8
    IMPORTING
    ed_date = l_date2.
    ENDCASE.
    Regards,
    Dilek

  • How to update the price based upon PGI date

    Hi
            I have issue of updation of the Prices and freight based on PGI date in the billing we are using the two billing types for the excsies and tax invoice creation .And in the copy control pricing type is maintained Aas "C" for the billing types with single delivery but someHow MRP in the excise billing has been picked from the condition record thats validity is ended and in Tax invoice it picks up the correct prices
    Both pricing condition types has pricing type "B" from Billing date and in the freight we have maintained as "A" SRD
    But for the some cases specially for the excise related part that is based upon the MRP we are facing this issue
    Pricing date is some how coming from sales document
    Please find the problem details in the attachment

    Hi,
    if you see two condition tabs snap shots you can understand clearly because that two invoices has been created in two different dates and you have maintained the pricing date C-billing date ( KOMK-FKDAT).Due to this,the price of ZMRP is coming differently.After you creation of first invoice then you would have changed ZMRP amount.Now while you are creating second invoice ,system has taken new price of ZMRP in billing level.
    Note:While creating second invoice, PGI date might have come into billing level but someone would be changed billing date manually at header level of billing document.Please check that one also.
    Kindly let me know if you need further help on this.
    Thanks,
    Naren

  • Filtering of the data based upon the selection screen data using ldb

    Hi Experts ,
    I am using ldb pnpce, for my report ,and i created my own report category with selection paramaters
    action type and payroll area
    now the problem is when i am giving the action type as Z0 ,the data to be extracted is not getting filtered
    based upon the action type ,the data consists the records having different action types other than Z0
    Please give me some solution for this

    Thanks Durga ,but the link wat ever u was for hiding the selection screen fields
    but my question is when am using get pernr event my data is not getting filtered with the selection screen paramater value
    i,e m giving action type as only hiring ,but m getting the data for all the action types ,its not filtering based upon my selection

  • IDoc number based upon sales data.

    Hi Experts,
    How to get the IDoc number in case I have sales document number or any other data which is being send in IDoc, any way we can get the IDoc number?
    Also help me know the program to process the IDocs in background, I know the t.code bd87 is used to process the idocs, but how to process in background via a batch job.
    thanx
    Garima

    Hi,
    You may use t.code we09 to get the Idoc number based upon data,
    you need to provide the information like Idoc basic type, date range etc to filter the data,
    and under "Creteria for search in data records",  provide the segment name, search in field and value against you are looking for a Idoc number.
    Use following programs to process the IDocs in background:-
    RSEOUT00 u2013 Process all selected IDocs (EDI) 
    RBDAPP01 u2013 Inbound Processing of IDocs Ready for Transfer
    Some use full t.code for IDoc processing:-
    WE60 u2013 IDoc documentation 
    BD87 u2013 Inbound IDoc reprocessing 
    BD88 u2013 Outbound IDoc reprocessing 
    BDM2 u2013 IDoc Trace 
    WE19- Testing IDoc.
    regards
    Vivek.

  • X-axis values - Set values based upon constant date

    I am creating a line graph.   I am plotting based upon date/time.   I'd like to use a constant date across the x-axis.  IE 8:00, 8:15, 8:30.   Within the constant value there could be many points or no points.   For example there could be a point at 8:01, 8:02, 8:05 and then a point at 8:35.   Along the x-axis the label should remain constant at 8:00, 8:15...
    Any ideas?

    Hi,
    use the chart engine for creating your graph. When requiring a horizontal time axis you have to use the chart type TimeScatter.
    Download the SAP Chart Designer (SDN - Downloads - WebAS) and see the included pdf document that describes how to structure your data XML.
    Demo reports are GRAPHICS_GUI_CE_DEMO and GRAPHICS_IGS_CE_TEST.
    Regards, Kai

  • Workflow 2013 execute based upon a date

    I have a workflow 2013 that will need to execute once a month when the day of the month is the 1st working day of the month. The day could actually be the first day of the month. Is there a way that I can setup this kind of a workflow to execute based upon
    start and end dates? Is there some kind of a background process that I can setup?
    Thus can you tell me if this is possible and how to accomplish my goal?

    Hi,
    From your description, my understanding is that you want to execute a workflow once a month.
    If you create this workflow with template SharePoint 2010 Workflow, you could refer to this article:
    Creating a Timed Workflow in SharePoint 2010
    http://blogs.askcts.com/2013/05/14/creating-a-timed-workflow-in-sharepoint-2010/.
    I tried to use this method on a workflow with template SharePoint 2013 Workflow, but I cannot find the workflow under the Active section by following above article. If you create this workflow with template SharePoint 2013 Workflow, there is no a OOB method
    to accomplish your requirement. You could create a custom timer job to accomplish your requirement.
    You could refer to these articles:
    Create and Deploy Custom Timer Job Definition in SharePoint Programatically
    http://www.codeproject.com/Tips/634208/Create-and-Deploy-Custom-Timer-Job-Definition-in-S
    Starting a SharePoint 2013 workflow programmatically using C#
    http://www.ericgregorich.com/blog/2014/10/1/starting-a-sharepoint-2013-workflow-programmatically-using-c
    Best Regards
    Vincent Han
    TechNet Community Support

  • How to add dynamic content to a web site such as a map that shows position based upon gps data?

    Hello All;
    I have some software that generates a map that shows the position of a moving object based upoin gps data that's updated every 30 seconds or so. I want to place that map image on a web page using Dreamweaver. Can someone give me some guidance how I may do this and/or lead me to other web resources that would explain the basics.
    Thanks.
    Tim

    Am I understanding your question right?
    You want to do 2 things:
    Add a map image to a page
    Have the image update every 30 seconds

  • Date based Resultset and Date display

    Hi
    I have two jsp pages. In first page user selects a Date and name, based on that 2nd jsp display a resultset in a table. I want to Display Selected name and Date on 2nd Page. I done it for name and unable to show the Date and query is also to be modified.
    Here is code for my two jsp pages:
    first.jsp
      <%@ taglib uri="http://java.sun.com/jstl/sql" prefix="sql" %>
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
    <%@ include file="DataSource.jsp" %>
    <html>
    <head>
    <title>abcd</title>
    <script type="text/javascript" language="javascript">
    function HTML(p){
    if(!p){
    /*default*/
    p='A action align alt B background Base bgcolor BIG BLINK BODY border bordercolor bordercolordark bordercolorlight Br cellpadding cellspacing checked color cols colspan compact content dir DIV enctype face FONT FORM H1 H2 H3 H4 H5 H6 HEAD height Hr href hspace HTML I id Img Input lang language leftmargin LI marginheight marginwidth maxlength Meta method name NOSCRIPT noshade nowrap OL onblur onchange onclick onfocus onload onmouseout onmouseover onreset onselect onsubmit onunload OPTION P PRE profile readonly rows rowspan SCRIPT SELECT size SMALL SPAN src start STRIKE STYLE style SUB SUP TABLE target TD TEXTAREA TH TITLE title topmargin TR TT type U UL valign value vspace width wrap'
    String.prototype.write=function(){
    document.write(this);
    return this
    String.prototype.alert=function(){
    window.alert(this);
    return this
    String.prototype.status=function(){
    window.status=this;
    return this
    var x=[
    function(W){var q=String.fromCharCode(34);return ' x='+q+((typeof(W)!='undefined')?W:'x')+q}/*attr*/,
    function(W){return '<x'+((typeof(W)!='undefined')?W:'')+' />'}/*tag*/,
    function(W){return '<x'+((typeof(W)!='undefined')?W:'')+'>'+this+'</'+'x>'}/*container*/,
    function(W){var o='<x'+((typeof(W)!='undefined')?W:'')+' />';return o+this.join(o)}/*tags*/,
    function(W){var o='<x'+((typeof(W)!='undefined')?W:'')+'>';var c='</'+'x>';return o+this.join(c+o)+c}/*containers*/
    var j=[];
    var f=0;
    var a=p.split(' ');
    var t,u,l;
    for(var i=0;i<a.length;i++){
    t=a;
    u=t.toUpperCase();
    l=t.toLowerCase();
    if(t==l){
    /*attr*/
    j[f]='window.'+u+'='+x[0]
    else if(t==u){
    /*container;containers*/
    j[f]='String.prototype.'+u+'='+x[2]+';Array.prototype.'+u+'='+x[4]
    else{
    /*tag;tags*/
    j[f]='window.'+u+'='+x[1]+';Array.prototype.'+u+'='+x[3]
    /*specific*/
    j[f]=j[f].replace(/x/g,l);
    f++
    window.status='HTML() bookmarklet library: Copyright (c) 2002-'+(new Date()).getFullYear()+', by Richard Edwards. ['+f+' tag/attrs added] ';
    /*implement!*/
    eval(j.join(';'))
    HTML();
    </script>
    <script type="text/javascript" language="javascript">
    function init(){m='January February March April May June July August September October November December'.split(' ');wd='Su M Tu W Th Fr Sa'.split(' ');lom=[31,28,31,30,31,30,31,31,30,31,30,31];sz=25;js='javascript';fn=[function(F){},function(F){DATE=new Date(F.date.value);if(isNaN(DATE.valueOf())){DATE=new Date()};M=DATE.getMonth();D=DATE.getDate();Y=DATE.getFullYear();lom[1]=28;if((Y%/**/4==0)&&((Y%/**/100>0)||(Y%/**/400==0))){lom[1]++}},function(F){if(D>lom[M]){D=lom[M]};F.date.value=(M<9?'0':'')+(1.0+M)+'/'+(D<10?'0':'')+D+'/'+Y;dv.value=F.date.value;if(opener.Page){opener.document.forms[0][dv.name].value=F.date.value}},function(){F=this.form;fn[1](F);M=this.selectedIndex;fn[2](F);fn[0](F)},function(){F=this.form;fn[1](F);D=this.value;fn[2](F);fn[0](F)},function(){F=this.form;fn[1](F);Y=this.value;fn[2](F);fn[0](F)},function(F){fn[1](F);var f=new Date(Y,M,1);var x=1-(f.getDay());for(var i=0;i<49;i++){F.d[i].value=(i<7?wd[i]:'');F.d[i].onclick=this;};for(var i=1;i<=lom[M];i++){w=Math.floor((i-1)/7);n=7+i-x;F.d[n].value=i;F.d[n].onclick=fn[4];if(i==D){F.d[7+i-x].focus()}};for(var i=0;i<F.m.length;i++){F.m[i].selected=(i==M)};F.m.onchange=fn[3];F.y.value=Y;F.y.onchange=fn[5];F.y.onblur=fn[5];fn[2](F)}];fn[0]=fn[6]};init();function popCal(datevalue){if(!datevalue){dv={name:'Today',value:(new Date())}}else{dv=datevalue};var c=ALIGN('center')+HEIGHT(sz);var h=(m.OPTION().SELECT(NAME('m'))+INPUT(TYPE('text')+SIZE(4)+NAME('y'))+INPUT(TYPE('hidden')+NAME('date')+VALUE(dv.value))).TD(COLSPAN(7)+c);var b=INPUT(TYPE('button')+NAME('d')+STYLE('width:'+sz+';height:'+sz)+WIDTH(sz)+c);var r=[b,b,b,b,b,b,b].TD(WIDTH(sz*7)+c);h=[h,r,r,r,r,r,r,r].TR(c).TABLE(BORDER('0')+CELLSPACING('0')+CELLPADDING('0')+c).FORM(NAME('frm')+ACTION(js+'://'));h+=(init+';init();dv=opener.dv;fn[0](document.forms.frm);').SCRIPT(LANGUAGE(js)+TYPE('text/'+js));window.open('','cal'+(new Date()).valueOf(),'height='+sz*9+',width='+sz*8).document.write(h)};
    </script>
    </head>
    <body bgcolor=lightblue>
    <center><h1>xyz</h1></center>
    <hr>
    <br>
    <p>
    <p>
    <p>
    <p>
    <h4>Select a date: </h4>
    <script type="text/javascript" language="javascript">
    (INPUT(NAME("DV")+READONLY())+INPUT(TYPE("button")+VALUE("Calendar..")+ONkLICK("popCal(this.form.DV)"))).FORM().write();
    </script>
    <p>
    <p>
    <br>
    <form method=post action="second.jsp">
    <sql:transaction dataSource="${example}">
         <sql:query var="Power">
              select unique trader_name from exchange_deal where unit_of_measure='mwh'
         </sql:query>
    </sql:transaction>
    <h4><p>Select a Trader:
         <select Name = "TraderDrop">
         <c:forEach var="row" items="${Power.rows}">
    <option size="20"><c:out value="${row.Trader_name}"/></option>
    </c:forEach>
         </select>
    <p>
    </h4>
    <br>
    <input type="submit" value="SUBMIT"/>
    <input type="reset" value="CANCEL"/>
    </form>
    </body>
    </html>
    Second jsp
      <%@ taglib uri="http://java.sun.com/jstl/sql" prefix="sql" %>
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
    <%@ include file="DataSource.jsp" %>
    <html>
    <head>
    <title>abc</title>
    </head>
    <body bgcolor=lightblue>
    <center><h1>xyz</h1></center>
    <hr>
    <form name="input" action="pqr.jsp"
    method="get">
    <c:set var="s" value="${param.TraderDrop}" />
    <h3>Trader : <c:out value="${s}" /></h3>
    <c:set var="d" value="${param.date}" />
    <h3>Trade Date: <c:out value="${d}" /></h3>
    <sql:transaction dataSource="${example}">
    <sql:query var="Power">
         SELECT DEAL_ID, DEAL_TYPE, EXCHANGE_NAME, HUB_NAME, ORGINATING_APPLICATION, PRODUCT_ID, TAKER_COMPANY FROM ENYWARE.EXCHANGE_DEAL where TRANSACTION_TIMESTAMP > sysdate - 3 and trader_name = '<c:out value="${s}" />'
    </sql:query>
    </sql:transaction>
    <table border="1">
    <%-- Get the column names for the header of the table --%>
    <tr>
    <c:forEach var="columnName" items="${Power.columnNames}">
    <th><c:out value="${columnName}"/></th>
    </c:forEach>
    </tr>
    <tr>
    <c:forEach var="column" items="${row}">
    <td><c:out value="${column.value}"/></td>
    </c:forEach>
    </tr>
    </c:forEach>
    </table>
    </form>
    </body>
    </html>
    I am using JavaScript calendar for entering date in a Text box.
    Please review code and help me.
    Thanks in Advance
    Surya

    Anitha123 wrote:
    Hi
    Thanks for your reply..
    We execute our application using a batch file which holds the main class file to be executed as below :
    batch file content as below :
    set PATH=.\_jvm\bin
    set JAVA_HOME=.\_jvm
    set CLASSPATH=.\_jvm\lib\rt.jar;.\_jvm\lib\itext.jar
    java -cp %CLASSPATH%;.\classes xx.yy.zz.Ourmainclass
    Here how can i set the time zone as users time zone? we don't use any manifest file for our application..can you please guide me on the same..Very Good...Then here is your answer..
    set PATH=.\_jvm\bin
    set JAVA_HOME=.\_jvm
    set CLASSPATH=.\_jvm\lib\rt.jar;.\_jvm\lib\itext.jar
    java -Duser.timezone=Asia/Calcutta -cp %CLASSPATH%;.\classes xx.yy.zz.OurmainclassIf this will solve your problem.. don't forget to reward duke stars...please..

  • Updation of SO Confirmed Delivery date based on GR date for BANC parts

    Dear All,
    Would appreciate an answer on the following issue:
    For Back to back/Indiv Purchase Order parts(BANC) the confirmed delivery date in the SO is updated based on the Order Acknowledgement date sent by the vendor for the corresponding PO generated for the SO. If the the vendor happens to deliver the parts in advance of the OA date(it happens quite often), the parts wait in stores till the confirmed delivery date is reached on the SO even thugh the original requested date on the Sales order is long past. If there is an order acknowledgement date in the system, at the time of GR, a warning message comes, but as our system is a high volume systme it is not possible to update the date in SO manually. Is there a way we can update the confirmed delivery date in the SO based on the Goods receipt date automaticall through config or a batch job?
    Thanks
    Suman

    Dspsac,
    Delivery date can be any date.  For instance, if your customer insisted on a Sunday delivery, you would accommodate him, regardless of any calendar.
    From the delivery date, the system counts backwards USING THE FACTORY CALENDAR ASSIGNED TO THE ROUTE by the number of days in the route.  You have to consult the FC assigned to your Route to determine if the GI date has been properly calculated.
    From the GI date, the system counts backward Pick/pack time, using the shipping point calendar, to arrive at Material availability date.
    Calculations are explained in SAP online help
    [Transportation and Delivery Scheduling|http://help.sap.com/erp2005_ehp_04/helpdata/EN/dd/5607e7545a11d1a7020000e829fd11/frameset.htm]
    Regards,
    DB49

  • Invoice Date Based on POD Date and Requested Delivery Date

    Hello Experts,
    Could you please Help me How to get the Billing date in the invoice document based on POD date if the POD Report has been Posted , If not the system should pick up the requested delivery date.
    Thanks for your time

    Hi,
    Create an copy control routine (T.Code VOFM) as assign in copy control setting between Delivery doc to billing docuement (T.code VTFL).
    The new routine will be created with copy of existing routine assign under "Copying requirements" at item level, and assign on same place.
    Pl take help of ABAPer to write the new routine.
    regards
    Vivek.
    Edited by: Vievk Vardhan on Jan 7, 2010 1:50 PM

  • Last month end date based on current date

    Hi,
    How to show last month end date based on the current date.
    Eg:
    Current date = "08/26/09"
    Var- Last Month End Date = "07/31/09" etc...,
    Please help me how to get it...
    Thank You!

    Good to hear that it worked for you. but not for me.
    I tried like this:
    1st::
    1. var1= ToDate("06/30/09","MM/dd/yyyy")
    2.Var2= RelativeDate([Var1];-DayNumberOfMonth([Var1]))
    result: 5/30/09
    2nd:
    RelativeDate('6/30/2009';-DayNumberOfMonth('6/30/2009'))
    result: 5/30/09
    Am working on SAP OLAP cubes.
    Please help me where am going wrong....
    Thank You!

Maybe you are looking for

  • 11.1.2: Declarative-component problem!

    Hi! We're just evaluating 11.1.2. I converted some declarative components to 11.1.2/Facelets style, but I am running into problems. As a test, I created some new components from scratch, confirming the issue. I create a declarative component and choo

  • Configuration setting that needs to be changed to allow flexibility copy and to paste formatted text

    what is the configuration setting in Contribute that needs to be changed to allow me flexibility copy and to paste formatted text? Example I am unable to copy and paste formatted text within contribute and the line that is represented under the headi

  • Private Area not Created in cFolders

    I assigned a collaboration folder (competitive scenario) while creating a Bid Invitation. This creates a public area and I added a document. The bid invitation is then published. Now when bidder creates a bid, private area is not being created in cFo

  • Could not complete the itunes store request. the store may be busy check ..

    I am trying to activate an Iphone (UK) and get the message:- could not complete the itunes store request. the store may be busy check your internet connection. No matter what I do, turn the firewall off, allow cookies... Can anyone help??????????????

  • Real problem with highlights

    Sorry for posting a new one but I am in real trouble here On a simple menu with 3 buttons that i built in photoshop CS2 I have a nice simulation with the correct highlights appearing on my buttons when I roll over then if i build the DVD the buttons