Select distinct from an infoset query

Hello
I need to select distinct / delete duplicate from an infoset query created thru SQ02.
Please let me to know how this can be done?
Many thanks in advance!
regards
Sanjyot

Hi,
You can verywell use infoset query if you are doing following things
Join using Keyfields to retreive data from tables
If not using keyfields create index for those table fields  in those fields which will improve in accessing database
Try to use minimum of tables of small size dont try to join big tables like GLPCA and all.
Try to load small set of data like a period or month. Dont try for a year or so.
if your performance is good for aperiod you can go for a year.
If you are good in function module you can try function module in which you will have the option of specifying no of records to be selected usign package size.
Hope this helps for you.
Thanks,
Arun

Similar Messages

  • Advices about creating a datasource from an infoset query

    Hi all,
    i have to create a datasource with extraction from an infoset query in R3, i have many questions:
    1- i have heard about the bad performance using a Datasource from an Infoset query, how can i improve this?
    2- The infoset query doesnt exist in R3 Develop, but this exist in R3 Prod, what do i must to do? create a false infosetquery in R3 D, with just the same name of the info set query in R3 Prod? or what else?,
    3- some material to improve this development about create datasources from an infoset query.
    thanks guys!

    Hi,
    You can verywell use infoset query if you are doing following things
    Join using Keyfields to retreive data from tables
    If not using keyfields create index for those table fields  in those fields which will improve in accessing database
    Try to use minimum of tables of small size dont try to join big tables like GLPCA and all.
    Try to load small set of data like a period or month. Dont try for a year or so.
    if your performance is good for aperiod you can go for a year.
    If you are good in function module you can try function module in which you will have the option of specifying no of records to be selected usign package size.
    Hope this helps for you.
    Thanks,
    Arun

  • "select distinct" from itab data?

    Hi anyone know how to do a "select distinct" from itab data and do some calculation.
    For example:
    This is my itab result data:
    Col1 | Col2    | Col3 | col4
    123  |000010 |a      |  10.00
    123  |000010 |b      |  2.00
    123  |000010 |c      |  3.00
    123  |000020 |a      |  10.50
    123  |000020 |b      |  2.50
    123  |000020 |c      |  3.50
    123  |000030 |a      |  50.00
    123  |000030 |b      |  6.00
    123  |000030 |c      |  7.00
    I need to do some calculation of a value a - (b value + c value) = x value and x value update back to value a col where the value of a, b, c must be match of col2.
    ideally return 000010: x value =  5.00
                        000020: x value = 4.50
                        000030: x value = 37.00
    How can I able to differential the data from cols2?
    aish.

    hi,
    u can do this:
    loop at itab.
      loop at itab into wa_itab where col2 = itab-col2.   " process all 10's, 20's
        ....do ur codition chk n calculations  here          " populate the data into new itab
      endloop.
      delete itab where col2 = itab-col2.                      " after processing delete them.
    endloop.
    do the calculations and populate into new internal table in the loop itself.

  • Selecting table fields in InfoSet query manually?

    Hi Experts,
    I have created an infoset query with two table. At the end selected field group as 'Key fields only'.
    Can you please tell me how to manually select the fields from both tables so that I can build an InfoSet with the selected fields?
    Thank you for you help!
    Lakshmi

    hi,
    For manullay selecting the fields, Just drag and drop fields from respective tables ( left sub tree) to their
    respective field groups( Right sub tree ) in a infoset.
    If you wish to create your own field group, just delete the sytem created field group and then recreate it by giving suitable name and then again drag & drop fields from table to  your field groups.

  • Selecting table fileds in InfoSet query?

    Hi Experts,
    I have created an infoset query with two table. At the end selected field group as 'Key fields only'.
    Can you please tell me how to manually select the fields from both tables so that I can build an InfoSet with the selected fields?
    Thank you for you help!
    Lakshmi

    hi,
    For manullay selecting the fields, Just drag and drop fields from respective tables ( left sub tree) to their
    respective field groups( Right sub tree ) in a infoset.
    If you wish to create your own field group, just delete the sytem created field group and then recreate it by giving suitable name and then again drag & drop fields from table to  your field groups.

  • Crystal report from SAP infoset query

    Hi All,
    I am facing a problem in a crystal report which is based on Infoset query. When I run the report after passing the parameters it gives me an error "Database error occured" "Parameter field value does not exists" "RFC Closed"
    But if I run the same Infoset query from SQ01 I am able to run it with same paramenter and it returns many records.
    To be very precise I am running the best practice crystal report "Cost Analysis - Planned vs. Actual Order Costs" which is based on infoset query CO_OM_CA_20_Q1.
    It throws me error that "Controlling Area does not exists".
    Did anyone faced similar problem?
    Best Regards,
    Chetan

    Hi,
    log into your SAP ERP system using the SAP GUI and choose in the SAP Menu the following path:
    SAP Menu -> Accounting -> Controlling -> Cost Cetner Controlling ->Environment->Set Controlling Area.
    Set the desired controlling area for your user there (DO NOT FORGET TO CLICK ON THE DISKETTE ICON) and try again.
    Regards,
    Stratos

  • Utility to export selected data from an SQL Query?

    I would like to know if there is any utility available in Oracle that I could use to export data selected on the basis of a query? Our requirement is to export the selected data to .dat file.
    This should be besides imp or exp built-in utilities available in Oracle.

    Hello,
    you can spool the results of your query to file.
    eks
    spool c:\....
    select * from emp;
    spool off;
    If you have a tool called Toad, you kan click on the results and then you can save the data in different format.
    Regards
    Kjersti

  • Show distinct record in InfoSet query

    Hello all.
    I have a silly question about the InfoSet. I have a InfoSet joins the Sales Order OSD (ODS1) and Sales Schdule Line ODS (ODS2), using Sales Document number and Sales Document item.
    If for 1 Sales Order there are 2 Schedule Lines, the query will show doubled Sales Order figures.
    For example.
    In ODS1
    Sales Order #1, Qty = 5
    Sales Order #2, Qty = 3
    In ODS2
    Sales Order #1, Schedule line 1, Confirmed qty = 3
    Sales Order #1, Schedule line 2, Confirmed qty = 2
    Sales Order #2, Schedule line 1, Confirmed qty = 1
    Sales Order #2, Schedule line 2, Confirmed qty = 1
    Sales Order #2, Schedule line 3, Confirmed qty = 1
    Then in the query, it will show Sales Order Qty for #1 is 10, Sales Order Qty for #2 is 9.
    I think this is because of the InfoSet join, when #1 is joined, totally we have 2 rows. When #2 is joined, totally we have 3 rows.
    Is there any way to avoid this?
    (In MultiProvider we can specify figures only came from a paritcular InfoProvider. But there's no such function in InfoSet)
    Please help. Thanks a lot.

    Thanks Oscar.
    I tried, but it does not help.
    Since the minimum (or maximum) of each single row is the same, it's meaningless on this setting.
    For example.
    In ODS1
    Sales Order #1, Qty = 5
    In ODS2
    Sales Order #1, Schedule line 1, Confirmed qty = 3
    Sales Order #1, Schedule line 2, Confirmed qty = 2
    After joining we have have below rows:
    Sales Order #1, Qty=5, Schedule line 1, confirmed qty = 3
    Sales Order #1, Qty=5, Schedule line 2, confirmed qty = 2
    Min or Max qty is still 5.
    Is there any other way? Thanks very much.

  • Infoset query ('At Selection-Screen') - Urgent

    Hi All,
    The below code for selection criteria 'At Selection-Screen' for an infoset-query works ok, but i find 2 problems, can someone help.
    1. When user presses F4, i wanted the output to display
       SG Singapore
       IN   India
       But at the moment it just displays
       SG
       IN
    2. If the user enters any other value apart from the above 2 i do not want the query to execute, instead show something like enter a valid value. But at the moment if i enter another country code manually just to test eg: US, the query runs with this selection which i do not want.
    Hope my problem is clear, await inputs.
    Code:
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR VEN_CTY-LOW.
            IT_LAND-VEN_CTY = 'SG'.
            IT_LAND-LTEXT   = 'Singapore'.
              APPEND IT_LAND.
            IT_LAND-VEN_CTY = 'IN'.
            IT_LAND-LTEXT   = 'India'.
              APPEND IT_LAND.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          RETFIELD   = 'VEN_CTY'
          VALUE_ORG  = 'S'
        TABLES
          VALUE_TAB  = IT_LAND
          RETURN_TAB = IT_RETURN
        EXCEPTIONS
          PARAMETER_ERROR = 1
          NO_VALUES_FOUND = 2.
    IF SY-SUBRC = 0.
        READ TABLE IT_LAND INDEX 1.
        MOVE IT_RETURN-FIELDVAL TO VEN_CTY-LOW.
    ENDIF.

    Hi vivek,
    for the 2nd problem,
    create a range for ingapor and india say r_range.
    and
    r_range will have two values say india, singapore.
    loop at VEN_CTY.
    if ven_cty not in r_range.
    display error message.
    exit.
    endloop.
    try this and let me know.
    reward if helpful.
    thanks .
    ranya

  • Infoset Query -- Selection Screen Text

    Dear experts,
    I hv created an infoset query. every thing is working fine except the selection screen text.
    It is coming like
    "Date on which the record was"    instead of
    "Date on which the record was created".
    Is there any way we can manage the selection screen texts in infoset query.
    Regards,
    Jaspal Kumar

    Hello,
    In the Infoset, click table -> field, double click on field and you see the field technical & label information, change the Field label there.

  • SQ01 Infoset Query - making a selection mandatory

    Hello,
    Is it possible to make a selection mandatory on an Infoset Query? If so, how do you do this?
    I have a report that I created using infoset query, but need to make a selection option mandatory to prevent the scenario of the report being run with no selections.
    many thanks,
    Allan

    When you display infoset go into the infoset>Goto>selections  or click on the app tool bar button for selections,
    it will open up a table will all the screen fields. Adjacent to these, there are 3 check boxes for Standard selection, required entry and default. Check the required entry field.

  • Using Select in from clause involving Remote connections.

    The query below is using a remote link namely SBUP. The tables
    involved contain Gigabytes of information. it is taking forever
    to return since the inner query doing a full table scan.
    Is there any alternate way to do this query.
    SELECT DISTINCT REGISTER_DATE,POL_NO FROM (
    SELECT DISTINCT CURRENT_POL.REGISTER_DATE,
    CURRENT_POL.POL_NO
    FROM CURRENT_POLICY@SBUP CURRENT_POL,CUST_PART@SBUP
    CUST_PART,PTY_KEY_MAP@SBUP KEY_MAP
    WHERE KEY_MAP.NEW_PTY_ID = CUST_PART.PTY_ID AND
    CUST_PART.POL_NO
    = CURRENT_POL.POL_NO AND CUST_PART.CUST_PART_END_DT
    IS NULL
    AND INSTR('+136688330+','+' || KEY_MAP.PSNID || '+' )
    != 0
    ORDER BY CURRENT_POL.REGISTER_DATE,CURRENT_POL.POL_NO
    ) WHERE ROWNUM <= 6

    I believe that the usage of DISTINCT in the inner query may be
    preventing the usage of indexes. If you use DENSE_RANK in the
    inner query, which is a fast analytic function, then you can
    eliminate the DISTINCT from the inner query and just use
    DISTINCT in the outer query. However, the usage of INSTR may
    still slow things down somewhat. Please see if the following is
    any faster and let us know:
    SELECT   DISTINCT register_date, pol_no
    FROM     (SELECT current_pol.register_date,
                     current_pol.pol_no,
                     DENSE_RANK () OVER
                     (ORDER BY current_pol.reigster_date,
                      current_pol.pol_no) AS rk
              FROM   current_policy@sbup current_pol,
                     cust_part@sbup cust_part,
                     pty_key_map@sbup key_map
              WHERE  key_map.new_party_id = cust_part.pty_id
              AND    cust_part.pol_no = current_pol.pol_no
              AND    cust_part.cust_part_end_dt IS NULL
              AND    INSTR ('+136688330+', '+'
                     || key_map.psnid || '+') != 0)
    WHERE    rk <= 6
    ORDER BY register_date, pol_no

  • Select distinct statement with various alias

    Hi everybody,
    I'm trying to put a select distinct statement in a query with two different alias for two different tables; like that:
    select distinct a.ma_name||'.'||a.ma_first_name d,
    a.ma_first_name||'.'||a.ma_name r
    from ma_main a, manager_liste b
    where (UPPER(b.manager_first_name||'.'||b.manager_name) = :APP_USER or
    (case when 'X'=:APP_USER or 'Y'=:APP_USER
    then 1
    else 0
    end) = 1)
    order by a.ma_name
    But it doesn't work. Can anybody help?
    Thx a lot!
    Jan

    hi,
    this is the error:
    1 error has occurred
    LOV query is invalid, a display and a return value are needed, the column names need to be different. If your query contains an in-line query, the first FROM clause in the SQL statement must not belong to the in-line query.
    and the table manager_liste and ma_main are varchar tables.
    how can i make it work, so that my select list with submit does only show distinct names. Because right now it shows each name about 10 times....

  • Select distinct records without using distinct

    hi experts,
    my retrieved data like these:
    cnt_id cnt_type rcrd_id wrkflw_id
    558848     PRODUCT     553503     248     
    558848     PRODUCT     553503     248     
    558848     PRODUCT     553503     248     
    558808     PRODUCT     553463     248     
    558808     PRODUCT     553463     248     
    558808     PRODUCT     553463     248     
    558810     PRODUCT     553463     248     
    558810     PRODUCT     553463     248     
    558810     PRODUCT     553463     248
    now i want to select one record for each cnt_id without using any distinct function .. how can i do that?
    regards,
    SKP

    you can use the below query
    select * from t where rowid in (select max(rowid)
    from t group by cnt_id)You're query is not the equivalent of DISTINCT.
    SQL> ed
    Wrote file afiedt.buf
      1  create table t as
      2            (select 558848 as cnt_id, 'PRODUCT' as cnt_type, 553503 as rcrd_id, 248 as wrkflw_id from dual union all
      3             select 558848, 'RETURN', 553503, 248 from dual union all
      4             select 558848, 'PRODUCT', 553503, 248 from dual union all
      5             select 558808, 'PRODUCT', 553463, 248 from dual union all
      6             select 558808, 'PRODUCT', 553463, 248 from dual union all
      7             select 558808, 'PRODUCT', 553463, 248 from dual union all
      8             select 558810, 'PRODUCT', 553463, 248 from dual union all
      9             select 558810, 'PRODUCT', 553463, 248 from dual union all
    10*            select 558810, 'PRODUCT', 553463, 248 from dual)
    11  /
    Table created.
    Elapsed: 00:00:00.01
    SQL> select * from t where rowid in (select max(rowid) from t group by cnt_id);
        CNT_ID CNT_TYP    RCRD_ID  WRKFLW_ID
        558810 PRODUCT     553463        248
        558808 PRODUCT     553463        248
        558848 PRODUCT     553503        248
    Elapsed: 00:00:00.00
    SQL> select distinct * from t;
        CNT_ID CNT_TYP    RCRD_ID  WRKFLW_ID
        558810 PRODUCT     553463        248
        558808 PRODUCT     553463        248
        558848 RETURN      553503        248
        558848 PRODUCT     553503        248
    Elapsed: 00:00:00.00
    SQL>

  • Generic Extraction - query view and infoset query difference

    Hi Guys,
    I want to know the Generic datasource difference between Extraction from view and Extraction from Query .I have read some threads and documents, still i am not getting the exact difference.
    My understanding :
    Views: combination of tables to view the end result , we use views.
    Infoset query also with help of SQ01, 02, 03  : we combine tables to see the result.
    both use primary key to select the data.
    Please help me.
    Thanks ,
    Nithi.

    Hi Nithi ,
    When we build the datasource on the View
    View is basically a table in which you can take data from many table combniation  .
    in view you can specify the table join condtion and selection condtion
    View data gets updated as the data in the source table gets updated
    When we build the datasource on the Infoset
    Data source str gets filled from the infoset query .you need to use SQ01 and Sq02 transaction for this
    in infoset you can define the tables from which you want to read the date .There is also facilty to write ABAP code which will process the data and fill the the data source str using infoset query
    infoset query read the data from infoset and transfer to data structure
    Thanks
    Rajendra

Maybe you are looking for

  • Song shows up in playlist on iTunes, but not on the iPod Touch

    So I bought a song from iTunes on my iPod Touch, and so it shows up on the "Purchased" playlist, and I can listen to it. So, I sync up to my PC (or my wife's MacBook Pro, doesn't matter) and using iTunes, I add the song to a playlist of my current fa

  • LACK OF SUPPORT FROM SKYPE For crash

    Total lack of support and no meaningful response from Skype.com forum. 2 months without being able to use Skype and hours nearly days lost for uninstall reinstall or initialize the phone all that only due to a faulty sensor problem. SKYPE MUST ADD a

  • Adjusting sound in iPad separately?

    I have ought iPad 3 recently. The thing I noticed is that when I use physical buttons to adjust sound, it sets only sound for media (music, movies), but not for the effects (keyboard clicks etc). If I go to the settings - general - sounds and turn on

  • Folio Builder Sign-In Issues (yes, I know I'm the 1,000th person to post this!)

    I'm about to go insane... I can't sign into the Folio Builder panel in InDesign CC (v9.1 x64).  I must have been asked 12 times today to sign into CC, and accept the license agreement another 6 times.  I was signed into the Folio Builder panel most o

  • What is maintanence level in  screen layout for asset master record

    hi everyboby, can anyone explian this when I'm defining screen layout for asset master record to  make business area as required entry it was throwing msg like select maintanance level. what could be the reason?can anyone help me on this. thanks siri