FM RSCRMBW_REPORT: What parameters for extracting query in itab?

Hello,
I'm trying to extract query data to a XML-file (in order to use it as a connection source for a XCelsius-dashboard).
Therefore I use the FM RSCRMBW_REPORT as shown in Eddy De Clercq's tutorial:
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/3ba5e590-0201-0010-59b1-cab51fd245b7
But I have a problem with the parameter i_extract while running the FM the second time:
What table do I need here? And what kind of structure does this table need?
Or is there any other solution for extracting query data to a XML-file? An ideal solution would be a XML-file with the same structue as the query.
I have tried the FM RRW3_GET_QUERY_VIEW_DATA but the problem is that I can't get the query's structure.
Thank you.

Robert,
I have integrated XML data from this webservice into Excel using XML Maps ... it works perfectly fine with the RESTFul Web service..
Once you have the XML Map in the excel sheet - create your table by dragging and dropping necessary fields and then point the dataset to your Xcelsius container...
I have not tried to change the XML in the BSP till now .. but one thing you can do otherwise is
have a custom FM based on the function by the same name RRW3_QUERY_VIEW_DATA and then you have AXIS_DATA and CELL_DATA and you can create your own XML string by manipulating the content...
Or you can directly call the web service QUERY_VIEW_DATA using the webservice option in Xcelsius...
I have still not found out why the variable name tag is required but have given you other ways of integrating SAP BI with Xcelsius...

