OR between groups in Row-Restrictions, priority - Universe Design

Old School Univers Design, no SAP source, but plain Oracle
Two Questions here
1 - Priority in rowrestrictions
from documentation:
u201CYou can specify which restriction to apply to a user that belongs to multiple groups using a universe. For example a user belongs to two groups, Sales with a restriction to view 5000 rows of data, and Marketing to view 10000 rows. When the user refreshes a report, the restriction associated with the lowest level group is applied. In the example above, if the Sales group had order 1 and Marketing had order 2, the restriction from marketing (10000) would be used.u201D
I read in the documentation for Rowrestrictions, that the restriction on top of the order list will be the one kicking in, in case of a huser having two conflicting restrictions.
Does anyone have experience with this ?
Does it work ?
My experience is that its not working.  Both rowrestrictions gets into the SQL with AND between as shown
  AND  ( FLEX_SEGMENT5.FLEX_VALUE IN (030,033,090,805,041,062,048)
  AND  FLEX_SEGMENT5.FLEX_VALUE IN (041,048,062)
the first line is my new restriction with priority 1,
the second line is the other restriction with priority 6
2 - OR between groups
there is a Restriction option in Manage Rowrestrictions , where you can spesify Rowrestriction Combinations using AND or OR.
I have not been able to have this working.
Anyone having a positive experience here ? Or have I misunderstood what this actually means.
I would expect 
  WHERE  ( FLEX_SEGMENT5.FLEX_VALUE IN (030,033,090,805,041,062,048)
  OR FLEX_SEGMENT5.FLEX_VALUE IN (041,048,062)
What I get is
( FLEX_SEGMENT5.FLEX_VALUE IN (030,033,090,805,041,062,048)
  AND  FLEX_SEGMENT5.FLEX_VALUE IN (041,048,062)
Is this a known bug ?
I have tried this in WEBI 3.1 and R2

Hello,
In fact, Priority is used for universe overload where only one overload among several might apply. This is the case for connection overloads, table mappings..., but not for row restrictions.
For row restrictions, you have AND/OR aggregation operators. In Universe design tool, you have the option to choose how Row restriction will aggregate (click the "cog" icon):
+ Combine row restrictions using AND
+ Combine row restrictions using AND within group hierarchies and OR between groups
In the first case, all row restrictions that might apply to a user will be aggregated with AND operators.
In the second case, row restrictions that are inherited are aggregated with AND operators and the ones coming the user groups a user belongs to are aggregated with OR operators.
Ex with the following user groups organisation:
G1
  G11 (G11 belongs to G1 group)
G2
  G21 (G21 belongs to G2 group)
and user U belongs to G11 and G21 user groups.
Final row restriction that applies to the user U is:
(G1 AND G11) OR (G2 AND G21)
Hope it helps.
Cheers
~~cas

Similar Messages

  • How to apply row restrictions to universes generated via Universe builder

    I have a universe generated via Universe Builder. The source is SAP BW.
    Now I want to apply row restrictions using some external security tables available inside another schema of my datawarehose. Restrictions should be like:
    0 < (select count(*) from SECURITY_TABLE x   where x.name = @Variable('BOUSER')   )
    How I can do it ? How I can reference this external security table ?
    Thanks

    Umberto,
    Row level securtity does not seem to be avaible in Designer when using a SAP BW source.
    For the SAP BW related sources you would need to set the connection to use SSO and within BW apply authorisations on the objects/dimesions restricting users i.e implementing row level restrictions and use this object in universe and report so that the authorisations are honored in SAP BW.

  • Grouping of Char Restrictions in Query Designer

    Hi
      Can you please update me on how can i achieve this at report level (Quesry Designer)
    Lets assume i had a Char Product which had 26 different values as Master data.
    Key: A,B,C.....Z
    In the report i need to group those values,Line
    North should display A,B,C,D
    South should display EFGH
    WEST Should display IJKL
    other should display the remaining all other  products
    Can i achieve this in Query Designer
    Thanks

    Hi,
    As per your requirement i can suggest you a way:
    1. Create as the structure as per your requirement: NORTH, SOUTH, EAST, WEST, OTHERS
    2. Then select the key figures and in the display properties; select the "hide (can be shown)"
    3, there you won't get the column heading. then you can describe your own column heading.
    PS: But you can do this only in BEx analyzer (in the workbooks). You cannot do this in the Web reports.
    Regards,
    Ravi Kanth

  • Xi 3.1 SP3 fp3.2 : Syntax error when validating row restriction

    Hi all,
    we currently migrating from Xi R2 to Xi 3.1 sp3 fp 3.2
    The database is sql server 2005
    I have a universe with a row restriction.
    Here is the syntax :
    ISNULL(COMMERCIAUXREF_ACC.Ptf_TopComPriv,1)=1
    COMMERCIAUXREF_ACC is an alias to the table dbo.VW_COMMERCIAUXREF_ACC
    In XiR2, when i create the restriction, i check the syntax --> OK
    So I :
    - import the universe on Xi 3.1 SP3 fp3.2
    - open the universe with designer
    - open the restriction
    - check the restriction --> Syntax error
    I've made no change between the original universe on Xi R2 and the one on Xi 3.1 sp3
    I've errors in designer log file
    I've made 2 tests :
    - The first one with oledb connector (changes made in oledb.sbo file)
    Error log :
    DBD:[Microsoft OLE DB Provider for SQL Server] : Invalid object name 'COMMERCIAUXREF_ACC'.
    BOUnvRowsTab::Parse CS Error - Syntax is Wrong
    - The second one with sql 2005 native client (changes made in oledb.sbo file), same issue,
    Error log:
    DBD:[Microsoft SQL Native Client] : Invalid object name 'COMMERCIAUXREF_ACC'.
    BOUnvRowsTab::Parse CS Error - Syntax is Wrong
    Thx

    I solved the problem.
    The cause would be: Multiple Designer versions installed on the client machine.
    You should uninstall all the existing multiple versions(Ex: XI Release2, XI3.0, XI3.1) of Business Objects Designer.
    Re-install the latest upgraded version of designer in use, as that on server machine.
    Cheers
    Giuseppe De Vitis

  • Best Practice to implement row restriction level

    Hi guys,
    We need to implement a security row filter scenario in our reporting system. Following several recommendations already posted in the forum we have created a security table with the following columns
    userName  Object Id
    U1             A
    U2             B
    where our fact table is something like that
    Object Id    Fact A
    A                23
    B                4
    Additionally we have created row restriction on the universe based on the following where clause:
    UserName = @Variable('BOUSER')
    If the report only contains objects based on Fact table the restriction is never applied. This has sense as docs specify that the row restrictions are only applied if the table is actually invoked in the SQL statement (SELECT statment is supposed).
    Question is the following: Which is the best practice recommended in this situation. Create a dummy column in the security table, map into it into the universe and include the object in the query?
    Thanks
    Edited by: Alfons Gonzalez on Mar 8, 2012 5:33 PM

    Hi,
    This solution also seemed to be the most suitable for us. Problem that we have discover: when the restriction set is not applied for a given user (the advantage of using restriction set is the fact that is not always applied) the query joins the fact table with the security table withou applying any where clause based on @variable('USER'). This is not a problem if the secuity table contains a 1:1 relationship betwwen users and secured objects , but (as in our case) relathion ship is 1:n query provide "additional wrong rows".
    By the moment we have discarded the use of the restriction sets. The effect of putting a dummy column based on the security table may have undesired effects when the condition is not applied.
    I don't know if anyone has found how to workaround this matter.
    Alfons

  • Trying to get ending effective date for groups of rows

    Hi Everyone,
    I've searched the forums, but I can't find a post that presents a problem quite like this.
    I have some data that looks like this:
            ID_NUM     EFFECTIVE ALLOC_PERCENT   ACCT
           101 01-JUL-11            21   A1
           101 01-JUL-11            72   A2
           101 01-JUL-11             7   A3
           101 01-JUL-12            20   B1
           101 01-JUL-12            80   B2
           101 01-JAN-13            20   A1
           101 01-JAN-13            20   A2
           101 01-JAN-13            50   A3
           101 01-JAN-13            10   B1
           101 01-JUN-13            50   A1
           101 01-JUN-13            50   A2(note - I manually inserted blank lines for clarity)
    Here's the logic: The rows represent a percentage allocation to the account number for the specified id number, for that effective date. A newer effective date supercedes previous ones, and if any row in the conceptual group is superceded, then they all are.
    I'm trying to find out the date when each group's effective period ended, and include that in the result set so that I can subsequently calculate the number of days a given row was effective; something like this;
      ID_NUM     EFFECTIVE END_DATE   ALLOC_PERCENT ACCT
           101 01-JUL-11 01-JUL-12             21 A1
           101 01-JUL-11 01-JUL-12             72 A2
           101 01-JUL-11 01-JUL-12              7 A3
           101 01-JUL-12 01-JAN-13             20 B1
           101 01-JUL-12 01-JAN-13             80 B2
           101 01-JAN-13 01-JUN-13             20 A1
           101 01-JAN-13 01-JUN-13             20 A2
           101 01-JAN-13 01-JUN-13             50 A3
           101 01-JAN-13 01-JUN-13             10 B1
           101 01-JUN-13 <null>                50 A1
           101 01-JUN-13 <null>                50 A2The END_DATE of the group is the EFFECTIVE_DATE of the following group (ordered by ID_NUM, EFFECTIVE_DATE).
    The last two rows' END_DATE is null because there is no group of rows with a later effective date - in my process, I'll NVL that to sysdate so that my days calculations will be valid.
    I tried some analytic queries with LEAD, but I couldn't figure out how to make it get the next group's effective date. I could get the next row's effective date, but not the next group's. I couldn't specify how many lead rows to look ahead, because there is not a consistent number of rows in each group.
    How do I populate the END_Date column?
    Here's the code to create the above.
    create table t
    (id_num number,
    effective_date date,
    alloc_percent number,
    acct_code varchar2(4)
    insert into t (id_num,Effective_date,alloc_percent,acct_code) values(101,'01-jul-2011',21.0,'A1');
    insert into t (id_num,Effective_date,alloc_percent,acct_code) values(101,'01-jul-2011',72.0,'A2');
    insert into t (id_num,Effective_date,alloc_percent,acct_code) values(101,'01-jul-2011',7.0,'A3');
    insert into t (id_num,Effective_date,alloc_percent,acct_code) values(101,'01-jul-2012',20.0,'B1');
    insert into t (id_num,Effective_date,alloc_percent,acct_code) values(101,'01-jul-2012',80.0,'B2');
    insert into t (id_num,Effective_date,alloc_percent,acct_code) values(101,'01-jan-2013',20.0,'A1');
    insert into t (id_num,Effective_date,alloc_percent,acct_code) values(101,'01-jan-2013',20.0,'A2');
    insert into t (id_num,Effective_date,alloc_percent,acct_code) values(101,'01-jan-2013',50.0,'A3');
    insert into t (id_num,Effective_date,alloc_percent,acct_code) values(101,'01-jan-2013',10.0,'B1');
    insert into t (id_num,Effective_date,alloc_percent,acct_code) values(101,'01-jun-2013',50.0,'A1');
    insert into t (id_num,Effective_date,alloc_percent,acct_code) values(101,'01-jun-2013',50.0,'A2');
    commit;
    select * from t;Oracle version information:
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    "CORE     11.2.0.3.0     Production"
    TNS for Solaris: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    Thank you very much

    select  id_num,
            effective_date,
            first_value(effective_date)
              over(
                   partition by id_num
                   order by effective_date
                   range between 1 following and unbounded following
                  ) end_date,
            alloc_percent,
            acct_code
      from  t
      order by id_num,
               effective_date
        ID_NUM EFFECTIVE END_DATE  ALLOC_PERCENT ACCT
           101 01-JUL-11 01-JUL-12            21 A1
           101 01-JUL-11 01-JUL-12            72 A2
           101 01-JUL-11 01-JUL-12             7 A3
           101 01-JUL-12 01-JAN-13            20 B1
           101 01-JUL-12 01-JAN-13            80 B2
           101 01-JAN-13 01-JUN-13            20 A1
           101 01-JAN-13 01-JUN-13            10 B1
           101 01-JAN-13 01-JUN-13            20 A2
           101 01-JAN-13 01-JUN-13            50 A3
           101 01-JUN-13                      50 A1
           101 01-JUN-13                      50 A2
    11 rows selected.
    SQL> SY.

  • Searching for code for giving headings to certain group of rows dynamically

    Hi All,
    We have a requirement of giving headings to the group of rows.
    For eg: there are three categories A,B&C. under each category the query returns say a set of 3 rows each. Now we have the requirement of arranging these rows under proper category with headings A,Bor C.We can look at this scenario in this way also. suppose category A is apples having 3 rows with data apple and its colour. Next is category B- Mangoes with data mango and its colour. similar is the case with C.We have to arrange them properly by giving them headings as A, B or C. These should be arranged one after another in a tabular fashion. How to do this using OAF. We have made different VOs for headings part and details part.
    Thanks
    Pooja

    Pooja,
    Looking at the initial problem statement, My suggestion is to use the row span feature of Advanced table to group rows on row basis.
    But keep in mind, that it supports read only data and there are some other restrictions as well with this approach.
    Another approach to take in case you have updateable fields is to use 3 different tables.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Previous record values displaying in the Group Footer row in the report.

    Hi Friends,
    I have 3 tables
    TableA:(PERNR BEGDA ENDDA are key fields)
    PERNR BEGDA    ENDDA      WERKS
    10001 1/1/2010 12/31/9999 1001
    TableB:(PERNR BEGDA ENDDA SUBTY are key fields)
    PERNR BEGDA    ENDDA       SUBTY  TYPES
    10001 1/1/2010 12/31/9999   01          COMS1
    10001 1/1/2010 12/31/9999   02         COMS2
    TableC:(PERNR BEGDA  ENDDA are key fields)
    PERNR BEGDA  ENDDA        AMNT
    10001 2/2/1997 4/3/2010      1000
    10001 4/4/2010 12/31/9999  2000
    I have joined these table by the key 'PERNR'( like A->B and A->C)
    Groped by the same key 'PERNR'
    My result rows in the report:
    PERNR BEGDA    ENDDA      WERKS  SUBTY  TYPES  BEGDA    ENDDA      AMNT
    10001 1/1/2010 12/31/9999 1001       01         COMS1  2/2/1997 4/3/2010    1000
    10001 1/1/2010 12/31/9999 1001       02         COMS2  2/2/1997 4/3/2010    1000
    10001 1/1/2010 12/31/9999 1001       01         COMS1  4/4/2010 12/31/9999 2000
    10001 1/1/2010 12/31/9999 1001       02         COMS2  4/4/2010 12/31/9999 2000
    But in the report format is like this in the Group Footer row:
    PERNR: 10001                     WERKS:1001
    SUBTY: 02                          AMNT :2000 (Current date)
                                                AMNT :1000 (Previous record)
    I created the format with "Previous" function
    but in the report it is giving the '2000' instead of '1000' in the AMT field
    Please help me, can i use the for loop in the report? or any sugessions?
    Thanks in advance.
    Regards,
    Venkata

    A group footer will dis[lay contents of the last record. You need to sort records to ensure that the last record contains link to your dynamic image.
    Ian

  • Problem with checkbox group in row popin of table.

    In table row popin I have kept Check Box Group.I have mapped  the texts property of checkbox group to the attribute which is under the subnode of the table.the subnode properties singleton=false,selectioncardinality=0-n,and cardinality=0-n.
    if there are 'n' number of records in the table.each record will have its own row popin and in the row popin there is check box group.
    the check box group in the row popin  belongs to that perticular row.
    but the checkboxegroup values in row popins of all the  rows are getting changed to the row which is lead selected.
    The same scenario  (table in the row popin is showing the values corresponding to its perticular row and all the table values in popin are not getting changed to the one lead selected in the main table)is working fine with the table in place of  checkbox group in row popin with datasource property of table  binded to the subnode
    I cant trace out the problem with checkbox group in place of table.
    Please help me in this regard.I have to place check box group in place of table in row popin.
    Thanks and Regards
        Kiran Kumar K

    I have done the same thing successfully with normal check box ui element. Try using check box in your tabel cell editor instead of check box group.

  • Row level security at universe design level

    Hi,
    I am creating a Universe layer on top of non SAP OLAP cube ( from MS Analysis Services 2005 ) .
    My concern is that can we maintain the row level or data level security at universe design level or if i am using that universe in creation of WEBI report so is there any possiblity to maintain this security at WEBI level.
    Regards,
    Mishra Vibhav.

    Thanks for the reply.
    Much Appriciated.
    My only concern is that i read in the Universe Designer developer guide that it does the row level security so can eloborate a bit about how we maintain at Universe level.
    Warm Regrads,
    Mishra Vibhav

  • Grouping of rows of internal table.

    Hi all,
    I am having a requirement in which I want to group two rows of an internal table and assign a pointer to the two rows.
    This pointer variable will then be passed to ALV.
    Help reqd.
    regards.

    hi,
    AT - itab:
    push F1 to look at the documentation for grouping
    then assign the value to a field-symbol.

  • Picking a Max value row out of a group of rows.

    Hi,
    I'm using Oracle 10.2.0.4.0
    For some reason I can't come up with a way to pick out a simple row that contains the max date value out of a group of sub group of rows. The following rows are one group of the result of a complex view ordered by ACCOUNT_NUMBER. I'm just showing the first group for Demo Purposes.
    CUSTOMER_NAME          ACCOUNT_NUMBER     BOOKED_DATES     OUTSTANDING_APPROVALS     BOOKED_NOT_BILLED         SALES
    ABC company, LLC     114943          05/22/2008                   11:17:05           100,072.43          100,072.43
    ABC company, LLC     114943          06/30/2008                   15:12:29           129,956.00          129,956.00
    ABC company, LLC     114943          07/30/2008                   15:57:16           10,957.00          10,957.00This is just the first of many groups in this view. I just need a simple way to select the row with the max BOOKED_DATES. I've tried everything I could think of but the other two rows are not going away. MAX(BOOKED_DATES) is not working in the HAVING section. I just want my out output to be the rows out of each group with the most recent BOOKED_DATES.
    Therefor , my output would be
    CUSTOMER_NAME          ACCOUNT_NUMBER     BOOKED_DATES     OUTSTANDING_APPROVALS     BOOKED_NOT_BILLED         SALES
    ABC company, LLC     114943          07/30/2008                   15:57:16           10,957.00          10,957.00for ACCOUNT_NUMBER 114943. For the truly curious, the query is below. I'm sure the solution is simple but not to me this day. Maybe it's a Monday thing.
    Thanks in Advance.
    select  distinct
    party.party_name CUSTOMER_NAME, --"Customer Name"
    cust_acct.account_number ACCOUNT_NUMBER,--"Account Number"
    max(h.BOOKED_DATE)  BOOKED_DATES,-- "Booked Dates",
    osa.OUTSTANDING_SALE_AMT    OUTSTANDING_APPROVALS,--"Outstanding Approvals",
    ola2.BOOKED_NOT_BILLED                                     BOOKED_NOT_BILLED,
    --ola.line_id,
    --h.header_id,
    sum(nvl(ola.ORDERED_QUANTITY,0) * nvl(ola.UNIT_LIST_PRICE,0))   SALES,
    CASE
       WHEN
       invoiced_amt_info.TERMS = 'Current'
        THEN invoiced_amt_info.CURRENT_INV  
       ELSE NULL
    END  "CURRENT_IA",--"Current",
    CASE
       WHEN
       invoiced_amt_info.TERMS = 'Current'
        THEN invoiced_amt_info.CURRENT_TAX 
       ELSE NULL
    END CURRENT_TAX,--"Current Tax",
    CASE
       WHEN
       invoiced_amt_info.TERMS = '1-30 days'
        THEN invoiced_amt_info.CURRENT_INV 
       ELSE NULL
    END     LT_30_DAYS,--  "1-30 Days",
    CASE
       WHEN
       invoiced_amt_info.TERMS = '1-30 days'
        THEN invoiced_amt_info.CURRENT_TAX  
       ELSE NULL
    END     LT_30_DAYS_TAX,-- "1-30 Days Tax",
    CASE
       WHEN
       invoiced_amt_info.TERMS = '31-60 days'
        THEN invoiced_amt_info.CURRENT_INV 
       ELSE NULL 
    END     LT_60_DAYS,-- "1-60 Days",
    CASE
       WHEN
       invoiced_amt_info.TERMS = '31-60 days'
        THEN invoiced_amt_info.CURRENT_TAX
       ELSE NULL
    END     LT_60_DAYS_TAX,--"1-60 Days Tax",
    CASE
       WHEN
       invoiced_amt_info.TERMS = '61-90 days'
        THEN invoiced_amt_info.CURRENT_INV  
       ELSE NULL
    END     LT_90_DAYS,-- "1-90 Days",
    CASE
       WHEN
       invoiced_amt_info.TERMS = '61-90 days'
        THEN invoiced_amt_info.CURRENT_TAX 
       ELSE NULL
    END     LT_90_DAYS_TAX,-- "1-90 Days Tax",
    CASE
       WHEN
       invoiced_amt_info.TERMS = '90+ days'
        THEN invoiced_amt_info.CURRENT_INV  
       ELSE NULL 
    END     MT_90_PLUS_DAYS,-- "90+ Days",
    CASE
       WHEN
       invoiced_amt_info.TERMS = '90+ days'
        THEN invoiced_amt_info.CURRENT_TAX
       ELSE NULL
    END     MT_90_PLUS_DAYS_TAX,--"90+ Days Tax",
    uc.UNAPPLIED_CASH UNAPPLIED_CASH--"Unapplied Cash"
    FROM
    oe_order_headers_all        h,
    hz_cust_accounts            cust_acct,
    hz_parties                  party,
    hz_customer_profiles        cust_prof,
    oe_order_lines_all ola,
    select l.HEADER_ID HEADER_ID,
    l.sold_to_org_id SOLD_TO_ORG_ID,
    sum(nvl(l.ORDERED_QUANTITY,0) * nvl(l.UNIT_LIST_PRICE,0)) BOOKED_NOT_BILLED
    from
    oe_order_lines_all l
    where
        l.BOOKED_FLAG <> 'N'
    AND l.FLOW_STATUS_CODE <> 'CANCELLED'
    AND l.INVOICE_INTERFACE_STATUS_CODE <> 'NO'
    group by l.HEADER_ID, l.sold_to_org_id
    ) ola2,
    select INV_AMT.aginglayer, INV_AMT.aging TERMS, sum(INV_AMT.due_amount) CURRENT_INV, INV_AMT.CUSTOMER_ID,--due_amount,--invoiced ammount Currrent
              sum(INV_AMT.tax_amount) CURRENT_TAX --tax_amount
               from (
                    select  
                            c.customer_name
                          , c.customer_number
                          , c.CUSTOMER_ID
                          , sum(ps.amount_due_remaining) due_amount
                          , sum(ps.tax_remaining) tax_amount
                          , 'Current' aging
                          , 1 aginglayer
                          , 1 showord
                     from ra_customers c
                          , ar_payment_schedules_all ps
                     where ps.status = 'OP'
                       and ps.class <> 'PMT'
                       and trunc(sysdate - ps.due_date) < 1
                       and ps.customer_id = c.customer_id
                     group by c.customer_name
                             , c.customer_number
                             , c.CUSTOMER_ID
                    union
                    select   
                            c.customer_name
                          , c.customer_number
                          , c.CUSTOMER_ID                     
                          , sum(ps.amount_due_remaining) due_amount
                          , sum(ps.tax_remaining) tax_amount
                          , '1-30 days' aging
                          , 2 aginglayer
                          , 2 showord
                     from ra_customers c
                          , ar_payment_schedules_all ps
                     where ps.status = 'OP'
                       and ps.class <> 'PMT'
                       and trunc(sysdate - ps.due_date) >= 1
                       and trunc(sysdate - ps.due_date) <= 30
                       and ps.customer_id = c.customer_id
                     group by c.customer_name
                             , c.customer_number
                             , c.CUSTOMER_ID                     
                    union
                    select  
                            c.customer_name
                          , c.customer_number
                          , c.CUSTOMER_ID                     
                          , sum(ps.amount_due_remaining) due_amount
                          , sum(ps.tax_remaining) tax_amount
                          , '31-60 days' aging
                          , 3 aginglayer
                          , 3 showord
                     from ra_customers c
                          , ar_payment_schedules_all ps
                     where ps.status = 'OP'
                       and ps.class <> 'PMT'
                       and trunc(sysdate - ps.due_date) > 30
                       and trunc(sysdate - ps.due_date) <= 60
                       and ps.customer_id = c.customer_id
                     group by c.customer_name
                             , c.customer_number
                             , c.CUSTOMER_ID
                    union
                    select  
                            c.customer_name
                          , c.customer_number
                          , c.CUSTOMER_ID                     
                          , sum(ps.amount_due_remaining) due_amount
                          , sum(ps.tax_remaining) tax_amount
                          , '61-90 days' aging
                          , 4 aginglayer
                          , 4 showord
                     from ra_customers c
                          , ar_payment_schedules_all ps
                     where ps.status = 'OP'
                       and ps.class <> 'PMT'
                       and trunc(sysdate - ps.due_date) > 60
                       and trunc(sysdate - ps.due_date) <= 90
                       and ps.customer_id = c.customer_id
                     group by c.customer_name
                             , c.customer_number
                             , c.CUSTOMER_ID                        
                    union
                    select  
                            c.customer_name
                          , c.customer_number
                          , c.CUSTOMER_ID                     
                          , sum(ps.amount_due_remaining) due_amount
                          , sum(ps.tax_remaining) tax_amount
                          , '90+ days' aging
                          , 5 aginglayer
                          , 5 showord
                     from ra_customers c
                          , ar_payment_schedules_all ps
                          , ra_customer_trx_all trx
                          , ra_cust_trx_types_all types
                     where ps.status = 'OP'
                       and ps.class <> 'PMT'
                       and trunc(sysdate - ps.due_date) > 90
                       and ps.customer_id = c.customer_id
                       and trx.customer_trx_id = ps.customer_trx_id
                       and types.cust_trx_type_id = trx.cust_trx_type_id
                       and types.name <> 'CSG-Conversion Pmt'
                       and types.org_id= 1
                     group by c.customer_name
                             , c.customer_number
                             , c.CUSTOMER_ID
                    ) INV_AMT
                 group by aginglayer, aging, showord, INV_AMT.CUSTOMER_ID
    ) invoiced_amt_info,
    select   ra_cust.customer_name CUSTOMER_NAME, ra_cust.customer_number CUSTOMER_NUMBER, ra_cust.customer_id CUSTOMER_ID,
                     sum(pay_sched.amount_due_remaining) UNAPPLIED_CASH
               from  ra_customers ra_cust
                    , ar_payment_schedules_all pay_sched
               where
                 pay_sched.status = 'OP'
                 and pay_sched.class = 'PMT'
                 and pay_sched.due_date > trunc(sysdate - 365)
                 and pay_sched.customer_id = ra_cust.customer_id
               group by ra_cust.customer_name, ra_cust.CUSTOMER_NUMBER, ra_cust.CUSTOMER_ID
    ) uc,
    select   qh.cust_account_id CUST_ACCOUNT_ID,    sum(qh.total_quote_price) OUTSTANDING_SALE_AMT
    from ASO_QUOTE_HEADERS_ALL qh,ASO_QUOTE_STATUSES_TL st
    where st.quote_status_id = qh.quote_status_id
    and st.meaning ='Credit Hold'
    group by qh.cust_account_id
    ) osa          
    Where 
         h.HEADER_ID = ola.HEADER_ID
    AND h.HEADER_ID = ola2.HEADER_ID
    AND ola.sold_to_org_id = cust_acct.cust_account_id(+)
    AND ola2.sold_to_org_id = ola.sold_to_org_id(+)
    AND cust_acct.party_id = party.party_id(+)
    AND cust_acct.CUST_ACCOUNT_ID = cust_prof.CUST_ACCOUNT_ID(+)
    AND cust_prof.party_id = party.party_id
    AND cust_prof.CUST_ACCOUNT_ID = invoiced_amt_info.CUSTOMER_ID(+)
    AND cust_prof.CUST_ACCOUNT_ID = uc.CUSTOMER_ID(+)
    AND cust_prof.CUST_ACCOUNT_ID = osa.CUST_ACCOUNT_ID(+)
    group by  party.party_name, cust_acct.account_number, invoiced_amt_info.TERMS, osa.OUTSTANDING_SALE_AMT,
    ola2.BOOKED_NOT_BILLED,
    invoiced_amt_info.CURRENT_INV,
    invoiced_amt_info.CURRENT_TAX, uc.UNAPPLIED_CASH
    order by party.party_name

    Example
    --Sample Data
    SQL>select deptno, empno, sal,
      2     max(sal) over ( partition by deptno order by deptno) mv
      3* from emp
    SQL> /
        DEPTNO      EMPNO        SAL         MV
            10       7782       2450       5000
            10       7839       5000       5000
            10       7934       1300       5000
            20       7566       2975       3000
            20       7902       3000       3000
            20       7876       1100       3000
            20       7369        800       3000
            20       7788       3000       3000
            30       7521       1250       2850
            30       7844       1500       2850
            30       7499       1600       2850
            30       7900        950       2850
            30       7698       2850       2850
            30       7654       1250       2850
    14 rows selected.
    SQL>select * from
      2  (
      3  select deptno, empno, sal,
      4     max(sal) over ( partition by deptno order by deptno) mv
      5  from emp
      6* ) where sal = mv
    SQL> /
        DEPTNO      EMPNO        SAL         MV
            10       7839       5000       5000
            20       7902       3000       3000
            20       7788       3000       3000
            30       7698       2850       2850SS

  • Totals after every group of rows - formating help

    Hi,
    What I need is to make the cells darker where the totals are after every group of rows. How do I do that?
    Also, I'm trying to remove the fact that they're merged cells for downloading to Excel (on another report for further analytics).
    Ex: a group of rows show multiple opportunities for an account. The Total NSR value (Revenue) for all the rows for the one Account is displayed after the rows and I don't want this on one of our reports.
    Thanks,
    Anita

    Are you talking about some pre-built report or a custom report you have created?

  • Move stock between quality and un-restrict

    Hi all,
    Is there any possibility in moving the stock between quality and un-restrict excluding release production order/ GR PO to get the procedure.
    When I use MB1B/MB11 with the correct movement type, the system shows: You can move it in QM only.
    My background : I activate the QM view in my system, and activate QM type: 01.04.89 for most materials.
    Thx for your information.
    Wilson

    Hi
    If you want to move the stock from QM stock to unrestricted , do not activate QM view.
    check the box " Inspection stock" (MARC-INSMK) either in Purchasing view/work scheduling view.
    For some materials if you do not want to activate full QM functionality ,but still to inspect visually before accepting at GR stage.
    This functionality will be of much use in cae of maintenence items.
    Hope this solves your problem.
    Regards
    YMREDDY

  • Process between groups reports 6i

    I am working with Reports 6i (No wise cracks. It's not my choice). I have a report that shows all policies written for the month for all the companies agencies, I have it grouped by agency with a page break and totals being reset when the group changes. I now need to store the totals for each agency in the database. Is there a way to run a process when the group changes and store the data from the summary columns in the database.
    Any help would be appreciated.

    Hello DLloyd,
    there aren't any trigger to execute between groups. I'll do a procedure that I´ll execute after the report to insert into database.

Maybe you are looking for

  • How to add an image to combo box model in java

    i want to display a images.for that i take a combox.in that i want to add al images those i want to display, while clicking the image in combo box the image will be display.there is no problem for displaying an image, but i dont know how to add an im

  • Remove cookies on my iPad 3?

    Is there a way to control cookies and other data on my iPad?

  • Odd question on automatic sleep mode when laptop is closed

    Is there a way to have the laptop closed and yet still have a program opperating? I'd like to play music through the headphone jack while driving and don't really have a spot to set an open laptop, but iTunes stops playing when I shut the computer. T

  • Repainting a JScrollPane

    Hi everyone, I've search the forum for an answer to this question but I can't seem to find the solution to my problem. I have a loop which updates the contents of a JTextArea with some text. The JtextArea is inside a JScrollPane. When I add text to t

  • TS1702 I got this error when doing a restore

    I got this error when doing a restore and the restrictions were turned on .  I disabled restrictions and the restore was able to complete.