How to get fast one entry of an returning table ?

Hello experts,
I'm calling a method (see example) and after receiving the returning table
I just want select one entry of this tabel. How can I do this with fast perfomrance ?
AT the moment I am doning this with a loop, but I need something faster !
      DATA: EV_PARTNER TYPE BU_PARTNER.
      DATA: ET_ATTRIBUTES TYPE /MRSS/T_FIELDNAME_VALUE_TAB.
      DATA: RT_PARTNER TYPE /MRSS/T_PARTNER_TAB.
      DATA: WA_PARTNER TYPE TABLE OF /MRSS/T_PARTNER_TAB.
      DATA: WAA_PARTNER TYPE LINE OF /MRSS/T_PARTNER_TAB.
      DATA: PARTNER_ROLE(2) TYPE C.
      PARTNER_ROLE = 'WE'.
      IF LV_PARTNER = ''.
        CALL METHOD <FS_ITEM>-OBJECT->PARTNER_GET
          RECEIVING
            RT_PARTNER = RT_PARTNER.
        LOOP AT RT_PARTNER INTO WAA_PARTNER.
          IF WAA_PARTNER-PARTNER_ROLE = 'WE'.
            LV_PARTNER = WAA_PARTNER-PARTNER_ID.
            EXIT.
          ENDIF.
        ENDLOOP.
      ENDIF.
Thanks,
Gerd

Hi,
Instead of looping in to a work area and then chekcing the condition , you can directly specify the condition in the loop by which the loop will only execute on those which satisfy the condition thereby making it much faster
DATA: EV_PARTNER TYPE BU_PARTNER.
DATA: ET_ATTRIBUTES TYPE /MRSS/T_FIELDNAME_VALUE_TAB.
DATA: RT_PARTNER TYPE /MRSS/T_PARTNER_TAB.
DATA: WA_PARTNER TYPE TABLE OF /MRSS/T_PARTNER_TAB.
DATA: WAA_PARTNER TYPE LINE OF /MRSS/T_PARTNER_TAB.
DATA: PARTNER_ROLE(2) TYPE C.
PARTNER_ROLE = 'WE'.
IF LV_PARTNER = ''.
CALL METHOD <FS_ITEM>-OBJECT->PARTNER_GET
RECEIVING
RT_PARTNER = RT_PARTNER.
LOOP AT RT_PARTNER where partner_role = 'WE'.
LV_PARTNER = RT_PARTNER-PARTNER_ID.
EXIT.
ENDLOOP.
Regards,
Vikranth

