Agg tables with non-Sum aggregation type

Situation: We have a fact called Ending Cash Balance that is non-additive across time. Each month, it shows the cash on hand at the end of the month. So our aggregation method is "Last" for the Time dimension (i.e. the value for Q1 = March, value for year = Dec), and "Sum" for all Other dimensions.
Using the Aggregation Wizard, we've built an agg table that contains the correct values for Ending Cash Balance (abbrev. ECB), rolled up along all levels properly.
However, our Answers query will NOT use that agg table when querying ECB. In fact, our logical table contains ECB (non-additive along Time) and Capital Spending (additive along time, so the agg method is Sum). When we query Capital Spending by month, the query hits the agg table. When we query ECB by month, the query refuses to hit the agg table. The only difference between the two fact columns is the aggregation method along the Time dimension.
The agg table is perfectly good, but the query will not use it for the fact that has a "non-sum" aggregation method. Any ideas?

Mark, OBIEE repositories from ver 10.1.3.x allows for an flag "Data is Dense" to be set up in the aggregation tab of the measure (fact) in question. Please check if this allows you to get the last along time calculation to occur based on results taken from Aggregate table instead of base level fact table. Read up help on this option also.
With this option turned on, I expect measure to get aggregated as follows:
Base level Fact: Day level
Aggregate Table: Month level (say)
Query at Month level => should fetch results from Agg table (sum along other dimensions as reqd)
Query at Quarter level => should fetch results from Agg table (sum along all other dimensions except time as reqd) and choose the last month of Quarter for showing value at Quarter level.
Also experiment with using Aggregation method in Answers (not rpd) as "Server (default)" if using in pivot. Sometimes the results are correct from db to rpd (mid tier) but the front end aggregation spoils the report.
HTH
Shankar

