APD with Query (conditions ) !

Hi,
1. I am trying to run a Query (with Top 15 Condition) using the APD and dump the results  into a file on   Application server.
The query takes 5 min when run on BEx web and retrieves 35,000 records with just 3 columns.
But when i run APD its short dumps after 2 hours
Is it because i am using Conditions in the query  or because  of APD cant handle 30 million of records from the cube which i have ?
I appreciate if you any one can  throw some light on this
Thanks

I did remember some note that said that conditions were a big no in terms of using the same in an APD...
Maybe this will help
Note 751577 - APD-FAQ: Data source query
Edited by: Arun Varadarajan on Mar 19, 2009 10:28 PM

Similar Messages

  • APD with query data source

    Hi,
    I'm facing a problem, i created APD which have query data source, this query have so many calculated keyfigure and these calculated keyfigure has Exception Aggregation field is "Use Standard Aggregation" and on Calculations tab "local calculation is "Nothing defined". so Bex query result is defferent from query column "SUM". my problem is all query fields are map in APD there i'm suing the aggregation transformation which is using SUM and load data into DSO.
    Now query indiviual sum for each column is equal to DSO field sum but diffferent from BEx query sum, is there any posibility to take BEx query sum in DSO
    Please help me to fix this issue.
    Thanks,

    Hi,
    Could not understand your issue correctly. Could you please give sample values?
    My suggestion would be to create the query without any result rows and load it in the APD with 1:1 transformation.
    Does that fulfill your requirement?
    Thank.

  • Help with query Condition

    --Sample create/insert :
    create table xxdummy(
    id integer,
    name varchar2(40),
    description varchar2(100)
    insert into xxdummy values (1,'L', 'Simple L press');
    insert into xxdummy values (2,'XL', 'XL with no film');
    insert into xxdummy values (2,'web', 'XL with no film');
    insert into xxdummy values (3,'XL', 'XL with Film');
    insert into xxdummy values (3,'Film', 'XL with Film');
    insert into xxdummy values (3,'print', 'XL with Film');
    insert into xxdummy values (4,'S', 'servo with film');
    insert into xxdummy values (4,'Film','servo with film' );
    insert into xxdummy values (5,'S','only servo' );
    insert into xxdummy values (6,'L', 'Simple L press');
    insert into xxdummy values (7,'XL', 'XL with no film');
    insert into xxdummy values (8,'XL', 'XL with Film');
    insert into xxdummy values (8,'Film', 'XL with Film');
    insert into xxdummy values (8,'guide', 'XL with Film');
    --drop table xxdummy;
    select * from xxdummy;
    select id, description, decode(name, 'L', 'L Only', 'XL', 'Got XLs here', 'dont know' ) type
    from xxdummy
    where name in ('L','XL' )
    In above query for column type, I want to display 'L Only', 'XL With Film', 'XL Without Film'
    How can I do this ?
    Thanks

    I should have explained more, but my mind is so fried making up sample replica of the data as its scattered over so many tables in the original query taht I couldnt put it properly:
    another try :
    column Description is just for my reference , So please ignore that for now.
    I have to form a condition only using colums name and id.
    select * from xxdummy :
    id=2 and 7 , has name=XL but doesnt have 'Film' so I want to mark this row as 'XL with no film'
    id=3 and 8 , has name=XL and also has name = Film, So label for this should be - XL With Film
    id=4 , has name=S and also Film, --All the ids that have name=S, no matter if it has film with same Id should be excluded.
    id=5, exclude it
    id=1 and 6 have name = L , Lable them 'L Only' .
    So I should basically have 6 rows returned in my sample data :
    select id, description, name, decode(name, 'L', 'L Only', 'XL', 'Got XLs here' ,'dont know') type
    from xxdummy
    where name in ('L','XL')
    how do I distinguish within id, that has name=XL : which one has film and which one doesnt
    did it sound better ?
    Edited by: OAF-dev on Nov 17, 2009 4:10 PM

  • APD from query to flat file - Results not correct

    Hi All,
      Need your help to resolve the issue.
    I am using APD with query as source and target as file download.
    For small sets of data the reults are dowloaded correct, howver if there is a large set more than 30K records the results dowloaded are incorrect.
    BEX results are fine, the issue is only with APD dowload.
    Appreciate all your responses at the earliest.i
    Thanks
    Hari

    Hi Hari,
    By using the tcode RSCRM_BAPI  you can Extract the date into Table or CSV file or save the file to the Application server .
    please check the below link:
    https://websmp103.sap-ag.de/~sapdownload/011000358700004400232004E/HowToRSCRM_BAPI.pdf
    Thanks and Regards
    Sekhar

  • APD using Query with multiple structures as a data source

    All,
    I want to set up an automatic process which executes a query and exports it to a shared drive as a csv file. I have tried various options , when I try to use APD to set up the extract, I get an error and this is because the query that I am trying to use has Strucutres in both rows and columns. Hence, I am unable to use this option. I tried RSCRM_BAPI, It works well, but there is an issue with scheduling this in Process chain. I created an event and scheduled this as a job to trigger after "event" as per SAP instructions, but the job does not exist and it is not possible to trigger it through the Process chain unless the variables are hard coded in the query which I do not want to do.
    Can any one tell me if there is a way to deal with APD using Query with multiple structures?
    Would really appreciate if some one can give me the right solution...
    Thanks

    Hi Tanu ,
    APD is an option but its not very good with large amount of data or hiearachies or if you have attributes in you query structure .
    One more option for this requirement is use of report program using function module RRW3_GET_QUERY_VIEW_DATA .
    This will work fine with multiple structure etc .
    There are some overheads with this FM  ex: if amount of data is too much then program will give dump .Solution for that is we call the FM in LOOP by diving amount of data need to be fetched .ex:  we can read data quarter wise.
    For using this function module what you can do is write an ABAP program (At SE38 ) .which will call this FM and then write the output into a flat file which you can save at application server (AL11) .From there other system can read it .
    To automate this whole process you can further add all the report programs into a process chain (RSPC) which can be schedule as per requirement .
    To pass input parameters you can use variants that will pass the values to the report .
    Check thi link for sample code :
    [http://www.tricktresor.de/content/index.php?navID=696&aID=496]
    Hope this will be helpful .
    Regards,
    Jaya Tiwari

  • If..then..else statement in SQL with 'generalized' conditions in the if sta

    it is possible to write something approaching an if..then..else statement in SQL with 'generalized' conditions in the if statement.
    Attached is the query for the payment register, in which I've written a series of decode statements, one for each possible value of the payment code. The query works OK - however, its specific and as the number of paycodes expand (and they do), the report won't pick up the new paycode until the code is changed. More importantly, the report won't be correct until someone 'discovers' that a paycode is missing, which might take months.
    If I were writing the equivalent of this series of decode statements in Focus, it would be something like this:
    DEFINE.......
    PAYMED/D12.2 = IF PAYMENT_CD LE 18
                   THEN PAYMENT_AMT
                   ELSE 0 ;
    PAYIND/D12.2 = IF PAYMENT_CD GE 19 AND PAYMENT_CD LE 49
                   THEN PAYMENT_AMT
                   ELSE 0 ;
    PAYEXP/D12.2 = IF PAYMENT_CD GE 70
                   THEN PAYMENT_AMT
                   ELSE 0 ;
    PAYREC/D12.2 = IF PAYMENT_CD GE 50 AND PAYMENT_CD LE 69
                   THEN PAYMENT_AMT
                   ELSE 0;
    END
    IN SQL/PLUS:
    SELECT ACCOUNT_NAME,
    LOCATION_1,
    CLMNT_LAST_NAME,
    CLAIM_NBR,
    DATE_OF_INJURY,
    DATE_CHECK_REGISTER,
    PAYEE_NAME_1,
    PAYMENT_CD,
    SERV_OFC,
    CPO_CHECK_NBR,
    PAYMENT_FORM,
    DECODE(PAYMENT_CD, 20, PAYMENT_AMT, 21, PAYMENT_AMT,
    22, PAYMENT_AMT, 23, PAYMENT_AMT, 25, PAYMENT_AMT,
    26, PAYMENT_AMT, 27, PAYMENT_AMT, 28, PAYMENT_AMT,
    29, PAYMENT_AMT, 30, PAYMENT_AMT, 31, PAYMENT_AMT,
    32, PAYMENT_AMT, 33, PAYMENT_AMT, 34, PAYMENT_AMT,
    35, PAYMENT_AMT, 36, PAYMENT_AMT, 37, PAYMENT_AMT,
    39, PAYMENT_AMT, 40, PAYMENT_AMT, 41, PAYMENT_AMT,
    42, PAYMENT_AMT, 43, PAYMENT_AMT, 44, PAYMENT_AMT,
    45, PAYMENT_AMT, 46, PAYMENT_AMT, 47, PAYMENT_AMT,
    48, PAYMENT_AMT, 49, PAYMENT_AMT, NULL) INDEMNITY,
    DECODE(PAYMENT_CD, 0, PAYMENT_AMT, 1, PAYMENT_AMT,
    2, PAYMENT_AMT, 3, PAYMENT_AMT, 4, PAYMENT_AMT,
    5, PAYMENT_AMT, 6, PAYMENT_AMT, 7, PAYMENT_AMT,
    8, PAYMENT_AMT, 9, PAYMENT_AMT, 10, PAYMENT_AMT,
    11, PAYMENT_AMT, 12, PAYMENT_AMT, 13, PAYMENT_AMT,
    14, PAYMENT_AMT, 15, PAYMENT_AMT, 18, PAYMENT_AMT,
    17, PAYMENT_AMT, NULL) MEDICAL,
    DECODE(PAYMENT_CD, 70, PAYMENT_AMT, 71, PAYMENT_AMT,
    72, PAYMENT_AMT, 73, PAYMENT_AMT, 74, PAYMENT_AMT,
    75, PAYMENT_AMT, 76, PAYMENT_AMT, 77, PAYMENT_AMT,
    78, PAYMENT_AMT, 79, PAYMENT_AMT, 80, PAYMENT_AMT,
    81, PAYMENT_AMT, 82, PAYMENT_AMT, 83, PAYMENT_AMT,
    84, PAYMENT_AMT, 85, PAYMENT_AMT, 86, PAYMENT_AMT,
    87, PAYMENT_AMT, 88, PAYMENT_AMT, 89, PAYMENT_AMT,
    90, PAYMENT_AMT, NULL) EXPENSES,
    DECODE(PAYMENT_CD, 50, PAYMENT_AMT, 51, PAYMENT_AMT,
    52, PAYMENT_AMT, 53, PAYMENT_AMT, 54, PAYMENT_AMT,
    55, PAYMENT_AMT, 56, PAYMENT_AMT, 57, PAYMENT_AMT,
    58, PAYMENT_AMT, NULL) RECOVERIES,
    DECODE(PAYMENT_FORM, 'N', PAYMENT_AMT, NULL) NONCASH,
    DATE_FROM_SERVICE,
    DATE_THRU_SERVICE
    FROM &INPUT_TABLES
    WHERE &SECURITYCOND
    DATE_OF_PAYMENT BETWEEN :START_DATE AND :END_DATE
    ORDER BY LOCATION_1, CPO_CHECK_NBR
    As you can see, this is both much easier to write and covers the possibility of expansion of paycodes (expansions always fit in these defined ranges).
    My question is, then, is it possible to write something like this in SQL and, if so, could you give me some sample code? (I'm one of those people who learn best from looking at the code as opposed to a set of instructions)

    Here is one way you could do it.
    Create a table that has columns like:
    Payment_code varchar2(2),
    Effective_Date Date,
    Payment_type varchar2(20),
    Expiration_Date Date)
    Payment type for example could be
    I- indemnity
    M- medical
    R- recovery
    E- expenses
    Let the table name for example be PAYMENT_CODE.
    The select query would look like
    SELECT ACCOUNT_NAME,
    LOCATION_1,
    CLMNT_LAST_NAME,
    CLAIM_NBR,
    DATE_OF_INJURY,
    DATE_CHECK_REGISTER,
    PAYEE_NAME_1,
    PAYMENT_CD,
    SERV_OFC,
    CPO_CHECK_NBR,
    PAYMENT_FORM,
    DECODE(p.payment_type,'E',PAYMENT_AMOUNT,0) expenses,
    DECODE(p.payment_type,'I',PAYMENT_AMOUNT,0) indemnity,
    DECODE(p.payment_type,'M',PAYMENT_AMOUNT,0) Medical,
    DECODE(p.payment_type,'R',PAYMENT_AMOUNT,0) recoveries,
    DECODE(PAYMENT_FORM, 'N', PAYMENT_AMT, NULL) NONCASH
    FROM &INPUT_TABLES,
    PAYMENT_CODE P
    WHERE P.PAYMENT_CODE = SOMEINPUT_TABLE.PAYMENT_CODE
    and other conditions
    The idea is to group all the payment codes into a few groups to reduce the clutter. If there is ever a change to the payment code, you could modify the table and it will be reflected in your select query.

  • BI Web services - Prompts with 'OR' condition are not working

    Hi Gurus
    I am using BIWS to build my Xcelsius dashboards . When i building a webservice from webi report having two data providers named fact & dim and i merging two data providers and the result i am using in a report.
    The Fact data providers contains a query filters with 'OR' conditions applied in it.
    when i test this webservice with the values it always displaying the last refreshed instance of report even i purge the data before building web service.
    Could you please let me know is any one faced this issue. I am using Webi rich client 12.3.1 version
    Note *: The web service works fine if i am using query filters with  'AND'  condition.
    Kindly check this do the needful
    Cheers
    Karun

    Hai
    Check this
    Re: Web Intelligence BI Web Services and Xcelsius
    http://everythingxcelsius.com/xcelsius-training/xcelsius-and-business-intelligence-web-services-biws/3642
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/00536d65-f9cf-2e10-0eaa-f3346306dc1a
    http://www.asug.com/CalendarEventDetails/tabid/150/eventid/2509/Default.aspx
    http://www.forumtopics.com/busobj/viewtopic.php?p=819152

  • How to define the query condition of Image Theme in MapBuilder?

    Hi,
    I'm trying to add an dynamic Image Theme in OracleMap, but there's a problem.I defined the query condition of Image Theme like this:
    select scanimage,shap from image where scanimgid=467
    The shap column is the MBR column
    And the XML CODE:
    <?xml version="1.0" standalone="yes"?>
    <styling_rules theme_type="image" image_column="SCANIMAGE" image_format="JPEG" image_unit="M" image_resolution="1.0">
    <rule>
    <features> select scanimage,shap from image where scanimgid=467 </features>
    </rule>
    </styling_rules>
    When i preview this Image Theme ,there is an ORA-00936 error means lack of expression.
    Is there any problem with my definition?Or can query an image from an Image Theme?
    Thanks a lot for your help!
    Message was edited by:
    N.Mars
    null

    Hi Mars,
    predefined image theme definition does not support a "select" statement in the <features> tag. You should just define a query condition in the <features> tag.
    It seems that you are trying to use an image theme in Oracle Maps, but it currently does not support a FOI image theme. You should add a predefined image theme as part of the basemap, and maybe add scales values to set the visibility range of this image theme.
    Joao

  • How to create a transport request with query and only with its structure.

    HI guru,
                how to create a transport request with query and only with its structure.transport request should not  include any other query items like ( variables, conditions...etc)
    thanks in advance.
    venkata

    Hi,
    Goto RSA1 and then Transport Connection -> In SAP Transports select Object Types-> Query Elements -> Then select Query->Give Technical name of the query and then select for transfer. In the right side you can choose the components which you wanted to transport.
    Regards,
    anil

  • How to set a BEx Query Condition in Design Studio (e.g. Net value GT 0)

    Hi experts,
    I have set a simple condition in my BEx Query...
    e.g. key figure "Net value" GT 0 to become only positive values in the query result.
    In the Query runtime the condition works successful, but in the Design Sudio view the defined Query condition doesn´t work.
    In my Design Studio crosstab I have tried to switch between the display setting "Conditional formating Visible" true/false, but without success.
    By the way, before I have posted this thread, I had a look at this two blogs...
    Design Studio 1.0: Create a Scorecard Using SAP BW BEx Query Exceptions
    Design Studio 1.2  - a Second Look
    Any ideas or experiences?
    Thanks and regards,
    Michael

    Hi Michael,
    I think you are mixing up two different BEx terms. Conditions are filters on key figures (show me only the results with a value bigger than 50). Exceptions do not filter the result set, but provide a formatting based on the values in the result set (if value is bigger than 50, make its cell red).
    The Conditional formatting setting in Design Studio refers to the BEx exceptions. For the BEx conditions there isn't such a setting available. You just have to activate the condition in your BEx Query and use that for your data source in Design Studio.
    If you want a workaround to enable/disable conditions from Design Studio, check this blog I wrote: HackingSAP.com - SAP Design Studio and Conditions It shows how you can use variables to adjust the conditions (and also activate) from within Design Studio.
    Cheers,
    Xavier

  • Problem with Guard Condition (Fields Disabling)

    Hi All
    I have a screen where I am creating a notification... so I enter all my fields and data as below:
    If ALL fields are filled out then the call to my RFC will create the notification and pass back a notification number (EX_QMNUM)
    I then pass back EX_QMNUM to the input of my READ_S1 RFC. Since we have a custom table attached I thought it was best to retrieve the latest data from the database after point of save.
    However if they don't fill in the necessary criteria then I pop up an error (EG. Please fill in customer number). I put a GUARD CONDITION on the call back to the READ_S1 RFC. The guard seems to work as my breakpoint/RFC does not get hit... however it then CLEARS my fields and DISABLES everything. This is what it looks like after the save (with guard condition in place). This means I lose all my data and no save occurs.
    What am I doing wrong here? Is this a bug with the guard condition?
    Guard Condition (which seems to be working apart from the fact it disables my RGA fields)
    I'm not completely sure about IF conditions so let me know if this is wrong?

    Hi Brad,
    Thanks for the input, I have tried this now.
    1. In the case the guard evaluates to "false", I experience the fields being blank, but not grayed out. So the user is able to refill the input and submit. This means something else in your model causes the "grayed out" behavior.
    2. In general, in case you know the conditions to valid input in the client side, you could model this way:
    Valid input => the data services run. example guard to service: =ISNULL(@customer)==false
    Invalid input => the popup shows. example guard to popup: =ISNULL(in1@customer)==true
    3. Is it possible in your case to validate the input before running the first query? This will enable to use the Validation feature as in Input Validation. If possible it's the best way in terms of user experience, in my opinion.
    Thanks,
    Udi

  • How can i define a boolean variable with the condition if i got a specific text on a selected column?

    How can i define a boolean variable with the condition if i got a specific text on a selected column?
    Example:
    my select results:
    [id = 102] [Company = 'Microsoft']
    If i got microsoft in 'Company' i want to my another table with the columnName "Microsoft" get "true".
    Can you help me?

    That is called 2-table UPDATE.
    Example:
    http://www.sqlusa.com/bestpractices2005/updatewithcorrelatedsubquery/
    Kalman Toth Database & OLAP Architect
    Free T-SQL Scripts
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Export/Import with where condition

    DearAll,
    I am facing a problem in the delete of a huge table that take 3 hours
    DELETE FROM HST HST
    WHERE JV_TYPE <> 999
    and ( HST.VALUE_DATE <= TO_DATE ('31/12/2010','DD/MM/YYYY')
    AND HST.TRANS_DATE <= TO_DATE ('31/12/2010','DD/MM/YYYY'))
    what i am trying to do is to export the HST table and import it into another table
    but what i need to do is to have a dump with where condition including only the needed records in the table not deleted in the DML above as well as the indexes, triggers.
    Thanks

    If I try the following:
    CONN / AS SYSDBA
    CREATE OR REPLACE DIRECTORY dpump_dir1 AS '/folder/';
    GRANT READ, WRITE ON DIRECTORY dpump_dir1 TO bokprod;
    expdp bokprod/bokprod@uat TABLES=HST PARFILE=hst_query.par
    In the parfile:
    QUERY=hst:"WHERE JV_TYPE <>999 and ( HST.VALUE_DATE > TO_DATE ('31/12/2010','DD/MM/YYYY') AND HST.TRANS_DATE > TO_DATE ('31/12/2010','DD/MM/YYYY'))"
    DUMPFILE=exp.dmp
    DIRECTORY=dpump_dir1
    LOGFILE=exp.log
    impdp bokprod/bokprod@uat DIRECTORY=dpump_dir1 DUMPFILE=exp.dmp
    TABLES=bokprod.hst REMAP_TABLE=bokprod.hst:hst_imported
    My question is:
    1- the parameter file, if i put it in the dpump_dir1 directory, is it read by the expdp command?
    2- the hst_imported table created by the remap_table command , is it created with the indexes and triggers already existant on hst table?
    Appreciate yoyr help Dears

  • How do I...Mimic Replacement Path with Query using Customer Variable Exits?

    Hello SDN:
    We are on BW 3.5 SP16.
    We are currently using a replacement path Query(RP) with variables
    to populate a variable in another Query(T).
    The problem we are having is with performance.
    The entry of variables in replacement path Query(RP) is optional (This is necessary there cannot be required values)
    When results from Replacement Path Query are small performance is fine. (e.g. 10 seconds)
    When results from Replacement path query are large performance suffers. (e.g. 1+ minutes)
    Users are free to leave the replacement path variables empty resulting in a large set of data to be replaced. This is the worst performance case.
    We would like to discover a way to conditionally execute the replacement path query. That is if users do not enter values for the replacement Query(RP) variables do not execute the replacement path query(RP).
    Does anyone know if this is possible within reason and in customer exit space?
    We have reviewed the situation from all angles and the requirement for the replacement path FUNCTIONALITY and the freedom for the user to leave variable values blank remains.
    I've been searching and reading SDN and SAP notes for about a week and do not find threads which address this situation.
    We are also exploring Customer variable exits to mimic replacement path functionality
    (different topic subject="How do I...Mimic Replacement Path with Query using Customer Variable Exits?")
    Any help will be appreciated
    Many thanks
    David Schuh

    My appologies-I posted this message with the wrong subject. I will repost it with appropriate subject.
    dave schuh

  • 'Show Query Conditions' in Charts Portlet

    Is it possible to display 'Query' conditions in the 'Run as Portlet' option in a Chart?
    If not, is there a workaround to display the conditions?
    Thanks.

    Juha,
    I have a similar problem what you have. Can you share the solution with me.
    My problem
    My LOV has following select:
    Select ename, empno from emp;
    I want to Show only Ename in the LOV and display Ename on the form too. but I want to store only empno and nothing to do with ename.empno is a hidden column.
    Can anybody please help me. Can you please reply to [email protected] also.
    Thanks in advance.
    Murali

Maybe you are looking for

  • Flash won't play audio

    OS: Windows Vista (32-bit) Browser: Mozilla Firefox 4.0.1 Flash version: 10.3.181.26 I've runned into a bit of a problem here which i've ultimately narrowed down to Flash, which while still playing video, has lost the capability to playback audio. My

  • Large partitioned tables with WM

    Hello I've got a few large tables (6-10GB+) that will have around 500k new rows added on a daily basis as part of an overnight batch job. No rows are ever updated, only inserted or deleted and then re-inserted. I want to stop the process that adds th

  • Bank Statement processing

    Hai Expert,                      Any one tell me ,what is Bank Statement Processing? in SAP B1. version 8.8,Batch Level 14 Thanks R.Arunraj

  • Try/catch refactoring in JSE 8?

    What happened to the "try/catch" refactoring from JSE 7? I really miss it.

  • 9790 FROZEN despite trying everything! Please help!!

    Hi, Yesterday I updated 4 of my apps on my 9790 and when I restarted my phone the start/load screen stopped 2/3 along and has been stuck there since. I have tried taking the battery out numerous times, tried a soft reboot and a hard reboot. It's not