OBIEE Query not hitting the other fact table

Hi All,
I am trying to create report based on two fact column and one dimension. Dimension is connected with these two facts table. When i create report using one column from dimension and one column from respective facts so i get two scenerio...
For example let say..
D1 is dimension and F1 and F2 are two fact tables.
First i used a column which have aggregation rule from one fact and one column from other fact which also have aggregate column.
That is report like...
D1.c1,Agg(F1.c2),Agg(F2.c3)
When i run the report I get the data from dimension and only from first fact table. When i check the query, Query contain only one fact table and it doesnt hit the other one.
Now in second scenerio i used one column from dimension, one column from first fact which have aggregation rule and one column from second fact which doesnt have any aggregation rule.
like...
D1.c1,Agg(F1.c2),F2.c3
When i run the report i got the error. It says
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 14026] Unable to navigate requested expression: F1 -C2 . Please fix the metadata consistency warnings. (HY000).
But there is no warning in RPD.
I am amazed that it is not taking both the fact columns even the dimension is confirmed dimension and have joined with both the fact tables.
As i am just started to learn OBIEE, So i am find it bit difficult that how OBIEE select the tables and formed physical query.
Waiting for your help.
Regards
Suhail

Aadi-Wasi,
Thumb rule, OBIEE BMM layer must contain a simple star schema.
Did your BMM layer suffice the above condition? If hope, Not.
My prediction of your BMM layer structure contains 3 logical tables, i.e. dimension & 2 logical facts...which is not a simple star.
Thus to make it a simple star collapse 2 logical fact tables into 1 logical fact table. As you mentioned dimension is linked to both facts, collapsing 2 logical fact tables into 1 logical fact table will provide the result for your query1.
regarding your second error:
All aggregations must be contained within Fact tables with few exceptions.
Let us know If I did resolve your issue
mark posts promptly...
J
-bifacts
http://www.obinotes.com