Similar Messages

  • Passing parameters for a query throught XML and capturing response in the same

    Hi All,
    I have defined a RequestParameters object and i am passing paramerts for a query through XML and trying to capture the result in the same and send back to the source. In this case i am send XML from excel.
    Below is my XML format.
    <?xml version="1.0" encoding="utf-8"?>
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <Insert xmlns="http://tempuri.org/">
    <dataContractValue>
    <dsRequest>
    <dsRequest>
    <SOURCE></SOURCE>
    <ACTION>Insert</ACTION>
    <RequestParams>
    <RequestParams>
    <ACC_NO>52451</ACC_NO>
    <EMP_CITY>HYD</EMP_CITY>
    <EMP_NAME>RAKESH</EMP_NAME>
    <EMP_CONTACT>99664</EMP_CONTACT>
    <EMP_JOM>NOV</EMP_JOM>
    <EMP_SALARY>12345</EMP_SALARY>
    </RequestParams>
    <RequestParams>
    <ACC_NO>52452</ACC_NO>
    <EMP_CITY>HYD</EMP_CITY>
    <EMP_NAME>RAKESH</EMP_NAME>
    <EMP_CONTACT>99664</EMP_CONTACT>
    <EMP_JOM>NOV</EMP_JOM>
    <EMP_SALARY>12345</EMP_SALARY>
    </RequestParams>
    </RequestParams>
    </dsRequest>
    <dsRequest>
    <SOURCE></SOURCE>
    <ACTION>Update</ACTION>
    <RequestParams>
    <RequestParams>
    <ACC_NO>52449</ACC_NO>
    <EMP_CITY>HYD1</EMP_CITY>
    <EMP_NAME>RAKESH1</EMP_NAME>
    <EMP_SALARY>1345</EMP_SALARY>
    </RequestParams>
    <RequestParams>
    <ACC_NO>52450</ACC_NO>
    <EMP_CITY>HYDer</EMP_CITY>
    <EMP_NAME>RAKEH</EMP_NAME>
    <EMP_SALARY>1235</EMP_SALARY>
    </RequestParams>
    </RequestParams>
    </dsRequest>
    </dsRequest>
    </dataContractValue>
    </Insert>
    </s:Body>
    </s:Envelope>
     Where i have a List of dsRequest and RequestParams, where i can send any number of requests for Insert,Update. I have two a XML element defined in RequestParams "RowsEffected","error" where the result will be caputred and is updated
    to the response XML.
    I have 6 defined in RequestParams
    EMP_SALARY(int),ACC_NO(int),EMP_CITY(string),EMP_NAME(string),EMP_CONTACT(string),EMP_JOM(string)
    My Question is:
    When i am trying to build response XML with the following code, the parameters which are not given in the Request XML are also appearing in the Response.
                    ResponseParams.Add(
    newdsResponse()
                        ACTION = OriginalParams[a].ACTION,
                        SOURCE = OriginalParams[a].SOURCE,
                        Manager = OriginalParams[a].Manager,
                        RequestParams = OriginalParams[a].RequestParams
    Where the OriginalParams is dsRequest
    Ex: In my update query i will only send three parameters, but in my response building with ablove code, i am getting all the variables defined as INT in the RequestParameters.
    Is there any way i can avoid this and build response with only the parameters given in the Request ??
    Appreciate ur help..Thanks
    Cronsey.

    Hi Kristin,
    My project is, User will be giving the parameters in the excel, and using VBA, the values are captured and an XML is created in the above mentioned format and is send to web service for the Insert/Update.
    I created a webservice which reads the values from <datacontract> and it consist of list of <dsRequests> where any number of Insert/Upate commands can be executed, with in which it contains a list of <RequestParams> for multiple insertion/Updation.
    //function call
    OriginalParams = generator.Function(query, OriginalParams);
    where OriginalParams is List<dsRequest>
    //inside function
    command.Parameters.Add()// parameters adding
    int
    val = command.ExecuteNonQuery();
    after the execution,an XML element is added for the response part.and it is looped for all the RequestParams.
    OriginalParams[i].Result.Add(
    newResult()
    { ERROR = "No Error",
    ROWS_EFFECTEFD = 1 });
    //once all the execution is done the response building part
    for(inta
    = 0; a < OriginalParams.Count; a++)
                    ResponseParams.Add(
    newdsResponse()
                      Result = OriginalParams[a].Result
    QUEST: When i am trying to build response XML with the following code, the parameters which are not given in the Request XML are also appearing in the Response.
    Ex: In my update query i will only send three parameters, but in my response building with ablove code, i am getting all the variables defined as INT in the RequestParameters.
    Is there any way i can avoid this and build response with only the parameters given in the Request ??
    Appreciate ur help..Thanks
    Cronsey.

  • Calling first query to get parameters for second query

    Newbie trying to convert an Oracle Report to BI. The report has 1 parameter from the user, which is plugged into a query that returns grouped data (4 values, 1 row). This data is then used in multiple places (not just where clause) in a second query to get the data for the report. Can anyone please point me in the right direction to accomplish this?
    I have looked at using a before trigger possibly to get the first query values but am not sure how to then pass those values back to be used by the second query.
    Thank you for ANY suggestions!

    Hello,
    you use any fields in additional querys as parameters.
    If you use XML-data-template, it would look like this:
    <dataTemplate name="INVOICE_REPORT" description="Invoice Report" Version="1.0">
      <parameters>
        <parameter name="P_INVOICE_HEADER_ID" dataType="number"/>
      </parameters>
      <dataQuery>
        <sqlStatement name="QUERY_INVOICE">
          <![CDATA[
    select ivh.invoice_header_id    
         , ivh.invoice_number
         , ivh.customer_id           // here you select the field which is a parameter for next query
          -- ... additional fields ... --
      from tbl_invoices ivh
      where ivh.invoice_header_id = :P_INVOICE_HEADER_ID
        -- and additonal conditions --
    ]]>
        </sqlStatement>
        <sqlStatement name="QUERY_CUSTOMER">
          <![CDATA[
    SELECT c.account_number
         , c.customer_name
         , c.customer_city
          -- ... additional fields ... --
      FROM tbl_customers c
      where c.customer_id = :CUSTOMER_ID // here is the parameter
        -- and additonal conditions --
    ]]>
        </sqlStatement>
      </dataQuery>
      <dataStructure>
        <group name="GRP_HEADER" source="QUERY_INVOICE">
          <element name="INVOICE_HEADER_ID" value="INVOICE_HEADER_ID"/>
          <element name="INVOICE_NUMBER" value="INVOICE_NUMBER"/>
          <group name="GRP_LINE" source="QUERY_INVOICE">
            <element name="ACCOUNT_NUMBER" value="ACCOUNT_NUMBER"/>
            <element name="CUSTOMER_NAME" value="CUSTOMER_NAME"/>
            <element name="CUSTOMER_CITY" value="CUSTOMER_CITY"/>
          </group>
        </group>
      </dataStructure>
    </dataTemplate>          The behavoir is much similar to oracle report
    Regards
    Alexander
    Edited by: alexander.steinbeisz on Dec 7, 2009 12:20 PM
    Edited by: alexander.steinbeisz on Dec 7, 2009 12:21 PM

  • URL Parameterizing for BI Query Detail Drill Down via Xcelsius

    Hi Guys,
    I am In the process of building an Xcelsius dashboard using BI/BW as my source system, working on a "Details" URL button to allow the user to drill directly into the source BI queries with their current combo box selections. 
    I am trying to build a URL to pass a value to both a variable and to filter a characteristic. I want to pass a value to a 0fiscper variable and exclude an employee number. 
    I have been able to get each URL to work independently, but not working together. If I leave out either the variable part or the filter part it works, but it doesn't work with both the filter portion and characteristic filter section. 
    I followed other threads and used Web application designer (WAD) instructions to view the XHTML I will have to parametrize for my URL.
    This is how I have flattened/parametrized it
    Variable part:
    BI_COMMAND_1-BI_COMMAND_TYPE=SET_VARIABLES_STATE&
    BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE=VARIABLE_INPUT_STRING&
    BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE-VARIABLE_INPUT_STRING=010/2010&
    BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE=BCURFPER&
    data provider part
    BI_COMMAND_1-BI_COMMAND_TYPE=SET_SELECTION_STATE&
    BI_COMMAND_1-TARGET_DATA_PROVIDER_REF_LIST-TARGET_DATA_PROVIDER_REF_1=DP_1&
    characteristic filter part
    BI_COMMAND_1-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_1-CHARACTERISTIC=0EMPLOYEE&
    BI_COMMAND_1-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_1-SELECTIONS-SELECTION_1-SELECTION_INPUT_STRING=!201
    So my complete URL is:
    http://serverinfo?
    QUERY=ABCQUERY&
    BI_COMMAND_1-BI_COMMAND_TYPE=SET_VARIABLES_STATE&
    BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE=VARIABLE_INPUT_STRING&
    BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE-VARIABLE_INPUT_STRING=010/2010&
    BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE=BCURFPER&
    BI_COMMAND_1-BI_COMMAND_TYPE=SET_SELECTION_STATE&
    BI_COMMAND_1-TARGET_DATA_PROVIDER_REF_LIST-TARGET_DATA_PROVIDER_REF_1=DP_1&
    BI_COMMAND_1-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_1-CHARACTERISTIC=0EMPLOYEE&
    BI_COMMAND_1-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_1-SELECTIONS-SELECTION_1-SELECTION_INPUT_STRING=!201
    Then it gives me the following error when I attempt to run this...
    " The metadata of "CMD" "SET_VARIABLES_STATE" are incorrect for parameter "CHARACTERISTICS_SELECTIONS"
    If I set the debug=x flag to see what is generated in the error this is the info I get:
    The parameter "CHARACTERISTICS_SELECTIONS" in the metadata of "CMD" "SET_VARIABLES_STATE is not correctly defined:
    <parameterList>
      <param name="BI_COMMAND_TYPE" value="SET_VARIABLES_STATE"/>
      <param name="CHARACTERISTICS_SELECTIONS">
        <param name="CHARACTERISTIC_SELECTIONS" index="1">
          <param name="CHARACTERISTIC" value="0EMPLOYEE"/>
          <param name="SELECTIONS">
            <param name="SELECTION" modification_type="delete_if_value_not_equal" index="1">
              <param name="SELECTION_INPUT_STRING" value="!201"/>
            </param>
          </param>
        </param>
      </param>
      <param name="TARGET_DATA_PROVIDER_REF_LIST">
        <param name="TARGET_DATA_PROVIDER_REF" value="DP_1" index="1"/>
      </param>
      <param name="TARGET_VARIABLE_CONTAINER_REF" value="DEFAULT"/>
      <param name="VARIABLE_VALUES">
        <param name="VARIABLE_VALUE" index="1">
          <param name="VARIABLE" value="BCURFPER"/>
          <param name="VARIABLE_TYPE" value="VARIABLE_INPUT_STRING" modification_type="delete_if_value_not_equal">
            <param name="VARIABLE_INPUT_STRING" value="010/2010"/>
          </param>
        </param>
      </param>
    </parameterList>
    Thanks for looking!
    -Gary

    Hi Gary,
    We came across the following issue.Colud you please provide the solution which you used to resolve it.
    " The metadata of "CMD" "SET_ITEM_PARAMETERS" are incorrect for parameter "BUTTON_LIST".
    Thanks,
    Anji

  • Selection Parameters for SAP Query

    I have difficulty in displaying the SAP Query selection parameter in my result screen.
    Even the ALV Selection option at the Print dialog is not working in this SAP Query (working for ABAP developed ALV report).
    Any help will be much appreciated.

    > Yes SAP Query.
    > The printing is printing out the SAP Query result, even mentioned in my 1st statement.
    > Is my language that bad or you have difficult understanding English?
    I have no difficulty in understanding English but in understanding your problem. If someone says only "it's not working" I must ask, what "it" is.
    Is your problem the fact, that the selection criteria is not printed if you use ALV but printed if you use an ABAP list? Or is printing not working alltogether?
    Markus

  • OIM: what parameters for the task assignment adapter?

    Hi,
    following the tip here: Re: how to use adapter to assign task to a specific user
    I created a task assigment adapter and set the following by means of a simple java class:
    Adapter return value for key="myapprover2"
    Adapter return value for key type="User"
    myapprover2 is the login name of a user in OIM.
    It does not seam to work, because the approval task is assigned to the xelsysadm instead of myapprover2.
    What I else need to do to get it working?
    Thanks.

    The key needs to be the Users.Key value returned in a string format to the Object variable holding the task assignment key variable.
    -Kevin

  • Does XML approach for passing parameters in the query make the query slow?

    Hi,
    I am using XML approach for passing parameters in a query. This is running very slow but when I pass comma separated values in parameter, it runs very fast.
    So it concludes that we should not use XML approach for passing parameters. Please confirm me that Am I right or wrong?
    I have also googled to clear my doubt but not get solution till now. please help me.
    Regards,
    Sachin

    914014 wrote:
    Hi,
    I am using XML approach for passing parameters in a query. This is running very slow but when I pass comma separated values in parameter, it runs very fast.
    So it concludes that we should not use XML approach for passing parameters. Please confirm me that Am I right or wrong?
    I have also googled to clear my doubt but not get solution till now. please help me.
    Regards,
    SachinShow us what you are doing, create a simple yet complete example we can run on our Oracle instances.
    Then we will know exactly what you mean, and can comment appropriately.
    Cheers,

  • What parameters should I use for a dunning letter in Crystal Reports?

    Hello
    I have created a dunning letter in Crystal Reports. I want to import this layout as a layout (not a report) in Business One.
    The problem is that I don't know the parameters in the report so I can import the layout between the standard PLD layouts (like Dunning 1, dunning 2 dunning 3 dunning all etc). I tried a few but import fails everytime. I can't check the parameters in another report, as SAP only uses standard PLD layouts.
    Does anybody know what parameters to use in this report? Thanks.

    I did areal photography one time.  What you have listed would not be on my short list for lenses to take at all.
    Maybe you could supply a little more info of the 50-100mm ?  I am going to guess you have the first version of the Canon EF-S 75-300mm?  It is a faily slow lens but if these two are the only possibility, I'd choose it.
    It and the XTi will work as a mattter of fact I took two XTi's on my flying photo experience.  But I had the fantastic EF 70-200mm.  Another thing, there is NOT a lot of room on these aircraft.
    EOS 1Ds Mk III, EOS 1D Mk IV EF 50mm f1.2 L, EF 24-70mm f2.8 L,
    EF 70-200mm f2.8 L IS II, Sigma 120-300mm f2.8 EX APO
    Photoshop CS6, ACR 8.7, Lightroom 5.7

  • How to pass Multi and Singlr value Parameters to DB2 query, which is using in SSRS report for ODBC connection

    Hi Guys,
    I am using DB2 database in SSRS. I have to pass Single Value and Multi Value Parameters. I tried with Select * From DB2Table Where
    Column=@PRM_Name Or Select * From DB2Table Where
    Column=:PRM_Name . It is not working and throwing error. Please help me out.
    Connection Details: ODBC
    Thanks Shiven:)

    Hi SKM,
    So you mean to say that Go to DataSource->Add Dataset-> Query Type-Text-> Under Query:
    click on fx (Expression)-> Write this expression
    For Single Value Parameter:
    ="SELECT customer_name, telephone_number, address1, address2, city from MyTable
    WHERE city = '" + Parameters!City.Value + "'"
    OR
    ="SELECT customer_name, telephone_number, address1, address2, city from MyTable
    WHERE city =  '" & Parameters!City.Value & "'"
    Keep it in mind if Parameter is String then
    It should be in Single quote ''.
     Like
    ="SELECT customer_name, telephone_number, address1, address2, city from MyTable WHERE city
    ='Hyderabad' "
    For Multivalu Parameter:
    ="SELECT EmployeeID, FirstName, LastName, LoginID FROM SHIVEN.AUDIT Where FirstName
    in ('" + REPLACE(JOIN(Parameters!City.Value,","),",","','") + "')"
    NOTE:
    If your Parameter is Single Value Parameter and You want to enter string values with Coma (,)
    separated (Like Hyderabad, Chennai, Delhi).
    In this case, you have to use below expression.
    ="SELECT customer_name, telephone_number, address1, address2, city from MyTable
    WHERE city IN ('" + REPLACE(Parameters!City.Value ,",","','") + "')"
    OR
    ="SELECT customer_name, telephone_number, address1, address2, city from MyTable
    WHERE city IN  ('" & REPLACE(Parameters!City.Value ,",","','") & "')"
    In above expression: Replace will replace all , with ‘,’ and city IN (‘Hyderabad’, ‘Chennai’,
    ‘Delhi’) will not throw any error.
     Note: You have to write expression in one line in Expression editor for dataset
    query
    Thanks It is working fine but it is tough job if query is big.
    Hi S kumar,
    The above approach we use when we have source like DB2, becasue DB2 has some syntactical differences to pass multivalue paramaeter. I tested and it works good, if i am mentioning the query in above format by using Fx button while creating dataset.
    but if we want fetch data from view which exist in DB2 and we need to call db2 view in SSRS and pass multivalue parameter in a way we did above then could you please mention the steps and way to achieve this.
    Thanks in advance!

  • What are the default parameters for PER_EVENTS api

    Dear Experts,
    Can you tell us what are the default parameters for PER_EVENTS API.Here below I have pasted the API.
    procedure create_event
    (p_validate in BOOLEAN default FALSE
    ,p_date_start in DATE
    ,p_type in VARCHAR2
    ,p_business_group_id in NUMBER default NULL -- HR/TCA merge
    ,p_location_id in NUMBER default NULL
    ,p_internal_contact_person_id in NUMBER default NULL
    ,p_organization_run_by_id in NUMBER default NULL
    ,p_assignment_id in NUMBER default NULL
    ,p_contact_telephone_number in VARCHAR2 default NULL
    ,p_date_end in DATE default NULL
    ,p_emp_or_apl in VARCHAR2 default NULL
    ,p_event_or_interview in VARCHAR2 default NULL
    ,p_external_contact in VARCHAR2 default NULL
    ,p_time_end in VARCHAR2 default NULL
    ,p_time_start in VARCHAR2 default NULL
    ,p_attribute_category in VARCHAR2 default NULL
    ,p_attribute1 in VARCHAR2 default NULL
    ,p_attribute2 in VARCHAR2 default NULL
    ,p_attribute3 in VARCHAR2 default NULL
    ,p_attribute4 in VARCHAR2 default NULL
    ,p_attribute5 in VARCHAR2 default NULL
    ,p_attribute6 in VARCHAR2 default NULL
    ,p_attribute7 in VARCHAR2 default NULL
    ,p_attribute8 in VARCHAR2 default NULL
    ,p_attribute9 in VARCHAR2 default NULL
    ,p_attribute10 in VARCHAR2 default NULL
    ,p_attribute11 in VARCHAR2 default NULL
    ,p_attribute12 in VARCHAR2 default NULL
    ,p_attribute13 in VARCHAR2 default NULL
    ,p_attribute14 in VARCHAR2 default NULL
    ,p_attribute15 in VARCHAR2 default NULL
    ,p_attribute16 in VARCHAR2 default NULL
    ,p_attribute17 in VARCHAR2 default NULL
    ,p_attribute18 in VARCHAR2 default NULL
    ,p_attribute19 in VARCHAR2 default NULL
    ,p_attribute20 in VARCHAR2 default NULL
    ,p_party_id in NUMBER default NULL -- HR/TCA merge
    ,p_event_id out nocopy NUMBER
    ,p_object_version_number out nocopy NUMBER
    );

    From the menu bar, select
     ▹ System Preferences... ▹ Network
    Click the Assist me button and select Assistant. Follow the prompts.

  • What are  the input parameters for Function Module

    Dear Experts,
    I want to generate a Sales Tax returns report,those fields are not available in my existing Datasources.
    For that i want to write a Generic Datasource with Function Module.
    audat
    bukrs
    vkorg
    vtweg
    spart
    aurat
    auart
    netwr
    mwsbp
    kschl zedp(consition type)
    kschl zvat(condition type)
    ksch   zcst(condition type)
    matkl     material group
    Here what are the Input parameters for Function Module.
    Thanks in Advance.
    Srinivasan.

    Srinivasan-
    For creating a Generic extractor based on a FM, you first of all need to know what is going to be your structure.. i.e. what all fields you need to pull from what all tables. A functional consultant may help you identify the exact DB tables.
    Once you know them, hand over the requirement and the pdf mentioned by Krishna to the ABAP guy, he would be able to take this up further.
    Also decide 1st whether you would be using a full load or delta. There is a slight difference in the way they are built.
    Let me know how it goes.
    -Bhushan.

  • Query taking long time for EXTRACTING the data more than 24 hours

    Hi ,
    Query taking long time for EXTRACTING the data more than 24 hours please find the query and explain plan details below even indexes avilable on table's goe's to FULL TABLE SCAN. please suggest me.......
    SQL> explain plan for select a.account_id,round(a.account_balance,2) account_balance,
    2 nvl(ah.invoice_id,ah.adjustment_id) transaction_id,
    to_char(ah.effective_start_date,'DD-MON-YYYY') transaction_date,
    to_char(nvl(i.payment_due_date,
    to_date('30-12-9999','dd-mm-yyyy')),'DD-MON-YYYY')
    due_date, ah.current_balance-ah.previous_balance amount,
    decode(ah.invoice_id,null,'A','I') transaction_type
    3 4 5 6 7 8 from account a,account_history ah,invoice i_+
    where a.account_id=ah.account_id
    and a.account_type_id=1000002
    and round(a.account_balance,2) > 0
    and (ah.invoice_id is not null or ah.adjustment_id is not null)
    and ah.CURRENT_BALANCE > ah.previous_balance
    and ah.invoice_id=i.invoice_id(+)
    AND a.account_balance > 0
    order by a.account_id,ah.effective_start_date desc; 9 10 11 12 13 14 15 16
    Explained.
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    | Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)|
    | 0 | SELECT STATEMENT | | 544K| 30M| | 693K (20)|
    | 1 | SORT ORDER BY | | 544K| 30M| 75M| 693K (20)|
    |* 2 | HASH JOIN | | 544K| 30M| | 689K (20)|
    |* 3 | TABLE ACCESS FULL | ACCOUNT | 20080 | 294K| | 6220 (18)|
    |* 4 | HASH JOIN OUTER | | 131M| 5532M| 5155M| 678K (20)|
    |* 5 | TABLE ACCESS FULL| ACCOUNT_HISTORY | 131M| 3646M| | 197K (25)|
    | 6 | TABLE ACCESS FULL| INVOICE | 262M| 3758M| | 306K (18)|
    Predicate Information (identified by operation id):
    2 - access("A"."ACCOUNT_ID"="AH"."ACCOUNT_ID")
    3 - filter("A"."ACCOUNT_TYPE_ID"=1000002 AND "A"."ACCOUNT_BALANCE">0 AND
    ROUND("A"."ACCOUNT_BALANCE",2)>0)
    4 - access("AH"."INVOICE_ID"="I"."INVOICE_ID"(+))
    5 - filter("AH"."CURRENT_BALANCE">"AH"."PREVIOUS_BALANCE" AND ("AH"."INVOICE_ID"
    IS NOT NULL OR "AH"."ADJUSTMENT_ID" IS NOT NULL))
    22 rows selected.
    Index Details:+_
    SQL> select INDEX_OWNER,INDEX_NAME,COLUMN_NAME,TABLE_NAME from dba_ind_columns where
    2 table_name in ('INVOICE','ACCOUNT','ACCOUNT_HISTORY') order by 4;
    INDEX_OWNER INDEX_NAME COLUMN_NAME TABLE_NAME
    OPS$SVM_SRV4 P_ACCOUNT ACCOUNT_ID ACCOUNT
    OPS$SVM_SRV4 U_ACCOUNT_NAME ACCOUNT_NAME ACCOUNT
    OPS$SVM_SRV4 U_ACCOUNT CUSTOMER_NODE_ID ACCOUNT
    OPS$SVM_SRV4 U_ACCOUNT ACCOUNT_TYPE_ID ACCOUNT
    OPS$SVM_SRV4 I_ACCOUNT_ACCOUNT_TYPE ACCOUNT_TYPE_ID ACCOUNT
    OPS$SVM_SRV4 I_ACCOUNT_INVOICE INVOICE_ID ACCOUNT
    OPS$SVM_SRV4 I_ACCOUNT_PREVIOUS_INVOICE PREVIOUS_INVOICE_ID ACCOUNT
    OPS$SVM_SRV4 U_ACCOUNT_NAME_ID ACCOUNT_NAME ACCOUNT
    OPS$SVM_SRV4 U_ACCOUNT_NAME_ID ACCOUNT_ID ACCOUNT
    OPS$SVM_SRV4 I_LAST_MODIFIED_ACCOUNT LAST_MODIFIED ACCOUNT
    OPS$SVM_SRV4 I_ACCOUNT_INVOICE_ACCOUNT INVOICE_ACCOUNT_ID ACCOUNT
    OPS$SVM_SRV4 I_ACCOUNT_HISTORY_ACCOUNT ACCOUNT_ID ACCOUNT_HISTORY
    OPS$SVM_SRV4 I_ACCOUNT_HISTORY_ACCOUNT SEQNR ACCOUNT_HISTORY
    OPS$SVM_SRV4 I_ACCOUNT_HISTORY_INVOICE INVOICE_ID ACCOUNT_HISTORY
    OPS$SVM_SRV4 I_ACCOUNT_HISTORY_ADINV INVOICE_ID ACCOUNT_HISTORY
    OPS$SVM_SRV4 I_ACCOUNT_HISTORY_CIA CURRENT_BALANCE ACCOUNT_HISTORY
    OPS$SVM_SRV4 I_ACCOUNT_HISTORY_CIA INVOICE_ID ACCOUNT_HISTORY
    OPS$SVM_SRV4 I_ACCOUNT_HISTORY_CIA ADJUSTMENT_ID ACCOUNT_HISTORY
    OPS$SVM_SRV4 I_ACCOUNT_HISTORY_CIA ACCOUNT_ID ACCOUNT_HISTORY
    OPS$SVM_SRV4 I_ACCOUNT_HISTORY_LMOD LAST_MODIFIED ACCOUNT_HISTORY
    OPS$SVM_SRV4 I_ACCOUNT_HISTORY_ADINV ADJUSTMENT_ID ACCOUNT_HISTORY
    OPS$SVM_SRV4 I_ACCOUNT_HISTORY_PAYMENT PAYMENT_ID ACCOUNT_HISTORY
    OPS$SVM_SRV4 I_ACCOUNT_HISTORY_ADJUSTMENT ADJUSTMENT_ID ACCOUNT_HISTORY
    OPS$SVM_SRV4 I_ACCOUNT_HISTORY_APPLIED_DT APPLIED_DATE ACCOUNT_HISTORY
    OPS$SVM_SRV4 P_INVOICE INVOICE_ID INVOICE
    OPS$SVM_SRV4 U_INVOICE CUSTOMER_INVOICE_STR INVOICE
    OPS$SVM_SRV4 I_LAST_MODIFIED_INVOICE LAST_MODIFIED INVOICE
    OPS$SVM_SRV4 U_INVOICE_ACCOUNT ACCOUNT_ID INVOICE
    OPS$SVM_SRV4 U_INVOICE_ACCOUNT BILL_RUN_ID INVOICE
    OPS$SVM_SRV4 I_INVOICE_BILL_RUN BILL_RUN_ID INVOICE
    OPS$SVM_SRV4 I_INVOICE_INVOICE_TYPE INVOICE_TYPE_ID INVOICE
    OPS$SVM_SRV4 I_INVOICE_CUSTOMER_NODE CUSTOMER_NODE_ID INVOICE
    32 rows selected.
    Regards,
    Bathula
    Oracle-DBA

    I have some suggestions. But first, you realize that you have some redundant indexes, right? You have an index on account(account_name) and also account(account_name, account_id), and also account_history(invoice_id) and account_history(invoice_id, adjustment_id). No matter, I will suggest some new composite indexes.
    Also, you do not need two lines for these conditions:
    and round(a.account_balance, 2) > 0
    AND a.account_balance > 0
    You can just use: and a.account_balance >= 0.005
    So the formatted query isselect a.account_id,
           round(a.account_balance, 2) account_balance,
           nvl(ah.invoice_id, ah.adjustment_id) transaction_id,
           to_char(ah.effective_start_date, 'DD-MON-YYYY') transaction_date,
           to_char(nvl(i.payment_due_date, to_date('30-12-9999', 'dd-mm-yyyy')),
                   'DD-MON-YYYY') due_date,
           ah.current_balance - ah.previous_balance amount,
           decode(ah.invoice_id, null, 'A', 'I') transaction_type
      from account a, account_history ah, invoice i
    where a.account_id = ah.account_id
       and a.account_type_id = 1000002
       and (ah.invoice_id is not null or ah.adjustment_id is not null)
       and ah.CURRENT_BALANCE > ah.previous_balance
       and ah.invoice_id = i.invoice_id(+)
       AND a.account_balance >= .005
    order by a.account_id, ah.effective_start_date desc;You will probably want to select:
    1. From ACCOUNT first (your smaller table), for which you supply a literal on account_type_id. That should limit the accounts retrieved from ACCOUNT_HISTORY
    2. From ACCOUNT_HISTORY. We want to limit the records as much as possible on this table because of the outer join.
    3. INVOICE we want to access last because it seems to be least restricted, it is the biggest, and it has the outer join condition so it will manufacture rows to match as many rows as come back from account_history.
    Try the query above after creating the following composite indexes. The order of the columns is important:create index account_composite_i on account(account_type_id, account_balance, account_id);
    create index acct_history_comp_i on account_history(account_id, invoice_id, adjustment_id, current_balance, previous_balance, effective_start_date);
    create index invoice_composite_i on invoice(invoice_id, payment_due_date);All the columns used in the where clause will be indexed, in a logical order suited to the needs of the query. Plus each selected column is indexed as well so that we should not need to touch the tables at all to satisfy the query.
    Try the query after creating these indexes.
    A final suggestion is to try larger sort and hash area sizes and a manual workarea policy.alter session set workarea_size_policy = manual;
    alter session set sort_area_size = 2147483647;
    alter session set hash_area_size = 2147483647;

  • A simple query in My SQL what is the similer query for that in Oracle ???

    hello friends
    In My Sql if i have 1000 records in a table and i want to get the records from 400 to 550 then it is posible by giving the following query
    Select * from Table a , table b where condition "List 400,550" gives the records from 400 to 550
    what is the coresponding query for this in oracle database
    any one help me pls
    mail me to [email protected]

    Genericly, if you want records N through M from a SELECT statement, there's a wonderful article on asktom.oracle.com
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:127412348064
    Justin

  • What are the parameters for DB2 / JDBC Connetivity?

    I have insert IDoc data from SAP > XI > DB2.
    What are the connection parameters for the Reeiver JDBC channel to connect from XI to a DB2 database?
    Regards,
    Bhaskar

    Hey
    please have a look at the following thread
    JDBC connection to DB2 Database
    also please search SDN for DB2 drivers,there is lots of material for it
    thanx
    Aamir

  • What is the "Extract" button at the bottom the DNG converter dialog box for ?

    Does anyone know ....
    What is the "Extract" button at the bottom the DNG converter dialog box for ?
    THANK YOU

    In DNG Converter you have an option to embed the original RAW files (CR2, NEF etc) into the DNG file (see screenshot). Later you might want to extract them back, for example, for converting in camera-maker's own software.
    So, if you have any DNGs with original RAWs embedded, Extract button will get them back.

Maybe you are looking for