Similar Messages

  • Transfer an internal table with non char data type to an application server

    Here is a part of my code. lv_string variable was type string initially but i got an error Not mutually convertible in a Unicode Program. I changed it to type ty_afko. Now the program works but the data it puts out has just a bunch of  #####. I cannot make all value in the internal table type char because then my select statement is giving errors..  Please help...
    Type: BEGIN OF ty_afko,
           rsnum LIKE afko-rsnum,          " Number of reservation
           aprio LIKE afko-aprio,          " Order Priority
           maufnr LIKE afko-maufnr,          " Number of superior order
           lead_aufnr LIKE afko-lead_aufnr,     " Leading order in current processing
         END OF ty_afko.
    data: gt_afko         TYPE STANDARD TABLE OF ty_afko INITIAL SIZE 0,
          wa_afko         TYPE ty_afko,
    select  rsnum aprio maufnr lead_aufnr
    from afko into table gt_afko.
    IF gv_error = 'X'.
      EXIT.
    ELSE.
    <b>DATA: Lv_string type ty_afko.</b>
      loop at gt_afko into wa_afko.
        clear lv_string.
    <b>  move wa_afko to lv_string.</b>
        perform f_transfer_dataset using gc_f_afko lv_string changing gv_error.
      endloop.
    endif.
    FORM f_transfer_dataset USING         p_file
                                          p_data
                            CHANGING      p_error TYPE c.
      Data: lv_file(25) type c.
      CONCATENATE gc_path p_file INTO lv_file.
      TRANSFER p_data TO lv_file.
    ENDFORM.                    "F_TRANSFER_DATASET

    The key is to create another empty structure with fields of type c.
    TYPES:       BEGIN OF ty_resb,
                bdter TYPE RESB-BDTER,     " This field is type d
                bdmng type resb-bdmng,  " This field is type p with 3 decimals - total 14
              END OF ty_resb,
              BEGIN OF ty_resbstr,     " This structure is the same as above but the field types will be char.
               bdter(10),            
               bdmng(14),                
              END OF ty_resbstr.
    DATA:     gt_resb         TYPE STANDARD TABLE OF ty_resb,
              wa_resb         TYPE ty_resb,
           structure type  ty_resbstr. " Empty fields with the same structure as the work area.
    SELECT   bdter bdmng  FROM resb INTO corresponding fields of TABLE gt_resb.
          open dataset pfile for output in text mode encoding default.
          loop at gt_resb into wa_resb.
              clear gv_string.
            move-corresponding wa_resb to gv_string.
             perform f_transfer_dataset using gc_f_resb gv_string.     
            endloop.
         FORM f_transfer_dataset USING p_file p_data.         
           TRANSFER p_data TO lv_file.     
         ENDFORM.

  • Trigger to update field on a table with the sum of fields on another table

    My experience creating triggers and pl/sql in general can best be described in oracle terms as null. I've been practicing by creating tables and applications on my personal home server to help me with some of my work related tasks. Right now I'm trying to create a trigger that will, after insert, update, delete on the assignment_time_track table update the time_spent field on the assignments table with the sum of the time_spent fields on the assignment_time_track table. Hopefully that run on sentence there is clear to people other than myself. I've attempted to script this on my own using the trigger creation tool for Oracle Database Express Edition but I get the following error:
    Trigger create was not successful for the following reason:
    ORA-06552: PL/SQL: Compilation unit analysis terminated ORA-06553: PLS-320: the declaration of the type of this expression is incomplete or malformed
    Here is my attempt at creating the trigger on my own.
    create or replace trigger "ASSIGNMENT_TIME_TRACK_T1"
    AFTER
    insert or update or delete on "ASSIGNMENT_TIME_TRACK"
    for each row
    begin
    update assignments
    set time_spent = (select sum(time_spent)
    from assignment_time_track
    where assignment_time_track.name = assignments.name);
    end;
    If what I've posted isn't clear or more detail is needed, let me know and I'll respond with a complete description of both tables and my goals for each table. Thanks in advance for any help. I will also gladly accept links to tutorials or lessons that explain how to do this sort of thing.
    Edited by: bobonthenet on Mar 9, 2009 2:01 PM

    Hi,
    If the assignments table has only one row per assignment, why is the primary key the combination of name and time_spent? If you have two two assignments called "Lab Report", isn't it possible that you would spend the same amount of time on each of them? I suggest using a sequence to assign an arbitrary id number to each assignment, and use that as the primary key.
    What does each row in assuignment_time_track represent? It sounds like it is a chunk of time spent on one assignment (that is, you want to know that you spent 90 minutes on Tudesday morning working on some assignment, and that you spent another 30 minutes on Tuesday afternoon working on the same assignment). If so, then there should be a foreign key constraint in assignment_time_track referencing the primary key of assignemnt, and not the other way around.
    Alex is right; you can get the total time spent on each project in a query or view; there is no need to replicate that data.
    If you're new to Oracle and SQL, you should invest your time in getting more experience with the basics: everyday things like queries (using joins and GROUP BY) and views, and not spend much time on things that aren't used that much, like triggers.
    If you really did have to copy the data, then you could have a trigger on assignemnt_time_track that kept the total in assignment up to date, like this:
    UPDATE  assignment
    SET     total_time_spent = total_time_spent
                    + NVL (:NEW.time_spent, 0)
                             - NVL (:OLD.time_spent, 0);I suggest you name the column in assignment something different than the column in assignment_time_track, to reduce the risk of confusion. Also, since they represent different things, the same name can't be the most descripttive for each of them.
    In case you're wondering about the use of NVL, above: It allows the same statement to take care of the situation when you INSERT, UPDATE or DELETE a row in assignment_time_track. That is, if you UPDATE a row in assignment_time_track, and change the time_spent from 60 to 90, then you want to add the new time (90) and subtract the old time (60) fro the total_time_spent in assignment: that is, total_time_spent would increase by 30. If you INSERT a new row into assignment_time_track with time_spent=30, you just need to add the new time_spent (30): there is nothing to subtract. But rather than write an IF statement and a second UPDATE for that situation, you can just rely on hte fact that all :OLD values are NULL iwhen INSERTing, and treat that NULL as a 0. Likewise, when DELETing, all :NEW values are NULL..

  • Upload text file to oracle table with checking and aggregation

    Hi Friends,
    I am new to ODI.  I have encountered a problem which is specific to ODI 11G (11.1.1.6.3) to upload text file to oracle table with checking and aggregation.  Would you please teach me how to implement the following requirement in ODI 11G?
    Input text file a:
    staffCode, staffCat, status, data
    input text file b:
    staffCodeStart, staffCodeEnd, staffCat
    temp output oracle table c:
    staffCat, data
    output oracle table d:
    staffCat, data
    order:
    a.staffCode, a.staffCat, a.status
    filter:
    a.status = ‘active’
    join:
    a left outerjoin b on a.staffCode between b.staffCodeStart and b.staffCodeEnd
    insert temp table c:
    c.staffCat = if b.staffCat is not null then b.staffCat else a.staffCat
    c.data = a.data
    insert table d:
    if c.staffCat between 99 and 1000 then d.staffCat = c.staffCat, d.data = sum(c.data)
    else d.staffCat = c.staffCat, d.data = LAST(c.data)
    Any help on fixing this is highly appreciated. Thanks!!
    Thanks,
    Chris

    Dear Santy,
    Many thanks for your prompt reply.  May I have more information about the LAST or SUM step?
    I was successful to create and run the following interfaces p and q
    1. Drag text file a to a newly created interface panel p
    2. Filter text file a : a.status = ‘active’
    3. Lookup text file a to text file b : a.staffCode between b.staffCodeStart and b.staffCodeEnd
    4. Drag oracle temp table c to interface panel p
    5. Set c.staffCat : CASE WHEN b.staffCat IS NULL THEN a.staffCat ELSE b.staffCat END
    6. Set c.data : a.data
    7. Drag oracle temp table c to a newly created interface panel q
    8. Drag oracle table d to interface panel q
    9. Set UK to d.staffCat
    10. Set Distinct Rows to table d
    11. Set d.staffCat = c.staffCat
    12. Set d.data = SUM(c.data)
    However, the interface q should be more than that:
    If c.staffCat is between 99 and 1000, then d.data = the last record c.data; else d.data = sum(c.data)
    Would you please teach me how to do the LAST or SUM steps?  Moreover, can interface p and interface q be combined to one interface and do not use the temp table c?  Millions thanks!
    Regards,
    Chris

  • Modelling 2 Fact Tables with Non-Conforming Dimension in OBIEE 11g

    Hi all,
    I have two fact tables (Fact 1 and Fact 2) and two dimension tables (Product and Rule). The Product dimension table is a conforming dimension and is used in both fact tables, but the Rule dimension is a non-conforming dimension which is used only one fact table. I'm using OBIEE 11g (11.1.1.6.0).
    ====
    Fact 1
    ====
    Sales ID | Product ID | Quantity | Sales Description | Sales Status
    S001 | P001 | 100 | bla bla bla bla bla | N
    S001 | P002 | 200 | bla bla bla bla bla | N
    S002 | P001 | 200 | lab lab lab lab lab | Y
    S002 | P003 | 250 | lab lab lab lab lab | Y
    Notes for Fact 1:
    - One Sales ID can have multiple Product IDs
    - Sales Description and Sales Status are the same for one Sales ID (repeating Sales Description and Sales Status for the same Sales ID)
    ====
    Fact 2
    ====
    Sales ID | Product ID | Rule ID | Score
    S001 | P001 | R001 | 2
    S001 | P001 | R002 | 3
    S001 | P002 | R003 | 1
    S002 | P001 | R003 | 1
    S002 | P003 | R002 | 2
    S002 | P003 | R004 | 5
    Notes for Fact 2:
    - One combination of Sales ID and Product ID can have multiple Rule ID
    I'm wondering how best to model these tables so that I can create this report (number of the dimension and fact tables created in the business model, level mapping, aggregation rule, etc)? Any suggestion/advice on how to achieve this?
    Sales ID | Product ID | Quantity | Sales Description | Sales Status | Rule ID | Score
    S001 | P001 | 100 | bla bla bla bla bla | N | R001 | 2
    S001 | P001 | 100 | bla bla bla bla bla | N | R002 | 3
    S001 | P002 | 200 | bla bla bla bla bla | N | R003 | 1
    S002 | P001 | 200 | lab lab lab lab lab | Y | R003 | 1
    S002 | P003 | 250 | lab lab lab lab lab | Y | R002 | 2
    S002 | P003 | 250 | lab lab lab lab lab | Y | R004 | 5
    Thank you very much!

    Hi Dhar, thanks for the suggestions.
    I tested what you suggested, but the result is not as per my expectation mentioned above. Here's what I did:
    1. In physical layer:
    - I joined Fact 1 table with Product dimension table only
    - I joined Fact 2 table with Product and Rule dimension tables
    2. In business model layer:
    - I created 3 logical tables: Fact, Product, and Rule
    - The Product table contains the Product ID and Product Name from the Product dimension table in the physical layer
    - I created the hierarchy (logical dimension) for Product with only ProductTotal level (as the grand total level) and ProductDetail level that contains Product ID and Product Name
    - The Rule table contains the Rule ID and Rule Name from the Rule dimension table in the physical layer
    - I created the hierarchy (logical dimension) for Rule with only RuleTotal level (as the grand total level) and RuleDetail level that contains Rule ID and Rule Name
    - The Fact table contains 2 logical tables sources: Fact 1 (which logical level in the Content tab is mapped to ProductDetail and RuleTotal) and Fact 2 (which logical level in the Content tab is mapped to ProductDetail and RuleDetail)
    - The Fact table contains Sales ID logical column (mapped to both Fact 1 and Fact 2 logical table sources)
    - The Fact table also contains Sales Description and Sales Status logical columns (mapped to only Fact 1), which aggregation rule is the default to None
    - The Fact table also contains Quantity logical column (mapped to only Fact 1), which aggregation rule is set to Sum
    - The Fact table also contains Score logical column (mapped to only Fact 2), which aggregation rule is set to Sum
    OBIEE returns the expected result when I retrieve the report:
    Sales ID | Product ID | Quantity | Sales Description | Sales Status
    However, OBIEE returns an error when I retrieve the reports:
    Sales ID | Product ID | Quantity | Sales Description | Sales Status | Rule ID
    or
    Sales ID | Product ID | Quantity | Sales Description | Sales Status | Rule ID | Score
    The error is:
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 14020] None of the fact tables are compatible with the query request FACT.SALES_STATUS. (HY000)
    And the Score column is blank when I retrieved this report:
    Sales ID | Product ID | Quantity | Sales Description | Sales Status | Score
    Any suggestion anyone? Please help. Thanks a lot!
    Edited by: stewartlife on Nov 29, 2012 4:01 PM

  • Problem with DII client for Doc/Literal with non built-in type in WL8.1 Sp2

    Hello,
    I have been trying to make this DII client for doc/literal using non built-in type to work for 2 days now.
    Any help/input will be greatly appreciated. I have added the code and wsdl below.
    BTW this is using the code first approach.
    Works perfectly fine with the clientgen generated stubs. But not with DII.
    With the stubs, following is the SOAP envelope.
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <env:Header/>
    <env:Body>
    <n1:getType xmlns:n1="http://www.aeb.com/wlws">
         <n2:id xmlns:n2="java:com.aeb.types">XYS</n2:id>
         <n3:name xmlns:n3="java:com.aeb.types">Name</n3:name>
    </n1:getType>
    </env:Body>
    </env:Envelope>
    With DII (using the serializer/deserializer generated by clientgen),
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <env:Header/>
    <env:Body>
    <n1:TestType xmlns:n1="java:com.aeb.types">
         <n1:id>ABC</n1:id>
         <n1:name>Some Name</n1:name>
    </n1:TestType>
    </env:Body></env:Envelope>
    Exception
    javax.xml.rpc.soap.SOAPFaultException: Unable to find a matching Operation for this remote invocation
    <n1:TestType xmlns:n1="java:com.aeb.types">
    <n1:id>ABC</n1:id>
    <n1:name>Some Name</n1:name>
    </n1:TestType>.
         Please check your operation name.
         at weblogic.webservice.core.ClientDispatcher.receive(ClientDispatcher.java:313)
         at weblogic.webservice.core.ClientDispatcher.dispatch(ClientDispatcher.java:144)
         at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:457)
         at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:443)
         at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:558)
         at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:411)
         at com.amgen.webservice.clients.DocClient.callService(DocClient.java:83)
         at com.amgen.webservice.clients.DocClient.main(DocClient.java:35)
    Client
    System.setProperty("javax.xml.rpc.ServiceFactory","weblogic.webservice.core.rpc.ServiceFactoryImpl");
    System.setProperty("weblogic.webservice.verbose", "true");
    String targetNamespace = "http://www.aeb.com/wlws";
    ServiceFactory factory = ServiceFactory.newInstance();
    QName serviceName = new QName(targetNamespace, "DocWebservice");
    QName portName = new QName(targetNamespace, "DocWebservicePort");
    QName operationName = new QName(targetNamespace, "getType");
    Service service = factory.createService(serviceName);
    TypeMappingRegistry registry = service.getTypeMappingRegistry();
    TypeMapping mapping = registry.getTypeMapping(SOAPConstants.URI_NS_SOAP_ENCODING);
    mapping.register(TestType.class, new QName("java:com.aeb.types","TestType"), new TestTypeCodec(), new TestTypeCodec());
    Call call = service.createCall();
    call.setOperationName(operationName);
    call.setPortTypeName(portName);
    call.setProperty(Call.SOAPACTION_USE_PROPERTY, new Boolean(true));
    call.setProperty(Call.SOAPACTION_URI_PROPERTY, "");
    call.setProperty(Call.OPERATION_STYLE_PROPERTY, "document");
    call.addParameter("testType", new QName("java:com.aeb.types","TestType"), TestType.class, ParameterMode.IN);
    call.setReturnType(new QName("java:com.aeb.types", "TestType"),TestType.class);
    call.setTargetEndpointAddress("http://localhost:7001/wlws/DocWebservice");
    TestType type = new TestType();
    type.setId("ABC");
    type.setName("Some Name");
    TestType res = (TestType) call.invoke(new Object[] { type });
    System.out.println(res.getName());
    TestType.java
    package com.aeb.types;
    import java.io.Serializable;
    public class TestType implements Serializable {
         private String id;
         private String name;
         public String getId() {
              return id;
         public void setId(String id) {
              this.id = id;
         public String getName() {
              return name;
         public void setName(String name) {
              this.name = name;
    DocWebservice.java
    package com.aeb.webservices;
    import com.aeb.types.TestType;
    public class DocWebservice {
         public TestType getType(TestType type) {
              System.out.println("In Server....");
              System.out.println("Received : " + type.getName());
              return type;
    ServiceGen Ant Task
    <servicegen destear="${dist.dir}/wlws.ear" contexturi="wlws">
         <service javaClassComponents="com.aeb.webservices.DocWebservice"
              generateTypes="True"
              targetNamespace="http://www.aeb.com/wlws"
              serviceName="DocWebservice"
              serviceURI="/DocWebservice"
              style="document">
              <client packageName="com.aeb.ws.doc.client" />
         </service>
    </servicegen>
    WSDL
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions xmlns:tns="http://www.aeb.com/wlws" xmlns:wsr="http://www.openuri.org/2002/10/soap/reliability/"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:soap12enc="http://www.w3.org/2003/05/soap-encoding" xmlns:conv="http://www.openuri.org/2002/04/wsdl/conversation/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema"
    xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://www.aeb.com/wlws">
    <types xmlns:tns="http://www.aeb.com/wlws"
    xmlns:wsr="http://www.openuri.org/2002/10/soap/reliability/"
    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:soap12enc="http://www.w3.org/2003/05/soap-encoding"
    xmlns:conv="http://www.openuri.org/2002/04/wsdl/conversation/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:s="http://www.w3.org/2001/XMLSchema"
    xmlns="http://schemas.xmlsoap.org/wsdl/">
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:stns="http://www.aeb.com/wlws"
    xmlns:tp="java:com.aeb.types"
    elementFormDefault="qualified"
    attributeFormDefault="qualified"
    targetNamespace="http://www.aeb.com/wlws">
    <xsd:import namespace="java:com.aeb.types">
    </xsd:import>
    <xsd:element xmlns:tp="java:com.aeb.types"
    type="tp:TestType"
    name="getType"
    nillable="true">
    </xsd:element>
    <xsd:element xmlns:tp="java:com.aeb.types"
    type="tp:TestType"
    name="getTypeResponse"
    nillable="true">
    </xsd:element>
    </xsd:schema>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:stns="java:com.aeb.types"
    elementFormDefault="qualified"
    attributeFormDefault="qualified"
    targetNamespace="java:com.aeb.types">
    <xsd:complexType name="TestType">
    <xsd:sequence>
    <xsd:element type="xsd:string"
    name="id"
    minOccurs="1"
    maxOccurs="1"
    nillable="true">
    </xsd:element>
    <xsd:element type="xsd:string"
    name="name"
    minOccurs="1"
    maxOccurs="1"
    nillable="true">
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>
    </types>
    <message name="getType">
    <part xmlns:partns="http://www.aeb.com/wlws"
    name="testType"
    element="partns:getType">
    </part>
    </message>
    <message name="getTypeResponse">
    <part xmlns:partns="http://www.aeb.com/wlws"
    name="result"
    element="partns:getTypeResponse">
    </part>
    </message>
    <portType name="DocWebservicePort">
    <operation name="getType">
    <input message="tns:getType">
    </input>
    <output message="tns:getTypeResponse">
    </output>
    </operation>
    </portType>
    <binding type="tns:DocWebservicePort"
    name="DocWebservicePort">
    <soap:binding style="document"
    transport="http://schemas.xmlsoap.org/soap/http">
    </soap:binding>
    <operation name="getType">
    <soap:operation style="document"
    soapAction="">
    </soap:operation>
    <wsr:reliability persistDuration="60000">
    </wsr:reliability>
    <input>
    <soap:body namespace="http://www.aeb.com/wlws"
    use="literal">
    </soap:body>
    </input>
    <output>
    <soap:body namespace="http://www.aeb.com/wlws"
    use="literal">
    </soap:body>
    </output>
    </operation>
    </binding>
    <service name="DocWebservice">
    <port name="DocWebservicePort"
    binding="tns:DocWebservicePort">
    <soap:address location="http://localhost:7001/wlws/DocWebservice">
    </soap:address>
    </port>
    </service>
    </definitions>
    Thanks
    Aspert

    Hello,
    I have been trying to make this DII client for doc/literal using non built-in type to work for 2 days now.
    Any help/input will be greatly appreciated. I have added the code and wsdl below.
    BTW this is using the code first approach.
    Works perfectly fine with the clientgen generated stubs. But not with DII.
    With the stubs, following is the SOAP envelope.
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <env:Header/>
    <env:Body>
    <n1:getType xmlns:n1="http://www.aeb.com/wlws">
         <n2:id xmlns:n2="java:com.aeb.types">XYS</n2:id>
         <n3:name xmlns:n3="java:com.aeb.types">Name</n3:name>
    </n1:getType>
    </env:Body>
    </env:Envelope>
    With DII (using the serializer/deserializer generated by clientgen),
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <env:Header/>
    <env:Body>
    <n1:TestType xmlns:n1="java:com.aeb.types">
         <n1:id>ABC</n1:id>
         <n1:name>Some Name</n1:name>
    </n1:TestType>
    </env:Body></env:Envelope>
    Exception
    javax.xml.rpc.soap.SOAPFaultException: Unable to find a matching Operation for this remote invocation
    <n1:TestType xmlns:n1="java:com.aeb.types">
    <n1:id>ABC</n1:id>
    <n1:name>Some Name</n1:name>
    </n1:TestType>.
         Please check your operation name.
         at weblogic.webservice.core.ClientDispatcher.receive(ClientDispatcher.java:313)
         at weblogic.webservice.core.ClientDispatcher.dispatch(ClientDispatcher.java:144)
         at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:457)
         at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:443)
         at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:558)
         at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:411)
         at com.amgen.webservice.clients.DocClient.callService(DocClient.java:83)
         at com.amgen.webservice.clients.DocClient.main(DocClient.java:35)
    Client
    System.setProperty("javax.xml.rpc.ServiceFactory","weblogic.webservice.core.rpc.ServiceFactoryImpl");
    System.setProperty("weblogic.webservice.verbose", "true");
    String targetNamespace = "http://www.aeb.com/wlws";
    ServiceFactory factory = ServiceFactory.newInstance();
    QName serviceName = new QName(targetNamespace, "DocWebservice");
    QName portName = new QName(targetNamespace, "DocWebservicePort");
    QName operationName = new QName(targetNamespace, "getType");
    Service service = factory.createService(serviceName);
    TypeMappingRegistry registry = service.getTypeMappingRegistry();
    TypeMapping mapping = registry.getTypeMapping(SOAPConstants.URI_NS_SOAP_ENCODING);
    mapping.register(TestType.class, new QName("java:com.aeb.types","TestType"), new TestTypeCodec(), new TestTypeCodec());
    Call call = service.createCall();
    call.setOperationName(operationName);
    call.setPortTypeName(portName);
    call.setProperty(Call.SOAPACTION_USE_PROPERTY, new Boolean(true));
    call.setProperty(Call.SOAPACTION_URI_PROPERTY, "");
    call.setProperty(Call.OPERATION_STYLE_PROPERTY, "document");
    call.addParameter("testType", new QName("java:com.aeb.types","TestType"), TestType.class, ParameterMode.IN);
    call.setReturnType(new QName("java:com.aeb.types", "TestType"),TestType.class);
    call.setTargetEndpointAddress("http://localhost:7001/wlws/DocWebservice");
    TestType type = new TestType();
    type.setId("ABC");
    type.setName("Some Name");
    TestType res = (TestType) call.invoke(new Object[] { type });
    System.out.println(res.getName());
    TestType.java
    package com.aeb.types;
    import java.io.Serializable;
    public class TestType implements Serializable {
         private String id;
         private String name;
         public String getId() {
              return id;
         public void setId(String id) {
              this.id = id;
         public String getName() {
              return name;
         public void setName(String name) {
              this.name = name;
    DocWebservice.java
    package com.aeb.webservices;
    import com.aeb.types.TestType;
    public class DocWebservice {
         public TestType getType(TestType type) {
              System.out.println("In Server....");
              System.out.println("Received : " + type.getName());
              return type;
    ServiceGen Ant Task
    <servicegen destear="${dist.dir}/wlws.ear" contexturi="wlws">
         <service javaClassComponents="com.aeb.webservices.DocWebservice"
              generateTypes="True"
              targetNamespace="http://www.aeb.com/wlws"
              serviceName="DocWebservice"
              serviceURI="/DocWebservice"
              style="document">
              <client packageName="com.aeb.ws.doc.client" />
         </service>
    </servicegen>
    WSDL
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions xmlns:tns="http://www.aeb.com/wlws" xmlns:wsr="http://www.openuri.org/2002/10/soap/reliability/"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:soap12enc="http://www.w3.org/2003/05/soap-encoding" xmlns:conv="http://www.openuri.org/2002/04/wsdl/conversation/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema"
    xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://www.aeb.com/wlws">
    <types xmlns:tns="http://www.aeb.com/wlws"
    xmlns:wsr="http://www.openuri.org/2002/10/soap/reliability/"
    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:soap12enc="http://www.w3.org/2003/05/soap-encoding"
    xmlns:conv="http://www.openuri.org/2002/04/wsdl/conversation/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:s="http://www.w3.org/2001/XMLSchema"
    xmlns="http://schemas.xmlsoap.org/wsdl/">
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:stns="http://www.aeb.com/wlws"
    xmlns:tp="java:com.aeb.types"
    elementFormDefault="qualified"
    attributeFormDefault="qualified"
    targetNamespace="http://www.aeb.com/wlws">
    <xsd:import namespace="java:com.aeb.types">
    </xsd:import>
    <xsd:element xmlns:tp="java:com.aeb.types"
    type="tp:TestType"
    name="getType"
    nillable="true">
    </xsd:element>
    <xsd:element xmlns:tp="java:com.aeb.types"
    type="tp:TestType"
    name="getTypeResponse"
    nillable="true">
    </xsd:element>
    </xsd:schema>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:stns="java:com.aeb.types"
    elementFormDefault="qualified"
    attributeFormDefault="qualified"
    targetNamespace="java:com.aeb.types">
    <xsd:complexType name="TestType">
    <xsd:sequence>
    <xsd:element type="xsd:string"
    name="id"
    minOccurs="1"
    maxOccurs="1"
    nillable="true">
    </xsd:element>
    <xsd:element type="xsd:string"
    name="name"
    minOccurs="1"
    maxOccurs="1"
    nillable="true">
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>
    </types>
    <message name="getType">
    <part xmlns:partns="http://www.aeb.com/wlws"
    name="testType"
    element="partns:getType">
    </part>
    </message>
    <message name="getTypeResponse">
    <part xmlns:partns="http://www.aeb.com/wlws"
    name="result"
    element="partns:getTypeResponse">
    </part>
    </message>
    <portType name="DocWebservicePort">
    <operation name="getType">
    <input message="tns:getType">
    </input>
    <output message="tns:getTypeResponse">
    </output>
    </operation>
    </portType>
    <binding type="tns:DocWebservicePort"
    name="DocWebservicePort">
    <soap:binding style="document"
    transport="http://schemas.xmlsoap.org/soap/http">
    </soap:binding>
    <operation name="getType">
    <soap:operation style="document"
    soapAction="">
    </soap:operation>
    <wsr:reliability persistDuration="60000">
    </wsr:reliability>
    <input>
    <soap:body namespace="http://www.aeb.com/wlws"
    use="literal">
    </soap:body>
    </input>
    <output>
    <soap:body namespace="http://www.aeb.com/wlws"
    use="literal">
    </soap:body>
    </output>
    </operation>
    </binding>
    <service name="DocWebservice">
    <port name="DocWebservicePort"
    binding="tns:DocWebservicePort">
    <soap:address location="http://localhost:7001/wlws/DocWebservice">
    </soap:address>
    </port>
    </service>
    </definitions>
    Thanks
    Aspert

  • Join rows from 2 tables with non-matching numeric intervals

    Hi,
    Could you please help me with the following:
    I have 2 tables - [Coal_Samples] and [Coal Type] Which I have pasted below. I want to create a single result set that matches as closley as possible [Coal Type].Coal_Type to the interval between [Coal_Samples].mfrom and [Coal_Samples].mto. I would have
    [Coal_Samples] as the primary table using a left outer join.
    The problem is that the intervals [Coal_Samples].mfrom do not match [Coal Type].mfrom and [Coal_Samples].mto does not match [Coal Type].mto. I want to match the [Coal_Samples] intervals ([Coal_Samples].mfrom-[Coal_Samples].mto) as closely as possible to
    the [Coal_Type].Coal_Type field.
    I have been able to acheive this in excel using a VLOOKUP statement - but I want to know how to do this with and SQL Script without duplicating the rows based in [Coal_Samples].mfrom-[Coal_Samples].mto interval. 
    COAL SAMPLES TABLE
    ID
    mFrom
    mTo
    SAMPLE NUMBER
    AD261
    57
    57.5
    SAMPLE_001
    AD261
    57.5
    58
    SAMPLE_002
    AD261
    58
    59
    SAMPLE_003
    AD261
    59
    60
    SAMPLE_004
    AD261
    60
    61
    SAMPLE_005
    AD261
    61
    62
    SAMPLE_006
    AD261
    62
    63
    SAMPLE_007
    AD261
    63
    64
    SAMPLE_008
    AD261
    64
    65
    SAMPLE_009
    AD261
    65
    66
    SAMPLE_010
    AD261
    66
    67
    SAMPLE_011
    AD261
    67
    68
    SAMPLE_012
    AD261
    68
    69
    SAMPLE_013
    AD261
    69
    70
    SAMPLE_014
    AD261
    70
    71
    SAMPLE_015
    AD261
    71
    72
    SAMPLE_016
    AD261
    72
    73
    SAMPLE_017
    AD261
    73
    74
    SAMPLE_018
    AD261
    74
    75
    SAMPLE_019
    AD261
    75
    76
    SAMPLE_020
    AD261
    76
    77
    SAMPLE_021
    AD261
    77
    78
    SAMPLE_022
    AD261
    78
    79
    SAMPLE_023
    COAL   TYPE TABLE
    ID
    Type_mFrom
    Type__mTo
    COAL TYPE
    AD261
    57
    68.6
    BROWN COAL
    AD261
    68.6
    75
    GREY COAL
    AD261
    75
    78.2
    BLACK COAL
    AD261
    78.2
    79.2
    BLACK COAL
    Example   RESULT SET
    ID
    mFrom
    mTo
    DOMINANT_COAL TYPE
    AD261
    57
    57.5
    BROWN COAL
    AD261
    57.5
    58
    BROWN COAL
    AD261
    58
    59
    BROWN COAL
    AD261
    59
    60
    BROWN COAL
    AD261
    60
    61
    BROWN COAL
    AD261
    61
    62
    BROWN COAL
    AD261
    62
    63
    BROWN COAL
    AD261
    63
    64
    BROWN COAL
    AD261
    64
    65
    BROWN COAL
    AD261
    65
    66
    BROWN COAL
    AD261
    66
    67
    BROWN COAL
    AD261
    67
    68
    BROWN COAL
    AD261
    68
    69
    BROWN COAL
    AD261
    69
    70
    GREY COAL
    AD261
    70
    71
    GREY COAL
    AD261
    71
    72
    GREY COAL
    AD261
    72
    73
    GREY COAL
    AD261
    73
    74
    GREY COAL
    AD261
    74
    75
    GREY COAL
    AD261
    75
    76
    BLACK COAL
    AD261
    75
    76
    BLACK COAL
    AD261
    76
    77
    BLACK COAL
    AD261
    77
    78
    BLACK COAL
    AD261
    78
    79
    BLACK COAL
    Can you please help with the logic of this query?
    Thanks very much.

    Well, here is the beginning of the solution:
    ;with cte as (select S.*, T.[Coal Type] as [Dominant_Coal],
    case when 
    T.m_from between S.m_from and S.m_to
    AND T.m_to between S.m_from and S.m_to then 0
    when T.m_from between S.m_from and S.m_to then t.m_from - S.m_from
    else S.m_to - T.m_to end as [Diff]
    from Coal_Samples S LEFT JOIN Coal_Type T
    ON T.m_from between S.m_from and S.m_to
    OR T.m_to between S.m_from and S.m_to),
    cte1 as (select *, row_number() over (partition by cte.ID order by Diff) as Rn
    from cte)
    select * from cte1 where Rn = 1 -- attempt to get best match
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog
    My TechNet articles

  • Building a table with a string data type

    I am using the Build Table function and I would like to be able to label my columns on the first iteration with a string data type, which doesn't seem to be an acceptable signal for the Build Table function. However, the express table is located under "text indicators" on the front panel, so it seems like there should be a way to do this..

    Ah, the "Build Table" Express VI. I hate Express VIs.
    That Express VI is nothing more than a really complicated way of creating a 2D array of strings. The Express VI has no inputs for the row and column headers, so you need to add them in yourself. The same would be true for a regular table control/indicator. Here's what you need to do:
    Right-click on the table indicator and select Visible Items -> Column Headers.
    Right-click on the table indicator and select Create -> Property Node -> Column Header Strings[]. LabVIEW will attach a property node to the cursor and switch to the block diagram. Plop down the property node on the block diagram.
    Right-click on the property node on the block diagram and select "Change All to Write".
    Right-click on the property node and select "Create -> Constant". This will give you an array of strings, and you can enter the column headers in each array element.
    Wire the array to the property node.
    Connect the property node to the Build Table Express VI using the error clusters.
    Message Edited by smercurio_fc on 07-02-2008 09:25 AM
    Attachments:
    Example_VI_BD6.png ‏3 KB

  • Opening of tables with non english names in Smart View

    Hi All,
    I can't open tables with russian names with Smart View. English named tables works fine, and Russian names opens in wrong encoding as a name of Excel worksheets like this - #1087;&#1086;&#1080;&#1089;. So no table opens. What's wrong and how to fix it?
    Thanks in advance,
    Mary

    Smart View Version is 11.1.2.5.000 (Build 111)
    Enterprise Performance Management Architect - 11.1.2.3.000.1954
    Financial Management - 11.1.2.3.100.4261

  • Check table with Plant and material type

    xperts,
    i m trying to find a check table with fields werks and mtart.

    Hi,
    NO ,its not possible to get from only one table...
    werks  -
    T001W
    mtart----
    t134.
    Regards,
    Rohan.

  • Passing internal table with a field of type string to & from BAPI

    Hello ABAP gurus,
    I have a simple BAPI which has to send back an internal table.
    Internal table structure is as follows
    DATA: BEGIN OF itab OCCURS 0,
            config_id(8),
            blobdata like zstring,
    END OF itab.
    where zstring is a string of variable length.
    When I try to activate the BAPI I get a message
    "itab" must be a flat structure. You cannot use internal tables, strings, references or structures as components.
    However, just for testing, I changed blobdata to type of char and I can successfully activate and use the BAPI.
    But, our requirement is to pass a string of variable length.
    How can I resolve this issue? I have searched sdn and other blogs but didn't help so far.
    Any feedback on this will be highly appreciated.
    Thanks
    Ram

    Hi Prasad ,
         Try this way :
    Acc to your requirement ,create a structure with a parameter and a string , create a table type for that structure .
    use that table type in the changing parameter as you need that bapi to accept and return a table .
    for the below example ,  ZTEST_05 is a structure , ZTT_TEST_05 is a table type of ZTEST_05 .
    ZTEST_05 has got 2 fields , one is a param of type char(8) and another is a string of type STRING .
    I created the below mentioned BAPI and I was able to activate it without any errors .
         FUNCTION ZTEST_BAPI_ITAB_01.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(BAPI_P1) TYPE  ZTEST_05
    *"  CHANGING
    *"     VALUE(BAPI_CP1) TYPE  ZTT_TEST_05
    ENDFUNCTION. 
    Revert if any issues .
    Regards,
    Ranjita

  • Repair / Subcontracting with non standard mov types.

    Dear friends,
    I have copied mov type 541 to 941 , 542 to 942 and 543 to 943.
    When I post trhu MB1B .. with mov.type 941 , and receive it via MIGO with mov type 101 the system is determining the mov type 543 and not the 943 as we do need.
    Does anyone knows if I got to change this behavior ?
    This scenario is to use the same functionality of Subcontracting to repair materials. Other Ideas ?
    best regards,
    Ale

    Hi,
    Please go to the transaction code- ' OPKA ' and in the 'Parts Provided' column of the table replace 543 with 943 movement type for the movement type 101.Save your data and try again the process.
    Please note that, the standard Sub-contracting procedure (541-101(543)) will be impacted with this change.
    Regards,
    Narayana.

  • Querying against two fact tables with non conformed dimension

    I have two fact tables and I have this set up in RPD :
    Fact1 joined to DimA and DimB
    Fact2 joined to DimA
    On Front end I build two analysis:
    Analysis 1:
    DimA.A, Fact1.1, Fact2.2
    Analysis 2 :
    DimA.A, DimB.B, Fact1.1, Fact2.2
    In the results of Analysis 1 , I am seeing correct values for Fact2.2
    In the results of Analysis 2, I am seeing Fact2.2 as empty column. I think the reason is that Fact2 is not joined to DIMB.
    Is it possible that I should be able to report against both dimension tables (DIMA and DIMB) columns for FACT1 and FACT2 measures.... Even though I don't have join between DIMB and FACT2.
    Any response would be helpful!!!
    Regards,
    Annu

    Hi,
    Go to the LTS-- Content Level of the fact which does not have join with Dimension and put Total level for that Dimension and total level on Column(Measure also)(Double click --Levels)(Assume Dim Hierarchy is  already set up)
    Pull everything(D1,D2,F1,F2) You will see results.
    Update Me
    Thanks
    NK
    Edited by: DNK on Mar 20, 2013 1:35 PM

  • Using nested tables with User Defıned Types.....

    Hi All,
    I defined TEST_1 User Defined Type where VALUE_PART field is a VARCHAR2 type.
    CREATE TYPE TEST_1 AS OBJECT (
                   x NUMBER,
                   y NUMBER,
         VALUE_PART VARCHAR2(50)
    This TEST_1 object type will be used as nested tables in the EMPLOYEE table where each attribute might require different bytes of VARCHAR2’s in the VALUE_PART field.
    CREATE TYPE NAME AS TABLE OF TEST_1;
    CREATE TYPE ADDRESS AS TABLE OF TEST_1;
    CREATE TYPE DEPARTMENT AS TABLE OF TEST_1;
    CREATE TABLE EMPLOYEE (
    SSN NUMBER,
    NAME TEST_1,
    ADDRESS TEST_1,
    DEPARTMENT TEST_1,
    SALARY NUMBER
    NESTED TABLE NAME STORE AS NAME_TABLE;
    NESTED TABLE ADDRESS STORE AS ADDRESS_TABLE;
    NESTED TABLE DEPARTMENT STORE AS DEPARTMENT_TABLE;
    Is it possible to specify VALUE_PART(50) in the TABLE OF statement?
    Is there any way to do that throught methods or some other ways that I may not be aware of?
    For Example:
    /*This should allocate 10 bytes of VARCHAR2. */
    CREATE TYPE NAME AS TABLE OF TEST_1(10);
    /* and 30 bytes of VARCHAR2. */
    CREATE TYPE ADDRESS AS TABLE OF TEST_1(30);
    /*and 10 bytes of VARCHAR2. */
    CREATE TYPE DEPARTMENT AS TABLE OF TEST_1(10);
    Any help is appreciated.
    Thanks a lot.

    Hi,
    We can not specify VALUE_PART(50) in the TABLE OF statement.
    Regards,
    Sailaja

  • Creating form based on table with non-sequence pk.

    How to you create a form based on a varchar2 column and not a sequenced assigned pk. So the pk would be entered at the time a new
    row is added. It would be entered just like the other fields from the form and not a sequence.
    How do you do this as when using the wizard it prompts you to select one of 3 ways to define the pk.
    Sequence, trigger or pl/sql code.
    If the answer is pl/sql code, what do I need to create in the code?

    If the primary key is created by the user themselves (which is not recommended, you should have another ID which the user sees which would be the varchar2 and keep the primary key as is, the user really shouldn't ever edit the primary key) then all you need to do is make sure that the table is not populated with a primary key in the wizard and then make sure that you cannot insert a null into your varchar primary key text field.
    IF you're doing it this way I would make a validation on the page which would run off a SQL Exists validation, something along the lines of
    SELECT <primary key column>
    FROM <your table>
    WHERE upper(<primary key column>) = upper(<text field containing user input>);
    and if it already exists, fire the validation claiming that it already exists and to come up with a new primary key.
    Like I said if you really should have a primary key which the database refers to each individual record itself and then have an almost pseudo-primary key that the user can use. For example in the table it would look like this:
    TABLE1
    table_id (this is the primary key which you should NOT change)
    user_table_id (this is the pretend primary key which the user can change)
    other_columns
    etc
    etc
    hope this helps in some way

Maybe you are looking for