Need help in triggering the Data stream load  using process chain

Hi Guru's
is it possible to trigger a data stream load using process chain?
Any help is highly appreciated.
Thanks
Indiran

Hi Indiran and welcome aboard!
Don't think this is possible. SAP BW & SAP SEM-BCS are rather independent systems. Though, BCS lives on top of BI-BW stack, it even may have master data different from those in BW.
Process chains, AFAIK, is completely the BW's feature. Certainly, you may use PCc on BW side, loading ODS/DSO and cubes involved in BCS data model.
The main con here is the lost transparency -- you don't control everything from the consolidation monitor.
The pro side is also rather obvious for me. Since, very often there is a huge difference between data quality at the data source and in the BCS totals cube, I need to make a lot of data transformation. Not only some data calculations or cleaning, but also transformation of data model: key figure model -> account model. It's much more easier to do in BW, for me.
I even call the ODS/cubes/routines involved in such transformation as intermediate layer, the layer between data source and SEM-BCS.
And this layer lives rather independently from BCS.
Hope this helps.

Similar Messages

  • Need help in formatting the Date - Date does not

    Need help in formatting the Date - Date does not formats and give Not a valid month error in the below scenario.
    select oc.ST_PGM_MGR, r.ag_dnum, get_major_work_type(r.perf_eval_rtng_id) "v_work_code", r.ag_dnum_supp "supp", r.intfinal, to_char(r.formdate,'MM/DD/YYYY') "formdate", to_char(r.servfrom,'MM/DD/YYYY') "srv_from", to_char(r.servto,'MM/DD/YYYY') "srv_to", descript, add_months(to_char
    --- Bellow line of Code on trying to format it to mm/dd/yyyy gives the error
    (r.formdate, 'DD-MON-YYYY'),12) "formdate2"
    from  table REdited by: Lucy Discover on Jul 7, 2011 11:34 AM
    Edited by: Lucy Discover on Jul 7, 2011 1:05 PM

    Your syntax is wrong - look at the post above where this syntax is given:
    to_char (add_months(r.formdate,12), 'MM/DD/YYYY') "formdate2"Look at the formula from a logical perspective - "inside out" to read what is happening -
    take formdate, add 12 months
    add_months(r.formdate, 12)then apply the to_char format mask - basic syntax
    to_char(date, 'MM/DD/YYYY')Compare to your syntax:
    to_char(add_months(r.formdate, 'MM/DD/YYYY'),12) "formdate2"You will see your format string inside the call to add_months, and your 12 inside the call to to_char.
    Good luck!

  • Need help in correcting the BW Delta loads

    Hi All,
    I have deleted entire data of the data targets and the init request of that data target,
    but I need to correct that now, please guide me with ur suggestions:
    I have tried with the following options, but it is not bringing the old data from the r3 system.
    1) I ran the init without data transfer and then the delta, but it didn't bring any records.
    2)I ran the init without data trnafer and then did the fullload, but I am unable to activate the full load request as it gave the error message indicating there is init, so full request can't be activated.\
    I am using 3.5 system.
    Please give ur suggestion.
    Thanks,
    Vinay

    Hi,
    Since you are using an AP (A/c Payable) extractor, it is FI related & do as one of the fellow users has suggested.
    Kindly go through the Notes mentioned above.
    You need to fill the setup tables only if its Logistics data (LO).
    Also, try doing a fresh INIT with Data Trasnfer. And, then setup your Delta InfoPackage in the Process Chain.
    Hope this helps.
    Regards
    Vishal

  • Calendar in iCloud deleted - need help to get the data back

    Hi,
    I just deleted one of my calendars in iCloud. Is there any chance to get this calendar (with all the data) back into iCloud?
    Thanks for your help.
    Pierre

    how? I should have a backup at my time machine from earlier today. Do I need to completely restore my MBP to also get my calender data back? Note that i only by accident deleted one calender (my others are ok)
    thank you

  • Need help to resolve the Date time issue(Urgent)

    Hello All,
    I am running simple code as follows, to get the date and time. getting difference in 2 environment. Our both environment of AIX.
    import java.io.PrintStream;
    import java.util.Calendar;
    public class DateTest
    public DateTest()
    public static void main(String args[])
    java.util.Date now = Calendar.getInstance().getTime();
    System.out.println((new StringBuilder("Calendar.getInstance
    ().getTime():")).append(now).toString());
    Problematics environment gives following o/p
    bash-4.0$ java -cp . DateTest
    Calendar.getInstance().getTime():Wed Feb 03 00:59:40 EST 2010
    bash-4.0$ date
    Wed Feb  3 05:59:42 EST 2010
    bash-4.0$
    In another enviornment gives proepr o/p
    bash-4.0$ java -cp . DateTest
    Calendar.getInstance().getTime():Wed Feb 03 05:01:45 GMT-05:00 2010
    bash-4.0$ date
    Wed Feb 3 05:01:48 CST 2010
    can some one help me out in this...............

    What were the results of your investigations based on the pointers you got from [your earlier thread|http://forums.sun.com/thread.jspa?threadID=5423811] ?

  • Need help to pivot the data with hierarchy

    Dear Team,
    I have hierarchical data in the table as shown below
    SQL> Create Table t As
      2  (
      3  Select 97250528 col1, 'TSD' col2,  97250528 col3,   'WAV' col4 From dual Union All
      4   Select 75020160     , 'ASD'     ,  97250528     ,   'TSD'      From dual Union All
      5   Select 69150832     , 'PA'      ,  75020160     ,   'ASD'      From dual Union All
      6   Select 49150538     , 'DB'      ,  69150832     ,   'PA'       From dual Union All
      7   Select 49150538     , 'WAV'     ,  49150538     ,   'DB'       From dual Union All
      8   ------------
      9   Select 97251520 col1, 'TSD' col2,  97251520 col3,   'WAV' col4 From dual Union All
    10   Select 75020689     , 'ASD'     ,  97251520     ,   'TSD'      From dual Union All
    11   Select 69151039     , 'PA'      ,  75020689     ,   'ASD'      From dual Union All
    12   Select 49150672     , 'DB'      ,  69151039     ,   'PA'       From dual Union All
    13   Select 49150672     , 'WAV'     ,  49150672     ,   'DB'       From dual
    14  );
    Table created
    SQL> select *
      2  from t;
          COL1 COL2       COL3 COL4
      97250528 TSD    97250528 WAV
      75020160 ASD    97250528 TSD
      69150832 PA     75020160 ASD
      49150538 DB     69150832 PA
      49150538 WAV    49150538 DB
      97251520 TSD    97251520 WAV
      75020689 ASD    97251520 TSD
      69151039 PA     75020689 ASD
      49150672 DB     69151039 PA
      49150672 WAV    49150672 DB
    10 rows selected
    I am using connect by prior clause to get the data in correct order.
    below is the SQL i am using..
    SQL> Select Level lvl,
      2          col3,
      3          col4
      4   From t
      5   Start With col3 In ('97250528','97251520')
      6   And        col4 In ('WAV')
      7   connect by Nocycle Prior col1 = col3
      8              And     Prior col2 = col4;
           LVL       COL3 COL4
             1   97250528 WAV
             2   97250528 TSD
             3   75020160 ASD
             4   69150832 PA
             5   49150538 DB
             1   97251520 WAV
             2   97251520 TSD
             3   75020689 ASD
             4   69151039 PA
             5   49150672 DB
    10 rows selected
    The data i am getting is correct one. However i want output in the following format..
         WAV             TSD              ASD             PA             DB
    1     97250528     97250528     75020160     69150832     49150538
    2     97251520     97251520     75020689     69151039     49150672
    When i use max + case statement i am getting in-correct results as there is no group by key
    Kindly give me some hints or tips to pivot the data or should i go to PL/SQL to pivot the data.
    Regards
    nic

    Hi Dbb,
    Connect_by_root did the trick i guess
    Select max(Case When col4 = 'WAV' Then col3 End) wav,
           max(Case When col4 = 'TSD' Then col3 End) tsd,
           max(Case When col4 = 'ASD' Then col3 End) ASD
    From
    Select  CONNECT_BY_ROOT col1 col,
            col3,
            col4
    From t
    Start With col3 In ('97250528','97251520')
    And        col4 In ('WAV')
    connect by Nocycle Prior col1 = col3
                And     Prior col2 = col4
    Group By col;    
           WAV        TSD        ASD
      97250528   97250528   75020160
      97251520   97251520   75020689
    Let me execute this over bulk-sets of data...
    thanks for this pointer and hint..

  • Need help to retrieve the message from MQ using get operation

    Hi
    Used MQ adapter to Post a message to queue.
    And used Received activity in bpel to retrieve the message using MQ adapter from same queue(used get operation) , got an error message as timed
    out exception.
    Could some one assist in retrieving the message from MQ using get operation.
    Regards
    Raja

    Hi Raja,
    Is the process a empty bpel process which is used to get the message from the MQ?
    Regards
    Surya

  • Need help in deleting the data load request

    Hi All,
    In the system one erroneous data load load request is being generated( whoes status is  monitor without Request), because of this I am unable to activate other requests...
    I want to delete this request, I am deleting it but it is not, it is still remain in the system, and i am unable to activate it as it is an erroneous one, I have deleted that request from the backend table RSMONICDP as well, but still no successful results.
    Please give ur suggestions on this.
    Thanks,
    vinay

    Hi
    There is a possible solution for these kind of issues .
    1. Note that bad request number
    2. Go to SE16
    3. Open table RSODSACTREQ.: Filter the contents by that request number . There will be one entry for that request . Delete that entry
    4. Open table RSICCONT. There will be one entry for that request . Delete that entry
    5. Open Table RSMONICDP. Filter the contents by that request number . There will be 3-4 entries for that request depending on number of data packages in that request .Delete all those entries

  • Need help to Modify the STD report which uses the Tcode CATS_DA.

    Hi ,
    we have a requirement as below. we need Add two Additional Fileds in the OutPut of the Std Report ( Tcode CATS_DA) .( 2 fileds are  one is Managername /Manager employee number ) ..
    Can you Please where we need to Modify the code to meet the above requirement.
    Thanks in Advance.
    Edited by: sandeep on Jul 29, 2008 12:45 PM

    Copy the report to "Z" version and plug in fields .
    Thanks,
    Saquib

  • HOW TO LOAD R/3 DATA INTO SAP BI USING PROCESS CHAINS?

    Hi,
    Can we load R/3 data into BI using process chains?... I loaded data from R/3 into Infocube using generic extraction using view... took 2 tables EBKN and EBAN and ceated view.
    In PSA I can find all the 2388 records but when I load into datatarget in transferred tab there are 2388 records but in added colum i could find only 2096.....
    I deleted the request and want to load through process chains....... but  how to do ?????? without flat file ...can we laod using process chains?
    I appreciate any inputs.......
    Regards,
    Prasanthi.

    did you even bother looking at the links in my previous posts???
    read the docs...try yourself...if you encounter specific issues, you can post them on the forum...
    if you're really expecting somebody to post a step by step for process chain, i think you can wait a long, long time...

  • Delete only the Fact table using process chain?

    Hi Experts,
    I have an issue,where i have to delete the contents of the Infocube.So when i drag the Process type "Delete Contents of the Data target" into the process chain.I Am able to delete the contents of the cube.
    But in my case i need to delete only the FACT table and not the DIMENSION table.The system does prompt a message to delete FACT only /FACT & DIM TAbles.
    Please advice if its possible to Delete the FACT table only using process chains
    thanks in advance

    Hi ,
    check this link ..
    http://help.sap.com/saphelp_nw04/helpdata/en/80/1a6473e07211d2acb80000e829fbfe/content.htm
    Regards,
    Shikha

  • I need help to remove the wrong email on my Iphone.  I can't down load app because my apple ID doese not match with the wrong email please help

    I need help to remove the wrong email on my Iphone.  the represnter who set up my phone put in the wrong email, and now I can't down loand apps on my phone because the apple ID does not match

    So sign out of the Apple ID under Settings > iTunes & App Store, then sign in with your own.

  • Need help On Triggers/Change pointers in SAP

    Hi Experts,
    I Need help On Triggers/Change pointers in SAP.
    I have a requirement  as soon as an entry is created in one of the  Standard SAP  table it should check against my Ztable and update and create the corresponding entry in another Ztable.
    Can some one help me out on this with the syntax and how to do it

    Hi,
    Check whether you have any enhancement option (BADI, user exit, Customer enhancement etc) in the program which is used to save the data in the SAP standard table. If so, then try to write your code in that appropriate enhancement.

  • I need help understanding how the Apple components integrate to create a system across all my devices?

    I need help understanding how the Apple components connect to create a whole system across all my devices?
    Is there a resource that describes current system and associated functionality?
    For example:
    Buy A, B, C to achieve "X" 
    You will need:
    an internet provider which supports <specs>
    add D to achieve "Y"
    You will need:
    an internet provider which supports <specs>
    add "E" to achieve "Z"
    You will need:
    an internet provider which supports <specs>
    For example, I am looking at the Gen 6 Airport extreme.  For intended performance do I need broadband? if so what are the specs, or will basic internet service suffice?  Do I need the internet provider's modem or does the Airport extreme replace that?  And then I think, if I am doing this, I should also look at Apple TV....What do I need and Why?  Then I look at the New Desk top coming out in the fall, and I think well, if I wait and get this, what does this component do for the system, and what becomes redundant? What does this awesome desktop do for my ability to sit and use a new macbook air when I travel  or sit on the couch in my PJs?
    If there was a place that plainly stated "if you buy the new dektop you can configure a system including only these components and achieve <this result> and by adding <additional components> you will achieve this result.
    I have been to the genius store a few times, but I come out of there more confused unless I have SPECIFIC questions or already know what to buy. 
    A "System Configuration App" would be a really great sales tool--Just saying.

    I have no idea what "fully optimized" means.
    No Apple device will let you watch broadcast TV. The Apple TV is a good option for watching streaming TV from iTunes, NetFlix and Hulu. If you want to watch from other sources, you may need to look at other devices.
    Any Mac computer or iPad will allow you to surf the web.
    What business software?
    Time Capsule is a good option for back ups.
    Update what across all devices?
    For accessing documents from all devices, a service like Dropbox is your best bet.
    I have no idea what "step as far away from an internet provider as possible" means. If you want Internet access, you need an Internet provider.
    Lighting fast speed for what? Processor? The specs are listed for all devices in the Online Store. Internet? We're back to the service provider.
    Technology changes. The only way to keep pace with it beyond a couple of years is to buy new stuff.
    The bottom line is you need to look at the specs for devices availble and at your budget and decide what best meets your needs. If you are unable to do that on your own, there are lot of technology consultants out there who will, for a fee, look at your exact situation, make recommendations and even handle the purchase and set up. Perhaps that would be the best route for you.
    Best of luck.

  • I Need Help to Access The Source Code From A Form to Know the Calculation Formula

    Hi,
    I Need Help to Access The Source Code From A Form to Know the Calculation Formula. The application is a windows form application that is linked to SQL Server 2008. In one of the application forms it generates an invoice and does some calculations. I just
    need to know where behind that form is the code that's doing the calculations to generate the invoice, I just need to get into the formula that's doing these calculations.
    Thank you so much.

    Hi, 
    Thanks for the reply. This is a view and [AmountDue] is supposed to be [CurrentDueAmount] + [PastDueAmount] - [PaidAmount]. The view is not calculating [PaidAmount] right . Below is the complete code of the view. Do you see anything wrong in the code ?
    Thanks. 
    SELECT     [isi].[InvoiceID], [ii].[DueDate], [SubInvoiceID] = [isi].[ID], [INV_FacilityID] = [if].[ID], [if].[FacilityID],
    [iff].[FacilityFeeID], [LoanID] = NULL, [isi].[PortfolioID], [isi].[Portfolio], 
                          [PaymentType] = [isis_fee].[SectionType], [Name]
    = [iff].[Name], [ReceivedAmount], [dates].[CurrentDueAmount], 
                          [PastDueAmount] = CASE WHEN ISNULL([ReceivedAmount],
    0) > 0 THEN [pastdue].[PastDueFeeAmount] + ISNULL([ReceivedAmount], 0) 
                          WHEN ISNULL([ReceivedAmount], 0) 
                          < 0 THEN /* We bring past due to zero and
    apply reset to current. */ CASE WHEN [pastdue].[PastDueFeeAmount] + ISNULL([ReceivedAmount], 0) 
                          < 0 THEN 0 ELSE [pastdue].[PastDueFeeAmount]
    + ISNULL([ReceivedAmount], 0) END WHEN ISNULL([ReceivedAmount], 0) = 0 AND 
                          [pastdue].[PastDueFeeAmount] < 0 THEN 0 ELSE
    [pastdue].[PastDueFeeAmount] END, [PaidAmount] = CASE WHEN ISNULL([ReceivedAmount], 0) 
                          < 0 THEN /* We bring past due to zero and
    apply rest to current. */ CASE WHEN [pastdue].[PastDueFeeAmount] + ISNULL([ReceivedAmount], 0) 
                          < 0 THEN - ([pastdue].[PastDueFeeAmount]
    + ISNULL([ReceivedAmount], 0)) ELSE 0 END WHEN ISNULL([ReceivedAmount], 0) = 0 AND 
                          [pastdue].[PastDueFeeAmount] < 0 THEN - [pastdue].[PastDueFeeAmount]
    ELSE 0 END, [AmountDue] = [unpaid].[UnpaidFeeAmount], [ID] = [iff].[FacilityFeeID]
    FROM         [dbo].[INV_SubInvoice] isi JOIN
                          [dbo].[INV_Invoice] ii ON [isi].[InvoiceID]
    = [ii].[ID] JOIN
                          [dbo].[INV_Facility] [if] ON [isi].[ID] = [if].[SubInvoiceID]
    JOIN
                          [dbo].[INV_FacilityFee] iff ON [if].[ID] = [iff].[INV_FacilityID]
    JOIN
                              (SELECT     [sis_fee].[ID],
    [sis_fee].[SectionTypeCode], [SectionType] = [st_fee].[Name], [sis_fee].[INV_FacilityFeeID]
                                FROM      
       [dbo].[INV_SubInvoiceSection] sis_fee JOIN
                   [dbo].[INV_SectionType] st_fee ON [sis_fee].[SectionTypeCode] = [st_fee].[Code]
                                WHERE      [INV_FacilityFeeID]
    IS NOT NULL AND [StatusCode] = 'BILL') isis_fee ON [iff].[ID] = [isis_fee].[INV_FacilityFeeID] JOIN
                              (SELECT     [iffa].[SectionID],
    [AccrualDeterminationDateMax] = MAX([iffa].[AccrualDeterminationDate]), 
                   [AccrualDeterminationDateMin] = MIN([iffa].[AccrualDeterminationDate]), [CurrentDueAmount] = SUM([iffa].[AccruedFeeAmount]), 
                   [ReceivedAmount] = SUM([iffa].[ReceivedFeeAmount])
                                FROM      
       [dbo].[INV_FacilityFeeAccrual] iffa
                                GROUP BY [iffa].[SectionID])
    dates ON [isis_fee].[ID] = [dates].[SectionID] LEFT JOIN
                              (SELECT     *
                                FROM      
       [dbo].[INV_FacilityFeeAccrual]) unpaid ON [dates].[SectionID] = [unpaid].[SectionID] AND 
                          [dates].[AccrualDeterminationDateMax] = [unpaid].[AccrualDeterminationDate]
    LEFT JOIN
                              (SELECT     [SectionID],
    [PastDueFeeAmount] = SUM([PastDueFeeAmount])
                                FROM      
       [dbo].[INV_FacilityFeeAccrual]
                                GROUP BY [SectionID]) pastdue
    ON [dates].[SectionID] = [pastdue].[SectionID]
    UNION
    SELECT     [isi].[InvoiceID], [ii].[DueDate], [SubInvoiceID] = [isi].[ID], [INV_FacilityID] = [if].[ID], [if].[FacilityID],
    [FacilityFeeID] = NULL, [il].[LoanID], [isi].[PortfolioID], [isi].[Portfolio], 
                          [PaymentType] = [isis_loan].[SectionType], [Name]
    = [il].[Name], [ReceivedAmount], [CurrentDueAmount], [PastDueAmount] = CASE WHEN ISNULL([ReceivedAmount], 
                          0) > 0 THEN [PastDueAmount] + ISNULL([ReceivedAmount],
    0) WHEN ISNULL([ReceivedAmount], 0) 
                          < 0 THEN /* We bring past due to zero and
    apply rest to current. */ CASE WHEN [PastDueAmount] + ISNULL([ReceivedAmount], 0) 
                          < 0 THEN 0 ELSE [PastDueAmount] + ISNULL([ReceivedAmount],
    0) END WHEN ISNULL([ReceivedAmount], 0) = 0 AND 
                          [PastDueAmount] < 0 THEN 0 ELSE [PastDueAmount]
    END, 
                          [PaidAmount] = CASE WHEN [isis_loan].[SectionTypeCode]
    = 'LOAN_PRIN' THEN 0 ELSE CASE WHEN ISNULL([ReceivedAmount], 0) 
                          < 0 THEN /* We bring past due to zero and
    apply rest to current. */ CASE WHEN [PastDueAmount] + ISNULL([ReceivedAmount], 0) 
                          < 0 THEN - ([PastDueAmount] + ISNULL([ReceivedAmount],
    0)) ELSE 0 END WHEN ISNULL([ReceivedAmount], 0) = 0 AND 
                          [PastDueAmount] < 0 THEN - [PastDueAmount]
    ELSE 0 END END, 
                          [AmountDue] = CASE WHEN [isis_loan].[SectionTypeCode]
    = 'LOAN_PRIN' THEN [CurrentDueAmount] ELSE [unpaid].[AmountDue] END, [ID] = [il].[LoanID]
    FROM         [dbo].[INV_SubInvoice] isi JOIN
                          [dbo].[INV_Invoice] ii ON [isi].[InvoiceID]
    = [ii].[ID] JOIN
                          [dbo].[INV_Facility] [if] ON [isi].[ID] = [if].[SubInvoiceID]
    JOIN
                          [dbo].[INV_Loan] il ON [if].[ID] = [il].[INV_FacilityID]
    JOIN
                              (SELECT     [sis_loan].[ID],
    [sis_loan].[SectionTypeCode], [SectionType] = [st_loan].[Name], [sis_loan].[INV_LoanID]
                                FROM      
       [dbo].[INV_SubInvoiceSection] sis_loan JOIN
                   [dbo].[INV_SectionType] st_loan ON [sis_loan].[SectionTypeCode] = [st_loan].[Code]
                                WHERE      [INV_LoanID]
    IS NOT NULL AND [StatusCode] = 'BILL') isis_loan ON [il].[ID] = [isis_loan].[INV_LoanID] JOIN
                              (SELECT     [iffa].[SectionID],
    [AccrualDeterminationDateMax] = MAX([iffa].[AccrualDeterminationDate]), 
                   [AccrualDeterminationDateMin] = MIN([iffa].[AccrualDeterminationDate]), [CurrentDueAmount] = SUM([iffa].[ExpectedPrincipalAmount]), 
                   [ReceivedAmount] = SUM([ReceivedPrincipalAmount])
                                FROM      
       [dbo].[INV_LoanPrincipalAmortization] iffa
                                GROUP BY [iffa].[SectionID]
                                UNION
                                SELECT     [iffa].[SectionID],
    [AccrualDeterminationDateMax] = MAX([iffa].[AccrualDeterminationDate]), 
                  [AccrualDeterminationDateMin] = MIN([iffa].[AccrualDeterminationDate]), [CurrentDueAmount] = SUM([iffa].[AccruedInterestAmount]), 
                  [ReceivedAmount] = SUM([ReceivedInterestAmount])
                                FROM      
      [dbo].[INV_LoanCashInterestAccrual] iffa
                                GROUP BY [iffa].[SectionID]
                                UNION
                                SELECT     [iffa].[SectionID],
    [AccrualDeterminationDateMax] = MAX([iffa].[AccrualDeterminationDate]), 
                  [AccrualDeterminationDateMin] = MIN([iffa].[AccrualDeterminationDate]), [CurrentDueAmount] = SUM([iffa].[AccruedInterestAmount]), 
                  [ReceivedAmount] = SUM([ReceivedInterestAmount])
                                FROM      
      [dbo].[INV_LoanPIKInterestAccrual] iffa
                                GROUP BY [iffa].[SectionID])
    dates ON [isis_loan].[ID] = [dates].[SectionID] LEFT JOIN
                              (SELECT     [AmountDue]
    = [UnpaidPrincipalAmount], [SectionID], [AccrualDeterminationDate]
                                FROM      
       [dbo].[INV_LoanPrincipalAmortization]
                                UNION
                                SELECT     [AmountDue]
    = [UnpaidInterestAmount], [SectionID], [AccrualDeterminationDate]
                                FROM      
      [dbo].[INV_LoanCashInterestAccrual]
                                UNION
                                SELECT     [AmountDue]
    = [UnpaidInterestAmount], [SectionID], [AccrualDeterminationDate]
                                FROM      
      [dbo].[INV_LoanPIKInterestAccrual]) unpaid ON [dates].[SectionID] = [unpaid].[SectionID] AND 
                          [dates].[AccrualDeterminationDateMax] = [unpaid].[AccrualDeterminationDate]
    LEFT JOIN
                              (SELECT     [PastDueAmount]
    = SUM([PastDuePrincipalAmount]), [SectionID]
                                FROM      
       [dbo].[INV_LoanPrincipalAmortization]
                                GROUP BY [SectionID]
                                UNION
                                SELECT     [PastDueAmount]
    = SUM([PastDueInterestAmount]), [SectionID]
                                FROM      
      [dbo].[INV_LoanCashInterestAccrual]
                                GROUP BY [SectionID]
                                UNION
                                SELECT     [PastDueAmount]
    = SUM([PastDueInterestAmount]), [SectionID]
                                FROM      
      [dbo].[INV_LoanPIKInterestAccrual]
                                GROUP BY [SectionID]) pastdue
    ON [dates].[SectionID] = [pastdue].[SectionID]
    UNION
    SELECT     [isi].[InvoiceID], [ii].[DueDate], [SubInvoiceID] = [isi].[ID], [INV_FacilityID] = [if].[ID], [if].[FacilityID],
    [FacilityFeeID] = NULL, [il].[LoanID], [isi].[PortfolioID], [isi].[Portfolio], 
                          [PaymentType] = 'PIK Interest Applied', [Name]
    = [il].[Name], [ReceivedAmount], [CurrentDueAmount] = - [dates].[CurrentDueAmount], 
                          [PastDueAmount] = - CASE WHEN ISNULL([ReceivedAmount],
    0) > 0 THEN [PastDueAmount] + ISNULL([ReceivedAmount], 0) WHEN ISNULL([ReceivedAmount], 0) 
                          < 0 THEN /* We bring past due to zero and
    apply rest to current. */ CASE WHEN [PastDueAmount] + ISNULL([ReceivedAmount], 0) 
                          < 0 THEN 0 ELSE [PastDueAmount] + ISNULL([ReceivedAmount],
    0) END WHEN ISNULL([ReceivedAmount], 0) = 0 AND 
                          [PastDueAmount] < 0 THEN 0 ELSE [PastDueAmount]
    END, [PaidAmount] = - CASE WHEN ISNULL([ReceivedAmount], 0) 
                          < 0 THEN /* We bring past due to zero and
    apply rest to current. */ CASE WHEN [PastDueAmount] + ISNULL([ReceivedAmount], 0) 
                          < 0 THEN - ([PastDueAmount] + ISNULL([ReceivedAmount],
    0)) ELSE 0 END WHEN ISNULL([ReceivedAmount], 0) = 0 AND 
                          [PastDueAmount] < 0 THEN - [PastDueAmount]
    ELSE 0 END, [AmountDue] = - [AmountDue], [ID] = [il].[LoanID]
    FROM         [dbo].[INV_SubInvoice] isi JOIN
                          [dbo].[INV_Invoice] ii ON [isi].[InvoiceID]
    = [ii].[ID] JOIN
                          [dbo].[INV_Facility] [if] ON [isi].[ID] = [if].[SubInvoiceID]
    JOIN
                          [dbo].[INV_Loan] il ON [if].[ID] = [il].[INV_FacilityID]
    JOIN
                              (SELECT     [sis_loan].[ID],
    [sis_loan].[SectionTypeCode], [SectionType] = [st_loan].[Name], [sis_loan].[INV_LoanID]
                                FROM      
       [dbo].[INV_SubInvoiceSection] sis_loan JOIN
                   [dbo].[INV_SectionType] st_loan ON [sis_loan].[SectionTypeCode] = [st_loan].[Code]
                                WHERE      [INV_LoanID]
    IS NOT NULL AND [StatusCode] = 'BILL' AND [sis_loan].[SectionTypeCode] = 'LOAN_INT_PIK') isis_loan ON 
                          [il].[ID] = [isis_loan].[INV_LoanID] JOIN
                              (SELECT     [iffa].[SectionID],
    [AccrualDeterminationDateMax] = MAX([iffa].[AccrualDeterminationDate]), 
                   [AccrualDeterminationDateMin] = MIN([iffa].[AccrualDeterminationDate]), [CurrentDueAmount] = SUM([iffa].[AccruedInterestAmount]), 
                   [ReceivedAmount] = SUM([ReceivedInterestAmount])
                                FROM      
       [dbo].[INV_LoanPIKInterestAccrual] iffa
                                GROUP BY [iffa].[SectionID])
    dates ON [isis_loan].[ID] = [dates].[SectionID] LEFT JOIN
                              (SELECT     [AmountDue]
    = [UnpaidInterestAmount], [SectionID], [AccrualDeterminationDate]
                                FROM      
       [dbo].[INV_LoanPIKInterestAccrual]) unpaid ON [dates].[SectionID] = [unpaid].[SectionID] AND 
                          [dates].[AccrualDeterminationDateMax] = [unpaid].[AccrualDeterminationDate]
    LEFT JOIN
                              (SELECT     [PastDueAmount]
    = SUM([PastDueInterestAmount]), [SectionID]
                                FROM      
       [dbo].[INV_LoanPIKInterestAccrual]
                                GROUP BY [SectionID]) pastdue
    ON [dates].[SectionID] = [pastdue].[SectionID]

Maybe you are looking for

  • Time Capsule--can I back up Two different Laptops on the Time Capsule?

    It's just about that easy. I just got the Time Capsule. I backed up my MacBook Pro. Now I'd like to use the same Time Capsule to back up my wife's MacBook. Can this be done? If so, how? I keep getting the failed message from the Time Machine Backup.

  • How do I fix my 4G ipod from 4.3.5???

    I recently updated to ios 4.3.5 and it all went wrong.  My pics won't sync anymore and sound works occasionally. Tried to restore to 4.3.3 but I was unable to. My ipod is not jailbroken and don't want to, I just want to be able to play music and have

  • Retriving a cookie variable in a init block

    Hello I configured obiee for sso. Here is my instance config: <Auth> <SSO enabled="false"> <ParamList> <!--IMPERSONATE param is used to get the authenticated user's username and is required --> <Param name="IMPERSONATE" source="cookie" nameInSource="

  • Missing Orders Ids

    Hi there, I have a Table with an Order Id field as A0301000 A0301011 A0301012 A0307090 A0349870 A0301055 A0306056 and so on. I need an SQL Query to list out all the missing Order Ids between A0301000 and A0399999 for re-allocation. How's the above po

  • TREX error 5500: NameServer error: communication with server failed

    Hello TREX Gurus, After applying the latest NW 7.0 SPS18, TREX is no longer working.  We are getting this error message in the TREX Administration. "5500: NameServer error: communication with server failed;connection refused,location=sap01:37001" Any