BEx query: CO-PA data and hierarchy

Hi BEx fans
We need to design a report in BEx.
There is a hierarchy in play, with let us say 2 levels. 2 Key figures are determined.
Hierarchy Level 1
Hierarchy Level 2
Key figure 1
Key figure 2
Commercial Business
150
150
Mix0
100
50
Mix1
50
100
Non Commercial Business
100
100
Mix1
100
100
Regarding the key figures let us explain it more detailled, they are designed depending on hierachy level values:
Key figure 1 should be be restricted by Mix0 and Mix1 (hierarchy level 2). On the other way it should also be restricted on Mix1 (level 2).
I have defined a query which doubles the keyfigures, instead of 2 there are at all 4 keyfigures. Executing the query you will see the 4 keyfigures correctly in a line (row area).
If you add the charateristic with collapsed hierarchy you will also see the these key figures correctly, but if you extract the hierarchy level from 1 to 2, you will recognize that the doubled keyfigures will be shown (with no values -> correct).
Question: Do you know a way how to eliminate these "duplicate" key figure rows when using the hierarchy? Is there another way to solve this problem?
Thanks
T.

Hi Yiannis
I have created a second charateristic which determines the logic of level 2 from the hierarchy characteristic (characteristic no. 1).
Then I additionally restricted the key figures with the relevant values of character no 2.
Unfortunately it doesn't work, still the same effect.
This is strange, as it is not really logic.
In the screen you can see KFG1 and KFG2, next column the new characteristic.
KFG1 is restricted additonally on value 1 of this new characteristic.
As you can see, the values 2, 3 and 4 are still displayed.
Do you know the reason for this?
Thanks
T.

