Selective State change of ArrayField Cell

Hi guys,
I have an ArrayField which has a cloumn as a ToggleField. My
requirement is depending on some condition (Business Rule) make the
ToggleField invisible for some rows while visible for others, so that
they do not try to Toggle unwanted rows. The version we are using is
20H2. Does any other version allow this. I know this doesn't. Also, is
there any good workaround that anybody who faced with such a situation
has tried. We have already implemented one workaround but was
wondering if there is any other way?
Any help would be Greatly appreaciated.
Thank You All.
Shrikant P. Iyengar
Forte Systems Engineer
International Business Corporation
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

Hi guys,
I have an ArrayField which has a cloumn as a ToggleField. My
requirement is depending on some condition (Business Rule) make the
ToggleField invisible for some rows while visible for others, so that
they do not try to Toggle unwanted rows. The version we are using is
20H2. Does any other version allow this. I know this doesn't. Also, is
there any good workaround that anybody who faced with such a situation
has tried. We have already implemented one workaround but was
wondering if there is any other way?
Any help would be Greatly appreaciated.
Thank You All.
Shrikant P. Iyengar
Forte Systems Engineer
International Business Corporation
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

Similar Messages

  • RE: Selective State change of ArrayField Cell

    it does work and there is a forte technote with sample code available
    on the
    forte web site
    At 04:35 PM 5/19/98 +0200, you wrote:
    This won't work, because Forte ignores it if you try to set the stateof
    a widget that is
    part of the bodygrid of an arrayfield. You can change color this way,
    but you can't change widget state.
    [Pascal Rottier]
    Could someone send me this technote, because I can't get at
    those technotes and I'm really interested how this would be achieved.
    Thanx,
    Pascal.
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    it does work and there is a forte technote with sample code available
    on the
    forte web site
    At 04:35 PM 5/19/98 +0200, you wrote:
    This won't work, because Forte ignores it if you try to set the stateof
    a widget that is
    part of the bodygrid of an arrayfield. You can change color this way,
    but you can't change widget state.
    [Pascal Rottier]
    Could someone send me this technote, because I can't get at
    those technotes and I'm really interested how this would be achieved.
    Thanx,
    Pascal.
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • RE: Selective State change of ArrayField

    >
    [Pascal Rottier]
    Thanks for sending me the technote, but look at the part I cut
    out of
    this technote and placed at the bottom of this message. It kind
    of
    proves my point. You can change a single cell's color, but not
    it's
    state. Hence, you can't make a cell invisible while leaving the
    other ones visible, which was the problem presented in the first
    message of this thread.
    it does work and there is a forte technote with sample codeavailable
    on the
    forte web site
    At 04:35 PM 5/19/98 +0200, you wrote:
    This won't work, because Forte ignores it if you try to set the
    state
    of
    a widget that is
    part of the bodygrid of an arrayfield. You can change color this
    way,
    but you can't change widget state.
    [Pascal Rottier]
    You can use this example to manipulate the visual behavior of
    a cell in an
    arrayfield, ie. its appearance (color, bold, highlighting,
    etc.), but
    not its functional behavior such as cell state. If you want
    to change
    the cell's functional behavior, you must set it for the entire
    column
    via the template field.
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    Okay, lets put an end to all this confusion. There are two ways to get
    to a single cell in an arrayfield.
    1) <ArrayField>.BodyGrid.GetChildInCell(row,column)
    2) for aWgt in <ArrayField>.BodyGrid.Children do
    if aWgt.Row = row
    and aWgt.Column = column then
    -- This is the one.
    end if;
    end for;
    The first one is only available in Forte 3 (and higher). The second
    one will work in all versions of Forte (I've never used Forte 1, so
    maybe it won't work there).
    Once you have the right widget, you can treat it like any other
    widget. Change it's color, inputmask, sizepolicy, size, state, what-
    ever.
    However, if the widget you found came from the bodygrid of an
    arrayfield and you change the state of the widget, nothing happens.
    The widget will always have the same state as it's template field.
    If you want to change the state of a widget, you have to change
    the state of it's templatefield, which will cause all widgets in that
    column to change to a new state.
    That is my experience with Forte 2. Maybe in Forte 3 it does
    work. The sample code supplied by Forte clearly states it is
    not possible to change the state, but this code also states it
    is intended for Forte 2. The sampe code supplied by some-
    one who had no problem changing the state of a cell in an
    arrayfield also included the method GetChildInCell, which would
    suggest he uses Forte 3.
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • Select statement issue- urgent pls help

    Hi
    The following select statement is always  failed, even LIKP table has data. pls help me
      LOOP AT LT_VBRP.
        IF LV_KEEP_VGBEL <> LT_VBRP-VGBEL.
          LV_KEEP_VGBEL = LT_VBRP-VGBEL.
          CLEAR LIKP.
          SELECT single  VBELN TRAID TRATY VERUR BOLNR LFDAT
          FROM LIKP INTO
          (LIKP-VBELN,LIKP-TRAID,LIKP-TRATY,LIKP-VERUR,LIKP-BOLNR,LIKP-LFDAT)
            WHERE BOLNR = LT_VBRP-VGBEL.
          IF SY-SUBRC = 0.
            LV_ASN_FOUND = 'X'.
          ELSE.
            CLEAR LV_ASN_FOUND.
          ENDIF.
        ENDIF.
        MOVE-CORRESPONDING LT_VBRP TO LT_LIPOV.
        IF LV_ASN_FOUND = 'X'.
          LT_LIPOV-VBELN    = LIKP-VBELN.             "ASN #
          LT_LIPOV-LFDAT    = LIKP-LFDAT.
         lt_lipov-verur    = likp-verur.
          LT_LIPOV-BOLNR    = LIKP-BOLNR.             "DDL#
          LT_LIPOV-KOMAU    = LIKP-VBELN.
    get the ASN line number details.
          SELECT VBELN POSNR MATNR ERDAT LFIMG ERNAM WERKS VGBEL VGPOS FROM LIPS INTO
          TABLE LT_LIPOV
           WHERE VBELN = LIKP-VBELN.
        ELSE.
          CLEAR LT_REP-VBELN.
          CLEAR LT_REP-LFDAT.
          CLEAR LT_REP-VERUR.
          CLEAR LT_REP-BOLNR.
          LT_REP-KOMAU = LT_VBRP-VBELN.             "Inv no
          LV_MESSAGE = TEXT-504.
          PERFORM CREATE_REPORT_RECORD_LIN01.
          LT_REP-LINE_COLOUR = 'C610'.  " red Intensified
        ENDIF.
        APPEND LT_REP.
        APPEND LT_LIPOV.
        CLEAR LT_LIPOV.
        CLEAR LT_REP.
      ENDLOOP.

    Hi Kumar....
    if statement should not be like ..
    if lv_keep_vgbel lt_vbrp-vgbel.
    Should be like this  if lv_keep_vgbel = lt_vbrp-vgbel.
    and try to use work area and table to select and loop the data...
    Have YOu checked whether da data in it_vbrp...
    there few error in way You are writing...
    And one more thing in the table LIKP the field BOLNR is 35 Char and VGBEL of VBRP is 10 char ...and your are equalling that to extract the data which will not happen even..
    So before select statement change VBRP-VGBEL as 35 char varible by using like this
    data : v_vgbel type likp-bolnr.
    loop at lt_vbrp.
    if lv_keep_vgbel lt_vbrp-vgbel. " Why did you right the statement like this
        if lv_keep_vgbel = lt_vbrp-vgbel.
            clear likp.
                call function 'CONVERSION_EXIT_ALPHA_INPUT'
                  exporting
                    input  = lt_vbrp-vgbel
                  importing
                    output = v_vgbel.
                  select single vbeln traid traty verur bolnr lfdat
                                                      from likp into
                                                     (likp-vbeln,likp-traid,likp-traty,likp-verur,likp-bolnr,likp-lfdat)
                                                      where bolnr = v-vgbel.
    regards,
    sg
    Edited by: Suneel Kumar Gopisetty on May 26, 2008 4:41 AM

  • Change the default select statement in the execute_query function

    I want to list all records where c1 like '%ABD%'. So I set the following in the 'when_button_pressed' tigger:
    set_block_property ('block_name',DEFAULT_WHERE,'upper(c1) like '''||'%'||:block_name.blk_col_name||'%'||'''');
    execute_query;
    When I click on the button the :system.last_query holds the following select statement:
    select c1, c2, .. cn from t_n where upper(c1) like '%ABD%' and (upper(c1) = 'ABD' and (c1 like 'ab%' or c1 like 'aB%' or c1 like 'Ab%' or c1 like 'AB%')) order by c1
    Since the condition upper(c1) = 'ABD' is not satisfied oracle does not return any rows.
    My question is how to overcome this or is it possible to change the built-in select statement of execute_query.

    Have you tried this :
    'upper(c1) like upper('''||'%'||:block_name.blk_col_name||'%'||''''));

  • Change the class and type in javascript or select statement of region

    Application Express 3.2.0.00.27
    I have a manually created tabular form where I need pk to be updatable or not not updateable depending on whether its a new record or not.
    I am attempting this thru 2 different ways.
    1st:
    using decode in select statement of region:
    SELECT decode(c001,NULL,APEX_ITEM.POPUP_FROM_LOV(15,c001,'AUTH_LOV',NULL,NULL,0,NULL,NULL,NULL,'YES','f15_' || '#ROWNUM#'),
    apex_item.display_and_save(15,c001,'f15_'|| '#ROWNUM#')) authid,
    apex_item.hidden(16, c002, NULL,'f16_'|| '#ROWNUM#') empid,
    -- apex_item.display_and_save(16,c002,'f16_'|| '#ROWNUM#') empid,
    apex_item.date_popup(17, rownum, c003, 'DD-MON-YYYY',20,2000,NULL,'f17_' || '#ROWNUM#')deldate,
    apex_item.textarea(18,c004,5,40,NULL,'f18_'|| '#ROWNUM#') "Delegation scope",
    apex_item.textarea(19,c005,5,40,NULL,'f19_'|| '#ROWNUM#')"Delegation limits",
    apex_item.select_list_from_lov(20,c006,'YESNO_LOV',NULL,'NO','N','%','f20_'|| '#ROWNUM#')"ORA Signed",
    apex_item.date_popup(21, rownum, c007, 'DD-MON-YYYY', 20,2000,NULL,'f21_' || '#ROWNUM#') "Del expiry",
    apex_item.date_popup(22, rownum, c008, 'DD-MON-YYYY', 20,2000,NULL,'f22_' || '#ROWNUM#') "Date removed",
    apex_item.textarea(23,c009,5,40,NULL,'f23_'|| '#ROWNUM#') "Delegation comments",
    apex_item.POPUP_FROM_LOV(24,c010,'DELEGATION_LOV',NULL,NULL,0,NULL,NULL,NULL,'YES','f24_' || '#ROWNUM#') "Delegator",
    apex_item.display_and_save(25,c011,'f25_'|| '#ROWNUM#') status,
    -- apex_item.display_and_save(26,seq_id,'f26_'|| '#ROWNUM#') seq_id,
    apex_item.hidden(26, seq_id,NULL,'f26_'|| '#ROWNUM#') ||
    apex_item.checkbox(27, seq_id,NULL,NULL,':','f27_'|| '#ROWNUM#') chkbx
    FROM apex_collections
    WHERE collection_name = 'DELEG_COLL'
    AND c011 IN ('O','N','U','D')
    --order by c001However this approach yields this error when I try to pick a value from the lov:
    Error: Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus.
    My other approach is to attempt to change the type and class in javascript. I am trying this but I get an error when I attempt to change the class and type like this:
    <script type="text/javascript">
    <!--
    /* Client side validation on the Salary column */
    function changeProp(pCol) {
       var elms = document.getElementsByName(pCol);
       for (i=0; i< elms.length; i++) {
    /*       elms.style.backgroundColor = 'yellow'; */
    if (elms[i].value == null || elms[i].value == '%null%'
    || elms[i].value == '') {
    elms[i].class = 't20data';
    elms[i].type = 'hidden';
    alert('The value is' + elms[i].value);
    //-->
    </script>

    not completely duplicate...here in this thread I am stressing what I am trying to accomplish and asking for help on the javascript side.

  • What is the change occured by using the package in select statement

    Hi all,
    Can some one please tell me using the following package in the select statement of the view does it restricts the data or fetches the data
    what is the change occurred using the package for fetching the date column
    hr_discoverer.check_end_date (per_assignments_f.effective_end_date)
    Thanks in advance

    You can check the code -
    -- this function checks to see if a date is equivalent to the end of time(31-Dec-4712)
    -- if this is true it will return null else the actual end-date
    Cheers,
    Vignesh

  • State Change causing tree item to loss selected item highlight

    I'm looking for some guidance on a situation i'm encountering. I've an application with a tree component which will be used as a report selector in all view states. The parent nodes are not selectable but the children are. Each child has a for a lack of a better term parameter classification. When a report item is selected in the tree then a state change occurs and displays the appropriate parameter selection view.
    My issue is this. Upon clicking an item and displaying the new state for the first time, the selected item in the tree losses the visual representation or highlight around the selected item. But within the debugger it still shows which item is the selectedItem.  Once the state has been displayed at least once...i.e. I select other items and then eventually back to initial tree item when the state changes it does not loss the highlight on the selected tree item.
    Couple things I've tried to see if i'm in the right neck of the woods is use the currentStateChange and currentStateChanging handlers to do a bit of tracing and found that the tree item remains selected all the way through both currentStateChanging and then even in the currentStateChange...the redraw occurs just after which is when the tree item losses its highlight.
    Does anyone have any ideas or even encounter this?

    Good question. Well you're right in asking. Just using a spark Label to show me the label of the selectedItem, upon the first time I click on the selection nothing populates the label's text BUT the state changes as its suppose to. Took me clicking on it a second time to get the item to be highlighted and the label to show me what had been selected.
    My question here is...is there another event which is occurring after the changeState?

  • Collumn order changes when i retrive data through select statement.

    Hi
    i am using the sql developer 2.1.1.64 i have below table with respected collum sequence.
    tbl_message( id,
    date,
    process_name,
    stage,
    message,
    message_type,
    parameter)
    when i retrive this table using select * from tbl_message; i got the below collumn sequence
    date process_name stage id message message_type parameter
    13-may-2011 procedure 10 1 info info null
    but when i create the table my id collumn is the first collumn?
    and when open the table through sql developer id collumn is in the first place. so why id collumn is in 3rd place when i use select statement?
    if you need more information lpease let me know.
    Thanks
    Ritesh

    SQL Developer allows you to change the order of the columns in the Output window, and it will remember it. This is probably why you see the columns in a different order when you execute "SELECT * FROM ..."
    The actual order of the columns in the database is what you see when you execute the DESC command.
    You also can verify the order of the columns in two other ways:
    1) Use SQL*PLus and exeute your "SELECT * " query. SQL*Plus will not re-arrange the columns.
    2) Query the data dictionary. Use user_tab_columns (if you are the owner of the table), or use all_tab_columns and add the schema owner to the query otherwise.
    SELECT table_name, column_name, column_id
    FROM user_tab_columns
    WHERE table_name  = 'TBL_MESSAGE';

  • Need help in logic change to avoid select statement inside loop .

    Hello all ,
    Please see the below code . Here i got the shipment number in internal table  IT_VTTK . So For this shipment number i want to get the details from Vekp table in to internal table  IT_VEKP  . There is no need for me to use For all entries . I have passed the value of it_vekp into work area wa_vekp and getting the details in to IT_vekp using loop.
    But since we should not use the select statement inside the loop , Can anybody please tell me how to achieve this functionality .
    Instead of passing into work area wa_vttk if i directly use the internal table I'm getting the following error .
    "IT_VTTK" is a table without a header line and therefore has no component called "TKNUM".
    Hence i have used select statement inside a loop . Please tell me is there any other way to avoid this ?
    types:begin of ty_likp,
            vbeln type likp-vbeln,
           end of ty_likp,
           begin of ty_vttk,
            tknum type vttk-tknum,
            end of ty_vttk.
    DATA: IT_VEKP TYPE STANDARD TABLE OF TY_VEKP,
          WA_VEKP TYPE TY_VEKP.
      data:it_likp type standard table of ty_likp,
           wa_likp type ty_likp,
           it_likp1 type standard table of ty_likp,
           it_vttk type standard table of ty_vttk,
           wa_vttk type ty_vttk.
      data:w_tknum type vttk-tknum.
    if not it_likp is initial .
        select vbeln
                from
                 vbfa
          into table it_vttk
           for all entries in it_likp where vbelv = it_likp-vbeln and vbtyp_n = '8'.
      endif .
    IF IT_VTTK[] IS NOT INiTIAL.
        loop at it_vttk into wa_vttk.
        SELECT venum
               EXIDV
               EXIDV2
               BRGEW
               NTGEW
               GEWEI
               TARAG
               GEWEI
               VHART
               INHALT
             FROM VEKP INTO TABLE IT_VEKP where VPOBJKEY = wa_vttk-tknum  and vpobj = '4'.
          endloop.
          endif.

    Hello,
    Why would you not like to use FOR ALL ENTRIES in the second select? Is it becasue of the length or type mismatch error between the fields VPOBJKEY and wa_vttk-tknum ?
    Vikranth

  • Passing value as a parameter in select statement

    Hi,
    Very simple query, how do I pass the values that i get in the cursor to a select statement. If table1 values are 1,2,3,4 etc , each time the cursor goes through , I will get one value in the variable - Offer
    So I want to pass that value to the select statement.. how do i do it?
    the one below does not work.
    drop table L1;
    create table L1
    (col1 varchar(300) null) ;
    insert into L1 (col1)
    select filter_name from table1 ;
    SET SERVEROUTPUT ON;
    DECLARE
    offer table1.col1%TYPE;
    factor INTEGER := 0;
    CURSOR c1 IS
    SELECT col1 FROM table1;
    BEGIN
    OPEN c1; -- PL/SQL evaluates factor
    LOOP
    FETCH c1 INTO offer;
    EXIT WHEN c1%NOTFOUND;
    DBMS_OUTPUT.PUT_LINE(offer);
    select * from table1 f where f.filter_name =:offer ;
    factor := factor + 1;
    DBMS_OUTPUT.PUT_LINE(factor);
    END LOOP;
    CLOSE c1;
    END;

    Hi Greg,
    Thanks for the response, No there is no ODB.net involved here.
    If I remove the : from :offer. I get this error now.
    Changed SQL is:
    select * from table1 f where f.filter_name =offer ;
    Error report:
    ORA-06550: line 16, column 23:
    PL/SQL: ORA-00942: table or view does not exist
    ORA-06550: line 16, column 9:
    PL/SQL: SQL Statement ignored
    06550. 00000 - "line %s, column %s:\n%s"
    *Cause:    Usually a PL/SQL compilation error.
    *Action:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Select statement in a sub routine(For Sapscript)

    Hi,
    M unable to write select statement for my reqirement in Sap-script in Sub routine.
    My requirement is 1)"Your correspondent for quality" in main window of my form.
    For dis rule is as below
    "Get the 'changed by' value resord in table QCPR field AENDERER.For the same value found in tabe USR21 fiels BNAME,pick up the PERSUNUM value.For dis PERSUNUM value, found in ADRP feild NAME_TEXT the value for "Your Correspondent for Quality".
    2) For this PERSUNUM value found in ADCP-TEL_NUMBER the vakue for "Ph".
    3)For this PERSUNUM value found in ADCP-FAX_NUMBER the vakue for "FAX".
    4For this PERSUNUM value found in ADR6-SMTP_ADDR the vakue for "EMAIL".
    Please help me out it's urgent for me.I wil b waiting 4 ur reply.

    READ TABLE in_par WITH KEY 'QCPR-AENDERER'.
      CHECK sy-subrc = 0.
      MOVE in_par-value TO V_aenderer
    .  READ TABLE in_par WITH KEY 'USR21-BNAME.
      CHECK sy-subrc = 0.
      MOVE in_par-value TO V_bname
      SELECT SINGLE persnumber addrnumber
        INTO wa_usr21-persnumber wa_usr21-addrnumber
        FROM usr21
        WHERE bname = V_bname
    and <b>check field for this</b> = V_aenderer.
      CHECK sy-subrc = 0.
      SELECT SINGLE tel_number fax_number
        INTO adcp-tel_number adcp-fax_number
        FROM adcp
        WHERE addrnumber = usr21-addrnumber
          AND persnumber = usr21-persnumber.
      CHECK sy-subrc = 0.
      READ TABLE out_par WITH KEY 'ADCP-TEL_NUMBER'.
      CHECK sy-subrc = 0.
      out_par-value = adcp-tel_number.
      MODIFY out_par INDEX sy-tabix.
      READ TABLE out_par WITH KEY 'ADCP-FAX_NUMBER'.
      CHECK sy-subrc = 0.
      out_par-value = adcp-fax_number.
      MODIFY out_par INDEX sy-tabix.
      SELECT SINGLE smtp_addr
        INTO adr6-smtp_addr
        FROM adr6
        WHERE addrnumber = usr21-addrnumber
          AND persnumber = usr21-persnumber.
      READ TABLE out_par WITH KEY 'ADR6-SMTP_ADDR'.
      CHECK sy-subrc = 0.
      out_par-value = adr6-smtp_addr.
      MODIFY out_par INDEX sy-tabix.
    Regards

  • How to model in OWB if you have a subquery in your select statement? (11.2)

    Which operator (is it the Table operator) to use if I have a subquery as part of my select statement? (The way I do it works, but is not elegant. What I do is create a table for the subquery and than join that with the other sources to point to my target.) But, would appreciate the best way with OWB's features.
    Here is the entire SQL (including the subquery):
    SELECT to_numbe (null), course_id
    at.book, lp.NAME,
    (select b.pricing from qp_pricing_attributes b
    where b.list_id = ll.list_id and b.product = at.product) sign,
    ll.operand AS price, lhb.comments
    FROM
    pricing_attribs at,
    list_lines ll,
    list_h lp,
    list_b lhb
    WHERE 1 = 1
    and ll.list_line_id = atrib.list_line_id
    AND ll.list_header_id = lp.list_header_id
    AND lp.list_header_id = lhb.list_header_id
    Thanks you.

    Hi
    Doesn't need to be a table in the target. Let's take a very simple example, let's say you wanted to do the following;
    select ename,(select dname from dept d where d.deptno=e.deptno) from emp e
    Then DEPT is your lookup table and EMP is your driving table.
    1. Add EMP on to the canvas.
    2. Add in lookup operator
    3. Bind lookup to DEPT
    4. Hit finish
    5. Map EMP.DEPT to DEPT.INGRP1 (the lookup operator)
    6. Edit lookup operator, on Lookup Conditions tab set DEPTNO for lookup column, and DEPTNO for input attribute
    7. Lookup complete now
    You can add in a target table operator and map from the source EMP table and the output attributes of the lookup operator. you can change step 4 to carry on through wizard and define lookup, but I have chosen to do 5, to automatically get the names and datatypes of the inputs. There are lot of other options now in 11gR2 in the lookup.
    Hope this makes sense.
    Cheers
    David

  • Performance Issue in select statements

    In the following statements, it is taking too much time for execution,Is there any best way to change these selection statements...int_report_data is my final internal table....
    select fsplant fvplant frplant fl1_sto pl1_delivery pl1_gr pl2_sto           pl2_delivery perr_msg into (dochdr-swerks,dochdr-vwerks,dochdr-rwerks,dochdr-l1sto,docitem-l1xblnr, docitem-l1gr,docitem-l2sto,  docitem-l2xblnr,docitem-err_msg) from zdochdr as f inner join zdocitem as p on fl1_sto  =  pl1_sto where fsplant in s_werks and
    fvplant in v_werks and frplant  in r_werks and pl1_delivery in l1_xblnr and pl1_gr in l1_gr and p~l2_delivery in l2_xblnr.
    move : dochdr-swerks    to  int_report_data-i_swerks,
            dochdr-vwerks    to  int_report_data-i_vwerks,
            dochdr-rwerks    to  int_report_data-i_rwerks,
            dochdr-l1sto     to  int_report_data-i_l1sto,
            docitem-l1xblnr  to  int_report_data-i_l1xblnr,
            docitem-l1gr     to  int_report_data-i_l1gr,
            docitem-l2sto    to  int_report_data-i_l2sto,
            docitem-l2xblnr  to  int_report_data-i_l2xblnr,
            docitem-err_msg  to  int_report_data-i_errmsg.
            append int_report_data.
        endselect.
    Goods receipt
    loop at int_report_data.
    select single ebeln from ekbe into l2gr where ebeln = int_report_data-i_l2sto and bwart = '101' and bewtp = 'E' and vgabe = '1'.
    if sy-subrc eq 0.
           move l2gr to int_report_data-i_l2gr.
           modify int_report_data.
       endif.
    endloop.
    first Billing document (I have to check fkart = ZRTY for second billing *document..how can i write the statement)
    select vbeln from vbfa into (tabvbfa-vbeln) where vbelv = int_report_data-i_l2xblnr or vbelv = int_report_data-i_l1xblnr.
    select single vbeln from vbrk into tabvbrk-vbeln where vbeln = tabvbfa-vbeln and fkart = 'IV'.
      if sy-subrc eq 0.
             move tabvbrk-vbeln to int_report_data-i_l2vbeln.
             modify int_report_data.
       endif.
       endselect.
    Thanks in advance,
    Yad

    Hi!
    Which of your selects is slow? Make a SQL-trace, check which select(s) is(are) slow.
    For EKBE and VBFA you are selecting first key field - in general that is fast. If your z-tables are the problem, maybe an index might help.
    Instead of looping and making a lot of select singles, one select 'for all entries' can help, too.
    Please analyze further and give feedback.
    Regards,
    Christian

  • Problem with Select Statements

    Hi All,
    I have a performance problem for my report because of the following statements.
    How can i modify the select statements for improving the performance of the report.
    DATA : shkzg1h  LIKE bsad-shkzg,
             shkzg1s  LIKE bsad-shkzg,
             shkzg2h  LIKE bsad-shkzg,
             shkzg2s  LIKE bsad-shkzg,
             shkzg1hu LIKE bsad-shkzg,
             shkzg1su LIKE bsad-shkzg,
             shkzg2hu LIKE bsad-shkzg,
             shkzg2su LIKE bsad-shkzg,
             kopbal1s  LIKE bsad-dmbtr,
             kopbal2s  LIKE bsad-dmbtr,
             kopbal1h  LIKE bsad-dmbtr,
             kopbal2h  LIKE bsad-dmbtr,
             kopbal1su  LIKE bsad-dmbtr,
             kopbal2su  LIKE bsad-dmbtr,
             kopbal1hu  LIKE bsad-dmbtr,
             kopbal2hu  LIKE bsad-dmbtr.
    *These statements are in LOOP.
        SELECT shkzg SUM( dmbtr )
          INTO (shkzg1s , kopbal1s)
          FROM bsid
         WHERE bukrs = ibukrs
           AND kunnr = ktab-kunnr
           AND budat < idate-low
           AND shkzg = 'S'
           AND umskz EQ ''
         GROUP BY shkzg.
        ENDSELECT.
        SELECT shkzg SUM( dmbtr )
          INTO (shkzg1su , kopbal1su)
          FROM bsid
         WHERE bukrs = ibukrs
           AND kunnr = ktab-kunnr
           AND budat < idate-low
           AND shkzg = 'S'
           AND umskz IN zspgl
         GROUP BY shkzg.
        ENDSELECT.
        SELECT shkzg SUM( dmbtr )
          INTO (shkzg1h , kopbal1h)
          FROM bsid
         WHERE bukrs = ibukrs
           AND kunnr = ktab-kunnr
           AND budat < idate-low
           AND shkzg = 'H'
           AND umskz EQ ''
         GROUP BY shkzg.
        ENDSELECT.
        SELECT shkzg SUM( dmbtr )
          INTO (shkzg1hu , kopbal1hu)
          FROM bsid
         WHERE bukrs = ibukrs
           AND kunnr = ktab-kunnr
           AND budat < idate-low
           AND shkzg = 'H'
           AND umskz IN zspgl
         GROUP BY shkzg.
        ENDSELECT.
        SELECT shkzg SUM( dmbtr )
          INTO (shkzg2s , kopbal2s)
          FROM bsad
         WHERE bukrs = ibukrs
           AND kunnr = ktab-kunnr
           AND budat < idate-low
           AND shkzg = 'S'
           AND umskz EQ ''
         GROUP BY shkzg.
        ENDSELECT.
        SELECT shkzg SUM( dmbtr )
          INTO (shkzg2su , kopbal2su)
          FROM bsad
         WHERE bukrs = ibukrs
           AND kunnr = ktab-kunnr
           AND budat < idate-low
           AND shkzg = 'S'
           AND umskz IN zspgl
         GROUP BY shkzg.
        ENDSELECT.
        SELECT shkzg SUM( dmbtr )
          INTO (shkzg2h , kopbal2h)
          FROM bsad
         WHERE bukrs = ibukrs
           AND kunnr = ktab-kunnr
           AND budat < idate-low
           AND shkzg = 'H'
           AND umskz EQ ''
         GROUP BY shkzg.
        ENDSELECT.
        SELECT shkzg SUM( dmbtr )
          INTO (shkzg2hu , kopbal2hu)
          FROM bsad
         WHERE bukrs = ibukrs
           AND kunnr = ktab-kunnr
           AND budat < idate-low
           AND shkzg = 'H'
           AND umskz IN zspgl
         GROUP BY shkzg.
        ENDSELECT.

    >
    Siegfried Boes  wrote:
    > Please stop writing answers if you understrand nothing about database SELECTS!
    > All above recommendations are pure nonsense!
    >
    > As always with such questions, you must do an analysis before you ask! The coding itself is perfectly o.k., a SELECT with an aggregate and a GROUP BY can not be changed into a SELECT SINGLE or whatever.
    >
    > But your SELECTS mustr be supported by indexes!
    >
    > Please run SQL Trace, and tell us the results:
    >
    > I see 8 statements, what is the duration and the number of records coming back for each statement?
    > Maybe only one statement is slow.
    >
    > See
    > SQL trace:
    > /people/siegfried.boes/blog/2007/09/05/the-sql-trace-st05-150-quick-and-easy
    >
    >
    > Siegfried
    Nice point there Siegfried. Instead of giving constructive suggestion, people here give a very bad suggestion on using SELECT SINGLE combined with SUM and GROUP BY.
    I hope the person already look at your reply before he try using select single and wondering why he has error.
    Anyway, the most important thing is how many loop expected for those select statements?
    If you have like thousands of loop, you can expect a poor performance.
    So, you should also look at how many times the select statement is called and not only performance for each select statement when you're doing SQL trace.
    Regards,
    Abraham

Maybe you are looking for

  • Forms integration into a JSP page

    There is a great White Paper on the OTN's home page about how to integrate a Forms application within a JSP page ;o) <p>Integrating Oracle Forms into Oracle ADF Faces</p> Francois

  • Performance regression in VS2013 compared to earlier versions due to dtoui3 casting

    Copied from submitted bug report ID 1175765      Description Hello, We have a performance bug with VS2013 that is not seen in earlier versions. The performance issue is due to casting problems similar to reported problem, https://connect.microsoft.co

  • Intermediary Bank

    Hi All FI Expert, my client wants to generate the intermediary bank details in IDOC so i found some configuration document on scn for intermediary bank i have to maintain bank chain. i configured it, but when i am running the APP as per the document

  • Mail logs out of server when imac sleeps

    Mail logs out of the server when computer sleeps

  • Premiere Pro Mixing Up Clips

    Problem I have a problem where Premiere Pro CS 5.5 is mixing up the thumbnails in my timeline and the clips in the export preview window. I exported my film and while watching it, some clips are in the wrong places. It is very aggravating because in