Similar Messages

  • How to get page one to animate only once in interactive pdf?

    how to get page one to animate only once in interactive pdf? I like when the document opens up in acrobat and the the page animations work but when I go to one of the pages and hit my designated home button it goes back to page one but it reloads again. As a user it would drive me crazy to have to wait for all of it to load......anyway to have that page one load once as the opening page?

    I don't think you really mean animations (unless you have a placed SWF file) because things created with the Animation panel don't work in PDF. Nonetheless, you're talking about some kind of interactivity which is set to happen On Page Load.
    So when you return to that page, of course the interactivity loads again.
    There isn't a On Page Load Once command.
    Perhaps you need to rethink why the interactivity is there. If it's important, maybe it should be triggered by a rollover or by clicking a button.

  • I deleted my uninstaller by accident how do get another one so that I can uninstall After Effects from my hard drive

    I deleted my uninstaller by accident how do get another one so that I can uninstall After Effects from my hard drive

    Why did you do that? Certainly not standard procedure. Fortunately, there is a fix: Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6

  • How Can I Create One Entry Sheet For Multiple Line Items of A PO

    Please Tell Me How Can I Create One Entry Sheet For Multiple Line Items of A PO

    hi,
    It is not possible to create single Service Entry sheet for multiple PO line items. It is 1 to 1 relation.
    you have to make different service entry sheets for different item of service master.
    regards
    Manish Joshi

  • How to get the field name of an internal table during runtime?

    How to get the field name of an internal table during runtime?

    Hi  Sudhir,
    Declare and Use Get Cursor Field in Your Prm to get the field Name of the Intenal Table
    Example Code:
        <b>  DATA: v_field(60).                        " Insert this code.
         GET CURSOR FIELD v_field.        " Insert this code.</b>
         <b>CHECK v_field = 'ITAB-KUNNR'.    " Insert this code. (or)
    Write: v_field.</b>
    Regards,
    Ramganesan K.

  • How to get no. of entries in BSEG in production

    Hi
    I am getting dump when I tried to get the no. of entries in BSEG in production even in background run also.
    Can anybody let me know how to get the no. of entries in BSEG in production.
    Thanks & Regards
    Bhaskar

    Hi,
    go to se11-> give table name BSEG-> the click on Contents button on appln. toolbar->click on display button->then click on No.of entries button on appln. toolbar.
          It will show the no. of entries in the table BSEG. If it gives u the dump then there may be two reasons behind it:-
    1) may be no. of entries are so large that ur system get time out. Ask ur Basis consultant to increase time-out.
    2)may be in the standard enhancement coding there may be some bugs which can lead u to dump.
                    I hope it will help u.
    Regards,
    Raghav

  • How to get  time of entry and date  fields during creation of excise inv

    Dear all,
    During creation of Excise invoice i am getting only removal time field.
    Please guide how to get the entry time field and date.
    Regards,
    deepti

    Hi
    Deepti
    When you do J1II OR J1IIN u will find the posting date that is nothing but Date which is used when entering the document in Financial Accounting or Controlling. For time system is taking the SAP time to record the doc.
    Thx.

  • How to get only one character

    my problem is the following:
    i want to get only ONE character from the input without pressing the "enter"-key. for example pressing ESC and doing something because it is ESC hit.
    thank you

    You can't. Either use a GUI or create a JNI DLL function that calls getch ().
    Kind regards,
      Levi

  • How to get Payment Advice details using REGUH  REGUP tables

    Hi,
    How to fetch payment Advice details in REGUH  REGUP tables by passing Header details of Payment document (BEKNR, BUKRS and GJAHR) ?
    My observation:
    E.g. for Payment document 1500000135 i am getting following records from REGUH table
    MANDT     LAUFD             LAUFI     ZBUKR    LIFNR                       VBLNR
    300            15.04.2010     00009O     1000     AB6666               1500000135
    300            16.04.2010     00002O     1000     AB6666               1500000135
    300            17.04.2010     00001O     1000     AB6666               1500000135
    While debugging driver program for Check print i have observed that REGUH contain entry as
    300            17.04.2010     00001*                 1000             AB6666               1500000135
    For other document also i have found that its picking up last entry from REGUH (i have relate 00001O with 00001*) and accordingly its displaying records on Check
    Correct if my observation is wrong
    Whats the meaning of LAUFI 'Additional Identification' ?
    While displaying Check is the program always picks last/latest payment run entry from REGUH?
    thanks,
    Edited by: Amol Deshpande on Apr 19, 2010 9:41 AM

    Hi Suhas,
    But if we are making payments through F-58 and FBZ5 transaction then these both tables REGUH REGUP also get updated. in such case how does system determines --> Payment Run id
    Payment Run id (REGUH-LAUFI) is crucial for me to fetch Payment details from REGUP table
    also tell me when does system generates multiple lines for single payment document in REGUH ?
    Please share your views

  • How to get control on each row in advance table

    hi, i have a advanced table with some data, in each row i have two radio buttons which i need to set depending on some column value in the row, i tried by following code
    for(SoftCompVORowImpl row2 = (SoftCompVORowImpl)svo.first();row2!=null;row2=(SoftCompVORowImpl)svo.next())
    if(row2.getAttribute("CommitEndDate")==null || row2.getAttribute("CommitEndDate").equals(""))
    onetime.setSelected(true);
    recurring.setSelected(false);
    else
    onetime.setSelected(false);
    recurring.setSelected(true);
    but this code is making set only one radio button (onetime), which ever i am making first true its getting selected, i need to know how to get control of each row....

    Babu,
    Basically you should use the decode function in your sql query itself and attach it with BC4J properties of radio buttons.In that case you don't have to worry about setting them declaratively !
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to get large no of records from adf table

    Hi All,
    I'm working on adf.I'm using jdeveloper 11.1.1.5 version.In my adf application i have 1000 records in my adf table.I want to get the 500 selected records from that table at a time.But im not able to get huge number of records.How can i get the records from adf table.Please give me ur valuable suggestions.
    Thanks!

    Hi.
    for large record check the oficial doc.
    http://docs.oracle.com/cd/E24382_01/web.1112/e16182/bcadvvo.htm#CEGDBJEJ
    PAGE_RANGING is the best option for large tables.
    and these maybe will help you
    Re: Performance scrolling large ADF tables
    Re: Expert opinion needed: Best practices to handle huge rowsets on UI

  • How to get the selected rows & columns in the table?

    hi everybody,
                         In my application the table is kept inside the event structure.I select the cells  in the table (using mouse) on running time.How to get the selected number of rows & columns in that table?

    Hello,
    You can fill selected values of the table by writing to it or the corresponding property using a property node - the table is just a 2D array of strings.  I think for your "disable" question you are referring to the shortcut menu (when you right click).  If you are using LabVIEW 8.x, you can edit or disable that shortcut menu - just right click on your table at edit time and choose Advanced >> Run-Time Shortcut Menu.
    Best Regards,
    JLS
    Best,
    JLS
    Sixclear

  • How to get selected row data of an ADF table in HashMap?

    Hi,
    Can anyone please tell me how to selected row data of an ADF table in HashMap like :
    Object obj = pageTable.getSelectedRowData();
    JUCtrlHierNodeBinding rowData = (JUCtrlHierNodeBinding)obj;
    Now in above code I want the convert rowData in HashMap.
    Can anyone please tell me how to do that? Its urgent.
    Thanks,
    Vik

    Vik,
    No need to ask the same question 3 times...
    In [url http://forums.oracle.com/forums/message.jspa?messageID=4590586]this post, Nick showed you how to get the Row.
    If it were so urgent, you could have done a little reading of the javadocs to come up with code like this (not tested, up to you to do that)
    HashMap m = new HashMap();
    Row r = get it like Nick showed you to;
    Object values[]=r.getAttributeValues();
    String names[]=r.getAttributeNames();
    for (int i=0; i<r.getAttributeCount(); i++)
    m.put(names, values[i]);

  • Trigger how to get new and old value for nested table column?

    Hi,
    I have created a nested table based on the following details:
    CREATE TYPE typ_item AS OBJECT --create object
    (prodid NUMBER(5),
    price NUMBER(7,2) )
    CREATE TYPE typ_item_nst -- define nested table type
    AS TABLE OF typ_item
    CREATE TABLE pOrder ( -- create database table
    ordid NUMBER(5),
    supplier NUMBER(5),
    requester NUMBER(4),
    ordered DATE,
    items typ_item_nst)
    NESTED TABLE items STORE AS item_stor_tab
    INSERT INTO pOrder
    VALUES (800, 80, 8000, sysdate,
    typ_item_nst (typ_item (88, 888)));
    Now I would like to create a trigger on table pOrder for after insert or update or delete
    and I would like to track the new and old value for the columns inside nested table.
    Can anybody direct me how to do it?
    I would like to know the sytax for it like:
    declare
    x number;
    begin
    x := :new.nestedtablecolumn;--how to get the new and old value from nested table columns
    end;
    Hope my question is clear.
    Thanks,
    Lavan

    Hi,
    Try like this:
    CREATE OR REPLACE TRIGGER PORDER_I
    BEFORE INSERT
    ON PORDER
    REFERENCING OLD AS old NEW AS new
    FOR EACH ROW
    DECLARE
      items_new typ_item_nst;
      ordid_NEW NUMBER;
    BEGIN
    FOR i IN :new.items.FIRST .. :new.items.LAST LOOP -- For first to last element
      DBMS_OUTPUT.PUT_LINE(':new.items(' || I || ').prodid: ' || :new.items(I).prodid );
      DBMS_OUTPUT.PUT_LINE(':new.items(' || I || ').price:  ' || :new.items(I).price );
    END LOOP;
    END;Regards,
    Peter

  • How to get Hide/Show using details in advanced table

    Hi,
    I develeoped one custom page using advanced table region and i used detail from advanced table for getting hide/show functionaliy in one column in that table. It is showing hide/show properly..but if I click on Show it is not doing any action..pls let me need to write any code in CO for getting action..
    Thanks in advance,
    Hanimi......

    If you are using the same VO and you execute in on page load then it must populate all view attribute.
    Check in back end that is there any data in that VO attribute exists or not.
    Thanks
    --Anil                                                                                                                                                                                                                                                                                                                                                                                                               

Maybe you are looking for