Similar Messages

  • Query not hitting the Aggregate

    HI Gurus,
    I have created a Aggregate on one info cube. now when i am executing a query which was created before the creation of aggregate then that query is hitting the Aggregate.
    But i created one more new query (after the creation of aggregate) on the same infoprovider.
    Now when i am checking that query is not hitting aggregate..
    I am checking through RSRT --> Execute and Debug --> Display Aggregate.
    Its quite strange for me...
    Please help..

    Hi,
    Thanks for your quick reply.
    Let me explain my problem clearly. I am aware of that when the Aggregate contain all the characteristics that are in the query only that Aggregate is used by the report while executing it. I have few cubes on which I have created Aggregates which includes all the characteristics which are used in all the reports. Now I have created a multi provider on these cubes and created a query on that multi provider. Now when I execute the query does it hit the Aggregate or not.
    For Example.
    I have cubes A, B and C. A contain 1,2,3 characteristics and B contains 1,4,5 and  contain 1,4,6,7. I have created Aggregates on these cubes. I have created the Multi Provider on these and executing the query. This query contain all these characteristics 1,2,3,4,5,6,7. when I run the query does it hit the any of the Aggregates.
    Regards
    Sankar.

  • SSRS,MDX- Passed parameters are not hitting the main query in Dataset

    I have created a SSRS report which has to accept two parameters i.e., store name, Date(to show sales on particular date) in report. which are working fine for me. but, those passed parameters are not hitting the main query in main Dataset. what ever i
    pass in parameters, it is displaying all the rows(every city values). i think i am not correct in creating the statement in  Main dataset query, to receive those 2 parameters into the main query. can anybody please help me how to create the statement
    in main date set to display the results for the exact parameter i am passing(which has to be in MDX).
    ram

    Hi ramprasad74,
    According to your description, you want to use parameter in the report, then after parameter values are selected, corresponding data will be displayed in the report. But the parameters do not work and all the rows are displayed.
    To pass parameter to main report dataset, we need to define parameter for MDX query and assign parameter name same as SSRS report parameter. For detail information, please refer to the following steps:
    Create a Dataset to retrieve data for Store name parameter.
    Create Store name parameter, type name and prompt, set Date type to Text, check Allow multiple values check box, then select get values from the dataset.
    Create a Dataset for Date parameter.
    Create Date parameter, type name and prompt, set Date type to Date/Time, then select get values from the dataset.
    Create a new dataset used to retrieve data for the report, add statement like below to the mdx query: {STRTOMEMBER(@Date)} * {STRTOSET (@Store_name)}.
    In Query Designer pane, click Query Parameters and assign parameter name same as SSRS report parameter.
    For more information about SSRS Report with Single and Multi Selection Parameter using MDX Query, please refer to the following blog:
    http://www.codeproject.com/Articles/799265/SSRS-Report-with-Single-and-Multi-Selection-Parame
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    If you have any feedback on our support, please click
    here.

  • Dimension which belongs to only one of the several fact tables

    Hi,
    I'm newbie in BI. I have good knowledge of DW and Administration (OCP).
    Firstly could you give me, please some link expalining aspects of creating "Business Model And Mapping" better than SE Tutoarial.
    Now how my problems looks like :
    I have several fact tables and dimensions.
    But not all dimensions are shared among all facts.
    So when i try to put in Answers measurements from all facts it's ok - results are retrieved.
    But when i try to add to report some Dimensions attributes which belongs to only one of the facts all facts measurements are gone except measurements for fact table to which dimension attribute is linked to.
    I think i know what is the reason but i don't know how to simply solve it :
    Below is session trace excerpt only with facts measurements :
    RqList
    Liczba Transakcji:[DAggr(Fakty - Transakcje (ZSFK).Liczba Transakcji by [ Słownik - Daty.Nr Miesiąca, Słownik - Daty.Miesiąc Rozliczenia, Słownik - Outlety.Outlet Numer (MID), Słownik - Outlety.Outlet Nazwa, Słownik - Terminale.Nr Terminala, Słownik - Daty.Rok Rozliczenia] )] as c7 GB,
    Kwota Opłaty Netto:[DAggr(Fakty - Opłaty za Terminale (CBD).Kwota Opłaty Netto by [ Słownik - Daty.Nr Miesiąca, Słownik - Daty.Miesiąc Rozliczenia, Słownik - Outlety.Outlet Numer (MID), Słownik - Outlety.Outlet Nazwa, Słownik - Terminale.Nr Terminala, Słownik - Daty.Rok Rozliczenia] )] as c11 GB,
    Below iis session trace excerpt with facts measurements and added dimension attribute:
    RqList
    Liczba Transakcji:[DAggr(Fakty - Transakcje (ZSFK).Liczba Transakcji by [ Słownik - Rodzaje Walut.KOD_WALUTY, Słownik - Daty.Nr Miesiąca, Słownik - Daty.Miesiąc Rozliczenia, Słownik - Outlety.Outlet Numer (MID), Słownik - Outlety.Outlet Nazwa, Słownik - Terminale.Nr Terminala, Słownik - Daty.Rok Rozliczenia] )] as c7 GB,
    Kwota Opłaty Netto:[DAggr(Fakty - Opłaty za Terminale (CBD).Kwota Opłaty Netto by [ Słownik - Rodzaje Walut.KOD_WALUTY, Słownik - Daty.Nr Miesiąca, Słownik - Daty.Miesiąc Rozliczenia, Słownik - Outlety.Outlet Numer (MID), Słownik - Outlety.Outlet Nazwa, Słownik - Terminale.Nr Terminala, Słownik - Daty.Rok Rozliczenia] )] as c12 GB,
    Second plan is the plan when report retrieves only results for one fact table and null's for others
    Problem is with attribute : "Słownik - Rodzaje Walut.KOD_WALUTY" which is from dimension which belongs only to one fact table.
    So other fact table are not linked to this dimension and therefore this plan cannot retrieve results for them.
    It is obvious that some of the facts cannot share some dimensions with others but i would like to join them on other common attribute
    and my question is how ?
    Thanks's in advance Arkadiusz Masny
    Edited by: Arkadiusz Masny on Dec 10, 2009 6:49 AM

    It's normal behavior. How would fact measure know the value for accurate "non-fact" dimension
    Workaround:
    First solution is:
    Add into logical source of each fact (in logical layer) tables to which belongs dimension attribute and join dimenstion to that fact.
    Second you may:
    Create fact table which join all needed dimensions with some useless fact ( i.e. count). Next you have to set option "Implicit Fact Column" in presentation catalog to use this fact table.
    I can explain it to you in Polish by mail or phone
    You bring me a next topic for my blog (in Polish) http://obiee.pl so I'll write sth about such behavior :)
    Regards

  • About the implicit fact table

    Hi all,
    Can any one has any idea about the implicit fact table, where it is used. Any doc or screenshot with example will be helpful for me.
    Thanks once again.

    I forgot the definition that you can find here :
    http://download.oracle.com/docs/cd/E12096_01/books/admintool/admintool_PresentationSetup4.html
    If you set an implicit fact column this column will be added to a query when it contains columns from two or more dimension tables and no measures. The column is not visible in the results. It is used to specify a default join path between dimension tables when there are several possible alternatives.
    Cheers
    Nico

  • Why is this query not using the index?

    check out this query:-
    SELECT CUST_PO_NUMBER, HEADER_ID, ORDER_TYPE, PO_DATE
    FROM TABLE1
    WHERE STATUS = 'N'
    and here's the explain plan:-
    1     
    2     -------------------------------------------------------------------------------------
    3     | Id | Operation | Name | Rows | Bytes | Cost (%CPU)|
    4     -------------------------------------------------------------------------------------
    5     | 0 | SELECT STATEMENT | | 2735K| 140M| 81036 (2)|
    6     |* 1 | TABLE ACCESS FULL| TABLE1 | 2735K| 140M| 81036 (2)|
    7     -------------------------------------------------------------------------------------
    8     
    9     Predicate Information (identified by operation id):
    10     ---------------------------------------------------
    11     
    12     1 - filter("STATUS"='N')
    There is already an index on this column, as is shown below:-
         INDEX_NAME INDEX_TYPE     UNIQUENESS     TABLE_NAME     COLUMN_NAME     COLUMN_POSITION
    1     TABLE1_IDX2 NORMAL     NONUNIQUE     TABLE1      STATUS     1
    2     TABLE1_IDX NORMAL     NONUNIQUE     TABLE1     HEADER_ID     1
    So why is this query not using the index on the 'STATUS' Column?
    I've already tried using optimizer hints and regathering the stats on the table, but the execution plan still remains the same, i.e. it still uses a FTS.
    I have tried this command also:-
    exec dbms_stats.gather_table_stats('GECS','GEPS_CS_SALES_ORDER_HEADER',method_opt=>'for all indexed columns size auto',cascade=>true,degree=>4);
    inspite of this, the query is still using a full table scan.
    The table has around 55 Lakh records, across 60 columns. And because of the FTS, the query is taking a long time to execute. How do i make it use the index?
    Please help.
    Edited by: user10047779 on Mar 16, 2010 6:55 AM

    If the cardinality is really as skewed as that, you may want to look at putting a histogram on the column (sounds like it would be in order, and that you don't have one).
    create table skewed_a_lot
    as
       select
          case when mod(level, 1000) = 0 then 'N' else 'Y' end as Flag,
          level as col1
       from dual connect by level <= 1000000;
    create index skewed_a_lot_i01 on skewed_a_lot (flag);
    exec dbms_stats.gather_table_stats(user, 'SKEWED_A_LOT', cascade => true, method_opt => 'for all indexed columns size auto');Is an example.

  • Mix source data with different granularity into the same fact table?

    I have two transaction tables "Incident (157 columns)" and "Unit (70 Colums)". For every "Incident" that happens there could be one or more records in the "Unit" table.
    As part of my data mart design, I have merged both the tables into a single Fact "Incident Fact (227 Columns)" and inserted the records from both the tables with a join condition between them [incident.IN_NUM = Unit.IN_NUM].
    Is this correct, is my question? or am I mixing source data with different granularity in the same fact table. Appreciate your help.
    Best Regards
    Bees

    Bees,
    Are the measures from 'Incident' , repeated for a given incident where it has more than one record in the Unit table ? If so, then the sum(indicent.measure) will give an incorrect result, no ?
    What requirement is there to physically merge the tables together outside of OBIEE? With OBIEE you could have one logical 'fact' table to present to report users, which sourced from seperate Incidents and Units tables and would stop the incorrect aggregations occuring. A common modelling piece in the same way would be Order Headers and Order Lines, quite common in OBIEE to have a logical 'Orders' fact which contained both Order header measures and Order line measures, this translates to your Incidents -> Units relationship.
    To do what I've mentioned, is relatively straight forward, you need a 'Dim - Incident' with two levels, Incident and Unit, mapp the unique identifiers in as the level keys and then use these levels to set the content levels correctly in your 2 logical tables sources for logical 'Fact' , ie Incidents LTS at incident level, Units LTS as units level.
    Hope this helps, let us know if you get stuck.
    Cheers
    Alastair

  • Cubes with different dimensions based on the same fact table

    I have a fact table (f_a) with three dimensions (dim_a, dim_b, dim_c) and a one measure (m_a).
    Is it possible to create cube with only one dimension (dim_a)?
    Data for other two dimensions (dim_b, dim_c) should be aggreagated together.
    Of course i can create second fact table with only one dimension, and then creating that cube would be no problem.
    But is it possible doing this directly from the primary fact table (without creating second fact table)?
    Raf
    PS:i use AWM 9.2 to create target cubes. Source cubes i create with OEM 9.2

    At the beginning i was confused by the numberous kind of cubes...
    for example when i created cube in MS i just designed cube, picked fact table, and that's all. In Oracle firstly i create project of cube (first cube) in OWB. Then i export it to the OLAP Catalog (second cube). That cube in OLAP catalog is a source cube for the AW cube (third cube). Then i need to enable AW cube for OLAPI by creating another cube in OLAP Catalog (i use 9iR2, so OLAPI doesn't have direct access to AW cubes).
    I spent much time until i could see my first sample cube in Discoverer or Excel as a final user should see it. :-)
    Now i'm facing another problem - when you redesign cube (for example add another dimension), you can't just "refresh" it as it was in MS. You have to delete old cube and create new one. And deleting cube isn't so simple (i'm not sure which elements i should delete).
    For testing and learning purposes i just create every cube in seperate AW. deleting whole AW is much simplier that deleting one cube.
    Raf

  • Tell me select Query that HITs the database Directly  ???

    Hi,
        I have a table, for this table in the Techinical Setttings I selected Buffering allowed, and buffering type is Full Bufferd.Now, I want a Select Query which hits the database directly, without fetching records from the BUFFER.
    Except using SELECT BYPASSING BUFFER query ????
        Regards,
    V.Raghavender.

    hi,
    ·        Any SELECT with a sub query or with joins
    ·        Any set function (COUNT, MIN, MAX, SUM, AVG)
    ·        GROUP BY
    ·        HAVING
    ·        SELECT DISTINCT
    ·        ORDER BY
    Examples:
    SELECT /*@ SAP BYPASSING BUFFER */ * FROM MYTAB
        WHERE KEY1 = ? AND KEY2 = ?
    SELECT * FROM MYTAB WHERE KEY1 = ?
    SELECT * FROM MYTAB
        WHERE KEY1 = ? AND KEY2 = ? OR KEY1 = ?
    SELECT MAX(DATA) FROM MYTAB WHERE KEY1 = ? KEY2 = ?
    SELECT * FROM MYTAB
        WHERE KEY1 = ? AND KEY2 = ? AND DATA =
       (SELECT DATA FROM MYTAB WHERE KEY1 = ? AND KEY2 = ?)
    if helpful pls award points.
    sri

  • Create UDF for table not in the List of tables

    Hi all,
    I know that my question maybe easy or been asked before, but I couldn't find the answer.
    To create a UDF in SAP B1 version 9.0 you should go Tools -> Customization Tools -> User-Defined Fields - Management...
    which is ok and working perfect. but my question is:
    If I want to create UDF for a table not in the list of tables there what should I do? I need to create 2 UDFs for table OMRC [Manufacturers], and can't find it in master data tables.
    anyone had this issue before?
    EDIT  : Is it good to add the field by using sql server? I know it's possible, but will it be visible in SAP
    thank you
    Message was edited by: Samira Haroun

    Hi Samira,
    There is noit a simple link for this, I advise you to study the documentation for TB1300 SBO Development Certification.
    Ypu should also have knowledge of .net, and C# or VB, because you have to make a small program/addon to add the fields
    Kind regards
    Ad Kerremans

  • Urgent: Error-Record 39,779, segment 0001 is not in the cross-record table

    Hi Gurus,
    This is an urgent production issue: I got the following error-
    I am updating data records from a DSO to Infocube in delta mode,
    1.Record 39,779, segment 0001 is not in the cross-record table
    2.Error in substep: End Routine
    I dont know problem is in the End Routine or somewhere else,
    The End routine is this:
    PROGRAM trans_routine.
          CLASS routine DEFINITION
    CLASS lcl_transform DEFINITION.
      PUBLIC SECTION.
    Attributs
        DATA:
          p_check_master_data_exist
                TYPE RSODSOCHECKONLY READ-ONLY,
    *-    Instance for getting request runtime attributs;
        Available information: Refer to methods of
        interface 'if_rsbk_request_admintab_view'
          p_r_request
                TYPE REF TO if_rsbk_request_admintab_view READ-ONLY.
      PRIVATE SECTION.
        TYPE-POOLS: rsd, rstr.
      Rule specific types
        TYPES:
          BEGIN OF tys_TG_1,
         InfoObject: ZVEHICLE Unique Vehicle ID.
            /BIC/ZVEHICLE           TYPE /BIC/OIZVEHICLE,
         InfoObject: ZLOCID Mine Site.
            /BIC/ZLOCID           TYPE /BIC/OIZLOCID,
         InfoObject: ZLOCSL Location Storage Location.
            /BIC/ZLOCSL           TYPE /BIC/OIZLOCSL,
         InfoObject: 0VENDOR Vendor.
            VENDOR           TYPE /BI0/OIVENDOR,
         InfoObject: ZNOMTK Nomination Number.
            /BIC/ZNOMTK           TYPE /BIC/OIZNOMTK,
         InfoObject: ZNOMIT Nomination Item.
            /BIC/ZNOMIT           TYPE /BIC/OIZNOMIT,
         InfoObject: ZNOMNR Nomination number.
            /BIC/ZNOMNR           TYPE /BIC/OIZNOMNR,
         InfoObject: ZVSTTIME Vehicle Starting Time Stamp.
            /BIC/ZVSTTIME           TYPE /BIC/OIZVSTTIME,
         InfoObject: ZVEDTIME Vehicle Ending Time Stamp.
            /BIC/ZVEDTIME           TYPE /BIC/OIZVEDTIME,
         InfoObject: ZNETWT Net Weight.
            /BIC/ZNETWT           TYPE /BIC/OIZNETWT,
         InfoObject: TU_GRS_WG Gross Wgt.
            /BIC/TU_GRS_WG           TYPE /BIC/OITU_GRS_WG,
         InfoObject: ZTU_TRE_W Tare Wgt.
            /BIC/ZTU_TRE_W           TYPE /BIC/OIZTU_TRE_W,
         InfoObject: ZCUSTWT Customer Weight.
            /BIC/ZCUSTWT           TYPE /BIC/OIZCUSTWT,
         InfoObject: ZCAR_NO Car Number.
            /BIC/ZCAR_NO           TYPE /BIC/OIZCAR_NO,
         InfoObject: ZINBND_ID Train Consist Inbound ID.
            /BIC/ZINBND_ID           TYPE /BIC/OIZINBND_ID,
         InfoObject: ZOTBND_ID Train Consist Return Load.
            /BIC/ZOTBND_ID           TYPE /BIC/OIZOTBND_ID,
         InfoObject: 0SOLD_TO Sold-to Party.
            SOLD_TO           TYPE /BI0/OISOLD_TO,
         InfoObject: 0CUSTOMER Customer Number.
            CUSTOMER           TYPE /BI0/OICUSTOMER,
         InfoObject: 0SHIP_TO Ship-To Party.
            SHIP_TO           TYPE /BI0/OISHIP_TO,
         InfoObject: ZVEHI_NO Vehicle Number.
            /BIC/ZVEHI_NO           TYPE /BIC/OIZVEHI_NO,
         InfoObject: ZCARSTDAT Car Start Date.
            /BIC/ZCARSTDAT           TYPE /BIC/OIZCARSTDAT,
         InfoObject: ZCAREDDAT Car End Date.
            /BIC/ZCAREDDAT           TYPE /BIC/OIZCAREDDAT,
         InfoObject: ZCARSTTIM Car Start Time.
            /BIC/ZCARSTTIM           TYPE /BIC/OIZCARSTTIM,
         InfoObject: ZCAREDTIM Car End Time.
            /BIC/ZCAREDTIM           TYPE /BIC/OIZCAREDTIM,
         InfoObject: 0COMPANY Company.
            COMPANY           TYPE /BI0/OICOMPANY,
         InfoObject: ZCONTRACT Contract.
            /BIC/ZCONTRACT           TYPE /BIC/OIZCONTRACT,
         InfoObject: 0PLANT Plant.
            PLANT           TYPE /BI0/OIPLANT,
         InfoObject: ZLOADTIME Total Vehicle Loading time.
            /BIC/ZLOADTIME           TYPE /BIC/OIZLOADTIME,
         InfoObject: ZSHIPDATE Shipping Date.
            /BIC/ZSHIPDATE           TYPE /BIC/OIZSHIPDATE,
         InfoObject: ZSHIPTIME Shipping Time.
            /BIC/ZSHIPTIME           TYPE /BIC/OIZSHIPTIME,
         InfoObject: ZMNEDDT Manifest End Date.
            /BIC/ZMNEDDT           TYPE /BIC/OIZMNEDDT,
         InfoObject: ZMNEDTM Manifest End Time.
            /BIC/ZMNEDTM           TYPE /BIC/OIZMNEDTM,
         InfoObject: ZLDEDDT Loaded End Date.
            /BIC/ZLDEDDT           TYPE /BIC/OIZLDEDDT,
         InfoObject: ZLDEDTM Loaded End Time.
            /BIC/ZLDEDTM           TYPE /BIC/OIZLDEDTM,
         InfoObject: ZMANVAR Manifest Variance.
            /BIC/ZMANVAR           TYPE /BIC/OIZMANVAR,
         InfoObject: ZTU_TYPE Trpr Unit Type.
            /BIC/ZTU_TYPE           TYPE /BIC/OIZTU_TYPE,
         InfoObject: ZACTULQTY Actual posted quantity.
            /BIC/ZACTULQTY           TYPE /BIC/OIZACTULQTY,
         InfoObject: ZVEDDT Vehicle End Date.
            /BIC/ZVEDDT           TYPE /BIC/OIZVEDDT,
         InfoObject: ZVEDTM Vehicle End Time.
            /BIC/ZVEDTM           TYPE /BIC/OIZVEDTM,
         InfoObject: ZVSTDT Vehicle Start Date.
            /BIC/ZVSTDT           TYPE /BIC/OIZVSTDT,
         InfoObject: ZVSTTM Vehicle Start Time.
            /BIC/ZVSTTM           TYPE /BIC/OIZVSTTM,
         InfoObject: ZTRPT_TYP Vehicle type.
            /BIC/ZTRPT_TYP           TYPE /BIC/OIZTRPT_TYP,
         InfoObject: 0CALMONTH Calendar Year/Month.
            CALMONTH           TYPE /BI0/OICALMONTH,
         InfoObject: 0CALYEAR Calendar Year.
            CALYEAR           TYPE /BI0/OICALYEAR,
         InfoObject: ZLOEDDT Quality Sent End Date.
            /BIC/ZLOEDDT           TYPE /BIC/OIZLOEDDT,
         InfoObject: ZLOEDTM Quality sent End Time.
            /BIC/ZLOEDTM           TYPE /BIC/OIZLOEDTM,
         InfoObject: ZATMDDT At Mine End Date.
            /BIC/ZATMDDT           TYPE /BIC/OIZATMDDT,
         InfoObject: ZATMDTM At Mine End Time.
            /BIC/ZATMDTM           TYPE /BIC/OIZATMDTM,
         InfoObject: ZDELAY Delay Duration.
            /BIC/ZDELAY           TYPE /BIC/OIZDELAY,
         InfoObject: ZSITYP Schedule type.
            /BIC/ZSITYP           TYPE /BIC/OIZSITYP,
         InfoObject: ZDOCIND Reference document indicator.
            /BIC/ZDOCIND           TYPE /BIC/OIZDOCIND,
         InfoObject: 0BASE_UOM Base Unit of Measure.
            BASE_UOM           TYPE /BI0/OIBASE_UOM,
         InfoObject: 0UNIT Unit of Measure.
            UNIT           TYPE /BI0/OIUNIT,
         InfoObject: ZACT_UOM Actual UOM.
            /BIC/ZACT_UOM           TYPE /BIC/OIZACT_UOM,
         Field: RECORD.
            RECORD           TYPE RSARECORD,
          END   OF tys_TG_1.
        TYPES:
          tyt_TG_1        TYPE STANDARD TABLE OF tys_TG_1
                            WITH NON-UNIQUE DEFAULT KEY.
    $$ begin of global - insert your declaration only below this line  -
    ... "insert your code here
    $$ end of global - insert your declaration only before this line   -
        METHODS
          end_routine
            IMPORTING
              request                  type rsrequest
              datapackid               type rsdatapid
            EXPORTING
              monitor                  type rstr_ty_t_monitors
            CHANGING
              RESULT_PACKAGE              type tyt_TG_1
            RAISING
              cx_rsrout_abort.
        METHODS
          inverse_end_routine
            IMPORTING
              i_th_fields_outbound         TYPE rstran_t_field_inv
              i_r_selset_outbound          TYPE REF TO cl_rsmds_set
              i_is_main_selection          TYPE rs_bool
              i_r_selset_outbound_complete TYPE REF TO cl_rsmds_set
              i_r_universe_inbound         TYPE REF TO cl_rsmds_universe
            CHANGING
              c_th_fields_inbound          TYPE rstran_t_field_inv
              c_r_selset_inbound           TYPE REF TO cl_rsmds_set
              c_exact                      TYPE rs_bool.
    ENDCLASS.                    "routine DEFINITION
    $$ begin of 2nd part global - insert your code only below this line  *
    ... "insert your code here
    $$ end of 2nd part global - insert your code only before this line   *
          CLASS routine IMPLEMENTATION
    CLASS lcl_transform IMPLEMENTATION.
          Method end_routine
          Calculation of result package via end routine
          Note: Update of target fields depends on rule assignment in
          transformation editor. Only fields that have a rule assigned,
          are updated to the data target.
      <-> result package
      METHOD end_routine.
    *=== Segments ===
        FIELD-SYMBOLS:
          <RESULT_FIELDS>    TYPE tys_TG_1.
        DATA:
          MONITOR_REC     TYPE rstmonitor.
    *$*$ begin of routine - insert your code only below this line        *-*
    Fill the following fields by reading Nomination and Vehicls DSO
    SOLD_TO, Customer
    data: L_TIMESTAMP1 TYPE timestamp,
          L_TIMESTAMP2 TYPE timestamp,
          L_TIMESTAMP3 type CCUPEAKA-TIMESTAMP,
          L_TIMESTAMP4 type CCUPEAKA-TIMESTAMP,
          L_TIMESTAMP5 type CCUPEAKA-TIMESTAMP,
          L_TIMESTAMP6 type CCUPEAKA-TIMESTAMP,
          L_TIMESTAMP7 TYPE timestamp,
          L_TIMESTAMP8 TYPE timestamp,
          L_TIMESTAMP9 type timestamp,
          L_TIMESTAMP10 type TIMESTAMP,
          L_CHAR1(14),
          L_CHAR2(14),
          l_duration type I,
          L_TS TYPE TZONREF-TZONE,
          l_flag,
          l_nomit TYPE /BIC/OIZNOMIT,
          l_error_flag.
    l_TS = 'CST'.
    Data: EXTRA_PACKAGE type tyt_TG_1.
    data: extra_fields type tys_TG_1.
    LOOP at RESULT_PACKAGE ASSIGNING <RESULT_FIELDS>.
    clear l_error_flag.
    Get sold_to and customer from nomination table.
       Select single SOLD_TO /BIC/ZLOCSL /BIC/ZCONTRACT COMPANY
                     /BIC/ZMNEDDT /BIC/ZMNEDTM /BIC/ZLDEDDT
                     /BIC/ZLDEDTM SHIP_TO /BIC/ZACTULQTY
                     /BIC/ZLOEDDT /BIC/ZLOEDTM /BIC/ZDELAY
                     /BIC/ZATMDDT /BIC/ZATMDTM
                     /BIC/ZSITYP /BIC/ZDOCIND
               into (<RESULT_FIELDS>-SOLD_TO,
                     <RESULT_FIELDS>-/BIC/ZLOCSL,
                     <RESULT_FIELDS>-/BIC/ZCONTRACT,
                     <RESULT_FIELDS>-company,
                     <RESULT_FIELDS>-/BIC/ZMNEDDT,
                     <RESULT_FIELDS>-/BIC/ZMNEDTM,
                     <RESULT_FIELDS>-/BIC/ZLDEDDT,
                     <RESULT_FIELDS>-/BIC/ZLDEDTM,
                     <RESULT_FIELDS>-SHIP_TO,
                     <RESULT_FIELDS>-/BIC/ZACTULQTY,
                     <RESULT_FIELDS>-/BIC/ZLOEDDT,
                     <RESULT_FIELDS>-/BIC/ZLOEDTM,
                     <RESULT_FIELDS>-/BIC/ZDELAY,
                     <RESULT_FIELDS>-/BIC/ZATMDDT,
                     <RESULT_FIELDS>-/BIC/ZATMDTM,
                     <RESULT_FIELDS>-/BIC/ZSITYP,
                     <RESULT_FIELDS>-/BIC/ZDOCIND)
               from   /BIC/AZTSW_0000
               where /BIC/ZNOMTK = <RESULT_FIELDS>-/BIC/ZNOMTK
                AND  /BIC/ZNOMIT = <RESULT_FIELDS>-/BIC/ZNOMIT.
    Select Invalid Nominations
      if sy-subrc <> 0.
        l_error_flag = 'X'.
      endif.
       <RESULT_FIELDS>-customer = <RESULT_FIELDS>-SOLD_TO.
    Prepare time stamp for Time Differences
    Vehicle Starting Time Stamp
      clear : L_TIMESTAMP9,L_TIMESTAMP10.
      CONVERT DATE <RESULT_FIELDS>-/BIC/ZCARSTDAT TIME
                   <RESULT_FIELDS>-/BIC/ZCARSTTIM
               INTO TIME STAMP L_TIMESTAMP9 TIME ZONE l_TS.
    Vehicle Ending Time Stamp
      CONVERT DATE <RESULT_FIELDS>-/BIC/ZCAREDDAT TIME
                   <RESULT_FIELDS>-/BIC/ZCAREDTIM
               INTO TIME STAMP L_TIMESTAMP10 TIME ZONE l_TS.
      Clear : L_TIMESTAMP3, L_TIMESTAMP4,
             <RESULT_FIELDS>-/BIC/ZVEDTIME,
             <RESULT_FIELDS>-/BIC/ZVSTTIME.
      <RESULT_FIELDS>-/BIC/ZVEDTIME = L_TIMESTAMP10.
      <RESULT_FIELDS>-/BIC/ZVSTTIME = L_TIMESTAMP9.
      L_TIMESTAMP3 = L_TIMESTAMP10.
      L_TIMESTAMP4 = L_TIMESTAMP9.
    Caliculate the load time
    IF L_TIMESTAMP3 is initial.
       clear <RESULT_FIELDS>-/BIC/ZLOADTIME.
    elseif L_TIMESTAMP4 is initial.
       clear <RESULT_FIELDS>-/BIC/ZLOADTIME.
    else.
       CALL FUNCTION 'CCU_TIMESTAMP_DIFFERENCE'
         EXPORTING
           timestamp1       =  L_TIMESTAMP3
           timestamp2       =  L_TIMESTAMP4
         IMPORTING
           DIFFERENCE        = <RESULT_FIELDS>-/BIC/ZLOADTIME
    ENDIF.
    Caliculate the Manifest Variance
       clear : L_TIMESTAMP5,L_TIMESTAMP6,L_TIMESTAMP7,L_TIMESTAMP8.
       CONVERT DATE <RESULT_FIELDS>-/BIC/ZMNEDDT TIME
                    <RESULT_FIELDS>-/BIC/ZMNEDTM
               INTO TIME STAMP L_TIMESTAMP7 TIME ZONE l_TS.
       CONVERT DATE <RESULT_FIELDS>-/BIC/ZLDEDDT TIME
                    <RESULT_FIELDS>-/BIC/ZLDEDTM
               INTO TIME STAMP L_TIMESTAMP8 TIME ZONE l_TS.
      L_TIMESTAMP5 = L_TIMESTAMP7.
      L_TIMESTAMP6 = L_TIMESTAMP8.
    Caliculate the Maniefest Variance
    IF L_TIMESTAMP5 is initial.
       clear <RESULT_FIELDS>-/BIC/ZMANVAR.
    elseif L_TIMESTAMP6 is initial.
       clear <RESULT_FIELDS>-/BIC/ZMANVAR.
    else.
       CALL FUNCTION 'CCU_TIMESTAMP_DIFFERENCE'
         EXPORTING
           timestamp1       =  L_TIMESTAMP5
           timestamp2       =  L_TIMESTAMP6
         IMPORTING
           DIFFERENCE        = <RESULT_FIELDS>-/BIC/ZMANVAR
       IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
       ENDIF.
    ENDIF.
    Delete datapackets with blank nominations
    Delete datapackets with blank shipdate and Invalid Time Stamps
    *IF <RESULT_FIELDS>-/BIC/ZNOMTK IS INITIAL OR
      <RESULT_FIELDS>-/BIC/ZSHIPDATE IS INITIAL.
    l_error_flag = 'X'.
    *ENDIF.
    <RESULT_FIELDS>-/BIC/ZVEHI_NO = 1.
      <RESULT_FIELDS>-CALMONTH = <RESULT_FIELDS>-/BIC/ZSHIPDATE(6).
      <RESULT_FIELDS>-CALYEAR  = <RESULT_FIELDS>-/BIC/ZSHIPDATE(4).
    if l_error_flag = 'X'.
    Looks like Monitor Entries are not working in SP11.
    Hence the following is commented temporarily.
    CLEAR MONITOR_REC.
    MONITOR_REC-MSGID = '0M'.
    MONITOR_REC-MSGTY = 'S'.
    MONITOR_REC-MSGNO = '501'.
    MONITOR_REC-MSGV1 = <RESULT_FIELDS>-/BIC/ZNOMTK.
    MONITOR_REC-recno = sy-tabix.
    APPEND MONITOR_REC to MONITOR.
    RAISE exception type CX_RSROUT_ABORT.
    DELETE RESULT_PACKAGE index sy-tabix.
    CLEAR L_ERROR_FLAG.
    else.
       MODIFY RESULT_PACKAGE FROM <RESULT_FIELDS>.
    endif.
    clear l_nomit.
    l_nomit = <RESULT_FIELDS>-/BIC/ZNOMIT.
    extra_fields = <RESULT_FIELDS>.
    Actual Qty and Contract details
       Select /BIC/ZLOCSL /BIC/ZNOMIT /BIC/ZCONTRACT /BIC/ZACTULQTY
              /BIC/ZSITYP /BIC/ZDOCIND
              SOLD_TO SHIP_TO COMPANY
               into (extra_fields-/BIC/ZLOCSL,
                     extra_fields-/BIC/ZNOMIT,
                     extra_fields-/BIC/ZCONTRACT,
                     extra_fields-/BIC/ZACTULQTY,
                     extra_fields-/BIC/ZSITYP,
                     extra_fields-/BIC/ZDOCIND,
                     extra_fields-SOLD_TO,
                     extra_fields-SHIP_TO,
                     extra_fields-company)
               from  /BIC/AZTSW_0000
               where /BIC/ZNOMTK = <RESULT_FIELDS>-/BIC/ZNOMTK AND
                     /BIC/ZNOMIT <> l_NOMIT.
           INSERT extra_fields into table EXTRA_PACKAGE.
       endselect.
    ENDLOOP.
    Append lines of extra_package to RESULT_PACKAGE.
    *--  fill table "MONITOR" with values of structure "MONITOR_REC"
    *-   to make monitor entries
    ... "to cancel the update process
       raise exception type CX_RSROUT_ABORT.
    $$ end of routine - insert your code only before this line         -
      ENDMETHOD.                    "end_routine
          Method inverse_end_routine
          This subroutine needs to be implemented only for direct access
          (for better performance) and for the Report/Report Interface
          (drill through).
          The inverse routine should transform a projection and
          a selection for the target to a projection and a selection
          for the source, respectively.
          If the implementation remains empty all fields are filled and
          all values are selected.
      METHOD inverse_end_routine.
    $$ begin of inverse routine - insert your code only below this line-
    ... "insert your code here
    $$ end of inverse routine - insert your code only before this line -
      ENDMETHOD.                    "inverse_end_routine
    ENDCLASS.                    "routine IMPLEMENTATION

    Hi,
    Most probably you are appending some records in the data package or deleting from the data package through end routine or expert routine or start routine.
    I just solved it.....you will have to import the note 1180163.
    Then modify the code which you are using....and include the function module as mentioned in the note 1223532.
    You need to add the function module just before you append the records.This will work perfectly.
    Thanks
    Ajeet

  • Rebate settlements should not hit the VAT account

    Hello everyone,
    There is a question on Rebate Settlement.
    There is a customer who is entitled to a 15% BPR rebate.
    We are accruing for this rebate successfully
    The issue we are having is that the materials that this customer buy from us attract 20% VAT but when the customer claims back from us they do not claim the VAT component.
    We need to  be able to do rebate settlements that do not hit the VAT account.
    I ran a test in SAP on a sample rebate agreement but the only way I could get the rebate settlement to not hit a VAT account was to change a material to be not liable for tax and then settle against that material.
    Billing doc 1-Posts to VAT since the material is Tax inclusive
    Billing doc 2-Does not posts to VAT since the material is Tax exclusive
    Any of you aware of any other way to do this (perhaps using a payment type)??
    Kindly suggest,
    Regards
    Manjunath

    Hi Manjunath,
    As Brian already explained the way how usually rebate settlements happen with settlement or dummy material.
    Is our business needs to have settlement against actual materials billed ?
    If yes, we did an approach in our client.
    we have a six document concept which is custom developed.
    You have 2 documents created for rebate settlement run. Rebate credit memo request and rebate credit memo for settlement or dummy material maintained in rebate agreement.
    These two documents gets cancelled with corresponding cancellation documents.
    New set of documents created for Rebate credit memo request and rebate credit memo with actual materials.
    All of these documents are created using a batchjob and these documents form document flow in our case.
    You can try with help of an ABAPer for achieving this.
    Thanks
    Rama

  • Alternate fact table without disturbing the existing fact table in EIS

    I have a question in EIS, how to load or work with alternate fact table, without disturbing the existing fact table, pls provide me with some procedure and steps
    thank u in advance
    sunil

    Yes you can have multiple models and metaoutlines load one cube. I've done it before. The trick is you ahve one "master" metaoutline that you put all the measures in (even if they are manually added. You use that to build the cube. Then you can have multiple metaoutlines build different measures within the cube. The idea is you have to have them update different intersections or the last one in will be what you get. I have a client that gets sales info from one source, shipment info from a different relational source . in all I have 10 differnt models and metaoutlines that build one cube. you just lump the load statements into one CBS file. It works great (or as great as EIS works). The biggest issue is timing to make sure all the sources are available when the load is going to be doe. Of course you could build different parts at different times.

  • After i bought mac os x lion from web then download , after that to install but when they ask me to choose disk to install i can not choose, it say this disk does not use the GUID partiton table scheme. use disk utility to change the partition scheme. but

    after i bought mac os x lion from web then download , after that to install but when they ask me to choose disk to install i can not choose, it say this disk does not use the GUID partiton table scheme. use disk utility to change the partition scheme. but

    after i bought mac os x lion from web then download , after that to install but when they ask me to choose disk to install i can not choose, it say this disk does not use the GUID partiton table scheme. use disk utility to change the partition scheme. but

  • HT5225 "This disc does not use the GUID Partition Table Scheme...". I keep getting this message when I try to install OSXLion. It has something to do with a repair Apple performed last year. I use a 17" MacBookPro. Any suggestions?

    "This disc does not use the GUID Partition Table Scheme. Use Disc Utility to change the partition scheme". I keep getting this message when I try to install OSX Lion so that I can upgrade my 17" MacBookPro to move to iCloud. My harddrive was replaced last year by Apple because of a fault by the manufacturer and I think this is the cause of the problem. What can I do so that I don't lose my content.

    When you click the partion tab. There is option on the bottom of the window. Click on that there there are these options.

