IFederatedSearch.searchWithSession and no rank value

If I do a search with multiple RIDs
searchWithSession(IQueryEntryList, IRidList, IResourceContext, ISortPropertyName, java.util.Set);
all returned IResults have a rank value of 0. If the IRidList contains only one RID, the Results have a rank value > 0.
Can't TREX rank the results of a multiple Collection search or is this a bug?
Cheers,
Christof
Message was edited by: Christof Holzhäuser

Sorry, forgot the version: NW04SneakPrevJavaSP11 and TREX 6.1.13.00
With the following code I get a number of results. Every result hat a rank value of 0%:
IIndexService indexService = getIndexService();
SearchQueryBuilder sqb = new SearchQueryBuilder();
sqb.setSearchTerm("searchString");
IQueryEntryList qel = sqb.buildSearchQueryEntries();
IRidList ridList = new RidList();
ridList.add(RID.getRID("/repository2/path1"));
ridList.add(RID.getRID("/repository2/path1"));
IFederatedSearch search = (IFederatedSearch) indexService.getObjectInstance(IWcmIndexConst.FEDERATED_SEARCH_INSTANCE);
ISearchSession session = getFederatedSearch().searchWithSession(qel, ridList, getResourceContext(), null, null);
ISearchResultList results = session.getSearchResults(1, session.getTotalNumberResultKeys());
for (ISearchResultListIterator iter = results.listIterator(); iter.hasNext();) {
   ISearchResult result = iter.next();
   float rankValue = result.getRankValue(); //this is always 0.0 if ridList has multiple RIDs
As said before, if the ridList contains only one RID, the results rank value is greater 0.0!
If I do the same search in the advanced search dialog, the results have a rank value greater 0. So I think search iview uses a different search. What am I doing wrong?
Cheers,
Christof

Similar Messages

  • Possible to use ranking value in formula?

    Hi!
    User wants to compare previous month to current month ranking number to trend the change. Setup is 2 key fig with sales current month and sales previous month where row is sales office. Then calculate single value as rank. Now, I want to use the ranking value in a formula to compare this months rank vs previous months ranking, but it seems not to work as the formula takes the sales value and not the displayed ranking value. Is there a way to do this in bex or is the only way transformation..?
    Regards
    Henning

    You could create a key figure that always displays a fixed value example 1.
    You then restrict this individual key figure to payment method C.
    The key figure is now only 1 for payment method C.
    In your calculation you now say: if key figure = 1 then ... else ...
    If statements are not directly possible, you can only do if statemements indirectly by a similar formula:
    (key figure = 1) * value
    if key figure is one -> result of (key figure = 1) is 1
    1 multiplied by value = value
    if key figure is not one -> result of (key figure = 1) is 0
    0 multiplied by value = 0
    You now have an indirect if clause.
    Please assign points if this solved your problem,
    Best Regards,
    Filip

  • How to get max ranking value?

    Hi Experts,
    I have a situation where I can calculate the ranked top 10 values of a key figure using a condition. One of the columns I have uses the ranking calculation.
    So I now have the top 10 values. I now need the maximum ranking value so I can know what the ranking is out of. So I would like to show the following:
    Rank     Out of
    1            157
    2            157
    3            157
    4            157
    10          157
    So even though I am only showing 10 values in need to know the maximum number of records for the 'Out of' column.
    Any ideas?

    Thanks for the responses. I've tried the maximum on the column, but it doesn't give me the correct value as ranking seems only to be a virtual number and thus is inaccessable.
    I've tried using the restricted and calculated key figure methods, but they don't bring back what I need.
    If I do a calculated key figure where I use the count operator, and then use exception aggregation using total and then using the characteristic I have in my my rows, all I get is a list of 1's.
    Is there something I'm missing in the calculated key figure?
    Thanks for the help!

  • Second highest and third lowest value in columns

    create table test (id number,a number,b number,c number,d number,e number);
    insert into test values (1,13,8,7,14,15);
    Required output with column names 2nd highest and 3rd Lowest Value
    ID           2NDHIGHEST        3RDLOWEST
    1            14[D]             13[A]Thanks.

    So because you didn't quite get the answer you wanted before you thought you'd just ask the same question again?
    That just confuses people as they don't know what solutions you've already been provided with.
    So what you want is something like...
    SQL> ed
    Wrote file afiedt.buf
      1  with test as (
      2                select 1 as id,20 as a,23 as b,38 as c,15 as d, 13 as e from dual union all
      3                select 2, 0, 18, 18.1, 19, 7 from dual union all
      4                select 3,40,-2,25.67,28,17 from dual union all
      5                select 4,13,8,7,14,15 from dual
      6               )
      7  --
      8  -- end of test data
      9  --
    10  select id
    11         -- take the results and pivot them back to single rows
    12        ,max(case when rnk = cnt_rnk-1 then to_char(n)||' ['||l||']' else null end) as second_highest
    13        ,max(case when rnk = 3 then to_char(n)||' ['||l||']' else null end) as third_lowest
    14  from (-- determine the maximum rank value within each id group
    15        select id, l, n, rnk
    16              ,max(rnk) over (partition by id) as cnt_rnk
    17        from (-- determine ranks for the 'n' values within each id group
    18              select id, l, n
    19                    ,dense_rank() over (partition by id order by n) as rnk
    20              from (-- unpivot the data to make the structure workable
    21                    select id
    22                          ,decode(rn,1,'a',2,'b',3,'c',4,'d',5,'e') as l
    23                          ,decode(rn,1,a,2,b,3,c,4,d,5,e) as n
    24                    from test
    25                         cross join (select rownum rn from dual connect by rownum <= 5)
    26                   )
    27             )
    28       )
    29  where rnk = 3
    30  or    rnk = cnt_rnk-1
    31  group by id
    32* order by id
    SQL> /
            ID SECOND_HIGHEST                               THIRD_LOWEST
             1 23 20 [a]
    2 18.1 [c] 18 [b]
    3 28 [d] 25.67 [c]
    4 14 [d] 13 [a]

  • How to check if a user has clicked on a digital control and changed its value?

    Greetings !!!
    I am looking for a simple way (without using Windows messages)of knowing if an user has clicked on a digital control and changed its value.
    I have tried the key focus property; but I have to click twice to make it work.
    If somebody knows a better solution; please let me know.
    Thank you in advance for your help

    If you just want to know if the value has changed you can put it in a while loop and use shift registers to see if the value has changed.
    Brian
    Attachments:
    Changed.vi ‏22 KB

  • Purchase order report with basic price and Excise duty values

    Hi All,
    Is there any standard report in SAP to get the Purchase order basic price / qty and its Excise duty values ? Since we are including Excise duties for non - codified items (w/o material master and with cost center 'K') Purchase order and the ed values are added to the cost and the requirement is to see the split up (Basic priceEdEcs+Hcs)for these Purchase orders for the vendors. If there is no std report then please let me know how to link Purchase order table with this Condition value table in query to get the desired report.
    Thanks in advance
    Benny

    Hi,
    there is no standert report to fullfill this requierment
    you have to create this report with the help of abaer
    for that which tax code you are using its importnat thing
    for po table EKPO
    1. A524 (Normal supply point / Material) it will return condition record number for condition type.
    2. KONP (Conditions (Item)) .
    3. J_1IMTCHID (Combination of Material Number and Chapter ID).
    4. J_1IEXCTAX (Tax calc. - Excise tax rates
    5 get the IR no. from RBKP and RSEG, and get the relevant FI doc no. and goto BSET table
    for IR number  to get from table apply logic for doc type RE ,you will get fi number nad in refernce field you will get invoice number + fiscal year
    Map this by refernig on po for which grn and invoice happen
    Regards
    Kailas Ugale

  • 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

  • OUTSTANDING PO QTY AND OUTSTANDING PO VALUE

    Hi
        I am in need of report to print outstanding po qty and outstanding po value.
    could any one please give me the source code..
    Its very urgent.....
                   Thanks in advance

    Please find this report for Outstanding PO's
    report zaprropo message-id zm no standard page heading line-size 212
                                                           line-count 65.
    **** TABLES------------------------------------------------------------*
    tables:
          ekko,                            " Purchasing Document Header
          ekpo,                            " Purchasing Document Item
          ekbe,                            " History of PurchasingDocument
          essr.                            " Service Entry Sheet HeaderData
    **** DATA--------------------------------------------------------------*
    data  : begin of it_ekko occurs 0,
             ebeln like ekko-ebeln,
             ernam like ekko-ernam,
             ekgrp like ekko-ekgrp,
             bedat like ekko-bedat,
           end of it_ekko.
    data  : begin of it_ekbe_gr occurs 0,
              ebeln like ekbe-ebeln,
              ebelp like ekbe-ebelp,
              bewtp like ekbe-bewtp,
              dmbtr like ekbe-dmbtr,
            end of it_ekbe_gr.
    data  : begin of it_ekbe_ir occurs 0,
              ebeln like ekbe-ebeln,
              ebelp like ekbe-ebelp,
    *          bewtp LIKE ekbe-bewtp,
              dmbtr like ekbe-dmbtr,
            end of it_ekbe_ir.
    data  : begin of it_output occurs 0,
              ekgrp like ekko-ekgrp,
              ebeln like ekko-ebeln,
              ebelp like ekpo-ebelp,
              ernam like ekko-ernam,
              afnam like ekpo-afnam,
              bedat like ekko-bedat,
              txz01 like ekpo-txz01,
    *          bewtp LIKE ekbe-bewtp,
              netwr like ekpo-netwr,
              dmbtr like ekbe-dmbtr,
              iramt like ekbe-dmbtr,
              outst like ekpo-netwr,
              eindt like eket-eindt,
    *          effwr LIKE ekpo-effwr,
            end of it_output.
    data  :  begin of it_title occurs 0,
               h11(5),
               h0(5),
               h1(13),
               h2(7),
               h3(15),
               h4(15),
               h5(10),
               h6(40),
               h7(20),
               h8(20),
               h9(20),
               h10(20),
               h12(10),
             end of it_title.
    data : flength.
    data : s_no type i value 1.
    * ---- Added by Gopi
    * Internal table for PO / WO Delivery Date
    data : begin of it_eket occurs 0,
             ebeln like eket-ebeln,
             ebelp like eket-ebelp,
             eindt like eket-eindt,
           end of it_eket.
    ***** selections
    selection-screen : skip.
    selection-screen : begin of block block1 with frame title text-001.
    parameters : s_bukrs like ekko-bukrs.
    select-options :  s_ebeln for ekko-ebeln,
                      s_bedat for ekko-bedat,
                      s_ekgrp for ekko-ekgrp.
    *                  s_hdg   for ekko-ekgrp.
    selection-screen : end of block block1.
    selection-screen begin of block btch with frame title text-003.
    parameters: excel as checkbox,
                file(128) type c.
    selection-screen end of block btch.
    selection-screen begin of block block2 with frame title text-002.
    parameters: asat as checkbox,
                p_date like sy-datum.
    selection-screen end of block block2.
    *---------AT SELECTION-SCREEN------------------------------------------*
    at selection-screen.
    at selection-screen on value-request for file.
      perform get_file_name using file.
    **** main program code**************************************************
    start-of-selection.
      it_title-h11 = 'S.No'.
      it_title-h0  = 'Group'.
      it_title-h1  = 'PO Number'.
      it_title-h2  = 'PO Item'.
      it_title-h3  = 'PO Creator'.
      it_title-h4  = 'Requisitor'.
      it_title-h5  = 'PO Date'.
      it_title-h6  = 'PO Short Text'.
      it_title-h7  = 'PO Amount'.
      it_title-h8  = 'GR/SE Amount'.
      it_title-h9  = 'IR Amount'.
      it_title-h10 = 'Outstanding'.
      it_title-h12 = 'Del. Date'.
      append it_title.
      perform extract_po_details_new.                           "20070814
      perform extract_po_history_new.                           "20070814
      perform calculate_outstanding_new.                        "20070814
    end-of-selection.
      perform display_report.
      if excel = 'X'.
        perform download.
      endif.
    * ---- Added by Gopi
    top-of-page.
      perform page_heading.
    *************************** display_report ****************************
    form display_report.
    *  it_title-h11 = 'S.No'.
    *  it_title-h0  = 'Group'.
    *  it_title-h1  = 'PO Number'.
    *  it_title-h2  = 'PO Item'.
    *  it_title-h3  = 'PO Creator'.
    *  it_title-h4  = 'Requisitor'.
    *  it_title-h5  = 'PO Date'.
    *  it_title-h6  = 'PO Short Text'.
    *  it_title-h7  = 'PO Amount'.
    *  it_title-h8  = 'GR/SE Amount'.
    *  it_title-h9  = 'IR Amount'.
    *  it_title-h10 = 'Outstanding'.
    *  it_title-h12 = 'Del Date'.
    *  APPEND it_title.
    *  WRITE : / 'Outstanding PO Listing Report'.
    *  ULINE.
    *  FORMAT COLOR COL_HEADING.
    *  WRITE : /1   it_title-h11,
    *           7   it_title-h0,
    *           14  it_title-h1,
    *           29  it_title-h2,
    *           38  it_title-h3,
    *           53  it_title-h4,
    *           68  it_title-h5,
    *           79  it_title-h6,
    *           122 it_title-h7,
    *           142 it_title-h8,
    *           162 it_title-h9,
    *           182 it_title-h10,
    *           202 it_title-h12.
    *  FORMAT COLOR OFF.
    *  ULINE.
    * If Output table is not empty
      if not it_output[] is initial.
        loop at it_output.
          on change of it_output-ebeln.
            uline.
            write : /1(5)  s_no, 6 sy-vline,
                     7  it_output-ekgrp,
                    14  it_output-ebeln,
                    29  it_output-ebelp,
                    38  it_output-ernam,
                    53  it_output-afnam,
                    68  it_output-bedat,
                    79  it_output-txz01,
                    122 it_output-netwr,
                    142 it_output-dmbtr,
                    162 it_output-iramt,
                    182 it_output-outst,
                    202 it_output-eindt.
            s_no = s_no + 1.
          else.
            write :/6 sy-vline,
                    29  it_output-ebelp,
                    38  it_output-ernam,
                    53  it_output-afnam,
                    68  it_output-bedat,
                    79  it_output-txz01,
                    122 it_output-netwr,
                    142 it_output-dmbtr,
                    162 it_output-iramt,
                    182 it_output-outst,
                    202 it_output-eindt.
          endon.
    *      WRITE :/6 sy-vline.
          clear : it_output.
        endloop.
      else.
    * If Output table is empty
        format color 5 intensified on.
       write : / 'No outstanding report generated for the purchasing group'
                  ,s_ekgrp-low, 'to', s_ekgrp-high,'for the period'
                  ,s_bedat-low, 'to', s_bedat-high.
        format color off.
      endif.
    endform.
    **************************** download*********************************
    form download.
      data: begin of it_download_header occurs 1,
               h0(5),
               h1(13),
               h2(7),
               h3(15),
               h4(15),
               h5(10),
               h6(40),
               h7(20),
               h8(20),
               h9(20),
               h10(20),
               h12(10).
      data: end of it_download_header.
      it_download_header-h0  = 'Group'.
      it_download_header-h1  = 'PO Number'.
      it_download_header-h2  = 'PO Item'.
      it_download_header-h3  = 'PO Creator'.
      it_download_header-h4  = 'Requisitor'.
      it_download_header-h5  = 'PO Date'.
      it_download_header-h6  = 'PO Short Text'.
      it_download_header-h7  = 'PO Amount'.
      it_download_header-h8  = 'GR/SE Amount'.
      it_download_header-h9  = 'IR Amount'.
      it_download_header-h10 = 'Outstanding'.
      it_download_header-h12 = 'Del. Date'.
      append it_download_header.
      call function 'WS_DOWNLOAD'
           exporting
                codepage            = 'IBM'
                filename            = file
                filetype            = 'DAT'
           importing
                filelength          = flength
           tables
                data_tab            = it_download_header
           exceptions
                file_open_error     = 1
                file_write_error    = 2
                invalid_filesize    = 3
                invalid_table_width = 4
                invalid_type        = 5.
      call function 'WS_DOWNLOAD'
           exporting
                codepage            = 'IBM'
                filename            = file
                filetype            = 'DAT'
                mode                = 'A'
           importing
                filelength          = flength
           tables
                data_tab            = it_output
           exceptions
                file_open_error     = 1
                file_write_error    = 2
                invalid_filesize    = 3
                invalid_table_width = 4
                invalid_type        = 5.
      if sy-subrc ne 0.
        message e999 with 'error downloading file :' file.
      endif.
    endform.
    *&      Form  get_file_name
    *       text
    *      -->P_P_FNAME  text
    form get_file_name using    p_fname.
      call function 'WS_FILENAME_GET'
           exporting
                def_filename     = p_fname
                mask             = ',*.*,*.*.'
                mode             = 'S'
           importing
                filename         = p_fname
           exceptions
                inv_winsys       = 1
                no_batch         = 2
                selection_cancel = 3
                selection_error  = 4
                others           = 5.
    endform.                    " get_file_name
    *&      Form  page_heading
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form page_heading.
    *  it_title-h11 = 'S.No'.
    *  it_title-h0  = 'Group'.
    *  it_title-h1  = 'PO Number'.
    *  it_title-h2  = 'PO Item'.
    *  it_title-h3  = 'PO Creator'.
    *  it_title-h4  = 'Requisitor'.
    *  it_title-h5  = 'PO Date'.
    *  it_title-h6  = 'PO Short Text'.
    *  it_title-h7  = 'PO Amount'.
    *  it_title-h8  = 'GR/SE Amount'.
    *  it_title-h9  = 'IR Amount'.
    *  it_title-h10 = 'Outstanding'.
    *  it_title-h12 = 'Del. Date'.
    *  APPEND it_title.
      write : / 'Outstanding PO Listing Report'.
      uline.
      format color col_heading.
      write : /1   it_title-h11,
           7   it_title-h0,
           14  it_title-h1,
           29  it_title-h2,
           38  it_title-h3,
           53  it_title-h4,
           68  it_title-h5,
           79  it_title-h6,
           122 it_title-h7,
           142 it_title-h8,
           162 it_title-h9,
           182 it_title-h10,
           202 it_title-h12.
      format color off.
      uline.
    endform.                    " page_heading
    *&      Form  EXTRACT_PO_DETAILS_NEW
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form extract_po_details_new.
      data: begin of it_po occurs 0,
        ebeln like ekko-ebeln,
        ebelp like ekpo-ebelp,
        ernam like ekko-ernam,
        ekgrp like ekko-ekgrp,
        bedat like ekko-bedat,
        txz01 like ekpo-txz01,
        netwr like ekpo-netwr,
        afnam like ekpo-afnam,
        effwr like ekpo-effwr.
      data: end of it_po.
      refresh it_output.
      if not p_date is initial.
        select a~ebeln b~ebelp a~ernam a~ekgrp a~bedat b~txz01 b~netwr
           b~afnam b~effwr
        into corresponding fields of table it_po
        from ekpo as b inner join ekko as a
        on b~ebeln = a~ebeln
        where a~bukrs = s_bukrs  and
            a~aedat le p_date  and
            a~ebeln in s_ebeln and
            a~bedat in s_bedat and
            a~ekgrp in s_ekgrp and
            a~frgke ne 'E'     and
            b~loekz not in ('L', 'S', 'X').
      else.
        select a~ebeln b~ebelp a~ernam a~ekgrp a~bedat b~txz01 b~netwr
           b~afnam b~effwr
        into corresponding fields of table it_po
        from ekpo as b inner join ekko as a
        on b~ebeln = a~ebeln
        where a~bukrs = s_bukrs  and
            a~ebeln in s_ebeln and
            a~bedat in s_bedat and
            a~ekgrp in s_ekgrp and
            a~frgke ne 'E'     and
            b~loekz not in ('L', 'S', 'X').
      endif.
      sort it_po by ebeln ebelp.
      delete adjacent duplicates from it_po.
      delete it_po where ekgrp eq 'HDB' and ebelp eq 10.    "20070814
      delete it_po where ebeln+0(1) eq '6'.
      loop at it_po.
        move-corresponding it_po to it_output.
        append it_output.
        clear it_output.
      endloop.
      refresh it_po.
      free it_po.
    endform.                    " EXTRACT_PO_DETAILS_NEW
    *&      Form  EXTRACT_PO_HISTORY_NEW
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form extract_po_history_new.
      data: begin of it_ekbe occurs 2000,
              ebeln like ekbe-ebeln,
              ebelp like ekbe-ebelp,
              bewtp like ekbe-bewtp,
              shkzg like ekbe-shkzg,
              dmbtr like ekbe-dmbtr.
      data: end of it_ekbe.
      check not it_output[] is initial.
      select * into corresponding fields of table it_ekbe
        from ekbe for all entries in it_output
        where ebeln = it_output-ebeln and
              ebelp = it_output-ebelp and
              bewtp in ('E', 'N', 'Q', 'R', 'X').
      loop at it_ekbe.
        if it_ekbe-bewtp = 'E'.          "GET GR AMT
          move it_ekbe-ebeln to it_ekbe_gr-ebeln.
          move it_ekbe-ebelp to it_ekbe_gr-ebelp.
          move it_ekbe-bewtp to it_ekbe_gr-bewtp.
          if it_ekbe-shkzg = 'H'.
            it_ekbe_gr-dmbtr = it_ekbe-dmbtr * ( -1 ).
          else.
            it_ekbe_gr-dmbtr = it_ekbe-dmbtr.
          endif.
          collect it_ekbe_gr.
        else.                              "GET IR AMT
    *    ELSEIF IT_EKBE-BEWTP = 'N' OR     "GET IR AMT
    *           IT_EKBE-BEWTP = 'Q' OR
    *           IT_EKBE-BEWTP = 'R' OR
    *           IT_EKBE-BEWTP = 'X'.
          move it_ekbe-ebeln to it_ekbe_ir-ebeln.
          move it_ekbe-ebelp to it_ekbe_ir-ebelp.
          if it_ekbe-shkzg = 'H'.
            it_ekbe_ir-dmbtr = it_ekbe-dmbtr * ( -1 ).
          else.
            it_ekbe_ir-dmbtr = it_ekbe-dmbtr.
          endif.
          collect it_ekbe_ir.
        endif.
      endloop.
      refresh it_ekbe.
      free it_ekbe.
    endform.                    " EXTRACT_PO_HISTORY_NEW
    *&      Form  CALCULATE_OUTSTANDING_NEW
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form calculate_outstanding_new.
    *  DATA: BEGIN OF IT_EKET OCCURS 10000,
    *          EBELN LIKE EKET-EBELN,
    *          EBELP LIKE EKET-EBELP,
    *          EINDT LIKE EKET-EINDT.
    *  DATA: END OF IT_EKET.
      sort: it_ekbe_gr, it_ekbe_ir.
      sort it_output by ebeln ebelp.
      loop at it_output.
        read table it_ekbe_gr with key ebeln = it_output-ebeln
                                       ebelp = it_output-ebelp.
        if sy-subrc = 0.
          move it_ekbe_gr-dmbtr to it_output-dmbtr.
        endif.
        read table it_ekbe_ir with key ebeln = it_output-ebeln
                                       ebelp = it_output-ebelp.
        if sy-subrc = 0.
          move it_ekbe_ir-dmbtr to it_output-iramt.
        endif.
        if it_output-iramt gt it_output-netwr.
          delete it_output. " where iramt gt it_output-netwr.
          clear : it_output.
          continue.
        endif.
        if it_output-ekgrp eq 'HDB'.
          if it_output-netwr = it_output-iramt.
            delete it_output.
            clear it_output.
          else.
            it_output-outst = it_output-netwr - it_output-iramt.
            modify it_output.
          endif.
        else.
          if it_output-netwr = it_output-dmbtr.
            if it_output-dmbtr = it_output-iramt.
              delete it_output.
              clear it_output.
            else.
              it_output-outst = it_output-netwr - it_output-iramt.
              modify it_output.
            endif.
          else.
            if it_output-netwr = it_output-iramt.
              delete it_output.
              clear it_output.
            else.
              it_output-outst = it_output-netwr - it_output-iramt.
              modify it_output.
            endif.
          endif.
        endif.
      endloop.
      sort it_output by ebeln ebelp.
      check not it_output[] is initial.
      select * into corresponding fields of table it_eket
        from eket for all entries in it_output
        where ebeln = it_output-ebeln and
              ebelp = it_output-ebelp.
      sort it_eket by ebeln ebelp.
      loop at it_output.
        read table it_eket with key ebeln = it_output-ebeln
                                    ebelp = it_output-ebelp.
        if sy-subrc = 0.
          it_output-eindt = it_eket-eindt.
        else.
          clear it_output-eindt.
        endif.
        modify it_output.
      endloop.
      sort it_output by ekgrp ebeln ebelp.
    endform.                    " CALCULATE_OUTSTANDING_NEW
    Regards
    Gopi

  • Opening and closing balance values at storage location level

    Dear all,
    I want to know opening and closing balance values and receipts and issue values at storage location level for certain period.
    I tried with MB5B, it is not giving value at storage location level, it is giving quantities at storage location level and values at plant level. But requirement is: please see below example:
    All values are in USD          
    Storage location:      1001     1002
    Opening Balance:      2000     3000
    Receipts:                           1000      2000
    Issues:                            2000     3000
    Closing Balance:      1000     2000
    Please help in this regard (I want value of the stock only, not qty)
    Regads,
    Veerappa
    Edited by: Chinna Veerappa on Jul 27, 2010 5:27 PM
    Edited by: Chinna Veerappa on Jul 27, 2010 5:28 PM

    vlauation is at plant level (MBEW table) the storage location level does not carry values (table MARD).
    You may have to develope your own ZMB5B  program and calculate yourself what is not stored in SAP.

  • ALV Report how to display from and to date values in the header.

    I develoeped alv report . i want to display selection screen from and to date values in  top of page...
    any sample code pls guide me..

    You have to do many things...
    first find the selection details using the FM.
    RS_REFRESH_FROM_SELECTOPTIONS
    use the Blog to Align/populate the Header  from the selection table
    /people/community.user/blog/2007/05/07/alignment-of-data-in-top-of-page-in-alv-grid

  • How do I click on a cell in a table control, and display the value in a string?

    What I would like to do is to click on a cell in a table control, and have the value of the cell be displayed in a string indicator. What ever cell I click on, I would like the value to be displayed in the indicator.
    Thank you!
    Solved!
    Go to Solution.

    ... or
    Event >>> ouse down for table.
    Use Coords" to feed invoke node "point To Row Column" and returned "Cell Postion" can be unbundled to produce the row and column tht can be used to index out the value.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • UDF for reading a particular line and storing the value in a variable

    Hi Experts,
    I am reading entire file content in single feild in source data type.I want to write a UDF to seach for a particular pattern(say :25: and store the value after it i.e  34535764778 detination for further use).
    EX: My  sample file and its  has feilds like
    point assured
    Thanks

    Hi since u are using a single field only then u dont need to use any advanced function
    Wel because if u see the formation of the queue u wil find the the whole data is under one context.. and there are not more context changes
    Convert the string to an array and progressively u can check for the four checks if the a<i>=:
    then a[i+]=2 then a[i]=5 and a[i+] =: and then substring the next 7-8 chrac.. hope u understand
    If this also doesnt work wel then u will have to use the Pattern class in Java
    By the way remember that the substring value cant be retained for the next instance of mapping
    Hope u have that in mind...
    Rgds
    Aditya

  • Bind Variable in SELECT statement and get the value  in PL/SQL block

    Hi All,
    I would like  pass bind variable in SELECT statement and get the value of the column in Dynamic SQL
    Please seee below
    I want to get the below value
    Expected result:
    select  distinct empno ,pr.dept   from emp pr, dept ps where   ps.dept like '%IT'  and pr.empno =100
    100, HR
    select  distinct ename ,pr.dept   from emp pr, dept ps where   ps.dept like '%IT'  and pr.empno =100
    TEST, HR
    select  distinct loc ,pr.dept   from emp pr, dept ps where   ps.dept like '%IT'  and pr.empno =100
    NYC, HR
    Using the below block I am getting column names only not the value of the column. I need to pass that value(TEST,NYC..) into l_col_val variable
    Please suggest
    ----- TABLE LIST
    CREATE TABLE EMP(
    EMPNO NUMBER,
    ENAME VARCHAR2(255),
    DEPT VARCHAR2(255),
    LOC    VARCHAR2(255)
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (100,'TEST','HR','NYC');
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (200,'TEST1','IT','NYC');
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (300,'TEST2','MR','NYC');
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (400,'TEST3','HR','DTR');
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (500,'TEST4','HR','DAL');
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (600,'TEST5','IT','ATL');
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (700,'TEST6','IT','BOS');
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (800,'TEST7','HR','NYC');
    COMMIT;
    CREATE TABLE COLUMNAMES(
    COLUMNAME VARCHAR2(255)
    INSERT INTO COLUMNAMES(COLUMNAME) VALUES ('EMPNO');
    INSERT INTO COLUMNAMES(COLUMNAME) VALUES ('ENAME');
    INSERT INTO COLUMNAMES(COLUMNAME) VALUES ('DEPT');
    INSERT INTO COLUMNAMES(COLUMNAME) VALUES ('LOC');
    COMMIT;
    CREATE TABLE DEPT(
    DEPT VARCHAR2(255),
    DNAME VARCHAR2(255)
    INSERT INTO DEPT(DEPT,DNAME) VALUES ('IT','INFORMATION TECH');
    INSERT INTO DEPT(DEPT,DNAME) VALUES ('HR','HUMAN RESOURCE');
    INSERT INTO DEPT(DEPT,DNAME) VALUES ('MR','MARKETING');
    INSERT INTO DEPT(DEPT,DNAME) VALUES ('IT','INFORMATION TECH');
    COMMIT;
    PL/SQL BLOCK
    DECLARE
      TYPE EMPCurTyp  IS REF CURSOR;
      v_EMP_cursor    EMPCurTyp;
      l_col_val           EMP.ENAME%type;
      l_ENAME_val       EMP.ENAME%type;
    l_col_ddl varchar2(4000);
    l_col_name varchar2(60);
    l_tab_name varchar2(60);
    l_empno number ;
    b_l_col_name VARCHAR2(255);
    b_l_empno NUMBER;
    begin
    for rec00 in (
    select EMPNO aa from  EMP
    loop
    l_empno := rec00.aa;
    for rec in (select COLUMNAME as column_name  from  columnames
    loop
    l_col_name := rec.column_name;
    begin
      l_col_val :=null;
       l_col_ddl := 'select  distinct :b_l_col_name ,pr.dept ' ||'  from emp pr, dept ps where   ps.dept like ''%IT'' '||' and pr.empno =:b_l_empno';
       dbms_output.put_line('DDL ...'||l_col_ddl);
       OPEN v_EMP_cursor FOR l_col_ddl USING l_col_name, l_empno;
    LOOP
        l_col_val :=null;
        FETCH v_EMP_cursor INTO l_col_val,l_ename_val;
        EXIT WHEN v_EMP_cursor%NOTFOUND;
          dbms_output.put_line('l_col_name='||l_col_name ||'  empno ='||l_empno);
       END LOOP;
    CLOSE v_EMP_cursor;
    END;
    END LOOP;
    END LOOP;
    END;

    user1758353 wrote:
    Thanks Billy, Would you be able to suggest any other faster method to load the data into table. Thanks,
    As Mark responded - it all depends on the actual data to load, structure and source/origin. On my busiest database, I am loading on average 30,000 rows every second from data in external files.
    However, the data structures are just that - structured. Logical.
    Having a data structure with 100's of fields (columns in a SQL table), raise all kinds of questions about how sane that structure is, and what impact it will have on a physical data model implementation.
    There is a gross misunderstanding by many when it comes to performance and scalability. The prime factor that determines performance is not how well you code, what tools/language you use, the h/w your c ode runs on, or anything like that. The prime factor that determines perform is the design of the data model - as it determines the complexity/ease to use the data model, and the amount of I/O (the slowest of all db operations) needed to effectively use the data model.

  • How to read and update the value of property file

    Hi,
    I am not able read the values from property file.
    Please tell me how to read and update the values from property file using Properties class
    This is my property file : - Config.properties its located in D:\newfolder
    Values
    SMTP = localhost
    Now i need to change the value of the SMTP
    New value :
    SMTP =10.60.1.9
    Pls Help me
    Thanks
    Merlin Rosina,

    Post a small (<1 page) example program that forum members can copy and run that demonstrates your problem.

  • Oracle Alert: Access before and after update values of a table column

    We have a requirement where a notification needs to be sent when 'END_DATE' attribute (column in a table X) is set, in an Oracle Applications form.
    I have defined an Event based Oracle Alert which fires 'On Update' of the table X.
    Could anyone please let me know as how to access the value of 'END_DATE' before and after update (i.e :new.END_DATE and :old.END_DATE) in the sql query of the alert.
    The need to use the before update and after update values of the attribute 'END_DATE' is that if we add the condition END_DATE is not null, the alert is sent even if any other attrbutes are updated in the Oracle form which is not the intended behavior.
    Appreciate any help.
    Thanks

    Hi
    use selectionlistener for your first table then add clientlistener and serverlistener so that you will get the rows on click in back bean.
    then get second table vo and and create and add row for that view object. add partial target to refresh your second table from back bean.
    on click of save call commit operation.

Maybe you are looking for

  • I'm working with dual monitors but can't get it to boot up on my main screen, so all my icons get messed up

    Hey all, So I have a Mac Pro at work and it's connected to a 30" monitor and a smaller monitor. I have the larger one set as the primary screen, but when the computer boots it always uses the smaller monitor as the primary, load all my icon on the sm

  • Error message in inventory audit report

    Hi I'm trying to generate an Inventory Audit Report when this error appeared > "You have an insufficient resources to complete this action.Select fewer records and try again"..  I know that the report is too big coz it's from 2006-2010. Can some one

  • "Find Related Items" in Entourage (like Outlook on PC)?

    Hi, I use Outlook on a Win XP machine at work and Entourage on my Mac at home. I cannot find anywhere in Entourage where there is a command that behaves the same as the "find related items" command does in Outlook. I use this extensively on my work c

  • SRM PO Adobe Form

    Hello Frn's. I  am creating a z Adobe by copying a exisitng PO Adobe form (bbp_po_adb) . Beacuse i need some more fileds calculation, so have to  create a Z interface as well by copying a existing interface (if_bbp_po_adb). But then i need to impleme

  • Help interpreting crash logs

    Powerbook G4 10.5.8 Several issues lately: -crashing browser (all add-ons turned off) -intermittently not able to connect to wifi (same room with another device not having trouble) -kernel panics -disk repair partially repaired disk but failed twice