Infoset Query - Filter Records

Dear Experts,
Please help me in defining in-built filter (by field values) in an Infoset query.
Regards
Jogeswara Rao

Thanks Venu,
This I am following already.
But this is not totally fool-proof. If someone uses his own selection screen variant then the setup disturbs.
If you are referring to ALV layout variant, that does not solve my problem. Because the output just filters the records, but the records are selected, this selection gives rise to a problem here (in some calculations)
In-fact the filter word in my query, is meant towards Not selecting OR Deleting records of certain field values
So I want this to be in-built either in Infoset itself or query design.
(of course, I prefer a way free of code)
Regards
Jogeswara Rao
Any inputs Expers?
Kind Regards
Jogeswara Rao
Edited by: K Jogeswara Rao on May 22, 2011 9:22 AM

Similar Messages

  • Query Report filter records

    Hi Experts,
    I have Query report for which I want to filter records.
    I have set condition to identify records to be displayed. But the problem is on execution of condition as false, I am not able to delete current record as I can not use 'CONTINUE' statement. It giving syntax error as I can only use it in Loop, Select,...etc.
    On use of 'EXIT', program execution stops and no further records printing.
    Kindly guide.
    Thanks and Regards,
    Swapnil

    Hi
    Are you trying to use SQ01 query and do this logic ???
    I think we can write logic in Infoset and do this.
    Regards,
    Vijay V

  • Create Query in FDM to filter records from ERPi/EBS

    Hi,
    I am replacing a manual data load created by a sql query which has many filters and text file lookups. The process creates a file which is loaded by FDM scheduler.
    The requirement is to automate the load, which I have done in ERPi/FDM, but I can not figure out how to filter the data using the existing query and lookups. I am only able to load the entire data set that is returned by default from EBS through ERPi.
    Does anyone know what table in ERPi or FDM I would use in the query?
    Thanks in Adavance!

    Here's the first of 5 steps to prepare the data for loading:
    STEP 1
    The following query is part 1 of the union query. This query retrieves records from VIEW: dw.rpt_gl_balances, if COMPANY and COSTCENTER fields combination does not exist in lookup table: dw.company_costctr_lookup, which is essentially CC_ROLLUP.txt, maintained by user.
    CC_ROLLUP.txt content sample:
    NGL Pipelines & Services,cc07037
    NGL Pipelines & Services,cc11131
    NGL Pipelines & Services,cc11119
    SELECT DISTINCT
    period_year AS years,
    'm' ||b.minor_id AS minor,
    CASE b.cc_id
    WHEN '00000' THEN '[None]'
    ELSE 'cc' || TRIM (b.cc_id)
    END
    AS entities,
    CASE intrco
    WHEN '00000' THEN '[ICP None]'
    ELSE 'c' || TRIM (intrco)
    END
    AS intercompany,
    'c' || TRIM (b.company_id) AS company,
    SUBSTR (period_name, 1, 3) AS months,
    TRIM (b.major_id) AS accounts,
    CASE
    WHEN account_type = 'EQUITY'
    THEN
    current_mth
    WHEN account_type = 'REVENUE'
    AND (SUBSTR (b.major_id, 1, 2) = 96)
    THEN
    current_mth
    WHEN account_type = 'REVENUE'
    THEN
    current_mth * -1
    WHEN b.major_id = '98001'
    THEN
    current_mth * -1
    WHEN SUBSTR (b.major_id, 1, 1) = 3
    OR SUBSTR (b.major_id, 1, 1) = 4
    THEN
    ytd_balance * -1
    ELSE
    ytd_balance
    END
    AS DATA,
    NULL description,
    '<Entity Currency>' VALUE,
    '[None]' custom3,
    '[None]' custom4,
    'Periodic' view1,
    'Actual' scenario
    FROM dw.rpt_gl_balances b,
    dw.cc_dim cc,
    dw.company_dim co,
    dw.company_dim ic,
    dw.minor_dim m,
    dw.major_dim a
    WHERE set_of_books_id <> 23
    AND actual_flag = 'ACTUAL'
    AND b.cc_id = cc.cc_id
    AND b.company_id = co.company_id
    AND b.intrco = ic.company_id
    AND b.minor_id = m.minor_id
    AND b.major_id = a.major_id
    AND currency_code = 'USD'
    AND period_name = 'OCT-11' --p_period_name
    AND NOT EXISTS
    (SELECT 1
    FROM dw.company_costctr_lookup c
    WHERE c.company_id = b.company_id AND c.cc_id = b.cc_id)
    AND ( (account_type IN ('EQUITY', 'REVENUE') AND current_mth <> 0)
    OR (account_type NOT IN ('EQUITY', 'REVENUE')
    AND ytd_balance <> 0))
    Thanks again!

  • BW Datasource on an Infoset Query based on 2 DSO Active tables

    Hello,
    We have created a Datasource in the BW system over an Infoset query (through SQ02) built on 2 DSO tables.
    In RSA3, this datasource is working fine - it shows us some data (close to 1000 records).
    The issue is when i try and run a infopackage for the datasource.
    The request times out and no records are fetched.
    I have added all the users to the Infoset user group - so, no issue with the authorization.
    IDoc Statuses changes from 53 --> 62 --> 64 --> 50.
    The extraction process does not complete - does not get the no. of records sent.
    Can anybody point to a probable cause here?
    Thank you.

    IDoc logs do not say much.
    Status Record 53: IDoc was successfully transferred
    Status Record 62: IDoc passed to application; Direct call started
    Status Record 64: IDoc ready to be transferred to application; No filter, no conversion
    Status Record 50: IDoc added
    Then, it does not go any further.
    We're using the Datasource on the Infoset query because we could not use the traditional BW infoset.
    Datsource is used to feed a DSO as we directly could not use anything else (we're trying with an expert routine also).
    The issue is that the base DSO tables are huge and querying on them (using SELECT) is taking a very long time.
    So, we thought of using an Infoset to create a view and then populatet he data.
    In an traditional infoset, we could not specify a condition with a range. So, the infoset query through SQ02.
    I have not tried using an APD, but that might be a good option.
    Only thing, we'll have to use a Direct DSO - which i am not sure will satisfy our requirement.
    Thank you.

  • Infoset Query is not available for generic Extractor

    Hi,
    I've created an infoset in SAP ECC with sq02. Then I've created an Infoset Query on top of this Infoset, because I wanted to exclude records with specific values. Now I want to use this Infoset Query (with the filter restrictions) in my generic DataSource. I can only chosse the Infoset, but not the InfoSet Query. Normally I use the filter in the InfoPackage, but neither IP nor DTP can exclude values with a pattern (f.e. exclude all record that contains a $ symbol in the string)
    Any suggestions?
    Thanks and regards,
    Sebastian

    I agree with Jen, that BW side routines would work just fine.
    If it is extractor performance you are worried about and that is why you want to build the $ exclusion in the select, then I would suggest just creating an extractor from scratch using a custom written function module.  It's actually very strait forward and provides many advantages over table/view/InfoSet based generic extractors.
    I am not a fan of using InfoSets for generic extractors.. but you can create InfoSets based on a data read program in which case you code all the selects and whatnot.  But if you go that far with the InfoSet, why not just write the FM...
    Thanks

  • 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

  • Read Portal User ID in BW report to filter records

    Hi,
    I need to filter my records in BW report based on the
    business partner who logs into Portal.
    (BW report is getting called thur IView in Portal)
    Is there any way i can fetch the Portal User id
    during the execution of BW report? so then i can filter
    records by writing code in user exit.
    I tried using variable sy-uname, but it populates
    the BW user id and not portal user id.
    Please reply if anybody knows solution to this query.
    Thnx in advance.

    Abhijit ,
    My understanding:
    You need to filter the query by the Business Partner ID and not by User name and Business Partner number and BW User ID are both different.
    If you want to filter by User name:
    Why don't you try using SSO through EP and that way you would get the ID of the person logged in.
    If you are using user mapping:
    Or what you could do is maintain the mapping in an info object/table in BW and query against the same.
    If you are using Business Partner:
    Populate the business partner master which will have the user name attached and that way you would be able to get the Business partner ID.
    Arun

  • Infoset query logical database and transparent table

    Hi!
    We have an infoset with the data source logical database=PNP.
    We get some fields from the infotype 0768, P0768-PERNR, P0768-BEGDA, etc.
    Now we need add another table to make a join within infotype 0768 and table T5F99SE.
    For instance, in infotype 0768 I have one record with the fields PERNR and BEGDA and in the T5F99SE I have 3 records related to the unique record of infotype 0768, the fields of the table are PERNR, BEGDA, ACTDT and ADDAT .
    The fields values in the example can be:
    Infotype 0768: PERNR=00101800, BEGDA=20110401, DICOT=20, BACHE=1200
    Table T5F99SE:  record 1 PERNR=00101800, BEGDA=20110401, ACTDT=20110401, ADDAT=PB    E
                             record 2 PERNR=00101800, BEGDA=20110101, ACTDT=20110405, ADDAT=PC    E01
                             record 3 PERNR=00101800, BEGDA=20110401, ACTDT=20110409, ADDAT=PA    E
    The result we want get with infoset query is
    PERNR    BEGDA   DICOT  BACHE   ADDAT
    00101800 20110101 20        1200       PB    E
    00101800 20110101 20        1200       PC    E01
    00101800 20110101 20        1200       PA    E
    I would like to get the fields of the infotype and some fields of the table T5F99SE.
    Is possible do this action with ABAP modifying an infoset that already exists adding the fields of the transparent table?
    What should I do?
    Kind regards,
    Julian.

    My guess is that it would not be possible to include a transparent table into the LDBs PNP and PNPCE. Would need input from a technical expert there.
    However, instead of using the LDB, why don't you explore just using a direct table join? You may need to join PA0000, PA0001, PA0002 along with PA0768 and your other tables. An infoset can then be created on this table join.
    To go to the mode where you can create the table join, in your infoset transactions, choose 'Table join' instead of 'LDB'.

  • Infoset-query-selection-screen-default-values

    Hi All,
    I am having the requirement as I need to put default values in the selecion-screen of the report by using  Infoset query. Let me know the settings required for this.
    I am using SQ01, SQ02, SQ03 T.Codes.
    And I need display  one record only if any field contains mulitple records, for example in the HR-ABAP, field p0105-usrid contains multiple values depending on the subtype.So, I need to display USRID when URSTY = '900'. All these should display by Infoset query only.
    Pls help me in this scenario , its an urgent requirement.I am very much thankful for you for reading my proble, if you will provide some sort of solution, I feel very happy.
    Advance thanks for this .
    Regards,
    Prakash.

    Prakash,
    To default the values on your selection screen, you will need to do some ABAP I guess. (if you do not want to use variant). Open up the infioset in SQ02 and then goto code option for the PNP**** field and then you can code to initialize the selection screen variables. Test with an ABAPer.
    To display multiple records as multiple columns, you will have to create custom fields in infoset, and then go from there. Again see ABAPer.

  • Infoset Query Wrong result after removing document number in the drilldown

    Hi Friends,
    I have 2 oDS,billing ODS and Condition ODS.I have created an infoset query based on these two ODS.
    From my Billing ODS i need QTY and from Condition ODS i need Value,Discount etc.
    Since there are more than one record in condition ods for each and every document of billin gods,i have divided the qty using number of records in the query.
    Im getting wrong qty if i run report based on customer or material,but if i drilldown based on document im getting the correct quanity.
    Can any one help me..
    Thanks & Regards
    Sudhakar

    Thnaks Oscar and Ganesh for your interest.
    FYI,my infoset is created based on bill doc and item number which is available in both the ODS.
    Here,for every document in Billing ODS,there are more number of documnets in Condition ODS,so the bill qty is getting added according to the numvber of records in Condition ODS.
    Eg.Billing ODS: Doc Num:100012, Qty = 8.if 10 records are ther in condition ODS,then in the infoset my QTY becomes,
    Doc Num:100012, Qty = 80.
    So in the query i divided it by number of records to get the qty and is coming correctly for documnet wise report.
    Problem comes when i remove documnet from the report and drilldown to higher level,say material,then it is calculated wrongly.
    Your suggestions plz..
    Regards
    Sudhakar

  • 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

  • InfoSet Query in R/3

    Hi Guys-
    I want to consolidate multiple similar (all same fields) records to a single record in an Infoset Query. Any one can please guide me how to do this.
    Thanks - Troy.

    Hi,
    In SQ01 ,press shift+F7 then find your user group. then from infoset query tab ,select ur infoset.
    and try to delete , I think, it should work.
    Regards
    CSM Reddy

  • 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

  • Infoset Query - Long run times

    Hi All,
    I was running a Bex query on top of an infoset query a few days ago with no problems and very good performance.  Now, returning any number of records it runs and timesout.  I know that there will be recommendations related to statistics and possibly those related to the active table of the ODS.  I have checked these and they have been recently updated.  In fact, when I manually update the statistics the behaviour is the same.  The structure of the infoset has not changed.
    We are running 3.0B on DB2. 
    Any ideas?
    Robert Zovic
    Arinso International

    Hi Giridharan,
    you check whether the hierarchy SIDs are updated properly, structure, to date are all fine.
    check the difference between X and Y hierarchy.
    Regards,
    Prakasha A

  • Infoset Query Restriction

    Is there a way to restrict master data within an infoset query? I only want master data for a certain sales organization in the infoset query because this is joined to a cube. The cube does not contain sales org. If I could only have the infoset query display the one sale org master data this join would work.

    Hi,
    the join function in infoset can't provide you restriction by value.
    Alternatively try to filter the infoset on the query level.
    Hope helps.

Maybe you are looking for

  • URL for a new record link in report

    My requirement is to have a hyperlink column on the report that will opens a new record edit screen to create a new Contact record with the Account Name and address info. defaulted in this new record screen. I've added a column to my report and chang

  • IPod classic not recognised by iTunes on Mac

    I have an 80Gb iPod classic video. It has suddenly stopped being recognised by iTunes on my iMac. It IS recognised by the iMac though. iTunes does recognise my iPhone and iPad. I've restarted the Mac and reinstalled iTunes but no difference. I tried

  • Issue with MS Excel 2010

    I am using MS Excel 2010 and i have a template which i am using for my project. There are fields in the template in one column and in the other column, the user has to feed data for the requested fields. Now the requested fields have explanation for

  • Hide a column in BPS layout ?

    Hi, Is it possible to hide a column in a BPS layout (Web Excel) ? When I hide a column in the layout definition, saving it resets the hidden column. Any idea if it will be included in a future release ? Thanks

  • What is ABAP all about & How it helps an Enterprise to help in its Business

    Moderator nessage - welcome to SCN But before posting, please take the time to read the rules of engagement - please do not ask vague, basic questions Hello friends ,         I am Rudra,I want to know what is ABAP and it can help an enterprise to imp