Maybe you are looking for

  • How to show THE TIME on my Calendar

    is there a way to get my monthly view on Calendar app to show the TIME? i am printing these out and viewing them on the computer and it is a bit aggravating to have to click on the actual item to find out what time the entry is. isn't there a way to

  • Converting to text/xml

    Hi, I get this error in sxmb_moni: "Delivery Exception: invalid content type for SOAP:TEXT/HTML." I have set the ContentType with the messageTransformBean in the SOAP receiver adapter. but I also need to set parameter "Do not use SOAP envelope", add

  • Why does my pdf file open in 'windows picture and fax viewer'?

    Anytime someone sends me a pdf file, when I click 'open', it automatically opens up my 'windows picture and fax viewer' and of course, I get nothing. So, in order to read a pdf file, I must first save it, then go into my Adobe Reader, and open it fro

  • How do i get Edge to work on my iphone 4 on tmobile?

    how do i get Edge to work on my iphone 4 on tmobile? I have been using edge for about a month or so and today it just stopped working. I havent updated my phone or anything. I did follow all the APN directions given to me but that did not work either

  • How to set a default trust store just for DirContext not the whole JVM

    I need to connect to a secure LDAP server ( URL is ldaps://..../). The Server certificate in this LDAP server is a self signed cert so I need to put this certificate in my Keystore as well for me to connect to it. My code is something like :   DirCon