Validate the XML tag value and display the Binding data in XDP

Hi,
I am new to Adobe Life Cycle.... and i am working on the following requirement and XML file is enclosed...
1. Need to validate the XML value of <pp> with condition
2. Basing on the value of <pp>, need to display the <ct> values in text field
If i simply bind, it takes the values from top of array and display..
Please suggest how to restrict the binding values basing on the condition.
Thanks
Madhu

Hi Paul,
Thank you for quick respose.
The solution which you have give me not excatly looking for.... working for the solution in alternative methods...
Regards
madhu

Similar Messages

  • Retrieve list items from the textbox text value and display the dropdownlist item for that particular list item

    hi,
     I have created a custom list in my sharepoint :
    List1 name:   employeedepartment  -
                   Title       empdepartment
                   A             D1
                   B             D2
                   C             D3 
    List2  name:  employeedetails  
     emptitle            empname       empdepartment(lookup) --> from the list "employeedepartment"
       x                     Ram                 D1
       y                     Robert             D2
       z                     Rahim              D3
    My task is to create a custom webpart that will be for searching this employee details by entering emptitle
    For this, i have created a visual webpart using visual studio 2010, my webpart will be like this:
    emptitle  --->  TextBox1                        Button1--> Text property : Search
    empname---> TextBox2
    empdepartment-->  DropDownList1
    For this, i wrote the code as follows:
    protected void Button1_Click(object sender, EventArgs e)
                using (SPSite mysite = new SPSite(SPContext.Current.Site.Url))
                    using (SPWeb myweb = mysite.OpenWeb())
                        SPList mylist = myweb.Lists["employeedetails"];
                        SPQuery query = new SPQuery();
                        query.Query = "<Where><Eq><FieldRef Name='Title'/><Value Type='Text'>" + TextBox1.Text.ToString() + "</Value></Eq></Where>";
                        SPListItemCollection myitems = mylist.GetItems(query);
                        if (myitems.Count > 0)
                            foreach (SPListItem item in myitems)
                                string a1 = Convert.ToString(item["empname"]);
                                string a2 = Convert.ToString(item["empdepartment"]);
                                TextBox2.Text = a1;           // displaying   properly                    
                                //DropDownList3.SelectedIndex = 1;                           
     It is showing the list item in textbox according to the item entered in the textbox1... But I am stuck to show in the dropdown list. 
    Suppose, if i enter X in textbox and click on search, then dropdownlist need to show D1,
                               for Y --> D2 and for Z-> D3... like that.
    What code do i need to write in the button_click to show this... 
    Please don't give any links...i just want code in continuation to my code.

    Hi,
    Since you have got the data you want with the help of SharePoint Object Model, then you can focus on how to populate values and set an option selected in the Drop Down List.
    With the retrieved data, you can populate them into the Drop Down List firstly, then set a specific option selected.
    Here is a link will show how to populate DropDownList control:
    http://www.dotnetfunda.com/articles/show/30/several-ways-to-populate-dropdownlist-controls
    Another link about select an item in DropDownList:
    http://techbrij.com/select-item-aspdotnet-dropdownlist-programmatically
    Best regards
    Patrick Liang
    TechNet Community Support

  • Setting the XML tag value in Java script

    Hi,
       I am trying to set a XML tag value in the initialize event of a text field.. The code works fine in FormCalc but I needed it to work in java script.
         FormCalc:
         $record.prospectApplication.typeName = "namedInsured";
         Java Script:
         xfa.record.prospectApplication.typeName = "namedInsured";
         The above JavaScript does not work. Can any one help on this?
    Thanks
    Srini

    Hi Srini,
    In JavaScript you don't get any default properties so you need to say;
    xfa.record.prospectApplication.typeName.value = "namedInsured";
    That is assign the value to the "value" property not the dataValue object.

  • Query Stripping: how to filter a value and display the detail

    Hi,
    We have just upgraded to XI 3.1 SP3.1, and I have done some tests on the query Stripping functionnality. I can see the benefits from a performance point of view if I dragged new characteristics to the report, but I was not able to reproduce one of our key requirements:
    The report displays Sales by Manager, the customer is in the webi query panel but not in the report. So far, thanks to the query stripping option, webi only retrieves the Manager information and not the customer.
    Now, the user wants to see the sales by customer for a particular manager. If I drag and drop the customer, I have the customers for all the managers, and I now have a performance issue.
    I just would like to do as in BEX: Filter and Drill Down.
    I know that I can use the Drill Functionnality of webi, but it is a fixed scenario that you have to define in advance in the universe. It has also the inconvenient to drill only to the key or the description of an object (cannot drill down to the key and description of the customer).
    Any tip to do a "filter and Drill Down" using the query stripping functionnality?
    THank you,
    Gabriel

    Hi,
    Drag from output port of dataservice and select "filter data" option. Then if you select "configure element" for filter operator, you can see the fileds.
    The filter conditions for a numeric field is as follows
    Equals 100 - <b>100</b>
    Not equals 100  - <b>not 100</b>
    greater than 100 - <b>100..</b>
    <= 100 - <b>not 100..</b>
    <100 - <b>..100</b>
    I think you got the logic here. the two dots at the end shows greater while dots at the begining shows less than. If the dots are in the middle of two numbers, the filter operator  will return values between the two numbers
    Regards,
    Sooraj

  • Calculating the total in alv and displaying the date

    Hi,
    I am trying to calculate the totals of netwr and fkimg in a report but the following coding cannot giv me the right answer so if there is anyone with the solution for this problem may you please help me out and how can i display the date on my report......here is my coding:
    REPORT  Z_DAILY_STOCK_NEW.
    TYPE-POOLS: SLIS.
                       TABLES
    TABLES: vbrk, kna1,vbrp,vbap,vbak, sflight.
               ALV FIELDS
    DATA: it_fieldcat TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
          wa_fieldcat TYPE slis_fieldcat_alv.
    DATA: w_cnt LIKE sy-tabix.
         total ref to data.
        t_alv LIKE TABLE OF s_error WITH HEADER LINE.
    DATA: gr_layout TYPE slis_layout_alv,
          gr_tab_group TYPE slis_t_sp_group_alv,
          gr_repid LIKE sy-repid,
          gr_events TYPE slis_t_event,
          gr_print  TYPE slis_print_alv,
          gr_user   TYPE slis_formname VALUE 'USER_COMMAND'.
             SELECTION SCREEN
    SELECT-OPTIONS:
      s_werks FOR vbrp-werks,
      s_auart FOR vbak-auart.
             DEFINITION OF AN INTERNAL TABLE
    DATA: begin of i_stocktab occurs 0,
             kunag LIKE vbrk-kunag,
             name1 LIKE kna1-name1,
             ort01 LIKE kna1-ort01,
             inco1 LIKE vbrk-inco1,
             vkgrp LIKE vbrp-vkgrp,
             fkimg LIKE vbrp-fkimg,
             netwr LIKE vbrk-netwr,
          end of i_stocktab.
             START OF SELECTION
       SELECT vbrkkunag kna1name1 kna1ort01 vbrkinco1 vbrp~vkgrp
              vbrpfkimg vbrknetwr
              FROM kna1 inner join vbrk on kna1kunnr EQ vbrkkunrg
                        inner join vbak on kna1kunnr EQ vbakkunnr
                        inner join vbrp on vbrkvbeln EQ vbrpvbeln
              INTO i_stocktab
              WHERE vbrp~werks IN s_werks
              AND   vbak~auart IN s_auart.
              APPEND i_stocktab.
       ENDSELECT.
    *DATA tb_alv TYPE i_stocktab WITH HEADER LINE.
    PERFORM build_fieldcatalog.
    PERFORM build_layout.
    PERFORM build_event.
    PERFORM build_print.
    PERFORM calc_total.
    PERFORM display_alv_report.
    FORM build_fieldcatalog.
      w_cnt = 1.
      it_fieldcat-fieldname = 'KUNAG'.
      it_fieldcat-seltext_m = 'Soldtp'.
      it_fieldcat-col_pos   = w_cnt.
      it_fieldcat-emphasize = 'X'.
      it_fieldcat-key       = 'X'.
      APPEND it_fieldcat TO it_fieldcat.
      CLEAR it_fieldcat.
      w_cnt = w_cnt + 1.
      it_fieldcat-fieldname = 'NAME1'.
      it_fieldcat-seltext_m = 'Name'.
      it_fieldcat-col_pos   = w_cnt.
      it_fieldcat-emphasize = 'X'.
      APPEND it_fieldcat TO it_fieldcat.
      CLEAR it_fieldcat.
      w_cnt = w_cnt + 1.
      it_fieldcat-fieldname = 'ORT01'.
      it_fieldcat-seltext_m = 'City'.
      it_fieldcat-col_pos   = w_cnt.
      it_fieldcat-emphasize = 'X'.
      APPEND it_fieldcat TO it_fieldcat.
      CLEAR it_fieldcat.
      w_cnt = w_cnt + 1.
      it_fieldcat-fieldname = 'INC01'.
      it_fieldcat-seltext_m = 'Incoterms'.
      it_fieldcat-col_pos   = w_cnt.
      it_fieldcat-emphasize = 'X'.
      APPEND it_fieldcat TO it_fieldcat.
      CLEAR it_fieldcat.
      w_cnt = w_cnt + 1.
      it_fieldcat-fieldname = 'VKGRP'.
      it_fieldcat-seltext_m = 'Sales Group'.
      it_fieldcat-col_pos   = w_cnt.
      it_fieldcat-emphasize = 'X'.
      APPEND it_fieldcat TO it_fieldcat.
      CLEAR it_fieldcat.
      w_cnt = w_cnt + 1.
      it_fieldcat-fieldname = 'FKIMG'.
      it_fieldcat-seltext_m = 'Invoiced Qty'.
      it_fieldcat-col_pos   = w_cnt.
      it_fieldcat-emphasize = 'X'.
    *it_fieldcat-do_sum = 'x'.
      APPEND it_fieldcat TO it_fieldcat.
      CLEAR it_fieldcat.
      w_cnt = w_cnt + 1.
      it_fieldcat-fieldname = 'NETWR'.
      it_fieldcat-seltext_m = 'Invoiced Value'.
      it_fieldcat-col_pos   = w_cnt.
      it_fieldcat-emphasize = 'X'.
    it_fieldcat-do_sum    = 'x'.
      APPEND it_fieldcat TO it_fieldcat.
      CLEAR it_fieldcat.
    ENDFORM.
    FORM build_layout.
        gr_layout-no_input           = 'X'.
        gr_layout-colwidth_optimize  = 'X'.
        gr_layout-totals_text        = 'Totals: '(201).
        gr_layout-detail_popup       = 'X'.
    ENDFORM.
    FORM build_event.
      DATA i_event TYPE slis_alv_event.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
         EXPORTING
           i_list_type = 0
         IMPORTING
           et_events   = gr_events[].
       READ TABLE gr_events WITH KEY name = slis_ev_user_command
                            INTO i_event.
       if sy-subrc = 0.
         MOVE gr_user TO i_event-form.
         APPEND i_event TO gr_events.
       endif.
    ENDFORM.
    *FORM calc_total.
    LOOP AT it_fieldcat into wa_fieldcat
    WHERE fieldname EQ 'FKIMG' OR
           fieldname EQ 'NETWR'.
           wa_fieldcat-do_sum   = 'X'.
           wa_fieldcat-datatype = 'QUAT'.
    modify it_fieldcat from wa_fieldcat.
    ENDLOOP.
    *ENDFORM.
    FORM build_print.
         gr_print-reserve_lines = '2'.
         gr_print-no_coverpage  = 'X'.
    ENDFORM.
    FORM calc_total.
    DATA: total type ref to data,
          subtotal1 type ref to data.
      field-symbols <fkimg> like sflight.
      field-symbols <netwr> like sflight.
      call method grid1-> get_subtotals
         importing
            ep_collect00 = subtotal
            ep_collect01 = total.
      assign total to <fkimg>.
      assign total to <netwr>.
    ENDFORM.
    *&          FUNCTION ALV DISPLAY
    FORM display_alv_report.
    gr_repid = sy-repid.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
       I_CALLBACK_PROGRAM                = gr_repid
       I_CALLBACK_USER_COMMAND           = slis_ev_user_command
       I_CALLBACK_TOP_OF_PAGE            = 'TOP-OF-PAGE' " see FORM
       IS_LAYOUT                         = gr_layout
       IT_FIELDCAT                       = it_fieldcat[]
       IT_SPECIAL_GROUPS                 = gr_tab_group
       I_SAVE                            = 'X'
       IT_EVENTS                         = gr_events
       IS_PRINT                          = gr_print
      TABLES
        t_outtab                          = i_stocktab
      EXCEPTIONS
        PROGRAM_ERROR                     = 1
        OTHERS                            = 2.
    IF sy-subrc <> 0.
    ENDIF.
    ENDFORM.
    FORM top-of-page.
    *ALV Header deaclarations
      DATA: t_header TYPE slis_t_listheader,
            wa_header TYPE slis_listheader,
            t_line LIKE wa_header-info,
            ld_lines TYPE i,
            ld_linesc TYPE c.
    *Title
       wa_header-typ  = 'H'.
       wa_header-info = 'Report for daily Stock Returns'.
       APPEND wa_header TO t_header.
       CLEAR wa_header.
    *Total No. Records Selected
    DESCRIBE TABLE i_stocktab LINES ld_lines.
      ld_linesc = ld_lines.
      CONCATENATE 'Total No. of Records Selected:' ld_linesc
                              INTO t_line SEPARATED BY space.
      wa_header-typ = 'A'.
      wa_header-info = t_line.
      APPEND wa_header TO t_header.
      CLEAR: wa_header, t_line.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
          EXPORTING
             it_list_commentary = t_header.
    ENDFORM.

    Try This
    REPORT z_daily_stock_new.
    TYPE-POOLS: slis.
    * TABLES
    TABLES: vbrk, kna1,vbrp,vbap,vbak, sflight.
    * ALV FIELDS
    DATA: it_fieldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE,
    wa_fieldcat TYPE slis_fieldcat_alv.
    DATA: w_cnt LIKE sy-tabix.
    * total ref to data.
    * t_alv LIKE TABLE OF s_error WITH HEADER LINE.
    DATA: gr_layout TYPE slis_layout_alv,
    gr_tab_group TYPE slis_t_sp_group_alv,
    gr_repid LIKE sy-repid,
    gr_events TYPE slis_t_event,
    gr_print TYPE slis_print_alv,
    gr_user TYPE slis_formname VALUE 'USER_COMMAND'.
    * SELECTION SCREEN
    SELECT-OPTIONS:
    s_werks FOR vbrp-werks,
    s_auart FOR vbak-auart.
    * DEFINITION OF AN INTERNAL TABLE
    DATA: BEGIN OF i_stocktab OCCURS 0,
    kunag LIKE vbrk-kunag,
    name1 LIKE kna1-name1,
    ort01 LIKE kna1-ort01,
    inco1 LIKE vbrk-inco1,
    vkgrp LIKE vbrp-vkgrp,
    fkimg LIKE vbrp-fkimg,
    netwr LIKE vbrk-netwr,
    END OF i_stocktab.
    * START OF SELECTION
    SELECT vbrk~kunag kna1~name1 kna1~ort01 vbrk~inco1 vbrp~vkgrp
    vbrp~fkimg vbrk~netwr
    FROM kna1 INNER JOIN vbrk ON kna1~kunnr EQ vbrk~kunrg
    INNER JOIN vbak ON kna1~kunnr EQ vbak~kunnr
    INNER JOIN vbrp ON vbrk~vbeln EQ vbrp~vbeln
    INTO i_stocktab
    WHERE vbrp~werks IN s_werks
    AND vbak~auart IN s_auart.
      APPEND i_stocktab.
    ENDSELECT.
    *DATA tb_alv TYPE i_stocktab WITH HEADER LINE.
    PERFORM build_fieldcatalog.
    PERFORM build_layout.
    PERFORM build_event.
    PERFORM build_print.
    PERFORM calc_total.
    PERFORM display_alv_report.
    *       FORM build_fieldcatalog                                       *
    FORM build_fieldcatalog.
      w_cnt = 1.
      it_fieldcat-fieldname = 'KUNAG'.
      it_fieldcat-seltext_m = 'Soldtp'.
      it_fieldcat-emphasize = 'X'.
      it_fieldcat-key = 'X'.
      APPEND it_fieldcat TO it_fieldcat.
      CLEAR it_fieldcat.
      w_cnt = w_cnt + 1.
      it_fieldcat-fieldname = 'NAME1'.
      it_fieldcat-seltext_m = 'Name'.
      it_fieldcat-emphasize = 'X'.
      APPEND it_fieldcat TO it_fieldcat.
      CLEAR it_fieldcat.
      w_cnt = w_cnt + 1.
      it_fieldcat-fieldname = 'ORT01'.
      it_fieldcat-seltext_m = 'City'.
      it_fieldcat-col_pos = w_cnt.
      it_fieldcat-emphasize = 'X'.
      APPEND it_fieldcat TO it_fieldcat.
      CLEAR it_fieldcat.
    *  w_cnt = w_cnt + 1.
    *  it_fieldcat-fieldname = 'INC01'.
    *  it_fieldcat-seltext_m = 'Incoterms'.
    *  it_fieldcat-emphasize = 'X'.
    *  APPEND it_fieldcat TO it_fieldcat.
    *  CLEAR it_fieldcat.
      w_cnt = w_cnt + 1.
      it_fieldcat-fieldname = 'VKGRP'.
      it_fieldcat-seltext_m = 'Sales Group'.
      APPEND it_fieldcat TO it_fieldcat.
      CLEAR it_fieldcat.
      w_cnt = w_cnt + 1.
      it_fieldcat-fieldname = 'FKIMG'.
      it_fieldcat-seltext_m = 'Invoiced Qty'.
      it_fieldcat-emphasize = 'X'.
      it_fieldcat-ref_tabname  = 'VBRP' .
      it_fieldcat-ref_fieldname = 'FKIMG' .
      it_fieldcat-do_sum = 'X' .
    * *it_fieldcat-do_sum = 'x'.
      APPEND it_fieldcat TO it_fieldcat.
      CLEAR it_fieldcat.
      w_cnt = w_cnt + 1.
      clear it_fieldcat .
      it_fieldcat-fieldname = 'NETWR'.
      it_fieldcat-seltext_m = 'Invoiced Value'.
      it_fieldcat-emphasize = 'X'.
      it_fieldcat-ref_tabname  = 'VBRP' .
      it_fieldcat-ref_fieldname = 'NETWR' .
      it_fieldcat-do_sum = 'X' .
    * it_fieldcat-do_sum = 'x'.
      APPEND it_fieldcat TO it_fieldcat.
      CLEAR it_fieldcat.
    ENDFORM.
    *       FORM build_layout                                             *
    FORM build_layout.
      gr_layout-no_input = 'X'.
      gr_layout-colwidth_optimize = 'X'.
      gr_layout-totals_text = 'Totals: '(201).
      gr_layout-detail_popup = 'X'.
    ENDFORM.
    *       FORM build_event                                              *
    FORM build_event.
      DATA i_event TYPE slis_alv_event.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
           EXPORTING
                i_list_type = 0
           IMPORTING
                et_events   = gr_events[].
      READ TABLE gr_events WITH KEY name = slis_ev_user_command
      INTO i_event.
      IF sy-subrc = 0.
        MOVE gr_user TO i_event-form.
        APPEND i_event TO gr_events.
      ENDIF.
    ENDFORM.
    *FORM calc_total.
    * LOOP AT it_fieldcat into wa_fieldcat
    * WHERE fieldname EQ 'FKIMG' OR
    * fieldname EQ 'NETWR'.
    * wa_fieldcat-do_sum = 'X'.
    * wa_fieldcat-datatype = 'QUAT'.
    * modify it_fieldcat from wa_fieldcat.
    * ENDLOOP.
    *ENDFORM.
    FORM build_print.
      gr_print-reserve_lines = '2'.
      gr_print-no_coverpage = 'X'.
    ENDFORM.
    *       FORM calc_total                                               *
    FORM calc_total.
      DATA: total TYPE REF TO data,
      subtotal1 TYPE REF TO data.
    *  FIELD-SYMBOLS <fkimg> LIKE sflight.
    *  FIELD-SYMBOLS <netwr> LIKE sflight.
    *  CALL METHOD grid1-> get_subtotals
    *  IMPORTING
    *  ep_collect00 = subtotal
    *  ep_collect01 = total.
    *  ASSIGN total TO <fkimg>.
    *  ASSIGN total TO <netwr>.
    ENDFORM.
    *& FUNCTION ALV DISPLAY
    FORM display_alv_report.
      gr_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_callback_program      = gr_repid
                i_callback_user_command = slis_ev_user_command
                i_callback_top_of_page  = 'TOP-OF-PAGE'  " see FORM
                is_layout               = gr_layout
                it_fieldcat             = it_fieldcat[]
                it_special_groups       = gr_tab_group
                i_save                  = 'X'
                it_events               = gr_events
                is_print                = gr_print
           TABLES
                t_outtab                = i_stocktab
           EXCEPTIONS
                program_error           = 1
                OTHERS                  = 2.
      IF sy-subrc <> 0.
      ENDIF.
    ENDFORM.
    *       FORM top-of-page                                              *
    FORM top-of-page.
    *ALV Header deaclarations
      DATA: t_header TYPE slis_t_listheader,
      wa_header TYPE slis_listheader,
      t_line LIKE wa_header-info,
      ld_lines TYPE i,
      ld_linesc TYPE c.
    *Title
      wa_header-typ = 'H'.
      wa_header-info = 'Report for daily Stock Returns'.
      APPEND wa_header TO t_header.
      CLEAR wa_header.
    *Total No. Records Selected
      DESCRIBE TABLE i_stocktab LINES ld_lines.
      ld_linesc = ld_lines.
      CONCATENATE 'Total No. of Records Selected:' ld_linesc
      INTO t_line SEPARATED BY space.
      wa_header-typ = 'A'.
      wa_header-info = t_line.
      APPEND wa_header TO t_header.
      CLEAR: wa_header, t_line.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
           EXPORTING
                it_list_commentary = t_header.
    ENDFORM.

  • HT4061 iTunes will not open when my iPhone 4S is attached to my Mac Book Pro. iTunes will start up but as soon as my iPhone appears in the list of devices the program then quits and displays the message 'iTune Quit Unexpectedly'? Can anybody help?

    The Problem/s
    1. I am unable to sync my iPhone 4S with my Mac Book Pro, either by cable, wifi or bluetooth
    2. iTunes will initiall open and briefly identifies the iPhone in the Device section in iTunes.
    3. When iTunes starts to read the iPhone (displaying the spinning wheel), it immediately then quits and
    4. Opens a 'dialogue box' which displays the message "iTunes Quit Unexpectedly"
    5 The dialoge box offers the following button options to:-
    'Show Details'
    The 'Show Details' button will open and display a list of the 'Problem Details and System Configeration'. To the average user the information is useless, as one doesn't know what to look for to solve the problem. This is a long and detailed report (too long to include in this message), which includes information such as:-
    Crashed Thread:  20
    Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
    Exception Codes: KERN_INVALID_ADDRESS at 0x00000000000006f0
    'OK'
    The 'Ok' button simply quits and closes the dialogue box
    'Reopen'
    The 'Reopen' button will again reopen iTunes, briefly showing that it is trying to read the iPhone in the Devices section, but then returns again to display the same dialogue box.
    Other Information
    1. iTunes will still start normally once the USB cable is removed from the Mac book Pro, but crashes again once the USB cable is reattached to the computer
    Any advice or help offered would be greatly appreciated.
    Sincerely
    Rob
    Message was edited by: Robmanrico

    Hi there anaqeed,
    I would recommend taking a look at the troubleshooting steps found in the article below.
    Issues installing iTunes or QuickTime for Windows
    http://support.apple.com/kb/ht1926
    -Griff W.

  • Get the sum of values and show only max(Date)

    Hi,
    I have a below query and the value
    select PO_No,DATE,RCVD,LINE_QTY,QTY_INVCD,PART_NO from Purchase                         
    PO_No     DATE     RCVD LINE_QTY QTY_INVCD     PART_NO
    PO1460 12/02/2007 11     20     12     0995-13
    PO1460 13/12/2006 4     20     12     0995-13
    PO1460 05/04/2007 5     20     12     0995-13
    In the above table,
    PO_No ,Line_Qty ,Qty_INVCD,Part_No all are same value.
    Now I want the sum ( rcvd,line_qty)
    i.e.,
    Select po_no,date,sum(rcvd) over (partition by line_quantity) RCVD,line_qty,qty_invcd,part_no from Purchase
    Its look like
    PO_No     DATE     RCVD LINE_QTY QTY_INVCD     PART_NO
    PO1460 12/02/2007 20     20     12     0995-13
    PO1460 13/12/2006 20     20     12     0995-13
    PO1460 05/04/2007 20     20     12     0995-13
    Now what I want is
    I want the value for only max(Date)
    b]PO_No     DATE     RCVD LINE_QTY QTY_INVCD     PART_NO
    PO1460 05/04/2007 20     20     12     0995-13
    How will I write a query?
    Likewise I have many PO_No PO100,PO101,PO102,..........

    No need to use subquery to get this result:
    WITH data AS (select 'PO1460' po_no, to_date('12/02/2007','dd/mm/yyyy') datum, 20 recvd, 20 line_qty, 12 qty_invcd, '0995-13' part_no FROM dual
    UNION all
    select 'PO1460', TO_DATE('13/12/2006','dd/mm/yyyy'), 20, 20, 12, '0995-13' FROM dual
    UNION all
    select 'PO1460', to_date('05/04/2007','dd/mm/yyyy'), 20, 20, 12, '0995-13' FROM dual
    UNION all
    select 'PO1462', TO_DATE('13/12/2006','dd/mm/yyyy'), 30, 20, 12, '0995-13' FROM dual
    UNION all
    select 'PO1462', to_date('15/04/2007','dd/mm/yyyy'), 15, 20, 12, '0995-13' FROM dual
    UNION all
    select 'PO1462', TO_DATE('13/12/2006','dd/mm/yyyy'), 40, 20, 12, '0995-13' FROM dual
    UNION all
    select 'PO1461', to_date('15/04/2007','dd/mm/yyyy'), 15, 20, 12, '0995-13' FROM dual
    UNION all
    select 'PO1463', TO_DATE('13/12/2006','dd/mm/yyyy'), 30, 20, 12, '0995-13' FROM dual
    UNION all
    select 'PO1463', to_date('15/04/2007','dd/mm/yyyy'), 15, 20, 12, '0995-13' FROM dual
    SELECT po_no, sum(recvd) keep (dense_rank first ORDER BY datum desc)
    FROM data
    GROUP BY po_no
    will do the same

  • Formating and calculating xml tag value

    I have an xml file that holds xml tag such as <weight>.55 kg</weight>
    I want to have two outputs:
    Output 1) Output to print: 0.55
    Output 2) Output to print 0.8 of the xml tag value (0.55 * 0.8) : 0.44
    I was able to get the Output 1) by using <?format-number:weight;'9G990D00'?>
    However, I can not get the Output2) as expected.
    If I put <?format-number:(weight)*0.8;'9G990D00'?>,
    I get the error message "Caused by: oracle.xdo.parser.v2.XPathException: Cannot convert .55 kg to number."
    Appreciate any help on how to solution for Output2)
    Edited by: user4697912 on Jun 22, 2010 1:23 AM
    Edited by: user4697912 on Jun 22, 2010 1:23 AM

    If that is the case then try using
    <?format-number:( substring-before(WEIGHT,'kg')*0.8);'9G990D00'?>

  • My screen just locked up and displayed the following pattern. Any ideas why?

    Hello,
    My computer went to sleep and when I awoke it and opened up safari browser, the screen locked up and displayed the attached pattern on my screen.  I could still use the mouse but couldn't click on anything.  I had to reboot.
    Any ideas what could be wrong?

    If it will repeat after restart - hardware problems. Most probably memory.
    Anyway run Apple Hardware Test

  • How to filter particular xml tag value using -DBMS_XMLGEN / DBMS_XMLSTORE

    Hi,
    I am using dbms_xmlgen and dbms_xmlstore package to extract xml datafile tag value from file server to oracle database table.
    I have used the below pl/sql program to extract the xml tag values to oracle relational table.Its working fine for me.
    But I would like to extract the values based on particular filter condition.
    The following xml program I have 3 rows I would like extract the xml data based on the following condition .
    Filter condition
    ==============
    the tag <STATE_ABBREVIATION> value shuold be 'CA' and the <CITY> tag value should be Palo_Alto then I will store the ZIPCODE
    ZIP_CODE_EXTN,STATE_ABBREVIATION tag values in the Oracle Relational table.
    The below pl/sql program storing all the three rows but I required the values based on the filter condition that I mentioned earlier.
    Kindly assist me what are the steps that I need to change in this program.?
    XML Program file content.
    ======================
    <ZIPCODES>
    <mappings>
    <STATE_ABBREVIATION>CA</STATE_ABBREVIATION>
    <ZIPCODE>94301</ZIPCODE>
    <ZIP_CODE_EXTN>9277</ZIP_CODE_EXTN>
    <CITY>Palo_Alto</CITY>
    </mappings>
    <mappings>
    <STATE_ABBREVIATION>CA</STATE_ABBREVIATION>
    <ZIPCODE>95302</ZIPCODE>
    <ZIP_CODE_EXTN>9279</ZIP_CODE_EXTN>
    <CITY>LA</CITY>
    </mappings>
    <mappings>
    <STATE_ABBREVIATION>TX</STATE_ABBREVIATION>
    <ZIPCODE>75038</ZIPCODE>
    <ZIP_CODE_EXTN>7837</ZIP_CODE_EXTN>
    <CITY>DALLAS</CITY>
    </mappings>
    </ZIPCODES>
    PL/SQL Program for XML extract.
    ==========
    declare
    charString varchar2(80);
    finalStr varchar2(4000) := null;
    rowsp number;
    insCtx DBMS_XMLStore.ctxType;
    ctx dbms_xmlgen.ctxHandle;
    v_FileHandle UTL_FILE.FILE_TYPE;
    begin
    v_FileHandle := utl_file.fopen('XMLTEST','XML_NEW_CITIES.XML','r') ;
    loop
    BEGIN
    utl_file.get_line(v_FileHandle, charString);
    exception
    when no_data_found then
    utl_file.fclose(v_FileHandle);
    exit;
    END;
    dbms_output.put_line(charString);
    if finalStr is not null then
    finalStr := finalStr || charString;
    else
    finalStr := charString;
    end if;
    end loop;
    insCtx := DBMS_XMLStore.newContext('SYS.ZIPCODES');
    dbms_xmlgen.setRowsetTag(insCtx,'ZIPCODES');
    dbms_xmlgen.setRowsetTag(insCtx,'mappings');
    DBMS_XMLStore.clearUpdateColumnList(insCtx);
    DBMS_XMLStore.setUpdateColumn(insCtx,'ZIPCODE');
    DBMS_XMLStore.setUpdateColumn(insCtx,'ZIP_CODE_EXT N');
    DBMS_XMLStore.setUpdateColumn(insCtx,'STATE_ABBREV IATION');
    rowsp := dbms_xmlstore.insertXML(insCtx,finalstr);
    end;
    Thanks,
    nat

    Thanks for your reply. :)
    Its working fine in the DBMS_XMLSTORE package. Here I have given the code
    CREATE OR REPLACE TYPE typ_dummy AS  OBJECT
    ( "@ENO"   NUMBER,
      "@ENAME" VARCHAR2(100),
      eno      NUMBER,
      ename    VARCHAR2(100));
    CREATE TABLE EMP
      empno    VARCHAR2(25),
      sal      NUMBER,
      hiredate DATE,
      typ      TYP_DUMMY
    DECLARE
      insCtx DBMS_XMLStore.ctxType;
      rows NUMBER;
      xmldoc CLOB :=
        '<ROWSET>
           <ROW num="1">
             <SAL>1800</SAL>
             <EMPNO>739</EMPNO>
             <HIREDATE>27-AUG-1996</HIREDATE>
               <TYP ENO="739" ENAME="Nazurullah">
               <ENO> 1 </ENO>
               <ENAME> ALDRIN </ENAME>
               </TYP>
           </ROW>
           <ROW>
             <SAL>18000</SAL>
             <EMPNO>7369</EMPNO>
             <HIREDATE>27-AUG-1996</HIREDATE>
             <TYP ENO="7369" ENAME="PEPPIN" />
           </ROW>
           <ROW>
             <SAL>37000</SAL>
             <EMPNO>20701</EMPNO>
             <HIREDATE>27-AUG-1996</HIREDATE>
             <TYP>
               <ENO> 20701 </ENO>
               <ENAME> VENKATACHALAM </ENAME>
             </TYP>
           </ROW>
         </ROWSET>';
    BEGIN
      insCtx := DBMS_XMLStore.newContext('emp'); -- get saved context
      -- Now insert the doc.
      -- This will only insert into EMPNO, SAL and HIREDATE columns
      rows := DBMS_XMLStore.insertXML(insCtx, xmlDoc);
      -- Close the context
      DBMS_XMLStore.closeContext(insCtx);
    END;
    SELECT * FROM emp;
    EMPNO        SAL HIREDATE          TYP(@ENO, @ENAME, ENO, ENAME)
    739         1800 27-AUG-96     TYP_DUMMY(739, 'Nazurullah', 1, ' ALDRIN ')
    7369       18000 27-AUG-96     TYP_DUMMY(7369, 'PEPPIN', NULL, NULL)
    20701      37000 27-AUG-96     TYP_DUMMY(NULL, NULL, 20701, ' VENKATACHALAM ')

  • Embedding inline HTML data in XML using the mx:XML tag with &lt; and &gt;

    What is best practice for embedding HTML within the
    <mx:XML> tag? Programmatically, I can implement this
    successfully:
    [Bindable]
    public var xmlDP:XML = <component data="&lt;" />;
    However, I get the following error if I try to store the same
    data inline in an mx:XML tag, as such:
    <mx:XML id="xmlDP">
    <component data="&lt;" />
    </mx:XML>
    Error #1095: XML parser failure: Unterminated attribute.
    If I change the MXML tag as follows, it works fine:
    <mx:XML id="xmlDP">
    <component data="&amp;lt;" />
    </mx:XML>
    Unfortunately, I also can not source the mx:XML tag to an XML
    file which uses &lt; or &gt; codes, as it yields the same
    results. This leads me to believe that the <mx:XML> tag does
    not support the special character codes for < and >, but why?
    Incidentally, this code also gives a 1095 error:
    <mx:XML id="xmlDP">
    <component data="&#0060;" />
    </mx:XML>
    This is causing an issue with my source data as it is not
    hand typed into Flex, and standard XML supports the &lt; and
    &gt; codes. I have tried a full HTML string, as shown below,
    but this also generates the error:
    <mx:XML id="xmlDP">
    <component data="&lt;b&gt;Test&lt;/b&gt;"
    />
    </mx:XML>
    Many thanks for any input you may have!

    I’m generating the XML source file with
    Microsoft’s XML Notepad 2007. It will encode invalid special
    characters automatically. My understanding is that this is the
    proper way to handle the less than symbol in a XML string, that is
    to say using the &lt; code.
    With respect to the escape and un-escape methods, I am able
    to successfully implement these in AS, but not in MXML. This makes
    sense considering they are AS methods, but I was hoping to be able
    to do something like:
    <mx:XML id="xmlDP">
    <component data="escape('<');" />
    </mx:XML>
    This gives the following compilation error:
    The value of attribute "data" must not contain the '<'
    character.
    As does using the escape character as such:
    <mx:XML id="xmlDP">
    <component data="\<" />
    </mx:XML>
    Below is an example of what the escape character may be used
    for in AS:
    var myString:String = "\"";
    trace(myString);
    // result: "
    Likewise, I can escape the < character as such:
    var myString:String = escape("<");
    trace(myString);
    // result: %3C
    <mx:XML id="xmlDP">
    <component data="%3C" />
    </mx:XML>
    trace(un-escape(xmlDP.@data));
    // result: <
    As you can see, using %3C and unescaping in AS will yield the
    correct result; however, this is not a practical method of
    representing the data in MXML as I would have to write an AS method
    to un-escape the XML string anyway, so I might as well just store
    the data in AS to begin with. I was hoping for a way to source an
    mx:XML object, without having to load it into ActionScript
    manually. Here’s an example of the functionality I would
    expect:
    <mx:XML id="xmlDP">
    <component data="&gt;" />
    </mx:XML>
    trace(xmlDP.@data);
    // result: >
    Only this does not work for the less than symbol. I’m
    assuming at this point that this is a bug in the Flex compiler.
    Thanks again for your help troubleshooting this one!

  • How to get the value in the XML tag?

    hi all,
    i am new to JAXP. i tried the sample program provided in the following link. it just counts the number of tags in the XML file. XML file name is given as command line argument.
    Now, if i want to display the value in the XML tag( say <NAME>xxx</NAME> in this tag i want to display the value 'xxx' ), what has to be done?
    how can i achieve this?
    please help...
    link of the sample program:
    http://xml.apache.org/~edwingo/jaxp-ri-1.2.0-fcs/samples/SAXLocalNameCount/SAXLocalNameCount.java
    thx in advance,
    -Soni.

    implement this method the same way you have startElement...
    public void characters(char[] ch,
                           int start,
                           int length)
                    throws SAXException

  • I am trying to build a basic TCL skeleton script that reads a remote SNMP OID and displays the value on the screen.

    I am trying to build a basic TCL skeleton script that reads a remote SNMP OID and displays the value on the screen.
    I don't want it to be an EEM Event, I just want to run it from the (tcl)# prompt.
    So I guess I'm asking if you can use cli_exec and other commands in the "namespace import ::cisco::eem::*" in a normal non-EEM script - can I do that?
    This is the error I get:
    OTN.159(tcl)#source flash:TCL_SNMP_Remote_Read.tcl
    invalid command name "::cisco::eem::event_register_none"             ^
    % Invalid input detected at '^' marker.
    What am I missing?
    =================  TCL_SNMP_Remote_Read.tcl  ==============================
    ::cisco::eem::event_register_none
    namespace import ::cisco::eem::*
    namespace import ::cisco::lib::*
    if [catch {cli_open} RESULT]
        { error $RESULT $errorInfo }
        else { array set cli1 $RESULT }
    if [catch {cli_exec $cli1(fd) "snmp get v2c 192.168.1.100 public timeout 1 oid 1.3.6.1.2.1.1.1.0" } RESULT]
           { error $RESULT $errorInfo  }
           else { set SnmpSysDesc $RESULT }
    if [catch {cli_close $cli1(fd) $cli1(tty_id)} RESULT] {
                error $RESULT $errorInfo
    puts $SnmpSysDesc
    =========================================================================
    In the sho-run config I have:
    event manager directory user policy "flash:/"
    event manager session cli username "cisco"
    Any help to get me started would be greatly appreciated!
    Tim

    If you don't want an EEM policy, then don't use any of the EEM constructs.  Instead, all you need is this:
    set output [exec "snmp get v2c 192.168.1.100 public timeout 1 oid 1.3.6.1.2.1.1.1.0"]puts $output

  • How to get the XML TAG name itself instead of TAG value

    Hi All,
    I have a question here
    I want to retrieve the XML tag from a XML file instead of its value.
    Example:
    <item>Colgate</item>
    Now I want to retrieve "item" as output from XPath expression, I dont want its value as "colgate"
    How to do that...?
    Thanks
    -Praveen

    You can do this with an axes XPatch expression:
    child::node()/name()
    For more info see: http://www.w3schools.com/xpath/xpath_axes.asp
    HTH,
    Bas

  • Call  RFC from ECC and display the values in  AET

    Hi ALL,
    I had an RFC in ECC ( Z_CRM_SPEC_DATA) this should be called into my AET Fields in getter method.
    In getter method of tat AET field what code should i write?
    Plz help me on this.

    HI,
    1) Call the  RFC(Z_CRM_SPEC_DATA) from ECC and display the values as mentioned in below AET fields.
    AET FIELDS :    zzfld00000M    zzfld00000N
    Description  :    Budget Quan    Forecast Quan
    values         :    (--5.0)(6.0--
    2) (Fetch Budget and Forecast data from ECC ),you would need to pass Material Number(MATNR) as well as Ship to party info to fetch the budget and forecast data as one material may be assigned to 2 or more SH with specific budget and forecast data for each.
    Edited by: venkatabharathv on May 23, 2011 2:44 PM
    Edited by: venkatabharathv on May 23, 2011 2:49 PM

Maybe you are looking for

  • Problem with Foreign Key check in an editable ALV

    Hi, I've implemented an editable ALV. The underlying context node is referenced to a structure and within the structure the foreign keys are defined. In my example, I have two editable columns with different foreign key checks. My problem is, the for

  • Cin excise duty entry

    hi, need the advice. please help. 1) for manufacturing, when purchase, the input tax will debit cenvat account, say 100inr. when sales, output tax will credit cenvat account, say (120)inr. may i know if 100inr is excise duty paid and 20inr (120-100)

  • Lost songs in song view

    Hi. I've been transferring my whole music collection (CDs and vinyl) to iTunes. I've used the iTunes ripper for the CDs and separate piece of PC software to digitise the vinyl which I've then put into itunes via Windows Explorer and linked to Music. 

  • Object State stops at first Image

    Hi, I have created Object States for 5 Images and gave a Auto Slideshow, It plays well and stops at the first state but I want to freeze at the last Object State. Is there any way to stop. Thanks Stanly

  • Camera File & Premiere Compatibility Question

    Sorry if this is a stupid question and has been asked before. I tried searching the forum but didn't see any other similar questions. I have a Canon 70d and have been making little videos, mainly of family stuff, and have been using Windows Movie Mak