Similar Messages

  • BPC 7.5 NW: Import master data and Hierarchy from BI

    There is a HTG about Import master data and Hierarchy from SAP NT BW, the BPC cost center master data's property have corresponding attribute  InfoObject 0COSTCENTER of BW.
    what about for those properties which do not have corresponding attribute in BW? I would asume that START_ROUTINE and END_ROUTINE will do this in BPC side,  can we also do this on BW side instead of BPC side?

    Hi,
    You can check this in start routine which can be called from Transformation file using BADI.
    http://help.sap.com/saphelp_bpc75_nw/helpdata/en/28/b66863b41f47589b9943f80b63def6/content.htm
    Hope this helps...
    regards,
    Raju

  • Upload Master data and hierarchy from BW to BPC : Account Hierarchy

    Hello,
    I know that you all are aware the property "ACCTYPE" is not available in BW for Account master data.
    The requirement here is to load master data and hierarchy for Account dimension from BW to BPC. Can anyone suggest the best approach to populate the priperty "ACCTYPE" in the account dimension member sheet in BPC during this automated load process?
    Thanks and regards,
    RJ

    Sure,
    For exemple:
    Assume that your infoprovider is 0COSTELMNT and you'll fill the ACCTYPE with the attribute 0CSTELMNTYP. (It's just a exemple).
    In the transformation file, in the mapping field you just map the attribute to the property.
    *OPTIONS
    *MAPPING
    ID=ID
    ACCTYPE=0CSTELMNTYP
    SCALING=*str(Y)
    RATETYPE=*str(AVG)
    IS_INPUT=*str(Y)
    *CONVERSION
    You can also, define a hardcode for any property.
    F.E: ACCTYPE=*str(EXP)
    I hope this can help you.
    Lucas

  • Status of data in Bex query shows wrong date

    Dear Experts,
    The Bex qurey after sucessful execution, show the Status of data as old date i.e. feb 2012. but we observed that the data uplaod happens regularly and sucessful.
    we tried executing the same query using RSRT/Bex Analyzer/Portal. the results are same i.e. showing incorrect status of data.
    Note: The Bex query is built on BI Infoset which sources from DSOs and Master Data infoobjects, and  BI version is 7.0.
    Kindly please help for resolving the issue.
    Best Regards,
    Mannu.

    Hi Vijay,
    The data upload has happend today also and it is sucessful, the reporing status is available for requests from respective infoproviders.
    'Status of data' is not a filed. if it an information to tell the status of data in query result.
    Please find the following steps to find the 'status of data'
    go to RSRT->give the query name and execute-> now after query results-> go to last page-> you can find the 'status of data'.
    Best Regards,
    Mannu

  • BEx Query in Browser - decimals and thousand separators switched

    I have a BEx query that I open up in a regular IE browser.  I connect to the BW system and my query appears.
    However, for all the Key Figures, the decimals and thousand separators are switched. 
    Example,
    $323,67
    $2.893,54
    10,0 EA
    12,60%
    Any suggestions on the fix?  Results appear normal in BEx.
    Thanks!

    Hello Rishmal,
    Check the menu Sytem-> User Profile -> Own Data -> Default Tab-> Change Decimal Notation.
    To maintain user profile, you need to use transaction SU01. Log out after making the changes and then log in to make the changes effective.
    Hope it helps.
    Regards,
    Praveen

  • Bex Query showing incorrect data

    Hi Experts,
    I have a Bex query on an infoset. The infoset is based on Sales Order Line Item DSO and Sales Order Condition DSO. I am refering Net value from Sales Order Line Item DSO. In the query, the values of Net Value is not coming correctly. When i check the value in Sales Order Line Item DSO it shows 100. However, in the query it shows 500. When i checked the infoset, it had 5 records. In each record, the net value was 100. What should i do to get the correct value of Net Value in the query.
    Have anyone faced similar problem ?
    Please reply as soon as possible.
    Thanks,
    Saachi

    Hi Sachi,
    This is a common problem in infoset.
    Sales order line item - SLI say
    Sales order condition - SC say.
    The value you see in your net value field depends on your join condition in the infoset.
    Currently you have join in such a way that 1 record in SLI correspods to 5 records in SLC (this is as per your join condition), hence you see this error. Youcan manupilate your join condition to get the required result, if this is viable.
    However, in most cases you may not be able to alleviate the fields defining the join.
    Say your sales order and item form the joining fields, then in sales order condition DSO you have 5 records for that sales order and item.
    The way you could probably avoid net value getting multiplied 5 times is by using exception aggregation  with reference char a characteristic in the query.
    The ref char should uniquely identify the 5 sales order item condition lines.
    (basic principle - we have to net value/ no of lines in Sales order condition DSO [5 in this case] .)
    The problem, however is, whenever you consider uniqueness defining fields, you would look at the keys of DSO, because they define uniqueness. One could have multiple infoobject when defining a DSO key.
    So you would'nt be able to define any record with only one particular infoobject(ref char), based on which you could define the  exception aggreation.
    You could define one more data field in the DSO which is a concatenation of all of its keys and then use it in exception aggreg as a reference char in the query.
    One more way is to load data from the two DSO to further cubes to achieve the requirement.
    I think, this is the limitation with the infoset.
    Please let me know if you find any other solution.
    Hope it helps,
    Regards,
    Sunmit.

  • How To Guide : Impact of a BEx query change to universes and WebI document

    Ever wondered about the impact of a BEx query change to your universes and Intelligence documents ? "If I change this, will I need to refresh the universe structure ? will my Web Intelligence documents break ?". This article aims at clarifying these questions for Web Intelligence documents that use OLAP Universe(s) based on BEx query(ies). More specifically, it clarifies which BEx query change does impact Universes and Web Intelligence documents and which one is transparent to them.
    The first part of this article provides a summary table. The second part explains what to do to make the universe and Web Intelligence documents reflect the BEx query change. And finally, it covers each change scenario in details with more explanation and screen shots.
    [http://wiki.sdn.sap.com/wiki/x/0wt9DQ|http://wiki.sdn.sap.com/wiki/x/0wt9DQ]

    Hi Rajesh J Salecha,
    What I understood is like :
    You have two queries and both gives same results but one of the query having a parameter.
    You have one report which is using query1.  Now you want that report to be copied as Report2 and use Query2 instead of Query1.
    If the this is the issue, then you copy Report1 as Report2 and go in Database and change the Data source location to Query2.
    Hope this will help you.  If my understanding is wrong then give us the work flow.
    Thanks,
    Sastry

  • Display Title in BEX query for Master Data Field

    Hi All,
    Appreciate if someone can assist me in this.
    When we display query result, we will have results of master data field for as master data and Text, e.g Customer and customer text.
    BEX display:
    Header Line : Customer
    Display Line : 90002011   Mary Kay
                          90002023   John Smith
    For the header Line, we have title 'customer', can we have the title for 'Customer Description' instead of having it as a blank field.
    Appreciate if someone can assist me in this, I cant find this issue posted by anyone.
    Thank you.

    Hi,
    For one object you can not have seperate description for key and text.
    Either you need to have seperate object. Check if your Customer object is having some name attribute then display cutomer key with name attribute so that there will be two object and you may change the description in report display.
    If this is not possible then you may not have dirctly in reporting. You need to stage one more object in staging area with same cutomer field then one you may use as text the other one as key.
    I hope it will help.
    Thanks,
    S

  • Query Help pls dates and logic.

    Hi all gurus
    I have a need where I need to put togahter series of timeline events that occurred in past as a one row concerning dates.
    This is my table .
      CREATE TABLE "SORS"."SOR_TRACKING"
       ( "TRACKING_ID" NUMBER NOT NULL ENABLE,
      "LETTER_ID" NUMBER NOT NULL ENABLE,
      "OFFENDER_ID" NUMBER NOT NULL ENABLE,
      "LOCATION_ID" NUMBER NOT NULL ENABLE,
      "OFFICE_ID" NUMBER,
      "MAIL_DATE" DATE DEFAULT SYSDATE NOT NULL ENABLE,
      "RESPONSE_DATE" DATE,
      "STATUS" VARCHAR2(30 BYTE) DEFAULT 'Mailed',
      "ENTRY_DATE" DATE DEFAULT SYSDATE NOT NULL ENABLE,
      "ENTRY_USER" VARCHAR2(30 BYTE) NOT NULL ENABLE,
      "COMMENTS" VARCHAR2(2000 BYTE),
      "FIRST_NAME" VARCHAR2(80 BYTE) NOT NULL ENABLE,
      "MIDDLE_NAME" VARCHAR2(80 BYTE),
      "LAST_NAME" VARCHAR2(80 BYTE) NOT NULL ENABLE,
      "SIR_NAME" VARCHAR2(30 BYTE),
      "ADDRESS1" VARCHAR2(80 BYTE),
      "ADDRESS2" VARCHAR2(80 BYTE),
      "CITY" VARCHAR2(50 BYTE),
      "STATE" VARCHAR2(30 BYTE),
      "ZIP" VARCHAR2(20 BYTE),
      "COUNTY" VARCHAR2(80 BYTE),
      "OFFENDER_TYPE" VARCHAR2(30 BYTE),
      "LAST_MAIL_DATE" DATE,
      "BATCH_ID" NUMBER NOT NULL ENABLE,
      "JURISDICTION" NUMBER,
      "DL_NAME" VARCHAR2(60 BYTE),
      "DL_OFFICE" VARCHAR2(60 BYTE),
      "DL_ADDRESS" VARCHAR2(60 BYTE),
      "DL_MAILING_ADDRESS" VARCHAR2(60 BYTE),
      "DL_CITY" VARCHAR2(60 BYTE),
      "DL_STATE" VARCHAR2(30 BYTE),
      "DL_ZIP" VARCHAR2(20 BYTE),
      "TITLE" VARCHAR2(10 BYTE),
      "MODIFIED_USER" VARCHAR2(30 BYTE),
      "MODIFIED_DATE" DATE,
      CONSTRAINT "PK_SOR_TRACKING" PRIMARY KEY ("TRACKING_ID"))
    Sample date
    REM INSERTING into SOR_TRACKING
    SET DEFINE OFF;
    Insert into SOR_TRACKING (TRACKING_ID,LETTER_ID,OFFENDER_ID,LOCATION_ID,OFFICE_ID,MAIL_DATE,RESPONSE_DATE,STATUS,ENTRY_DATE,ENTRY_USER,COMMENTS,FIRST_NAME,MIDDLE_NAME,LAST_NAME,SIR_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP,COUNTY,OFFENDER_TYPE,LAST_MAIL_DATE,BATCH_ID,JURISDICTION,DL_NAME,DL_OFFICE,DL_ADDRESS,DL_MAILING_ADDRESS,DL_CITY,DL_STATE,DL_ZIP,TITLE,MODIFIED_USER,MODIFIED_DATE) values (781410,1,4557,110207,2809,to_date('05-NOV-13','DD-MON-RR'),null,'Mailed',to_date('05-NOV-13','DD-MON-RR'),'NEEL',null,'BOB','Jolene','Luna',null,'20535 Valleyview Rd ',null,'Boo','OK','74840','potter','STANDARD',to_date('15-FEB-12','DD-MON-RR'),30211,2809,null,null,null,null,null,null,null,'Ms.','NEEL',to_date('05-NOV-13','DD-MON-RR'));
    Insert into SOR_TRACKING (TRACKING_ID,LETTER_ID,OFFENDER_ID,LOCATION_ID,OFFICE_ID,MAIL_DATE,RESPONSE_DATE,STATUS,ENTRY_DATE,ENTRY_USER,COMMENTS,FIRST_NAME,MIDDLE_NAME,LAST_NAME,SIR_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP,COUNTY,OFFENDER_TYPE,LAST_MAIL_DATE,BATCH_ID,JURISDICTION,DL_NAME,DL_OFFICE,DL_ADDRESS,DL_MAILING_ADDRESS,DL_CITY,DL_STATE,DL_ZIP,TITLE,MODIFIED_USER,MODIFIED_DATE) values (190294,1,4557,110207,2809,to_date('08-FEB-12','DD-MON-RR'),to_date('15-FEB-12','DD-MON-RR'),'Verified',to_date('17-FEB-12','DD-MON-RR'),'Casper',null,'BOB','Jolene','Luna',null,'20535 Valleyview Rd ',null,'Boo','OK','74840','potter','STANDARD',to_date('13-DEC-11','DD-MON-RR'),28442,2809,null,null,null,null,null,null,null,'Ms.',null,null);
    Insert into SOR_TRACKING (TRACKING_ID,LETTER_ID,OFFENDER_ID,LOCATION_ID,OFFICE_ID,MAIL_DATE,RESPONSE_DATE,STATUS,ENTRY_DATE,ENTRY_USER,COMMENTS,FIRST_NAME,MIDDLE_NAME,LAST_NAME,SIR_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP,COUNTY,OFFENDER_TYPE,LAST_MAIL_DATE,BATCH_ID,JURISDICTION,DL_NAME,DL_OFFICE,DL_ADDRESS,DL_MAILING_ADDRESS,DL_CITY,DL_STATE,DL_ZIP,TITLE,MODIFIED_USER,MODIFIED_DATE) values (184647,1,4557,110207,2809,to_date('05-DEC-11','DD-MON-RR'),to_date('13-DEC-11','DD-MON-RR'),'Verified',to_date('15-DEC-11','DD-MON-RR'),'Casper',null,'BOB','Jolene','Luna',null,'20535 Valleyview Rd ',null,'Boo','OK','74840','potter','STANDARD',to_date('09-NOV-11','DD-MON-RR'),27985,2809,null,null,null,null,null,null,null,'Ms.',null,null);
    Insert into SOR_TRACKING (TRACKING_ID,LETTER_ID,OFFENDER_ID,LOCATION_ID,OFFICE_ID,MAIL_DATE,RESPONSE_DATE,STATUS,ENTRY_DATE,ENTRY_USER,COMMENTS,FIRST_NAME,MIDDLE_NAME,LAST_NAME,SIR_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP,COUNTY,OFFENDER_TYPE,LAST_MAIL_DATE,BATCH_ID,JURISDICTION,DL_NAME,DL_OFFICE,DL_ADDRESS,DL_MAILING_ADDRESS,DL_CITY,DL_STATE,DL_ZIP,TITLE,MODIFIED_USER,MODIFIED_DATE) values (157253,1,4557,102288,2809,to_date('03-FEB-11','DD-MON-RR'),null,'Mailed',to_date('03-FEB-11','DD-MON-RR'),'Casper',null,'BOB','Jolene','Luna',null,'PO Box 146',null,'Boo','OK','74840','potter','STANDARD',to_date('08-NOV-10','DD-MON-RR'),25613,2809,null,null,null,null,null,null,null,'Ms.',null,null);
    Insert into SOR_TRACKING (TRACKING_ID,LETTER_ID,OFFENDER_ID,LOCATION_ID,OFFICE_ID,MAIL_DATE,RESPONSE_DATE,STATUS,ENTRY_DATE,ENTRY_USER,COMMENTS,FIRST_NAME,MIDDLE_NAME,LAST_NAME,SIR_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP,COUNTY,OFFENDER_TYPE,LAST_MAIL_DATE,BATCH_ID,JURISDICTION,DL_NAME,DL_OFFICE,DL_ADDRESS,DL_MAILING_ADDRESS,DL_CITY,DL_STATE,DL_ZIP,TITLE,MODIFIED_USER,MODIFIED_DATE) values (149710,1,4557,102288,2809,to_date('01-NOV-10','DD-MON-RR'),to_date('08-NOV-10','DD-MON-RR'),'Verified',to_date('16-NOV-10','DD-MON-RR'),'Casper',null,'BOB','Jolene','Luna',null,'PO Box 146',null,'Boo','OK','74840','potter','STANDARD',to_date('18-OCT-10','DD-MON-RR'),24939,2809,null,null,null,null,null,null,null,'Ms.',null,null);
    Insert into SOR_TRACKING (TRACKING_ID,LETTER_ID,OFFENDER_ID,LOCATION_ID,OFFICE_ID,MAIL_DATE,RESPONSE_DATE,STATUS,ENTRY_DATE,ENTRY_USER,COMMENTS,FIRST_NAME,MIDDLE_NAME,LAST_NAME,SIR_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP,COUNTY,OFFENDER_TYPE,LAST_MAIL_DATE,BATCH_ID,JURISDICTION,DL_NAME,DL_OFFICE,DL_ADDRESS,DL_MAILING_ADDRESS,DL_CITY,DL_STATE,DL_ZIP,TITLE,MODIFIED_USER,MODIFIED_DATE) values (138268,1,4557,99564,2809,to_date('03-JUN-10','DD-MON-RR'),to_date('17-JUN-10','DD-MON-RR'),'Letter Returned',to_date('17-JUN-10','DD-MON-RR'),'Boo','Post office: No mail receptacle','BOB','Jolene','Luna',null,'20535 Valley View Rd.',null,'Boo','OK','74840','potter','STANDARD',to_date('19-MAY-10','DD-MON-RR'),24216,2809,null,null,null,null,null,null,null,'Ms.',null,null);
    Insert into SOR_TRACKING (TRACKING_ID,LETTER_ID,OFFENDER_ID,LOCATION_ID,OFFICE_ID,MAIL_DATE,RESPONSE_DATE,STATUS,ENTRY_DATE,ENTRY_USER,COMMENTS,FIRST_NAME,MIDDLE_NAME,LAST_NAME,SIR_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP,COUNTY,OFFENDER_TYPE,LAST_MAIL_DATE,BATCH_ID,JURISDICTION,DL_NAME,DL_OFFICE,DL_ADDRESS,DL_MAILING_ADDRESS,DL_CITY,DL_STATE,DL_ZIP,TITLE,MODIFIED_USER,MODIFIED_DATE) values (128798,1,4557,91503,2809,to_date('04-FEB-10','DD-MON-RR'),null,'Mailed',to_date('04-FEB-10','DD-MON-RR'),'Casper',null,'BOB','Jolene','Luna',null,'PO Box 146',null,'Boo','OK','74840','potter','STANDARD',to_date('10-NOV-09','DD-MON-RR'),23369,2809,null,null,null,null,null,null,null,'Ms.',null,null);
    Insert into SOR_TRACKING (TRACKING_ID,LETTER_ID,OFFENDER_ID,LOCATION_ID,OFFICE_ID,MAIL_DATE,RESPONSE_DATE,STATUS,ENTRY_DATE,ENTRY_USER,COMMENTS,FIRST_NAME,MIDDLE_NAME,LAST_NAME,SIR_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP,COUNTY,OFFENDER_TYPE,LAST_MAIL_DATE,BATCH_ID,JURISDICTION,DL_NAME,DL_OFFICE,DL_ADDRESS,DL_MAILING_ADDRESS,DL_CITY,DL_STATE,DL_ZIP,TITLE,MODIFIED_USER,MODIFIED_DATE) values (115073,1,4557,91503,2809,to_date('07-AUG-09','DD-MON-RR'),to_date('10-NOV-09','DD-MON-RR'),'Verified',to_date('10-NOV-09','DD-MON-RR'),'Boo',null,'BOB','Jolene','Luna',null,'PO Box 146',null,'Boo','OK','74840','potter','STANDARD',to_date('06-MAY-09','DD-MON-RR'),21926,2809,null,null,null,null,null,null,null,'Ms.',null,null);
    Insert into SOR_TRACKING (TRACKING_ID,LETTER_ID,OFFENDER_ID,LOCATION_ID,OFFICE_ID,MAIL_DATE,RESPONSE_DATE,STATUS,ENTRY_DATE,ENTRY_USER,COMMENTS,FIRST_NAME,MIDDLE_NAME,LAST_NAME,SIR_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP,COUNTY,OFFENDER_TYPE,LAST_MAIL_DATE,BATCH_ID,JURISDICTION,DL_NAME,DL_OFFICE,DL_ADDRESS,DL_MAILING_ADDRESS,DL_CITY,DL_STATE,DL_ZIP,TITLE,MODIFIED_USER,MODIFIED_DATE) values (108510,1,4557,91503,2809,to_date('05-MAY-09','DD-MON-RR'),to_date('06-MAY-09','DD-MON-RR'),'Verified',to_date('07-MAY-09','DD-MON-RR'),'Casper',null,'BOB','Jolene','Luna',null,'PO Box 146',null,'Boo','OK','74840','potter','STANDARD',to_date('01-MAY-09','DD-MON-RR'),21316,2809,null,null,null,null,null,null,null,'Ms.',null,null);
    Insert into SOR_TRACKING (TRACKING_ID,LETTER_ID,OFFENDER_ID,LOCATION_ID,OFFICE_ID,MAIL_DATE,RESPONSE_DATE,STATUS,ENTRY_DATE,ENTRY_USER,COMMENTS,FIRST_NAME,MIDDLE_NAME,LAST_NAME,SIR_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP,COUNTY,OFFENDER_TYPE,LAST_MAIL_DATE,BATCH_ID,JURISDICTION,DL_NAME,DL_OFFICE,DL_ADDRESS,DL_MAILING_ADDRESS,DL_CITY,DL_STATE,DL_ZIP,TITLE,MODIFIED_USER,MODIFIED_DATE) values (101463,1,4557,88052,2809,to_date('05-FEB-09','DD-MON-RR'),null,'Mailed',to_date('05-FEB-09','DD-MON-RR'),'Boo',null,'BOB','Jolene','Luna',null,'PO Box 146',null,'Boo','OK','74840','potter','STANDARD',to_date('15-DEC-08','DD-MON-RR'),20525,2809,null,null,null,null,null,null,null,'Ms.',null,null);
    Insert into SOR_TRACKING (TRACKING_ID,LETTER_ID,OFFENDER_ID,LOCATION_ID,OFFICE_ID,MAIL_DATE,RESPONSE_DATE,STATUS,ENTRY_DATE,ENTRY_USER,COMMENTS,FIRST_NAME,MIDDLE_NAME,LAST_NAME,SIR_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP,COUNTY,OFFENDER_TYPE,LAST_MAIL_DATE,BATCH_ID,JURISDICTION,DL_NAME,DL_OFFICE,DL_ADDRESS,DL_MAILING_ADDRESS,DL_CITY,DL_STATE,DL_ZIP,TITLE,MODIFIED_USER,MODIFIED_DATE) values (97272,1,4557,88052,2809,to_date('05-DEC-08','DD-MON-RR'),to_date('15-DEC-08','DD-MON-RR'),'Verified',to_date('17-DEC-08','DD-MON-RR'),'Casper',null,'BOB','Jolene','Luna',null,'PO Box 146',null,'Boo','OK','74840','potter','STANDARD',to_date('12-NOV-08','DD-MON-RR'),20018,2809,null,null,null,null,null,null,null,'Ms.',null,null);
    Insert into SOR_TRACKING (TRACKING_ID,LETTER_ID,OFFENDER_ID,LOCATION_ID,OFFICE_ID,MAIL_DATE,RESPONSE_DATE,STATUS,ENTRY_DATE,ENTRY_USER,COMMENTS,FIRST_NAME,MIDDLE_NAME,LAST_NAME,SIR_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP,COUNTY,OFFENDER_TYPE,LAST_MAIL_DATE,BATCH_ID,JURISDICTION,DL_NAME,DL_OFFICE,DL_ADDRESS,DL_MAILING_ADDRESS,DL_CITY,DL_STATE,DL_ZIP,TITLE,MODIFIED_USER,MODIFIED_DATE) values (68398,1,4557,76399,1070,to_date('10-OCT-07','DD-MON-RR'),to_date('15-NOV-07','DD-MON-RR'),'Letter Returned',to_date('15-NOV-07','DD-MON-RR'),'KERRYMIN','post office: not delivaerable as addressed ','BOB','Jolene','Luna',null,'752 Boo',null,'Norman','OK','73072','Cleveland','STANDARD',to_date('17-MAY-07','DD-MON-RR'),16596,1070,null,null,null,null,null,null,null,'Ms.',null,null);
    Insert into SOR_TRACKING (TRACKING_ID,LETTER_ID,OFFENDER_ID,LOCATION_ID,OFFICE_ID,MAIL_DATE,RESPONSE_DATE,STATUS,ENTRY_DATE,ENTRY_USER,COMMENTS,FIRST_NAME,MIDDLE_NAME,LAST_NAME,SIR_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP,COUNTY,OFFENDER_TYPE,LAST_MAIL_DATE,BATCH_ID,JURISDICTION,DL_NAME,DL_OFFICE,DL_ADDRESS,DL_MAILING_ADDRESS,DL_CITY,DL_STATE,DL_ZIP,TITLE,MODIFIED_USER,MODIFIED_DATE) values (63767,1,4557,76399,1070,to_date('09-AUG-07','DD-MON-RR'),to_date('20-AUG-07','DD-MON-RR'),'Letter Returned',to_date('20-AUG-07','DD-MON-RR'),'KERRYMIN','post office: not deliverable as addressed ','BOB','Jolene','Luna',null,'752 Boo',null,'Norman','OK','73072','Cleveland','STANDARD',to_date('17-MAY-07','DD-MON-RR'),16077,1070,null,null,null,null,null,null,null,'Ms.',null,null);
    Insert into SOR_TRACKING (TRACKING_ID,LETTER_ID,OFFENDER_ID,LOCATION_ID,OFFICE_ID,MAIL_DATE,RESPONSE_DATE,STATUS,ENTRY_DATE,ENTRY_USER,COMMENTS,FIRST_NAME,MIDDLE_NAME,LAST_NAME,SIR_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP,COUNTY,OFFENDER_TYPE,LAST_MAIL_DATE,BATCH_ID,JURISDICTION,DL_NAME,DL_OFFICE,DL_ADDRESS,DL_MAILING_ADDRESS,DL_CITY,DL_STATE,DL_ZIP,TITLE,MODIFIED_USER,MODIFIED_DATE) values (59499,1,4557,76399,1070,to_date('14-MAY-07','DD-MON-RR'),to_date('17-MAY-07','DD-MON-RR'),'Verified',to_date('17-MAY-07','DD-MON-RR'),'LAWANHAM',null,'BOB','Jolene','Luna',null,'752 Boo',null,'Norman','OK','73072','Cleveland','STANDARD',to_date('14-MAY-07','DD-MON-RR'),15569,1070,null,null,null,null,null,null,null,'Ms.',null,null);
    Insert into SOR_TRACKING (TRACKING_ID,LETTER_ID,OFFENDER_ID,LOCATION_ID,OFFICE_ID,MAIL_DATE,RESPONSE_DATE,STATUS,ENTRY_DATE,ENTRY_USER,COMMENTS,FIRST_NAME,MIDDLE_NAME,LAST_NAME,SIR_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP,COUNTY,OFFENDER_TYPE,LAST_MAIL_DATE,BATCH_ID,JURISDICTION,DL_NAME,DL_OFFICE,DL_ADDRESS,DL_MAILING_ADDRESS,DL_CITY,DL_STATE,DL_ZIP,TITLE,MODIFIED_USER,MODIFIED_DATE) values (54783,1,4557,74693,1070,to_date('01-MAR-07','DD-MON-RR'),to_date('06-MAR-07','DD-MON-RR'),'Verified',to_date('13-MAR-07','DD-MON-RR'),'Boo',null,'BOB','Jolene','Luna',null,'1203 Rebecca Lane',null,'Norman','OK','73072','Cleveland','STANDARD',to_date('01-MAR-07','DD-MON-RR'),14994,1070,null,null,null,null,null,null,null,'Ms.',null,null);
    Insert into SOR_TRACKING (TRACKING_ID,LETTER_ID,OFFENDER_ID,LOCATION_ID,OFFICE_ID,MAIL_DATE,RESPONSE_DATE,STATUS,ENTRY_DATE,ENTRY_USER,COMMENTS,FIRST_NAME,MIDDLE_NAME,LAST_NAME,SIR_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP,COUNTY,OFFENDER_TYPE,LAST_MAIL_DATE,BATCH_ID,JURISDICTION,DL_NAME,DL_OFFICE,DL_ADDRESS,DL_MAILING_ADDRESS,DL_CITY,DL_STATE,DL_ZIP,TITLE,MODIFIED_USER,MODIFIED_DATE) values (34100,1,4557,58761,1094,to_date('08-FEB-06','DD-MON-RR'),null,'Mailed',to_date('31-MAR-06','DD-MON-RR'),'LAWANHAM','per M. Splawn','BOB','Jolene','Luna',null,'Rt. 1 Box 42',null,'Wewoka','OK','74884','Seminole','STANDARD',to_date('03-FEB-06','DD-MON-RR'),9560,1094,null,null,null,null,null,null,null,'Ms.',null,null);
    Insert into SOR_TRACKING (TRACKING_ID,LETTER_ID,OFFENDER_ID,LOCATION_ID,OFFICE_ID,MAIL_DATE,RESPONSE_DATE,STATUS,ENTRY_DATE,ENTRY_USER,COMMENTS,FIRST_NAME,MIDDLE_NAME,LAST_NAME,SIR_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP,COUNTY,OFFENDER_TYPE,LAST_MAIL_DATE,BATCH_ID,JURISDICTION,DL_NAME,DL_OFFICE,DL_ADDRESS,DL_MAILING_ADDRESS,DL_CITY,DL_STATE,DL_ZIP,TITLE,MODIFIED_USER,MODIFIED_DATE) values (27562,1,4557,52781,1115,to_date('08-NOV-05','DD-MON-RR'),null,'Mailed',to_date('08-NOV-05','DD-MON-RR'),'Boo',null,'BOB','Jolene','Luna',null,'5590 Rebel Ridge Rd',null,'El Reno','OK','73036','Canadian','STANDARD',to_date('16-OCT-05','DD-MON-RR'),8034,1115,null,null,null,null,null,null,null,'Ms.',null,null);
    Insert into SOR_TRACKING (TRACKING_ID,LETTER_ID,OFFENDER_ID,LOCATION_ID,OFFICE_ID,MAIL_DATE,RESPONSE_DATE,STATUS,ENTRY_DATE,ENTRY_USER,COMMENTS,FIRST_NAME,MIDDLE_NAME,LAST_NAME,SIR_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP,COUNTY,OFFENDER_TYPE,LAST_MAIL_DATE,BATCH_ID,JURISDICTION,DL_NAME,DL_OFFICE,DL_ADDRESS,DL_MAILING_ADDRESS,DL_CITY,DL_STATE,DL_ZIP,TITLE,MODIFIED_USER,MODIFIED_DATE) values (11822,1,4557,39238,1094,to_date('03-MAR-05','DD-MON-RR'),null,'Mailed',to_date('03-MAR-05','DD-MON-RR'),'Boo',null,'BOB','Jolene','Luna',null,'Rt. 1, Box 42',null,'Wewoka','OK','74884','Seminole','STANDARD',to_date('17-FEB-05','DD-MON-RR'),306,null,null,null,null,null,null,null,null,'Ms.',null,null);
    Insert into SOR_TRACKING (TRACKING_ID,LETTER_ID,OFFENDER_ID,LOCATION_ID,OFFICE_ID,MAIL_DATE,RESPONSE_DATE,STATUS,ENTRY_DATE,ENTRY_USER,COMMENTS,FIRST_NAME,MIDDLE_NAME,LAST_NAME,SIR_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP,COUNTY,OFFENDER_TYPE,LAST_MAIL_DATE,BATCH_ID,JURISDICTION,DL_NAME,DL_OFFICE,DL_ADDRESS,DL_MAILING_ADDRESS,DL_CITY,DL_STATE,DL_ZIP,TITLE,MODIFIED_USER,MODIFIED_DATE) values (2257,1,4557,18958,1087,to_date('03-AUG-04','DD-MON-RR'),null,'Mailed',to_date('29-JAN-05','DD-MON-RR'),'SYSTEM',null,'BOB','Jolene','Luna',null,'1037 Tabor Drive',null,'Oklahoma City','OK','73107','Oklahoma',null,null,178,null,null,null,null,null,null,null,null,null,null,null);
    I want to find the all the records whose mail date(earliest of all with no reply) and no response date and find the earlier one with reponse date and display it as a one row.
    For example 
    mail_Date+45 mail_Date in table    earliest date of reponse
    BEGIN_DATE   DEL_DATES           END_DATE                 TRACKING_ID
    17-SEP-04    03-AUG-04 06-          MAR-07                                2257
    Other date and their response date should be shown same way
    The issue is I am not able to retrieve other records in the tables because I am using MIN function.
    here is my query
    SELECT   t.MAIL_DATE + 45 begin_Date,
      del_date.del_dates,
      (SELECT MIN(st2.RESPONSE_DATE) Del_end_date
      FROM sor_tracking st2
      WHERE t.OFFENDER_ID   = st2.OFFENDER_ID
      AND st2.RESPONSE_DATE > del_date.del_dates
      ) End_date,
      t.OFFENDER_ID,
      t.TRACKING_ID
    FROM
      (SELECT MIN(st1.MAIL_DATE) del_dates
        FROM sor_tracking st1
      WHERE st1.OFFENDER_ID  = 4557
      AND st1.RESPONSE_DATE IS NULL
      AND st1.MAIL_DATE      < SysDate - 45
      AND st1.STATUS                  IN ('Letter Returned', 'Mailed')
      AND st1.LETTER_ID               IN (1, 4)
      ) del_date,
      sor_tracking t
    WHERE t.MAIL_DATE   <= del_date.del_dates
    AND (t.OFFENDER_ID   = 4557
         AND t.RESPONSE_DATE IS NULL)
    ORDER BY 1 desc
    Thanks for you time and help.

    with
    sor_tracking as
    (select 4557 offender_id,
            1 letter_id,
            to_date('05-NOV-13','dd-MON-yy') mail_date,
            781410 tracking_id,
            110207 location_id,
            null response_date,
            'Mailed' status
       from dual
    union all
    select 4557,1,to_date('08-FEB-12','dd-MON-yy'),190294,110207,to_date('15-FEB-12','dd-MON-yy'),'Verified' from dual union all
    select 4557,1,to_date('05-DEC-11','dd-MON-yy'),184647,110207,to_date('13-DEC-11','dd-MON-yy'),'Verified' from dual union all
    select 4557,1,to_date('03-FEB-11','dd-MON-yy'),157253,102288,null,'Mailed' from dual union all
    select 4557,1,to_date('01-NOV-10','dd-MON-yy'),149710,102288,to_date('08-NOV-10','dd-MON-yy'),'Verified' from dual union all
    select 4557,1,to_date('03-JUN-10','dd-MON-yy'),138268,99564,to_date('17-JUN-10','dd-MON-yy'),'Letter Returned' from dual union all
    select 4557,1,to_date('04-FEB-10','dd-MON-yy'),128798,91503,null,'Mailed' from dual union all
    select 4557,1,to_date('07-AUG-09','dd-MON-yy'),115073,91503,to_date('10-NOV-09','dd-MON-yy'),'Verified' from dual union all
    select 4557,1,to_date('05-MAY-09','dd-MON-yy'),108510,91503,to_date('06-MAY-09','dd-MON-yy'),'Verified' from dual union all
    select 4557,1,to_date('05-FEB-09','dd-MON-yy'),101463,88052,null,'Mailed' from dual union all
    select 4557,1,to_date('05-DEC-08','dd-MON-yy'),97272,88052,to_date('15-DEC-08','dd-MON-yy'),'Verified' from dual union all
    select 4557,1,to_date('10-OCT-07','dd-MON-yy'),68398,76399,to_date('15-NOV-07','dd-MON-yy'),'Letter Returned' from dual union all
    select 4557,1,to_date('09-AUG-07','dd-MON-yy'),63767,76399,to_date('20-AUG-07','dd-MON-yy'),'Letter Returned' from dual union all
    select 4557,1,to_date('14-MAY-07','dd-MON-yy'),59499,76399,to_date('17-MAY-07','dd-MON-yy'),'Verified' from dual union all
    select 4557,1,to_date('01-MAR-07','dd-MON-yy'),54783,74693,to_date('06-MAR-07','dd-MON-yy'),'Verified' from dual union all
    select 4557,1,to_date('08-FEB-06','dd-MON-yy'),34100,58761,null,'Mailed' from dual union all
    select 4557,1,to_date('08-NOV-05','dd-MON-yy'),27562,52781,null,'Mailed' from dual union all
    select 4557,1,to_date('03-MAR-05','dd-MON-yy'),11822,39238,null,'Mailed' from dual union all
    select 4557,1,to_date('03-AUG-04','dd-MON-yy'),2257,18958,null,'Mailed' from dual
    select offender_id,
           letter_id,
           to_char(event_date,'dd-MON-yy') mail_date,
           tracking_id,
           location_id,
           case when last_response_verified is null
                then status
           end status,
           to_char(last_response_verified,'dd-MON-yy') response_date,
           case when last_response_verified is not null
                then 'Verified'
           end response_status
      from (select offender_id,
                   letter_id,
                   event_date,
                   tracking_id,
                   location_id,
                   status,
                   to_find,
                   verified_response,
                   last_value(verified_response ignore nulls) over (partition by offender_id,letter_id
                                                                        order by event_date desc
                                                                   ) last_response_verified
              from (select offender_id,
                           letter_id,
                           event_date,
                           tracking_id,
                           location_id,
                           status,
                           case when event_date < lead(event_date) over (partition by offender_id,letter_id,tracking_id
                                                                             order by event_date
                                                                        ) - 45
                                then 'THIS'
                                when status = 'Mailed'
                                 and lead(tracking_id) over (partition by offender_id,letter_id,tracking_id
                                                                 order by event_date
                                                            ) is null
                                 and direction != lag(direction,1,'null') over (partition by offender_id,letter_id
                                                                                    order by event_date
                                then 'this'
                           end to_find,
                           case when status = 'Verified'
                                then event_date
                           end verified_response
                      from (select offender_id,
                                   letter_id,
                                   mail_date event_date,
                                   tracking_id,
                                   location_id,
                                   'Mailed' status,
                                   'sent' direction
                              from sor_tracking
                            union all
                            select offender_id,
                                   letter_id,
                                   response_date,
                                   tracking_id,
                                   location_id,
                                   status,
                                   'rcvd' direction
                              from sor_tracking
                             where response_date is not null
    where to_find is not null
    order by event_date desc
    OFFENDER_ID
    LETTER_ID
    MAIL_DATE
    TRACKING_ID
    LOCATION_ID
    STATUS
    RESPONSE_DATE
    RESPONSE_STATUS
    4557
    1
    05-NOV-13
    781410
    110207
    Mailed
    4557
    1
    03-FEB-11
    157253
    102288
    13-DEC-11
    Verified
    4557
    1
    04-FEB-10
    128798
    91503
    08-NOV-10
    Verified
    4557
    1
    07-AUG-09
    115073
    91503
    10-NOV-09
    Verified
    4557
    1
    05-FEB-09
    101463
    88052
    06-MAY-09
    Verified
    4557
    1
    03-AUG-04
    2257
    18958
    06-MAR-07
    Verified
    Regards
    Etbin

  • Bex Query WAD Iview - Look and feel.

    I've put a query into a WAD and I've published the WAD as an ivew. But i want the look and feel to be "Corporate" and not use the SAP standard blues etc. I have created a custom them but when I preview the iview the query in the WAD is blue rather than the green I want and have used in my theme. I created a custom stylesheet and tried using &style_sheet in the Iview but the bulk of the query is still blue. I tried putting a line in the XTHML just below <HEAD> that said <link rel="STYLESHEET" type="text/css" href="&quot;bwmimerep:///sap/bw/MIME/customer/stylesheets/My_Theme_For_Portal.css" but that doesnt seem to work either. The bulk of the data displayed in the query remians blue. I just dont think it's referencing my stylesheet.
    Any ideas? Help is much appreciated.
    Edited by: Joel Yates on Mar 16, 2011 2:18 PM

    Joel,
    What I would do is publish the WAD as a template in your system and then call your query like:
    ...?query=zbm_m001_q001&template=zmywad_temp
    or
    make the default template that is called your WAD - zmywad_temp
    tcode - RSCUSTV27
    Customizing ID
    Broadcasting         0BROADCASTING_TEMPLATE70
    Query Precalculation 0QUERY_TEMPLATE_BROADCASTING70
    Report Precalculat.  0REPORT_TEMPLATE_BROADCASTING
    Enterpr. Report      0REPORT_DEFAULT_TEMPLATE
    Ad Hoc Analysis      0ANALYSIS_PATTERN
    You can change 0ANALYSIS_PATTERN to zmywad_temp
    Couple things to remember: in your new default template make it so all queries can use it and don't default it to a specific query unless you want you users to get a different look on that query.
    Hope I'm understanding ur question correctly.
    Mike

  • Query with Start Date and End Date

    Dear Members,
    I have done a basic query on to get a report on Sales Invoices processed in a given period with the General Ledger account they were posted to. Minor hassle is that to change the dates, I have to go into the script (see extract below) and change dates manually, save query etc.
    Is there a way to have the query, when selected to run, pop up with window, allowing user to input say "start date" and "finish date". I imagine it will require some complex addition to the script below, any assistance will be appreciated.
    Regards
    Raj
    SELECT T1.[DocNum] AS 'Document Number', T1.[DocDate] AS 'Posting Date', T0.[AcctCode] AS 'Account Code', T0.[Dscription] AS 'Item/Service Description', T0.[LineTotal] AS 'Row Total' FROM  [dbo].[INV1] T0  INNER  JOIN [dbo].[OINV] T1  ON  T1.[DocEntry] = T0.[DocEntry]   WHERE T1.[DocDate] > (CONVERT(DATETIME, '20110801', 112) )  AND  T1.[DocDate] < (CONVERT(DATETIME, '20110831', 112) )

    Hi Raj,
    try this:
    /*SELECT FROM [dbo].[OINV] T0*/
    declare  @StartDate as datetime
    /* WHERE */
    set @StartDate = /* T0.DocDate */ '[%0]'
    /*SELECT FROM [dbo].[OINV] T1*/
    declare  @EndDate as datetime
    /* WHERE */
    set @EndDate = /* T0.DocDate */ '[%1]'
    SELECT T1.DocNum AS 'Document Number', T1.DocDate AS 'Posting Date', T0.AcctCode AS 'Account Code', T0.Dscription AS 'Item/Service Description', T0.LineTotal AS 'Row Total'
    FROM dbo.INV1 T0 INNER JOIN dbo.OINV T1 ON T1.DocEntry = T0.DocEntry WHERE T1.DocDate > @StartDate AND T1.DocDate < @EndDate
    Thanks,
    Neetu

  • How to use BEX query in BI data archiving?

    I see some power point presentations about  the use of BEX query in the archiving customizing setting.
    But the presentations have no text about the details.
    Can somebody help detail how to use BEX to customize archiving objects?
    Thanks!

    Yeah I would be interested in such a solution as well.
    Can anyone help here?
    Cheers,
    Andreas

  • BEx Query Returning No Data

    I have loaded the Active Content of an ODS (the /BIC/ZAXXXXXXXX table) directly via an Insert statement in an ABAP program.  I can see the data when I go through SE11 and through the Active Data button inside of the Manage option of the ODS. When I use this ODS via BEx I do not get any data to appear.  Does anyone know why this would be?  Do I need to load a different table, maybe the change log, instead of the Active content?  It has now turned into more of a curiosity question of why an ODS with Active Data, but no Requests, would show no results in BEx.  Any help would be appreciated.
    Jon

    Hi,
    maybe loading records straight into the active table doesn't give BW a signal that the data is refreshed. The result from your query are most likely to come from cache ? Try to change the selection of the query or run the query without using the cache.
    regards,
    Raymond Baggen
    Uphantis bv

  • Sales order query - display invoice date and invoice number

    I have a query that is reading information from both the ORDR and RDR1. How do I link to AR invoice to get the invoice number and invoice date if the line item of the sales order has been shipped (we do not use deliveries so the AR invoice is the next document after the sales order.
    Thanks

    Hi Keith,
    The link between ORDR and RDR1 to invoice:
    RDR1.trgetentry = OINV.DocEntry
    or
    INV1.BaseEntry = ORDR.DocEntry
    Use which is more appropriate to your query
    Regards,
    David

  • Issues with loading master data and hierarchy from BI InfoObject

    Hi,
    I was successful with loading the master data from BI InfoObject. It copies the text node as well but it discards the space I have in the technical name when it copies it to BPC. For example if my Text Node technical ID is "NODE 1" it copies it as "NODE1" on BPC side because of which my hierarchy load fails as it is not able to find "NODE 1".
    What is the reason it deletes the space from technical ID? and how can I resolve this issue?
    Do we have a provision to write a ABAP exit where I can check?
    (PS: If i manuallay enter space on my BPC dimension the hierarchy loads successfully)
    Thanks in advance,
    Diksha.

    Hi,
    You can check this in start routine which can be called from Transformation file using BADI.
    http://help.sap.com/saphelp_bpc75_nw/helpdata/en/28/b66863b41f47589b9943f80b63def6/content.htm
    Hope this helps...
    regards,
    Raju

Maybe you are looking for