Accumulation logic

Is there a way we can write Accumulation logic without having to write *GO statement in Script logic?
Or can we reference prior period (in BPC Script logic) values while generating current period balances?
Thanks, Rahul
Edited by: Rahul Kulkarni on Sep 22, 2008 10:49 AM
Edited by: Rahul Kulkarni on Sep 22, 2008 10:56 AM

I figured out a way to do accumulation.

Similar Messages

  • Extended Withholding Tax ( Minimum/maximum Base Amount )  - with accumulati

    We are facing problem in posting of vendor Invoice. Actually we have implemented Minimum base amount ( Rs. 75000/- ) at withholding tax type level and accumulation at per year  in withholding tax type A1 ( for testing purpose ) and assign the same to a vendor.  We have booked some invoices up to RS. 75000/- system working fine, no WHT is deducted. But now we have received a another Invoice Rs. 5000/- and at the time of booking of invoice system giving an error message
    I have changed the error message to warning but itu2019s again showing the same error message.
    Actually the problem is system calculate the WHT from the beginning of the year to till date and the amount of Vendor invoice is less the than the amount of WHT but itu2019s legal requirement and we have to post the financial entry as mentioned below
    Fictitious figures
    Vendor Account           Dr.           Rs,       1500.00     ( Debit instead of credit )
    Expense Account            Dr.           Rs.      5000.00     ( Actual exp. Of Invoice )
    WHT Payable Account            Cr.           Rs.      6500.00     ( Total WHT from the beginning
    Please provide the any.
    SAP reply
    Dear Customer,
    We understand your requirement. But the standard SAP system does not support a scenario where an invoice amount in lower than the tax amount.
    This is not a localization specific requirement. The accumulation logic is a generic system behaviour and all countries use it. We cannot make any change in the standard in this regard and change the current system behaviour.
    Option to handle this in the system
    The only way this can be handled in the system is once the accumulation limit has been reached, use a separate tax type tax code with out accumulations.
    Though this is not the ideal solution, this is the best possible solution for your requirement.
    Accumulation is not localized for India and the standard solution vailable for all the countries is used by Indian customers too.
    SAP is currently not looking at any enhancements to this feature.
    Other than the option mentioned above, there is no other way of handling this in the system.
    Best Regards,
    Soumya
    If any one have any otehr solution please inform us.

    This cannot be possible for two reasons.
    1.  If you are not able to recover the amount from the Vendor, you'll have to bear it yourself which is a loss to the company.
    2.  Even if such a process is provided, you cannot alter the previous invoices and your EWT amount does not correspond to the invoice you account for.  SAP works in an assumption that Tax will be calculated as a % of base price and cannot exceed it.
    The only way to mitigate this is to decide whether a Vendor would require this exemption to be declared based on past experience and past amount of transactions in the beginning itself.  If it is unlikely, better do not declare the accumulation limit for them.  This will save you from incurring loss and reducing the risk for the company.  Start deducting right from the beginning.
    If you are not sure, instead of giving accumulation, you can declare exemption upto 75000.  In this case, SAP cannot check whether the Vendor has crossed the limit or not.  You'll have to manually check and pass a Debit note to that extent when he exceeds the limit.  Again, this does not evade the risk of loss for the company.  Also, you cannot do TDS post processing for this amount (like TDS Remittance challan, TDS Certificate etc).
    So, in my opinion, try and decide if the Vendor would require accumulation right in the beginning itself.  Even if not able to decide, you can still deduct the tax and issue a TDS certificate, which the Vendor can claim refund based on his transactions with you from the Income Tax in case he does not exceed the limit.  This will limit the risk of loss for the company.
    Ravi.

  • Essbase API - Account Dimension - Account Type

    Hello all,
    I'm connecting to a cube that has an account dimension and I need to extract the account hierarchy for a given member name. What I did to get the member information is:
    mbrSel = cube.openMemberSelection(null);
    mbrSe.executeQuety("<OutputType Binary <SelectMbrInfo(MemberName, MemberAlias, ParentMemberName )"
      , "@IDESCENDENTS (\"" + s_member + "\", 0)");
    Now what I'm trying to get from this query is the account type(or the account aggregator). Is this information queryable?
    Many thanks!
    Rafael

    In BPC, "Account" can be interpretted fairly generic.  Yes each application requires an account dimension and each account dimension member must be assigned a valid account type (Asset, Liab, Equity, Rev, Cost) property.  But that is the extent of the restrictions.  So in is not uncommon to see the account dimension be used to represent the vendor, the customer, the material, or a key figure.  That last option may be necessary if you want to track "statistical key figures" or various types of quantities in your application.  Just be sure to utilize the right account type attribute assignment to result in the correct sign handling and accumulation logic for your data.
    Best regards,
    [Jeffrey Holdeman|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/jeffrey+holdeman]
    SAP BusinessObjects
    Enterprise Performance Management
    Regional Implementation Group

  • Logical database AA- *Accumulated depreciation* & *Original Acquistion Cost

    Hi
    I am creating a SAP QUERY report with logical data base AA in asset accounting.Can anyone suggest me on what fields to be taken for the below values:
    Accumulated depreciation   - Depreciation posted till date (including the ACC dep +current year dep)
    Original Acquistion Cost    - Acquistion and Production Cost + current year acquistion
    Please advice.
    Edited by: mysap query on Feb 24, 2009 6:33 PM

    ANLCV-KANSW  for acquisition costs and ANLCV-KNAFA  for accumulated depreciaiton

  • Calculating Acqusition value and Accumulated depriciation

    Hi,
    I want to create a new report which shows the acqusition value . accumulated depriciation and monthly derpricaition for an asset.
    I have used funciton module 'DEPR_RECALCULATE' to find acuistion value and accumulated derp , but the acq value displayed is always equal to the acquistion value at the fiscal year start , irrerspective of the period entered .
    ALso in my report if i enter period as 7 , then acq value for the asset in period 7 should be displayed . and accumulated depr upto period 6 should be displayed .ie acq for asset during the  period entered and accum depr till period-1 should be displayed
    Could some one help me with a proper way to calculate asset acq and accumulatd depr .
    I tried looking into the std report RABEST01 , but it uses logical database ADA .And I would notbe able to use logical db , as the accum depr and acq value need to calculated for diff periods .
    Thanks,
    Lalitha Iyer

    Hi,
    Try report RAHAFA_ALV01.
    After executing the above report, go to change layout option and choose below fields.
    1) ***.acq.value
    Acq value start of FY
    2) Accum.dep.
    Accum dep start of FY
    3) Start book.val
    NBV start of FY (1-2) minus
    4) Trans.acq.val
    Acq transactions from FY start to Report date (in selection screen)
    5) Trns.AccDep
    Accum dep from FY start to Report date (in selection screen), this field will have values only some transfer transactions posted to that particular asset
    6) PlndDep
    Planned dep from FY start to report date
    7) End book val
    End book value on report date (3+4-5-6)
    You dont need to create a new report for this requirement.
    Transaction codes for this report are the below
    AR03         
    S_ALR_87012004
    S_ALR_87012005
    S_ALR_87012026
    S_ALR_87012027
    S_ALR_87012035
    S_ALR_87012036
    S_ALR_87012064
    S_ALR_87012065
    S_P6B_12000064
    Thanks,
    Srinu

  • 0EC_PCA_1 Accumulated Balance field issue

    Hi Gurus/Experts,
    We have a standard extractor in ECC side: 0EC_PCA_1 wherein USD currency (CURRTYPE/Currecny type = 30) is giving out a sum value for Accumulated Balance field of -300,962.66 for Plant A. I checked on its corresponding EUR value (CURRTYPE/Currency type = 10) it is giving out a sum value of +4,060,629.43 as shown below.
    Plant
    Fiscal year/period
    Currency Key / Type
    Accumulated Bal(BALANCE)
    Plant A
    2011/005
    EUR / 10
    +4,060,629.43 <--Balance is summation value
    Plant A
    2011/005
    USD / 30
    -300,962.66 <--Balance is summation value
    Logically thinking, if we sum up all of the accumulated balance and result is +4,060,629.43 in Euro, it should appear also as +USD after summing up the accumulated balance in the corresponding currency. But given this scenario, we are getting a negative result for USD value. I already checked the exractor on how is the Accumulated balance is being populated on ECC side but unfortunately, did not find any luck. I was not able to validate the records of Accumulated balance with the source table GLPTC as I don't have that much experience on the ABAP side.
    As for my questions:
    1. How is the currency conversion works on this extractor for Accumulated Balance field?
    2. How is the value for Accumulated Balance derived?
    Please take note also that isue rises at ECC side so I did not include the data flow on BW side.
    Thanks!

    You need to include period 000 in your query to get the year b/f
    This will bring the HSL00 (or whatever it is called (from memory) from the GLPCT table
    To calaculate future balances or ata where there is no movement in a month you need to implement an oss note which puts code into the start routine of the update to the cube
    Basically what it does is add the value for 0BALANCE for each period from the period in the record into period +1 up to period = 16
    eg
    Period 2 balance = 100
    comes through
    this then posts
    Period 2 balance = 100
    Period 3 balance = 100
    Period 4 balance = 100
    Period 5 balance = 100
    Period 6 balance = 100
    Period 7 balance = 100
    Period 8 balance = 100
    Period 9 balance = 100
    Period 10 balance = 100
    Period 11 balance = 100
    Period 12 balance = 100
    Period 16 balance = 100
    then another record comes in in period 3 for 50
    Then you get
    Period 2 balance = 100
    Period 3 balance = 100
    Period 3 balance = 50
    Period 4 balance = 100
    Period 4 balance = 50
    Period 5 balance = 100
    Period 5 balance = 50
    Period 6 balance = 100
    Period 6 balance = 50
    Period 7 balance = 100
    Period 7 balance = 50
    Period 8 balance = 100
    Period 8 balance = 50
    Period 9 balance = 100
    Period 9 balance = 50
    Period 10 balance = 100
    Period 10 balance = 50
    Period 16 balance = 100
    Period 16 balance = 50
    thus when you compress the cube or/and run the query - all looks very nice

  • Logical Error in Script Logic

    Hello Experts,
    Please provide your guidance for the following scenario.
    I need to calculate the 'Accumulated Depreciation' for every month, based on the amounts in the 'AccumDep' and the 'Depreciation' accounts.
    In other words, the value of the Accumulated Depreciation for the month of Feb should be equal to (Accumulated Depreciation in Jan + Depreciation in Jan), and so on.
    To accomplish this, I have written the following script logic.
    *WHEN ACCOUNT
    *IS AccumDep, Depreciation
         *FOR %MON% = 2009.FEB,2009.MAR,2009.APR
              *REC(FACTOR=1, ACCOUNT=AccumDep, TIME=%MON%)
         *NEXT
    *ENDWHEN
    *COMMIT
    The above logic was validated without any 'syntax' errors.  However, I do not see the desired results, as the Accumulated Depreciation is not getting updated every month.  The amount from FEB appears for MAR & APR also.
    Therefore, could you please review the above script and let me know if there are any 'logical' errors?
    All your guidance is greatly appreciated.  Thanks...

    Hi,
    You are not getting the desired result because you are trying to aggregate the depreciation and the accumulated depreciation of the same month and post the result again in the same month. Lets say the code is working for 2009.MAR. You are trying to add the depreciation and accumulated depreciation of 2009.MAR. However, you still dont have the acc depreciation of 2009.MAR. You basically need to take the acc depreciation of the previous month.
    You can try something like:
    *WHEN ACCOUNT
    *IS Depreciation
         *FOR %MON% = 2009.FEB,2009.MAR,2009.APR
              *REC(EXPRESSION = %VALUE% + ([ACCOUNT].[AccumDep],[TIME].Previous), ACCOUNT=AccumDep)
         *NEXT
    *ENDWHEN
    *COMMIT
    You can have a property called Previous to store the previous month of each period in the time dimension.
    Hope you got the idea.

  • Please Help me with this Logic.....

    Seniors , Please Help me with this Requirment
         BUKRS _____________________
         GJAHR  ____________________
         LIFNR    _____________________
         MONAT _____________________
    LIFNR  NAME1  GSBER   GJAHR  HBAL SBAL  ACCUMBAL
    1001   ABB    BUSS1   2005     300      00            
                 ABB      BUSS1    2005      00      100
                                                        300     100   (300-100)=200
                  ABB      BUSS1   2006      200      00
                  ABB      BUSS1   2006      200      00                 
                                                      400      00   (400-00)+ 200 =                                                                               
    600
                ABB     BUSS2   2005     300       00
                ABB      BUSS2    2005      00       100                                                                               
                                                     300      100    ( 300-100) =200                                                                               
                ABB      BUSS2   2006    400         00
                ABB      BUSS2   2006     00         100
                                                      400       100   (400-100)+200 =                                                                               
    500   ****************************************************************************                                                                               
    1400         300  (1400-300)                                            **********************************************************************************************************
    Same for the Next Vendor also...
    This is the report for this Requirment i am working on....Please Help me in the Logic..How to Go on with it....
    *& Report  ZVENDOR_RECONCILLATION
    REPORT  ZVENDOR_RECONCILLATION.
    TABLES : BSAK , BSIK , LFC1 , LFC3 , LFA1.
    *ALV
    TYPE-POOLS: SLIS.
    *TYPE-POOLS icon.
    DATA: It_SORT TYPE SLIS_T_SORTINFO_ALV ."WITH HEADER LINE.
    DATA: TOP TYPE slis_t_listheader,
          END TYPE slis_t_listheader,
          EVENTS TYPE slis_t_event.
    DATA : T_KEY TYPE SLIS_KEYINFO_ALV.
    DATA : FIELDCAT TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
          LAYOUT TYPE SLIS_LAYOUT_ALV OCCURS 1 WITH HEADER LINE ,
          LCAT TYPE SLIS_FIELDCAT_ALV.
    *INTERNAL TABLE
    DATA: BEGIN OF sd_bsak,
            bukrs TYPE bsak-bukrs,
            lifnr TYPE bsak-lifnr,
            umsks TYPE bsak-umsks,
            umskz TYPE bsak-umskz,
            augdt TYPE bsak-augdt,
            augbl TYPE bsak-augbl,
            zuonr TYPE bsak-zuonr,
            gjahr TYPE bsak-gjahr,
            belnr TYPE bsak-belnr,
            buzei TYPE bsak-buzei,
            budat TYPE bsak-budat,
            bldat TYPE bsak-bldat,
            xblnr TYPE bsak-xblnr,
            blart TYPE bsak-blart,
            monat TYPE bsak-monat,
            bschl TYPE bsak-bschl,
            zumsk TYPE bsak-zumsk,
            shkzg TYPE bsak-shkzg,
            gsber TYPE bsak-gsber,
            dmbtr TYPE bsak-dmbtr,
            wrbtr TYPE bsak-wrbtr,
            sgtxt TYPE bsak-sgtxt,
            saknr TYPE bsak-saknr,
            hkont TYPE bsak-hkont,
          END OF sd_bsak.
    DATA: BEGIN OF sd_bsik,
            bukrs TYPE bsik-bukrs,
            lifnr TYPE bsik-lifnr,
            umsks TYPE bsik-umsks,
            umskz TYPE bsik-umskz,
            augdt TYPE bsik-augdt,
            augbl TYPE bsik-augbl,
            zuonr TYPE bsik-zuonr,
            gjahr TYPE bsik-gjahr,
            belnr TYPE bsik-belnr,
            buzei TYPE bsik-buzei,
            budat TYPE bsik-budat,
            bldat TYPE bsik-bldat,
            xblnr TYPE bsik-xblnr,
            blart TYPE bsik-blart,
            monat TYPE bsik-monat,
            bschl TYPE bsik-bschl,
            zumsk TYPE bsik-zumsk,
            shkzg TYPE bsik-shkzg,
            gsber TYPE bsik-gsber,
            dmbtr TYPE bsik-dmbtr,
            wrbtr TYPE bsik-wrbtr,
            sgtxt TYPE bsik-sgtxt,
            saknr TYPE bsik-saknr,
            hkont TYPE bsik-hkont,
            zlsch TYPE bsik-zlsch,
          END OF sd_bsik.
    DATA: BEGIN OF it_lfa1,
            lifnr TYPE lfa1-lifnr,
            name1 TYPE lfa1-name1,
          END OF it_lfa1.
    *FINAL INTERNAL TABLE DECLARATION
    DATA: BEGIN OF IT_FINAL,
            lifnr TYPE bsak-lifnr,
            gsber TYPE bsak-gsber,
            bukrs TYPE bsak-bukrs,
            umsks TYPE bsak-umsks,
            umskz TYPE bsak-umskz,
            augdt TYPE bsak-augdt,
            augbl TYPE bsak-augbl,
            zuonr TYPE bsak-zuonr,
            gjahr TYPE bsak-gjahr,
            belnr TYPE bsak-belnr,
            buzei TYPE bsak-buzei,
            budat TYPE bsak-budat,
            bldat TYPE bsak-bldat,
            xblnr TYPE bsak-xblnr,
            blart TYPE bsak-blart,
            monat TYPE bsak-monat,
            bschl TYPE bsak-bschl,
            zumsk TYPE bsak-zumsk,
            shkzg TYPE bsak-shkzg,
           gsber TYPE bsak-gsber,
            dmbtr TYPE bsak-dmbtr,
            wrbtr TYPE bsak-wrbtr,
            sgtxt TYPE bsak-sgtxt,
            saknr TYPE bsak-saknr,
            hkont TYPE bsak-hkont,
            DMBTR_S  TYPE BSAK-DMBTR,
            DMBTR_H  TYPE BSAK-DMBTR,
            DS       TYPE P DECIMALS 2,
            DH       TYPE P DECIMALS 2,
            SUB      TYPE P DECIMALS 2,
            ADD      TYPE P DECIMALS 2,
            BAL      TYPE P DECIMALS 2,
           lifnr TYPE bsik-lifnr,
           umsks TYPE bsik-umsks,
           umskz TYPE bsik-umskz,
           augdt TYPE bsik-augdt,
           augbl TYPE bsik-augbl,
           zuonr TYPE bsik-zuonr,
           gjahr TYPE bsik-gjahr,
           belnr TYPE bsik-belnr,
           buzei TYPE bsik-buzei,
           budat TYPE bsik-budat,
           bldat TYPE bsik-bldat,
           xblnr TYPE bsik-xblnr,
           blart TYPE bsik-blart,
           monat TYPE bsik-monat,
           bschl TYPE bsik-bschl,
           zumsk TYPE bsik-zumsk,
           shkzg TYPE bsik-shkzg,
           gsber TYPE bsik-gsber,
           dmbtr TYPE bsik-dmbtr,
           wrbtr TYPE bsik-wrbtr,
           sgtxt TYPE bsik-sgtxt,
           saknr TYPE bsik-saknr,
           hkont TYPE bsik-hkont,
            zlsch TYPE bsik-zlsch,
                   lifnr TYPE lfa1-lifnr,
            name1 TYPE lfa1-name1,
    END OF IT_FINAL.
    DATA: BEGIN OF SD_FINAL,
            gsber TYPE bsak-gsber,
            lifnr TYPE bsak-lifnr,
            bukrs TYPE bsak-bukrs,
           lifnr TYPE bsak-lifnr,
            umsks TYPE bsak-umsks,
            umskz TYPE bsak-umskz,
            augdt TYPE bsak-augdt,
            augbl TYPE bsak-augbl,
            zuonr TYPE bsak-zuonr,
            gjahr TYPE bsak-gjahr,
            belnr TYPE bsak-belnr,
            buzei TYPE bsak-buzei,
            budat TYPE bsak-budat,
            bldat TYPE bsak-bldat,
            xblnr TYPE bsak-xblnr,
            blart TYPE bsak-blart,
            monat TYPE bsak-monat,
            bschl TYPE bsak-bschl,
            zumsk TYPE bsak-zumsk,
            shkzg TYPE bsak-shkzg,
            dmbtr TYPE bsak-dmbtr,
            wrbtr TYPE bsak-wrbtr,
            sgtxt TYPE bsak-sgtxt,
            saknr TYPE bsak-saknr,
            hkont TYPE bsak-hkont,
                   bukrs TYPE bsik-bukrs,
           lifnr TYPE bsik-lifnr,
           umsks TYPE bsik-umsks,
           umskz TYPE bsik-umskz,
           augdt TYPE bsik-augdt,
           augbl TYPE bsik-augbl,
           zuonr TYPE bsik-zuonr,
           gjahr TYPE bsik-gjahr,
           belnr TYPE bsik-belnr,
           buzei TYPE bsik-buzei,
           budat TYPE bsik-budat,
           bldat TYPE bsik-bldat,
           xblnr TYPE bsik-xblnr,
           blart TYPE bsik-blart,
           monat TYPE bsik-monat,
           bschl TYPE bsik-bschl,
           zumsk TYPE bsik-zumsk,
           shkzg TYPE bsik-shkzg,
           gsber TYPE bsik-gsber,
           dmbtr TYPE bsik-dmbtr,
           wrbtr TYPE bsik-wrbtr,
           sgtxt TYPE bsik-sgtxt,
           saknr TYPE bsik-saknr,
           hkont TYPE bsik-hkont,
            zlsch TYPE bsik-zlsch,
                   lifnr TYPE lfa1-lifnr,
            name1 TYPE lfa1-name1,
    line_color(4) TYPE c,
    END OF SD_FINAL.
    DATA IT_STD_BSAK  LIKE TABLE OF SD_BSAK  WITH HEADER LINE.
    DATA IT_STD_BSIK  LIKE TABLE OF SD_BSIK  WITH HEADER LINE.
    DATA IT_STD_LFA1  LIKE TABLE OF IT_LFA1  WITH HEADER LINE.
    DATA IT_STD_FINAL  LIKE TABLE OF IT_FINAL  WITH HEADER LINE.
    DATA IT_FINAL_DISPLAY LIKE TABLE OF SD_FINAL WITH HEADER LINE.
    *SELECTION-SCREEN
    SELECTION-SCREEN BEGIN OF BLOCK HEADER WITH FRAME TITLE TEXT-001.
    PARAMETERS:  P_BUKRS LIKE BSAK-BUKRS OBLIGATORY.
    SELECT-OPTIONS : S_GJAHR FOR BSAK-GJAHR.
    SELECT-OPTIONS: S_LIFNR FOR BSAK-LIFNR.
    SELECT-OPTIONS: S_MONAT FOR BSAK-MONAT.
    SELECTION-SCREEN END OF BLOCK HEADER.
    START-OF-SELECTION.
      SET PF-STATUS 'STATUS'.
      PERFORM DATA_RETRIVAL.
      PERFORM FIELD.
      PERFORM EVENTS USING EVENTS.
    PERFORM EVENTS_1 USING EVENTS.
    PERFORM HEADER USING TOP.
      PERFORM LAYOUT.
      PERFORM DISPLAY.
      END-OF-PAGE.
    *&      Form  DATA_RETRIVAL
         text
    -->  p1        text
    <--  p2        text
    FORM DATA_RETRIVAL .
      SELECT BUKRS  LIFNR UMSKS UMSKZ AUGDT AUGBL ZUONR GJAHR BELNR BUZEI BUDAT BLDAT XBLNR BLART
             MONAT BSCHL ZUMSK SHKZG GSBER DMBTR WRBTR SGTXT SAKNR HKONT
        FROM BSAK INTO TABLE IT_STD_BSAK
        WHERE BUKRS = P_BUKRS
              AND GJAHR IN S_GJAHR
        AND LIFNR IN S_LIFNR
        AND MONAT IN S_MONAT.
      IF NOT IT_STD_BSAK[] IS INITIAL.
        SELECT BUKRS LIFNR UMSKS UMSKZ AUGDT AUGBL ZUONR GJAHR BELNR BUZEI BUDAT BLDAT XBLNR
               BLART MONAT BSCHL ZUMSK SHKZG GSBER DMBTR WRBTR SGTXT SAKNR HKONT ZLSCH
        FROM BSIK INTO TABLE IT_STD_BSIK FOR ALL ENTRIES IN IT_STD_BSAK
        WHERE BUKRS = IT_STD_BSAK-BUKRS AND LIFNR = IT_STD_BSAK-LIFNR AND GJAHR = IT_STD_BSAK-GJAHR .
      ENDIF.
    IF NOT IT_STD_BSAK[] IS INITIAL.
        SELECT LIFNR NAME1
               FROM LFA1  INTO TABLE IT_STD_LFA1 FOR ALL ENTRIES IN IT_STD_BSAK
               WHERE LIFNR = IT_STD_BSAK-LIFNR.
      ENDIF.
      LOOP AT IT_STD_BSAK.
        IT_STD_FINAL-BUKRS = IT_STD_BSAK-BUKRS.
        IT_STD_FINAL-LIFNR = IT_STD_BSAK-LIFNR.
        IT_STD_FINAL-UMSKS = IT_STD_BSAK-UMSKS.
        IT_STD_FINAL-UMSKZ = IT_STD_BSAK-UMSKZ.
        IT_STD_FINAL-AUGDT = IT_STD_BSAK-AUGDT.
        IT_STD_FINAL-AUGBL = IT_STD_BSAK-AUGBL.
        IT_STD_FINAL-ZUONR = IT_STD_BSAK-ZUONR.
        IT_STD_FINAL-GJAHR = IT_STD_BSAK-GJAHR.
        IT_STD_FINAL-BELNR = IT_STD_BSAK-BELNR.
        IT_STD_FINAL-BUZEI = IT_STD_BSAK-BUZEI.
        IT_STD_FINAL-BUDAT = IT_STD_BSAK-BUDAT.
        IT_STD_FINAL-BLDAT = IT_STD_BSAK-BLDAT.
        IT_STD_FINAL-XBLNR = IT_STD_BSAK-XBLNR.
        IT_STD_FINAL-BLART = IT_STD_BSAK-BLART.
        IT_STD_FINAL-MONAT = IT_STD_BSAK-MONAT.
        IT_STD_FINAL-BSCHL = IT_STD_BSAK-BSCHL.
        IT_STD_FINAL-ZUMSK = IT_STD_BSAK-ZUMSK.
        IT_STD_FINAL-SHKZG = IT_STD_BSAK-SHKZG.
        IT_STD_FINAL-GSBER = IT_STD_BSAK-GSBER.
        IT_STD_FINAL-DMBTR = IT_STD_BSAK-DMBTR.
        IT_STD_FINAL-WRBTR = IT_STD_BSAK-WRBTR.
        IT_STD_FINAL-SGTXT = IT_STD_BSAK-SGTXT.
        IT_STD_FINAL-SAKNR = IT_STD_BSAK-SAKNR.
        IT_STD_FINAL-HKONT = IT_STD_BSAK-HKONT.
    READ TABLE IT_STD_LFA1 WITH KEY LIFNR = IT_STD_FINAL-LIFNR.
      IF SY-SUBRC = 0.
        IT_STD_FINAL-NAME1 = IT_STD_LFA1-NAME1.
      ENDIF.
        APPEND IT_STD_FINAL.
        CLEAR IT_STD_FINAL.
      ENDLOOP.
    LOOP AT IT_STD_BSIK.
    IF SY-SUBRC = 0.
        IT_STD_FINAL-BUKRS = IT_STD_BSIK-BUKRS.
        IT_STD_FINAL-LIFNR = IT_STD_BSIK-LIFNR.
        IT_STD_FINAL-UMSKS = IT_STD_BSIK-UMSKS.
        IT_STD_FINAL-UMSKZ = IT_STD_BSIK-UMSKZ.
        IT_STD_FINAL-AUGDT = IT_STD_BSIK-AUGDT.
        IT_STD_FINAL-AUGBL = IT_STD_BSIK-AUGBL.
        IT_STD_FINAL-ZUONR = IT_STD_BSIK-ZUONR.
        IT_STD_FINAL-GJAHR = IT_STD_BSIK-GJAHR.
        IT_STD_FINAL-BELNR = IT_STD_BSIK-BELNR.
        IT_STD_FINAL-BUZEI = IT_STD_BSIK-BUZEI.
        IT_STD_FINAL-BUDAT = IT_STD_BSIK-BUDAT.
        IT_STD_FINAL-BLDAT = IT_STD_BSIK-BLDAT.
        IT_STD_FINAL-XBLNR = IT_STD_BSIK-XBLNR.
        IT_STD_FINAL-BLART = IT_STD_BSIK-BLART.
        IT_STD_FINAL-MONAT = IT_STD_BSIK-MONAT.
        IT_STD_FINAL-BSCHL = IT_STD_BSIK-BSCHL.
        IT_STD_FINAL-ZUMSK = IT_STD_BSIK-ZUMSK.
        IT_STD_FINAL-SHKZG = IT_STD_BSIK-SHKZG.
        IT_STD_FINAL-GSBER = IT_STD_BSIK-GSBER.
        IT_STD_FINAL-DMBTR = IT_STD_BSIK-DMBTR.
        IT_STD_FINAL-WRBTR = IT_STD_BSIK-WRBTR.
        IT_STD_FINAL-SGTXT = IT_STD_BSIK-SGTXT.
        IT_STD_FINAL-SAKNR = IT_STD_BSIK-SAKNR.
        IT_STD_FINAL-HKONT = IT_STD_BSIK-HKONT.
        IT_STD_FINAL-ZLSCH = IT_STD_BSIK-ZLSCH.
        ENDIF.
        APPEND IT_STD_FINAL.
        CLEAR IT_STD_FINAL.
      ENDLOOP.
    LOOP AT IT_STD_FINAL.
        IF IT_STD_FINAL-SHKZG = 'S'.
            IT_STD_FINAL-DMBTR_S  = IT_STD_FINAL-DMBTR.
        ELSE.
        IF IT_STD_FINAL-SHKZG = 'H'.
          IT_STD_FINAL-DMBTR_H  = IT_STD_FINAL-DMBTR.
          ENDIF.
        ENDIF.
        IT_STD_FINAL-DMBTR = ''.
        MODIFY IT_STD_FINAL INDEX SY-TABIX TRANSPORTING DMBTR_H DMBTR_S DMBTR.
    "VAR.
        CLEAR IT_STD_FINAL.
      ENDLOOP.
    SORT IT_STD_FINAL BY LIFNR GSBER GJAHR.
    ENDFORM.                    " DATA_RETRIVAL
    *&      Form  FIELD
         text
    -->  p1        text
    <--  p2        text
    form FIELD .
      LCAT-FIELDNAME = 'LIFNR'.
      LCAT-TABNAME = 'IT_STD_FINAL'.
      LCAT-SELTEXT_L = 'Vendor No'.
      LCAT-JUST = 'M'.
      APPEND LCAT TO FIELDCAT.
      CLEAR LCAT.
      LCAT-FIELDNAME = 'NAME1'.
      LCAT-TABNAME = 'IT_STD_FINAL'.
      LCAT-SELTEXT_L = 'Vendor Name'.
      LCAT-JUST = 'M'.
      APPEND LCAT TO FIELDCAT.
      CLEAR LCAT.
      LCAT-FIELDNAME = 'GJAHR'.
      LCAT-TABNAME = 'IT_STD_FINAL'.
      LCAT-SELTEXT_L = 'Fiscal Year'.
      LCAT-JUST = 'M'.
      APPEND LCAT TO FIELDCAT.
      CLEAR LCAT.
      LCAT-FIELDNAME = 'GSBER'.
      LCAT-TABNAME = 'IT_STD_FINAL'.
      LCAT-SELTEXT_L = 'BussArea'.
      LCAT-JUST = 'M'.
      APPEND LCAT TO FIELDCAT.
      CLEAR LCAT.
      LCAT-FIELDNAME = 'DMBTR_S'.
      LCAT-TABNAME = 'IT_STD_FINAL'.
      LCAT-SELTEXT_L = 'Debit Balanace'.
      LCAT-JUST = 'M'.
      APPEND LCAT TO FIELDCAT.
      CLEAR LCAT.
      LCAT-FIELDNAME = 'DMBTR_H'.
      LCAT-TABNAME = 'IT_STD_FINAL'.
      LCAT-SELTEXT_L = 'Credit Balance'.
      LCAT-JUST = 'M'.
      APPEND LCAT TO FIELDCAT.
      CLEAR LCAT.
      LCAT-FIELDNAME = 'BAL'.
      LCAT-TABNAME = 'IT_STD_FINAL'.
      LCAT-SELTEXT_L = 'Accumulated Balance'.
      LCAT-JUST = 'M'.
      APPEND LCAT TO FIELDCAT.
      CLEAR LCAT.
    endform.                    " FIELD
    *&      Form  DISPLAY
         text
    -->  p1        text
    <--  p2        text
    form DISPLAY .
      CLEAR: IT_STD_BSAK,IT_STD_BSIK, IT_STD_LFA1 .
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
    I_INTERFACE_CHECK                = ' '
    I_BYPASSING_BUFFER                = ' '
    I_BUFFER_ACTIVE                  = ' '
        I_CALLBACK_PROGRAM                = SY-REPID
    I_CALLBACK_PF_STATUS_SET          = 'STATUS '
    I_CALLBACK_USER_COMMAND          = ' '
    I_CALLBACK_TOP_OF_PAGE            = ' '
    I_CALLBACK_HTML_TOP_OF_PAGE      = ' '
    I_CALLBACK_HTML_END_OF_LIST      = ' '
    I_STRUCTURE_NAME                  =
    I_BACKGROUND_ID                  = ' '
    I_GRID_TITLE                      =
    I_GRID_SETTINGS                  =
        IS_LAYOUT                        = LAYOUT
        IT_FIELDCAT                      = FIELDCAT[]
    IT_EXCLUDING                      =
    IT_SPECIAL_GROUPS                =
         IT_SORT                          = IT_SORT
    IT_FILTER                        =
    IS_SEL_HIDE                      =
    I_DEFAULT                        = 'X'
    I_SAVE                            = ' '
    IS_VARIANT                        =
        IT_EVENTS                        = EVENTS
    IT_EVENT_EXIT                    =
    IS_PRINT                          =
    IS_REPREP_ID                      =
    I_SCREEN_START_COLUMN            = 0
    I_SCREEN_START_LINE              = 0
    I_SCREEN_END_COLUMN              = 0
    I_SCREEN_END_LINE                = 0
    I_HTML_HEIGHT_TOP                = 0
    I_HTML_HEIGHT_END                = 0
    IT_ALV_GRAPHICS                  =
    IT_HYPERLINK                      =
    IT_ADD_FIELDCAT                  =
    IT_EXCEPT_QINFO                  =
    IR_SALV_FULLSCREEN_ADAPTER        =
    IMPORTING
    E_EXIT_CAUSED_BY_CALLER          =
    ES_EXIT_CAUSED_BY_USER            =
        TABLES
       t_outtab                          = IT_CHARG
          t_outtab                          = IT_STD_FINAL[]
    EXCEPTIONS
    PROGRAM_ERROR                    = 1
    OTHERS                            = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
           WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    "DISPLAY
    *&      Form  EVENTS
         text
    -->  p1        text
    <--  p2        text
    form EVENTS USING P_EVENTS TYPE slis_t_event.
      DATA: ls_event TYPE slis_alv_event.
      ls_event-name = 'TOP_OF_PAGE'.
      ls_event-form = 'TOP_OF_PAGE'.
      APPEND ls_event TO P_EVENTS.
    endform.                    " EVENTS
    *&      Form  TOP_OF_PAGE
         text
    FORM TOP_OF_PAGE.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = TOP.
    ENDFORM.                    "TOP_OF_PAGE
    *&      Form  LAYOUT
         text
    -->  p1        text
    <--  p2        text
    form LAYOUT .
    LAYOUT-ZEBRA = 'X'.
      LAYOUT-INFO_FIELDNAME = 'LINE_COLOR'.
      LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
      APPEND LAYOUT." TO LAYOUT.
    endform.                    " LAYOUT
    *&      Form  EVENTS_1
         text
         -->P_EVENTS  text
    FORM EVENTS_1  USING    P_EVENTS TYPE slis_t_event.
      DATA: ls_event TYPE slis_alv_event.
      WRITE: SY-UNAME.
      ls_event-name = 'END_OF_PAGE'.
      ls_event-form = 'END_OF_PAGE'.
      APPEND ls_event TO P_EVENTS.
    ENDFORM.                    " EVENTS_1

    Seniors , Please Help me with this Requirment
         BUKRS _____________________
         GJAHR  ____________________
         LIFNR    _____________________
         MONAT _____________________
    LIFNR  NAME1  GSBER   GJAHR  HBAL SBAL  ACCUMBAL
    1001   ABB    BUSS1   2005     300      00            
                 ABB      BUSS1    2005      00      100
                                                        300     100   (300-100)=200
                  ABB      BUSS1   2006      200      00
                  ABB      BUSS1   2006      200      00                 
                                                      400      00   (400-00)+ 200 =                                                                               
    600
                ABB     BUSS2   2005     300       00
                ABB      BUSS2    2005      00       100                                                                               
                                                     300      100    ( 300-100) =200                                                                               
                ABB      BUSS2   2006    400         00
                ABB      BUSS2   2006     00         100
                                                      400       100   (400-100)+200 =                                                                               
    500   ****************************************************************************                                                                               
    1400         300  (1400-300)                                            **********************************************************************************************************
    Same for the Next Vendor also...
    This is the report for this Requirment i am working on....Please Help me in the Logic..How to Go on with it....
    *& Report  ZVENDOR_RECONCILLATION
    REPORT  ZVENDOR_RECONCILLATION.
    TABLES : BSAK , BSIK , LFC1 , LFC3 , LFA1.
    *ALV
    TYPE-POOLS: SLIS.
    *TYPE-POOLS icon.
    DATA: It_SORT TYPE SLIS_T_SORTINFO_ALV ."WITH HEADER LINE.
    DATA: TOP TYPE slis_t_listheader,
          END TYPE slis_t_listheader,
          EVENTS TYPE slis_t_event.
    DATA : T_KEY TYPE SLIS_KEYINFO_ALV.
    DATA : FIELDCAT TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
          LAYOUT TYPE SLIS_LAYOUT_ALV OCCURS 1 WITH HEADER LINE ,
          LCAT TYPE SLIS_FIELDCAT_ALV.
    *INTERNAL TABLE
    DATA: BEGIN OF sd_bsak,
            bukrs TYPE bsak-bukrs,
            lifnr TYPE bsak-lifnr,
            umsks TYPE bsak-umsks,
            umskz TYPE bsak-umskz,
            augdt TYPE bsak-augdt,
            augbl TYPE bsak-augbl,
            zuonr TYPE bsak-zuonr,
            gjahr TYPE bsak-gjahr,
            belnr TYPE bsak-belnr,
            buzei TYPE bsak-buzei,
            budat TYPE bsak-budat,
            bldat TYPE bsak-bldat,
            xblnr TYPE bsak-xblnr,
            blart TYPE bsak-blart,
            monat TYPE bsak-monat,
            bschl TYPE bsak-bschl,
            zumsk TYPE bsak-zumsk,
            shkzg TYPE bsak-shkzg,
            gsber TYPE bsak-gsber,
            dmbtr TYPE bsak-dmbtr,
            wrbtr TYPE bsak-wrbtr,
            sgtxt TYPE bsak-sgtxt,
            saknr TYPE bsak-saknr,
            hkont TYPE bsak-hkont,
          END OF sd_bsak.
    DATA: BEGIN OF sd_bsik,
            bukrs TYPE bsik-bukrs,
            lifnr TYPE bsik-lifnr,
            umsks TYPE bsik-umsks,
            umskz TYPE bsik-umskz,
            augdt TYPE bsik-augdt,
            augbl TYPE bsik-augbl,
            zuonr TYPE bsik-zuonr,
            gjahr TYPE bsik-gjahr,
            belnr TYPE bsik-belnr,
            buzei TYPE bsik-buzei,
            budat TYPE bsik-budat,
            bldat TYPE bsik-bldat,
            xblnr TYPE bsik-xblnr,
            blart TYPE bsik-blart,
            monat TYPE bsik-monat,
            bschl TYPE bsik-bschl,
            zumsk TYPE bsik-zumsk,
            shkzg TYPE bsik-shkzg,
            gsber TYPE bsik-gsber,
            dmbtr TYPE bsik-dmbtr,
            wrbtr TYPE bsik-wrbtr,
            sgtxt TYPE bsik-sgtxt,
            saknr TYPE bsik-saknr,
            hkont TYPE bsik-hkont,
            zlsch TYPE bsik-zlsch,
          END OF sd_bsik.
    DATA: BEGIN OF it_lfa1,
            lifnr TYPE lfa1-lifnr,
            name1 TYPE lfa1-name1,
          END OF it_lfa1.
    *FINAL INTERNAL TABLE DECLARATION
    DATA: BEGIN OF IT_FINAL,
            lifnr TYPE bsak-lifnr,
            gsber TYPE bsak-gsber,
            bukrs TYPE bsak-bukrs,
            umsks TYPE bsak-umsks,
            umskz TYPE bsak-umskz,
            augdt TYPE bsak-augdt,
            augbl TYPE bsak-augbl,
            zuonr TYPE bsak-zuonr,
            gjahr TYPE bsak-gjahr,
            belnr TYPE bsak-belnr,
            buzei TYPE bsak-buzei,
            budat TYPE bsak-budat,
            bldat TYPE bsak-bldat,
            xblnr TYPE bsak-xblnr,
            blart TYPE bsak-blart,
            monat TYPE bsak-monat,
            bschl TYPE bsak-bschl,
            zumsk TYPE bsak-zumsk,
            shkzg TYPE bsak-shkzg,
           gsber TYPE bsak-gsber,
            dmbtr TYPE bsak-dmbtr,
            wrbtr TYPE bsak-wrbtr,
            sgtxt TYPE bsak-sgtxt,
            saknr TYPE bsak-saknr,
            hkont TYPE bsak-hkont,
            DMBTR_S  TYPE BSAK-DMBTR,
            DMBTR_H  TYPE BSAK-DMBTR,
            DS       TYPE P DECIMALS 2,
            DH       TYPE P DECIMALS 2,
            SUB      TYPE P DECIMALS 2,
            ADD      TYPE P DECIMALS 2,
            BAL      TYPE P DECIMALS 2,
           lifnr TYPE bsik-lifnr,
           umsks TYPE bsik-umsks,
           umskz TYPE bsik-umskz,
           augdt TYPE bsik-augdt,
           augbl TYPE bsik-augbl,
           zuonr TYPE bsik-zuonr,
           gjahr TYPE bsik-gjahr,
           belnr TYPE bsik-belnr,
           buzei TYPE bsik-buzei,
           budat TYPE bsik-budat,
           bldat TYPE bsik-bldat,
           xblnr TYPE bsik-xblnr,
           blart TYPE bsik-blart,
           monat TYPE bsik-monat,
           bschl TYPE bsik-bschl,
           zumsk TYPE bsik-zumsk,
           shkzg TYPE bsik-shkzg,
           gsber TYPE bsik-gsber,
           dmbtr TYPE bsik-dmbtr,
           wrbtr TYPE bsik-wrbtr,
           sgtxt TYPE bsik-sgtxt,
           saknr TYPE bsik-saknr,
           hkont TYPE bsik-hkont,
            zlsch TYPE bsik-zlsch,
                   lifnr TYPE lfa1-lifnr,
            name1 TYPE lfa1-name1,
    END OF IT_FINAL.
    DATA: BEGIN OF SD_FINAL,
            gsber TYPE bsak-gsber,
            lifnr TYPE bsak-lifnr,
            bukrs TYPE bsak-bukrs,
           lifnr TYPE bsak-lifnr,
            umsks TYPE bsak-umsks,
            umskz TYPE bsak-umskz,
            augdt TYPE bsak-augdt,
            augbl TYPE bsak-augbl,
            zuonr TYPE bsak-zuonr,
            gjahr TYPE bsak-gjahr,
            belnr TYPE bsak-belnr,
            buzei TYPE bsak-buzei,
            budat TYPE bsak-budat,
            bldat TYPE bsak-bldat,
            xblnr TYPE bsak-xblnr,
            blart TYPE bsak-blart,
            monat TYPE bsak-monat,
            bschl TYPE bsak-bschl,
            zumsk TYPE bsak-zumsk,
            shkzg TYPE bsak-shkzg,
            dmbtr TYPE bsak-dmbtr,
            wrbtr TYPE bsak-wrbtr,
            sgtxt TYPE bsak-sgtxt,
            saknr TYPE bsak-saknr,
            hkont TYPE bsak-hkont,
                   bukrs TYPE bsik-bukrs,
           lifnr TYPE bsik-lifnr,
           umsks TYPE bsik-umsks,
           umskz TYPE bsik-umskz,
           augdt TYPE bsik-augdt,
           augbl TYPE bsik-augbl,
           zuonr TYPE bsik-zuonr,
           gjahr TYPE bsik-gjahr,
           belnr TYPE bsik-belnr,
           buzei TYPE bsik-buzei,
           budat TYPE bsik-budat,
           bldat TYPE bsik-bldat,
           xblnr TYPE bsik-xblnr,
           blart TYPE bsik-blart,
           monat TYPE bsik-monat,
           bschl TYPE bsik-bschl,
           zumsk TYPE bsik-zumsk,
           shkzg TYPE bsik-shkzg,
           gsber TYPE bsik-gsber,
           dmbtr TYPE bsik-dmbtr,
           wrbtr TYPE bsik-wrbtr,
           sgtxt TYPE bsik-sgtxt,
           saknr TYPE bsik-saknr,
           hkont TYPE bsik-hkont,
            zlsch TYPE bsik-zlsch,
                   lifnr TYPE lfa1-lifnr,
            name1 TYPE lfa1-name1,
    line_color(4) TYPE c,
    END OF SD_FINAL.
    DATA IT_STD_BSAK  LIKE TABLE OF SD_BSAK  WITH HEADER LINE.
    DATA IT_STD_BSIK  LIKE TABLE OF SD_BSIK  WITH HEADER LINE.
    DATA IT_STD_LFA1  LIKE TABLE OF IT_LFA1  WITH HEADER LINE.
    DATA IT_STD_FINAL  LIKE TABLE OF IT_FINAL  WITH HEADER LINE.
    DATA IT_FINAL_DISPLAY LIKE TABLE OF SD_FINAL WITH HEADER LINE.
    *SELECTION-SCREEN
    SELECTION-SCREEN BEGIN OF BLOCK HEADER WITH FRAME TITLE TEXT-001.
    PARAMETERS:  P_BUKRS LIKE BSAK-BUKRS OBLIGATORY.
    SELECT-OPTIONS : S_GJAHR FOR BSAK-GJAHR.
    SELECT-OPTIONS: S_LIFNR FOR BSAK-LIFNR.
    SELECT-OPTIONS: S_MONAT FOR BSAK-MONAT.
    SELECTION-SCREEN END OF BLOCK HEADER.
    START-OF-SELECTION.
      SET PF-STATUS 'STATUS'.
      PERFORM DATA_RETRIVAL.
      PERFORM FIELD.
      PERFORM EVENTS USING EVENTS.
    PERFORM EVENTS_1 USING EVENTS.
    PERFORM HEADER USING TOP.
      PERFORM LAYOUT.
      PERFORM DISPLAY.
      END-OF-PAGE.
    *&      Form  DATA_RETRIVAL
         text
    -->  p1        text
    <--  p2        text
    FORM DATA_RETRIVAL .
      SELECT BUKRS  LIFNR UMSKS UMSKZ AUGDT AUGBL ZUONR GJAHR BELNR BUZEI BUDAT BLDAT XBLNR BLART
             MONAT BSCHL ZUMSK SHKZG GSBER DMBTR WRBTR SGTXT SAKNR HKONT
        FROM BSAK INTO TABLE IT_STD_BSAK
        WHERE BUKRS = P_BUKRS
              AND GJAHR IN S_GJAHR
        AND LIFNR IN S_LIFNR
        AND MONAT IN S_MONAT.
      IF NOT IT_STD_BSAK[] IS INITIAL.
        SELECT BUKRS LIFNR UMSKS UMSKZ AUGDT AUGBL ZUONR GJAHR BELNR BUZEI BUDAT BLDAT XBLNR
               BLART MONAT BSCHL ZUMSK SHKZG GSBER DMBTR WRBTR SGTXT SAKNR HKONT ZLSCH
        FROM BSIK INTO TABLE IT_STD_BSIK FOR ALL ENTRIES IN IT_STD_BSAK
        WHERE BUKRS = IT_STD_BSAK-BUKRS AND LIFNR = IT_STD_BSAK-LIFNR AND GJAHR = IT_STD_BSAK-GJAHR .
      ENDIF.
    IF NOT IT_STD_BSAK[] IS INITIAL.
        SELECT LIFNR NAME1
               FROM LFA1  INTO TABLE IT_STD_LFA1 FOR ALL ENTRIES IN IT_STD_BSAK
               WHERE LIFNR = IT_STD_BSAK-LIFNR.
      ENDIF.
      LOOP AT IT_STD_BSAK.
        IT_STD_FINAL-BUKRS = IT_STD_BSAK-BUKRS.
        IT_STD_FINAL-LIFNR = IT_STD_BSAK-LIFNR.
        IT_STD_FINAL-UMSKS = IT_STD_BSAK-UMSKS.
        IT_STD_FINAL-UMSKZ = IT_STD_BSAK-UMSKZ.
        IT_STD_FINAL-AUGDT = IT_STD_BSAK-AUGDT.
        IT_STD_FINAL-AUGBL = IT_STD_BSAK-AUGBL.
        IT_STD_FINAL-ZUONR = IT_STD_BSAK-ZUONR.
        IT_STD_FINAL-GJAHR = IT_STD_BSAK-GJAHR.
        IT_STD_FINAL-BELNR = IT_STD_BSAK-BELNR.
        IT_STD_FINAL-BUZEI = IT_STD_BSAK-BUZEI.
        IT_STD_FINAL-BUDAT = IT_STD_BSAK-BUDAT.
        IT_STD_FINAL-BLDAT = IT_STD_BSAK-BLDAT.
        IT_STD_FINAL-XBLNR = IT_STD_BSAK-XBLNR.
        IT_STD_FINAL-BLART = IT_STD_BSAK-BLART.
        IT_STD_FINAL-MONAT = IT_STD_BSAK-MONAT.
        IT_STD_FINAL-BSCHL = IT_STD_BSAK-BSCHL.
        IT_STD_FINAL-ZUMSK = IT_STD_BSAK-ZUMSK.
        IT_STD_FINAL-SHKZG = IT_STD_BSAK-SHKZG.
        IT_STD_FINAL-GSBER = IT_STD_BSAK-GSBER.
        IT_STD_FINAL-DMBTR = IT_STD_BSAK-DMBTR.
        IT_STD_FINAL-WRBTR = IT_STD_BSAK-WRBTR.
        IT_STD_FINAL-SGTXT = IT_STD_BSAK-SGTXT.
        IT_STD_FINAL-SAKNR = IT_STD_BSAK-SAKNR.
        IT_STD_FINAL-HKONT = IT_STD_BSAK-HKONT.
    READ TABLE IT_STD_LFA1 WITH KEY LIFNR = IT_STD_FINAL-LIFNR.
      IF SY-SUBRC = 0.
        IT_STD_FINAL-NAME1 = IT_STD_LFA1-NAME1.
      ENDIF.
        APPEND IT_STD_FINAL.
        CLEAR IT_STD_FINAL.
      ENDLOOP.
    LOOP AT IT_STD_BSIK.
    IF SY-SUBRC = 0.
        IT_STD_FINAL-BUKRS = IT_STD_BSIK-BUKRS.
        IT_STD_FINAL-LIFNR = IT_STD_BSIK-LIFNR.
        IT_STD_FINAL-UMSKS = IT_STD_BSIK-UMSKS.
        IT_STD_FINAL-UMSKZ = IT_STD_BSIK-UMSKZ.
        IT_STD_FINAL-AUGDT = IT_STD_BSIK-AUGDT.
        IT_STD_FINAL-AUGBL = IT_STD_BSIK-AUGBL.
        IT_STD_FINAL-ZUONR = IT_STD_BSIK-ZUONR.
        IT_STD_FINAL-GJAHR = IT_STD_BSIK-GJAHR.
        IT_STD_FINAL-BELNR = IT_STD_BSIK-BELNR.
        IT_STD_FINAL-BUZEI = IT_STD_BSIK-BUZEI.
        IT_STD_FINAL-BUDAT = IT_STD_BSIK-BUDAT.
        IT_STD_FINAL-BLDAT = IT_STD_BSIK-BLDAT.
        IT_STD_FINAL-XBLNR = IT_STD_BSIK-XBLNR.
        IT_STD_FINAL-BLART = IT_STD_BSIK-BLART.
        IT_STD_FINAL-MONAT = IT_STD_BSIK-MONAT.
        IT_STD_FINAL-BSCHL = IT_STD_BSIK-BSCHL.
        IT_STD_FINAL-ZUMSK = IT_STD_BSIK-ZUMSK.
        IT_STD_FINAL-SHKZG = IT_STD_BSIK-SHKZG.
        IT_STD_FINAL-GSBER = IT_STD_BSIK-GSBER.
        IT_STD_FINAL-DMBTR = IT_STD_BSIK-DMBTR.
        IT_STD_FINAL-WRBTR = IT_STD_BSIK-WRBTR.
        IT_STD_FINAL-SGTXT = IT_STD_BSIK-SGTXT.
        IT_STD_FINAL-SAKNR = IT_STD_BSIK-SAKNR.
        IT_STD_FINAL-HKONT = IT_STD_BSIK-HKONT.
        IT_STD_FINAL-ZLSCH = IT_STD_BSIK-ZLSCH.
        ENDIF.
        APPEND IT_STD_FINAL.
        CLEAR IT_STD_FINAL.
      ENDLOOP.
    LOOP AT IT_STD_FINAL.
        IF IT_STD_FINAL-SHKZG = 'S'.
            IT_STD_FINAL-DMBTR_S  = IT_STD_FINAL-DMBTR.
        ELSE.
        IF IT_STD_FINAL-SHKZG = 'H'.
          IT_STD_FINAL-DMBTR_H  = IT_STD_FINAL-DMBTR.
          ENDIF.
        ENDIF.
        IT_STD_FINAL-DMBTR = ''.
        MODIFY IT_STD_FINAL INDEX SY-TABIX TRANSPORTING DMBTR_H DMBTR_S DMBTR.
    "VAR.
        CLEAR IT_STD_FINAL.
      ENDLOOP.
    SORT IT_STD_FINAL BY LIFNR GSBER GJAHR.
    ENDFORM.                    " DATA_RETRIVAL
    *&      Form  FIELD
         text
    -->  p1        text
    <--  p2        text
    form FIELD .
      LCAT-FIELDNAME = 'LIFNR'.
      LCAT-TABNAME = 'IT_STD_FINAL'.
      LCAT-SELTEXT_L = 'Vendor No'.
      LCAT-JUST = 'M'.
      APPEND LCAT TO FIELDCAT.
      CLEAR LCAT.
      LCAT-FIELDNAME = 'NAME1'.
      LCAT-TABNAME = 'IT_STD_FINAL'.
      LCAT-SELTEXT_L = 'Vendor Name'.
      LCAT-JUST = 'M'.
      APPEND LCAT TO FIELDCAT.
      CLEAR LCAT.
      LCAT-FIELDNAME = 'GJAHR'.
      LCAT-TABNAME = 'IT_STD_FINAL'.
      LCAT-SELTEXT_L = 'Fiscal Year'.
      LCAT-JUST = 'M'.
      APPEND LCAT TO FIELDCAT.
      CLEAR LCAT.
      LCAT-FIELDNAME = 'GSBER'.
      LCAT-TABNAME = 'IT_STD_FINAL'.
      LCAT-SELTEXT_L = 'BussArea'.
      LCAT-JUST = 'M'.
      APPEND LCAT TO FIELDCAT.
      CLEAR LCAT.
      LCAT-FIELDNAME = 'DMBTR_S'.
      LCAT-TABNAME = 'IT_STD_FINAL'.
      LCAT-SELTEXT_L = 'Debit Balanace'.
      LCAT-JUST = 'M'.
      APPEND LCAT TO FIELDCAT.
      CLEAR LCAT.
      LCAT-FIELDNAME = 'DMBTR_H'.
      LCAT-TABNAME = 'IT_STD_FINAL'.
      LCAT-SELTEXT_L = 'Credit Balance'.
      LCAT-JUST = 'M'.
      APPEND LCAT TO FIELDCAT.
      CLEAR LCAT.
      LCAT-FIELDNAME = 'BAL'.
      LCAT-TABNAME = 'IT_STD_FINAL'.
      LCAT-SELTEXT_L = 'Accumulated Balance'.
      LCAT-JUST = 'M'.
      APPEND LCAT TO FIELDCAT.
      CLEAR LCAT.
    endform.                    " FIELD
    *&      Form  DISPLAY
         text
    -->  p1        text
    <--  p2        text
    form DISPLAY .
      CLEAR: IT_STD_BSAK,IT_STD_BSIK, IT_STD_LFA1 .
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
    I_INTERFACE_CHECK                = ' '
    I_BYPASSING_BUFFER                = ' '
    I_BUFFER_ACTIVE                  = ' '
        I_CALLBACK_PROGRAM                = SY-REPID
    I_CALLBACK_PF_STATUS_SET          = 'STATUS '
    I_CALLBACK_USER_COMMAND          = ' '
    I_CALLBACK_TOP_OF_PAGE            = ' '
    I_CALLBACK_HTML_TOP_OF_PAGE      = ' '
    I_CALLBACK_HTML_END_OF_LIST      = ' '
    I_STRUCTURE_NAME                  =
    I_BACKGROUND_ID                  = ' '
    I_GRID_TITLE                      =
    I_GRID_SETTINGS                  =
        IS_LAYOUT                        = LAYOUT
        IT_FIELDCAT                      = FIELDCAT[]
    IT_EXCLUDING                      =
    IT_SPECIAL_GROUPS                =
         IT_SORT                          = IT_SORT
    IT_FILTER                        =
    IS_SEL_HIDE                      =
    I_DEFAULT                        = 'X'
    I_SAVE                            = ' '
    IS_VARIANT                        =
        IT_EVENTS                        = EVENTS
    IT_EVENT_EXIT                    =
    IS_PRINT                          =
    IS_REPREP_ID                      =
    I_SCREEN_START_COLUMN            = 0
    I_SCREEN_START_LINE              = 0
    I_SCREEN_END_COLUMN              = 0
    I_SCREEN_END_LINE                = 0
    I_HTML_HEIGHT_TOP                = 0
    I_HTML_HEIGHT_END                = 0
    IT_ALV_GRAPHICS                  =
    IT_HYPERLINK                      =
    IT_ADD_FIELDCAT                  =
    IT_EXCEPT_QINFO                  =
    IR_SALV_FULLSCREEN_ADAPTER        =
    IMPORTING
    E_EXIT_CAUSED_BY_CALLER          =
    ES_EXIT_CAUSED_BY_USER            =
        TABLES
       t_outtab                          = IT_CHARG
          t_outtab                          = IT_STD_FINAL[]
    EXCEPTIONS
    PROGRAM_ERROR                    = 1
    OTHERS                            = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
           WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    "DISPLAY
    *&      Form  EVENTS
         text
    -->  p1        text
    <--  p2        text
    form EVENTS USING P_EVENTS TYPE slis_t_event.
      DATA: ls_event TYPE slis_alv_event.
      ls_event-name = 'TOP_OF_PAGE'.
      ls_event-form = 'TOP_OF_PAGE'.
      APPEND ls_event TO P_EVENTS.
    endform.                    " EVENTS
    *&      Form  TOP_OF_PAGE
         text
    FORM TOP_OF_PAGE.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = TOP.
    ENDFORM.                    "TOP_OF_PAGE
    *&      Form  LAYOUT
         text
    -->  p1        text
    <--  p2        text
    form LAYOUT .
    LAYOUT-ZEBRA = 'X'.
      LAYOUT-INFO_FIELDNAME = 'LINE_COLOR'.
      LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
      APPEND LAYOUT." TO LAYOUT.
    endform.                    " LAYOUT
    *&      Form  EVENTS_1
         text
         -->P_EVENTS  text
    FORM EVENTS_1  USING    P_EVENTS TYPE slis_t_event.
      DATA: ls_event TYPE slis_alv_event.
      WRITE: SY-UNAME.
      ls_event-name = 'END_OF_PAGE'.
      ls_event-form = 'END_OF_PAGE'.
      APPEND ls_event TO P_EVENTS.
    ENDFORM.                    " EVENTS_1

  • FOR loop in script logic

    Dear Gurus,
    This is the logic I am working with:
    *FOR %MONTH% = 2008.FEB,2008.MAR,2008.APR,2008.MAY,2008.JUN,2008.JUL,2008.AUG,2008.SEP
    //CHECK IF THE VALUE OF THE ACCUMULATED DEPRECIATION IS GREATER THAN THE CAPITALIZED ASSET VALUE//
    [ACCOUNT].[#AccumDepr] = (([ACCOUNT].[AccumDepr]+[ACCOUNT].[Depreciation])>[ACCOUNT].[EQUIPMENT1]? [ACCOUNT].[EQUIPMENT1] : ([ACCOUNT].[AccumDepr]+[ACCOUNT].[Depreciation]))
    *NEXT
    I am trying to execute the above script logic, but the system is throwing an error that says 
    "Duplicate formula found:  [ACCOUNT].[#AccumDepr] = (([ACCOUNT].[AccumDepr]+......."
    Any idea why this is happening?
    Also, could you please suggest a better way of writing the above code?
    Thanks,
    Vijay.

    As a testing scenario, I have calculated the depreciation in a different part of the same logic.  Here it is:
    //This logic calculates the accumulated depreciation amount for the time period specified in the logic
    //NOTE:  This logic is not very dynamic and is only valid for the accounts specified in the logic
    //A FUTURE ENHANCEMENT TO THIS LOGIC WOULD BE TO MAKE THE "LIFE" OF THE ASSET A $DATAMANAGER VARIABLE$
    //AND WRITE A CUSTOM SCRIPT LOGIC
    //BEGIN SCRIPT LOGIC FILE//
    //CONSTANTS
    *XDIM_MEMBERSET CATEGORY=ACTUAL
    *XDIM_MEMBERSET ACCOUNT=Depreciation,AccumDepr,NBV_EQUIPMENT1,EQUIPMENT1
    *XDIM_MEMBERSET ENTITY=STORE1
    *XDIM_MEMBERSET TIME=2008.JAN,2008.FEB,2008.MAR,2008.APR,2008.MAY,2008.JUN,2008.JUL,2008.AUG,2008.SEP
    //BEGIN: POPULATE NET BOOK VALUE FROM CAPITALIZED ASSET VALUE //
    *WHEN ACCOUNT
    *IS EQUIPMENT1
         *WHEN TIME
         *IS 2008.JAN
              *REC(FACTOR=1,ACCOUNT="NBV_EQUIPMENT1")
         *ENDWHEN
    *ENDWHEN
    *COMMIT
    //END: POPULATE NET BOOK VALUE FROM CAPITALIZED ASSET VALUE   //
    //BEGIN: CALCULATE DEPRECIATION //
    *WHEN ACCOUNT
    *IS EQUIPMENT1
         *REC(EXPRESSION=(%VALUE%/6),ACCOUNT="Depreciation")
    *ENDWHEN
    *COMMIT
    //END: CALCULATE DEPRECIATION   //
    //BEGIN: CALCULATE ACCUMULATED DEPRECIATION AND NET BOOK VALUE //
    *FOR %MONTH% = 2008.FEB,2008.MAR,2008.APR,2008.MAY,2008.JUN,2008.JUL,2008.AUG,2008.SEP
    //CHECK IF THE VALUE OF THE ACCUMULATED DEPRECIATION IS GREATER THAN THE CAPITALIZED ASSET VALUE//
    *WHEN CATEGORY
    *IS ACTUAL
    *REC(EXPRESSION=IIF((([ACCOUNT].[AccumDepr] + [ACCOUNT].[Depreciation])>[ACCOUNT].[EQUIPMENT1]), [ACCOUNT].[EQUIPMENT1], [ACCOUNT].[AccumDepr]+[ACCOUNT].[Depreciation]))
    *ENDWHEN
    *NEXT
    //*FOR %MONTH% = 2008.FEB,2008.MAR,2008.APR,2008.MAY,2008.JUN,2008.JUL,2008.AUG,2008.SEP
    //CHECK IF THE NET BOOK VALUE OF THE ASSET IS LESS THAN ZERO//
    //*[ACCOUNT].[#NBV_EQUIPMENT1] = (([ACCOUNT].[NBV_EQUIPMENT1]-[ACCOUNT].[Depreciation])>0? ([ACCOUNT].[NBV_EQUIPMENT1]-[ACCOUNT].[Depreciation]) : 0)
    //*NEXT
    *COMMIT
    //END: CALCULATE ACCUMULATED DEPRECIATION AND NET BOOK VALUE   //
    //END SCRIPT LOGIC FILE//
    Please let me know if there is a better way to write this code.
    Thanks for all your help.

  • How much better is Logic Pro?

    Would it be a real disadvantage to get logic express over Logic, i mean has it still got all the loops, synths, drum machines and actual audio recording capabilities?
    Thanks

    Pro is much better imo, but depending on your budget and needs you might not need it. What I did was to purchase Logic Express first, learned it, liked it and then upgraded from Logic Express to Logic Pro once I found that I wanted the plugins and some options found in pro, this winter. That's a good route since it doesn't cost much more (Express$ + Upgrade$ ~= Pro$) and allowed me to have a much better idea for why I wanted Pro. I might have chosen not to buy it if I found so, but I did (and a the extra time accumulating money helped :-))

  • Need a Macro logic

    Hi Experts,
    My client wants to see accumulation of sales History in a INITIAL column in the planning book.
    So could you pls provide any logic and pre requisites for this.
    Regards,
    Ram

    Hi Murali,
    You can achieve this scenario interactively by creating a Default Macro (Create regular macro and assign to default so that as soon as you enter a value in KF1 and save, KF2 will be calculated)
    Case 1: If you want to adopt a specific percentage (say 75%), the logic is simple,
    Row: KF2
    = (75/100)*(Row: KF1)
    Case 2: If the % keeps fluctuating every period, then create a new Key Figure (say KF3) for the factor
    Row: KF2
    = ((Row: KF3)/100)*(Row: KF1)
    when KF3 = 75 (for 75%).
    If KF3 = 0.75, then
    Row: KF2
    = (Row: KF3)*(Row: KF1)
    Hope this helps.
    Regards,
    JB

  • Business Logic

    HELLO,
    I have gotten into a unique situation while builiding a business logic for below case. Here is how the process/contracts are set up. Fields: CLAIM_ID is unique and in order of the reciept of claim. M_ID is Member_ID. Reserve_Date
    is when Member reserved the Product. Rent_Cost is product rent cost listed in system. Sales Tax is 7% of Rent_Cost. ACC_Rent_Cost is accumulated (rent cost + sales tax), Also can be described as YTD Rent Cost by member by year order by reserve_date, claim_id).
    There are two threshholds in this process. 1. ACC_RENT_COST = $200 2. ACC_M_PAID = $400. The fields needed to be calculated are M_PAID, ACC_M_PAID. ( I believe both have to be calculated together claim by claim for this logic to pull
    correct numbers).
    The terms for M_PAID: Member pays(M_PAID) 75% of the (Rent Cost + Sales Tax) for Product_type: PV6, PV4, DZD. Member pays(M_PAID) 50% of the (Rent Cost + Sales Tax) for all products but PV6, PV4 & DZD. Although, when member's ACC_RENT_COST > 200 THEN
    Member pays(M_PAID) 100% of the (Rent Cost + Sales Tax) UNTIL when member's ACC_M_PAID reaches 400. When ACC_M_PAID reaches 400, on remaining amount and futures claims, member only pays(M_PAID) 10% of (rent cost + sales tax ) if (rent cost + sales tax ) > $10, else member pays (rent cost + sales tax ).
    CO_PAID will be simply (Rent_Cost + Sales_Tax - M_PAID ) per CLAIM.
    Here is walkthrough of M001 from below data:
    Total Claims = 6.
    CLAIM_ID = 1111: M_PAID = ( 25.06 + 1.75 ) * 50% = 13.41               ACC_M_PAID = 0
    CLAIM_ID = 1112: M_PAID = ( 12.06 + 0.84 ) * 50% = 6.45                 ACC_M_PAID = 13.41
    CLAIM_ID = 1113: M_PAID = ( 25.06 + 1.75 ) * 50% = 13.41               ACC_M_PAID = 19.86
    CLAIM_ID = 1114: M_PAID = ( 25.06 + 1.75 ) * 50% = 13.41               ACC_M_PAID = 33.26
    CLAIM_ID = 1115: M_PAID = ( (200(THRESHOLD) - 93.33(ACC_RENT_COST) ) * 75%) + ( ( 125.06 + 8.76 ) - (200(THRESHOLD) - 93.33(ACC_RENT_COST) ) * 100% ) = 107.15                 ACC_M_PAID = 46.67
    CLAIM_ID = 1116: M_PAID = ( ( 400(THRESHOLD) - 153.82(ACC_M_PAID )* 100% ) +  ( ( 525.06 + 36.75 ) - ( 400(THRESHOLD) - 153.82(ACC_M_PAID ) ) ) * 10% )                                  ACC_M_PAID = 153.82Again, it seems as if M_PAID, ACC_M_PAID are dependend on each other because the way M_PAID terms are set up which is what I am unable to build logic for. Anyways, Please let me know if I can provide any more detail. Below is sample
    data and required result.
    --DROP TABLE TMP_COST ;
    CREATE TABLE TMP_COST (
    CLAIM_ID    VARCHAR2(4),
    M_ID    VARCHAR2(4),
    RESERVE_DATE    DATE,
    RENT_COST    FLOAT,
    SALES_TAX   FLOAT,
    M_PAID  FLOAT,
    ACC_M_PAID  FLOAT,
    ACC_RENT_COST   FLOAT,
    CO_PAID FLOAT,
    PRODUCT_TYPE    VARCHAR2(3),
    MEMBER_TYPE     VARCHAR2(3) ) ;
    COMMIT ;
    INSERT INTO TMP_COST ( CLAIM_ID, M_ID, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, PRODUCT_TYPE, MEMBER_TYPE ) VALUES ( '1111', 'M001', '21-JAN-2011', 25.06, 1.75, 0, 0, 0, 0, 'PV3', 'P' ) ;
    INSERT INTO TMP_COST ( CLAIM_ID, M_ID, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, PRODUCT_TYPE, MEMBER_TYPE ) VALUES ( '1112', 'M001', '21-JAN-2011', 12.06, 0.84, 0, 0, 26.81, 0, 'DSD', 'P' ) ;
    INSERT INTO TMP_COST ( CLAIM_ID, M_ID, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, PRODUCT_TYPE, MEMBER_TYPE ) VALUES ( '1113', 'M001', '23-JAN-2011', 25.06, 1.75, 0, 0, 39.71, 0, 'PV3', 'P' ) ;
    INSERT INTO TMP_COST ( CLAIM_ID, M_ID, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, PRODUCT_TYPE, MEMBER_TYPE ) VALUES ( '1114', 'M001', '24-JAN-2011', 25.06, 1.75, 0, 0, 66.52, 0, 'PV3', 'P' ) ;
    INSERT INTO TMP_COST ( CLAIM_ID, M_ID, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, PRODUCT_TYPE, MEMBER_TYPE ) VALUES ( '1115', 'M001', '21-MAR-2011', 125.06, 8.76, 0, 0, 93.33, 0, 'PV4', 'P' ) ;
    INSERT INTO TMP_COST ( CLAIM_ID, M_ID, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, PRODUCT_TYPE, MEMBER_TYPE ) VALUES ( '1116', 'M001', '21-APR-2011', 525.06, 36.75, 0, 0, 227.15, 0, 'DZD', 'P' ) ;
    INSERT INTO TMP_COST ( CLAIM_ID, M_ID, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, PRODUCT_TYPE, MEMBER_TYPE ) VALUES ( '1117', 'M002', '21-JAN-2011', 125.06, 8.76, 0, 0, 0, 0, 'PV4', 'P' ) ;
    INSERT INTO TMP_COST ( CLAIM_ID, M_ID, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, PRODUCT_TYPE, MEMBER_TYPE ) VALUES ( '1118', 'M002', '21-FEB-2011', 1000.06, 70, 0, 0, 133.82, 0, 'PV6', 'P' ) ;
    INSERT INTO TMP_COST ( CLAIM_ID, M_ID, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, PRODUCT_TYPE, MEMBER_TYPE ) VALUES ( '1119', 'M002', '21-MAR-2011', 25.06, 1.75, 0, 0, 1203.88, 0, 'PV3', 'P' ) ;
    INSERT INTO TMP_COST ( CLAIM_ID, M_ID, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, PRODUCT_TYPE, MEMBER_TYPE ) VALUES ( '1120', 'M002', '21-APR-2011', 25.06, 1.75, 0, 0, 1230.69, 0, 'PV3', 'P' ) ;
    INSERT INTO TMP_COST ( CLAIM_ID, M_ID, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, PRODUCT_TYPE, MEMBER_TYPE ) VALUES ( '1121', 'M003', '21-JAN-2011', 5.06, 0.35, 0, 0, 5.41, 0, 'PV1', 'P' ) ;
    INSERT INTO TMP_COST ( CLAIM_ID, M_ID, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, PRODUCT_TYPE, MEMBER_TYPE ) VALUES ( '1122', 'M003', '21-JAN-2011', 25.06, 1.75, 0, 0, 5.41, 0, 'PV3', 'P' ) ;
    INSERT INTO TMP_COST ( CLAIM_ID, M_ID, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, PRODUCT_TYPE, MEMBER_TYPE ) VALUES ( '1123', 'M004', '21-JAN-2011', 25.06, 1.75, 0, 0, 0, 0, 'PV3', 'P' ) ;
    INSERT INTO TMP_COST ( CLAIM_ID, M_ID, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, PRODUCT_TYPE, MEMBER_TYPE ) VALUES ( '1124', 'M005', '21-JAN-2011', 1000.06, 70, 0, 0, 0, 0, 'PV6', 'P' ) ;
    INSERT INTO TMP_COST ( CLAIM_ID, M_ID, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, PRODUCT_TYPE, MEMBER_TYPE ) VALUES ( '1125', 'M005', '21-APR-2011', 25.06, 1.75, 0, 0, 1070.06, 0, 'PV3', 'P' ) ;
    COMMIT ;Results
    CLAIM_ID     M_ID     RESERVE_DATE     RENT_COST     SALES_TAX     M_PAID     ACC_M_PAID     ACC_RENT_COST     CO_PAID     PRODUCT_TYPE     MEMBER_TYPE
    1111     M001     01/21/2011 00:00:00     25.06     1.75     13.41     0.00     0.00     13.41     PV3     P
    1112     M001     01/21/2011 00:00:00     12.06     0.84     6.45     13.41     26.81     6.45     DSD     P
    1113     M001     01/23/2011 00:00:00     25.06     1.75     13.41     19.86     39.71     13.41     PV3     P
    1114     M001     01/24/2011 00:00:00     25.06     1.75     13.41     33.26     66.52     13.41     PV3     P
    1115     M001     03/21/2011 00:00:00     125.06     8.76     107.15     46.67     93.33     26.67     PV4     P
    1116     M001     04/21/2011 00:00:00     525.06     36.75     277.75     153.82     227.15     284.06     DZD     P
    1117     M002     01/21/2011 00:00:00     125.06     8.76     100.37     0.00     0.00     33.46     PV4     P
    1118     M002     02/21/2011 00:00:00     1000.06     70     419.69     100.37     133.82     650.37     PV6     P
    1119     M002     03/21/2011 00:00:00     25.06     1.75     2.68     520.06     1203.88     24.13     PV3     P
    1120     M002     04/21/2011 00:00:00     25.06     1.75     2.68     522.74     1230.69     24.13     PV3     P
    1121     M003     01/21/2011 00:00:00     5.06     0.35     2.71     0.00     0.00     2.71     PV1     P
    1122     M003     01/21/2011 00:00:00     25.06     1.75     13.41     2.71     5.41     13.41     PV3     P
    1123     M004     01/21/2011 00:00:00     25.06     1.75     13.41     0.00     0.00     13.41     PV3     P
    1124     M005     01/21/2011 00:00:00     1000.06     70     597.01     0.00     0.00     473.05     PV6     P
    1125     M005     04/21/2011 00:00:00     25.06     1.75     2.68     597.01     1070.06     24.13     PV3     PI appreciate your time.
    Edited by: 788729 on May 14, 2011 5:18 PM

    Hi,
    First, I apoogize. I miscalculated few things and also didn't read full contract. There are few more terms that are included in the contract for the crossover claims(claims that fall in two phases) and few other scenarios/challenges.
    1. PHASE-1: ACC_RENT_COST = $0 to $2840 PHASE-2: ACC_M_PAID = After ACC_RENT_COST - $2840 but before ACC_M_PAID - $4550. PHASE-3: After ACC_M_PAID of $4550. The fields needed to be calculated are M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, MBR_DSCNT.
    ( AGAIN, all these fields are depended on each other especially ACC_RENT_COST AND ACC_M_PAID to determine in what phase the member is in during each claim ). You are a genious. I believe you already know how to resolve that part. Everything should be sorted by CLM_RECIEVE_DATE to CALCULATE ACCUMULATED fields.
    The terms for M_PAID:
    1. Before Phase-1 threshold -- Member pays(M_PAID) MBR_CAP rate based on ITEM_ROW. MBR_CAP are given in below table. These CAP rates apply until ACC_RENT_COST reaches 2840. Please note that for ITEM_ROW 4, member pays
    33% of the (RENT_COST+SALES_TAX).
    2. After Phase-1 but before Phase-2: Member pays(M_PAID) following ways:
    1. If PRODUCT_CODE = P then M_PAID = 93% of the (RENT_COST + SALES_TAX). This is what goes into ACC_M_PAID.
    2. AA - If PRODUCT_CODE = V and LABEL_TYPE starts with 5 (so all 500 series) then M_PAID = ((RENT_COST+SALES_TAX)-(RENT_COST/2)). The remaining RENT_COST/2 goes to MBR_DSCNT. Although
    ENTIRE AMOUNT (M_PAID + MBR_DSCNT) goes into ACC_M_PAID.
    BB - If PRODUCT_CODE = V and LABEL_TYPE doesn't start with 5 then M_PAID = (RENT_COST+SALES_TAX). 0 goes to MBR_DSCNT. This also counts in ACC_M_PAID.
    3. In Phase -3 -- Member pays if PRODUCT_CODE = P then Greater of $2.5 or 5% of remaining or full amount
    if PRODUCT_CODE = V then Greater of $6.30 or 5% of remaining or full amount.
    CO_PAID will simply be ( RENT_COST + SALES_TAX - M_PAID - MBRDSCNT )
    For claims that crossover 2 or more phases, M_PAID will be lesser of 100% of RENT_COST+SALES_TAX. Below is an example for
    Here is walkthrough of M001 from below data:
    Total Claims = 20.
    CLAIM_ID = 1111: M_PAID = $20 (MBR_CAP for ITEM_ROW - 2) -- NO MBR_DSCNT even though LABEL_TYPE starts with 5.( bcz this is in phase 1)
    CLAIM_ID = 1112: M_PAID = ( 60 + ( ( 2840 - 2310.52(ACC_RENT_COST) ) * 93% ) = 130.8 ( there is an error here. 60 is not added in this example but, logic needs to be built as if 60 CAP + 93% on remaining )
    CLAIM_ID = 1113: M_PAID = ( 159 + 1.25 ) * 93% = 149.03
    CLAIM_ID = 1114: M_PAID = ((1.21 + 1.95) - (( 1.21 + 1.95 ) * 50% )) = 2.55 Remaining (1.21+1.95)*50% goes to MBR_DSCNT --Please note that entire M_PAID + MBR_DSCNT goes into ACC_M_PAID.
    CLAIM_ID = 1115: M_PAID = ((14.26 + 1.95 ) * 93% ) = 15.08
    skipping because of same logic
    CLAIM_ID = 1124: M_PAID = ((4550 - 4190.2(ACC_M_PAID))/2 + greater of $6.30 or 5% of ( (2306.2 + 1.25 ) - ((4550 - 4190.2(ACC_M_PAID)) which is 97.38 so total M_PAID = 277.28 Please note that both MBR_DSCNT & M_PAID
    were deducteed to get remaining balance * applied 5% on that.
    CLAIM_ID = 1127 : M_PAID = $2.5 or 5% of (RENT_COST + SALES_TAX). In this case, $2.5 is greater so M_PAID = $2.5
    Again, I really really appreciate your time and effort. I hope this is great challenege and learning experience for you. If you have any questions, please let me know. Sorry agaoin for incomplete info on previous post.
    DROP TABLE TMP_COST ;
    CREATE TABLE TMP_COST (
    CLAIM_ID    VARCHAR2(4),
    M_ID    VARCHAR2(4),
    CLM_RECEIVE_DATE    VARCHAR2(255),
    LABEL_TYPE  VARCHAR2(3),
    PRODUCT_CODE  VARCHAR2(1),
    ITEM_ROW    VARCHAR2(1),
    RESERVE_DATE    DATE,
    RENT_COST    FLOAT,
    SALES_TAX   FLOAT,
    M_PAID  FLOAT,
    ACC_M_PAID  FLOAT,
    ACC_RENT_COST   FLOAT,
    CO_PAID FLOAT,
    MBR_DSCNT   FLOAT,
    MBR_CAP FLOAT ) ;
    COMMIT ;
    INSERT INTO TMP_COST ( CLAIM_ID, M_ID, CLM_RECEIVE_DATE, LABEL_TYPE, PRODUCT_CODE, ITEM_ROW, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, MBR_DSCNT, MBR_CAP ) VALUES ( '1111', 'M001', '2011-01-05-16.31.47.000000', '551', 'V', '2', '04-JAN-2011', 2306.2, 1.25, 0, 0, 0, 0, 0, 20 ) ;
    INSERT INTO TMP_COST ( CLAIM_ID, M_ID, CLM_RECEIVE_DATE, LABEL_TYPE, PRODUCT_CODE, ITEM_ROW, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, MBR_DSCNT, MBR_CAP ) VALUES ( '1112', 'M001', '2011-01-07-19.17.26.000000', '221', 'P', '3', '04-JAN-2011', 668.88, 1.25, 0, 0, 0, 0, 0, 60 ) ;
    INSERT INTO TMP_COST ( CLAIM_ID, M_ID, CLM_RECEIVE_DATE, LABEL_TYPE, PRODUCT_CODE, ITEM_ROW, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, MBR_DSCNT, MBR_CAP ) VALUES ( '1113', 'M001', '2011-01-07-19.18.05.000000', '223', 'P', '3', '04-JAN-2011', 159, 1.25, 0, 0, 0, 0, 0, 60 ) ;
    INSERT INTO TMP_COST ( CLAIM_ID, M_ID, CLM_RECEIVE_DATE, LABEL_TYPE, PRODUCT_CODE, ITEM_ROW, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, MBR_DSCNT, MBR_CAP ) VALUES ( '1114', 'M001', '2011-01-14-18.47.44.000000', '551', 'V', '1', '14-JAN-2011', 1.21, 1.95, 0, 0, 0, 0, 0, 0 ) ;
    INSERT INTO TMP_COST ( CLAIM_ID, M_ID, CLM_RECEIVE_DATE, LABEL_TYPE, PRODUCT_CODE, ITEM_ROW, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, MBR_DSCNT, MBR_CAP ) VALUES ( '1115', 'M001', '2011-01-19-23.02.32.000000', '279', 'P', '1', '19-JAN-2011', 14.26, 1.95, 0, 0, 0, 0, 0, 0 ) ;
    INSERT INTO TMP_COST ( CLAIM_ID, M_ID, CLM_RECEIVE_DATE, LABEL_TYPE, PRODUCT_CODE, ITEM_ROW, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, MBR_DSCNT, MBR_CAP ) VALUES ( '1116', 'M001', '2011-02-08-16.44.54.000000', '297', 'P', '3', '08-FEB-2011', 668.88, 1.25, 0, 0, 0, 0, 0, 60 ) ;
    INSERT INTO TMP_COST ( CLAIM_ID, M_ID, CLM_RECEIVE_DATE, LABEL_TYPE, PRODUCT_CODE, ITEM_ROW, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, MBR_DSCNT, MBR_CAP ) VALUES ( '1117', 'M001', '2011-02-08-16.45.25.000000', '288', 'P', '3', '08-FEB-2011', 159, 1.25, 0, 0, 0, 0, 0, 60 ) ;
    INSERT INTO TMP_COST ( CLAIM_ID, M_ID, CLM_RECEIVE_DATE, LABEL_TYPE, PRODUCT_CODE, ITEM_ROW, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, MBR_DSCNT, MBR_CAP ) VALUES ( '1118', 'M001', '2011-02-08-16.46.24.000000', '287', 'P', '1', '08-FEB-2011', 5.44, 1.25, 0, 0, 0, 0, 0, 0 ) ;
    INSERT INTO TMP_COST ( CLAIM_ID, M_ID, CLM_RECEIVE_DATE, LABEL_TYPE, PRODUCT_CODE, ITEM_ROW, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, MBR_DSCNT, MBR_CAP ) VALUES ( '1119', 'M001', '2011-02-08-16.47.54.000000', '553', 'V', '2', '08-FEB-2011', 2306.2, 1.25, 0, 0, 0, 0, 0, 20 ) ;
    INSERT INTO TMP_COST ( CLAIM_ID, M_ID, CLM_RECEIVE_DATE, LABEL_TYPE, PRODUCT_CODE, ITEM_ROW, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, MBR_DSCNT, MBR_CAP ) VALUES ( '1120', 'M001', '2011-02-15-14.25.54.000000', '501', 'V', '1', '15-FEB-2011', 2.42, 1.95, 0, 0, 0, 0, 0, 0 ) ;
    INSERT INTO TMP_COST ( CLAIM_ID, M_ID, CLM_RECEIVE_DATE, LABEL_TYPE, PRODUCT_CODE, ITEM_ROW, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, MBR_DSCNT, MBR_CAP ) VALUES ( '1121', 'M001', '2011-03-02-16.46.15.000000', '289', 'P', '3', '02-MAR-2011', 668.88, 1.25, 0, 0, 0, 0, 0, 60 ) ;
    INSERT INTO TMP_COST ( CLAIM_ID, M_ID, CLM_RECEIVE_DATE, LABEL_TYPE, PRODUCT_CODE, ITEM_ROW, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, MBR_DSCNT, MBR_CAP ) VALUES ( '1122', 'M001', '2011-03-02-16.48.52.000000', '268', 'P', '3', '02-MAR-2011', 159, 1.25, 0, 0, 0, 0, 0, 60 ) ;
    INSERT INTO TMP_COST ( CLAIM_ID, M_ID, CLM_RECEIVE_DATE, LABEL_TYPE, PRODUCT_CODE, ITEM_ROW, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, MBR_DSCNT, MBR_CAP ) VALUES ( '1123', 'M001', '2011-03-02-16.50.46.000000', '267', 'P', '1', '02-MAR-2011', 5.44, 1.25, 0, 0, 0, 0, 0, 0 ) ;
    INSERT INTO TMP_COST ( CLAIM_ID, M_ID, CLM_RECEIVE_DATE, LABEL_TYPE, PRODUCT_CODE, ITEM_ROW, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, MBR_DSCNT, MBR_CAP ) VALUES ( '1124', 'M001', '2011-03-02-16.52.11.000000', '564', 'V', '2', '02-MAR-2011', 2306.2, 1.25, 0, 0, 0, 0, 0, 20 ) ;
    INSERT INTO TMP_COST ( CLAIM_ID, M_ID, CLM_RECEIVE_DATE, LABEL_TYPE, PRODUCT_CODE, ITEM_ROW, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, MBR_DSCNT, MBR_CAP ) VALUES ( '1125', 'M001', '2011-03-08-05.20.54.000000', '227', 'P', '1', '08-MAR-2011', 14.26, 1.95, 0, 0, 0, 0, 0, 0 ) ;
    INSERT INTO TMP_COST ( CLAIM_ID, M_ID, CLM_RECEIVE_DATE, LABEL_TYPE, PRODUCT_CODE, ITEM_ROW, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, MBR_DSCNT, MBR_CAP ) VALUES ( '1126', 'M001', '2011-03-23-18.00.36.000000', '551', 'V', '2', '23-MAR-2011', 2306.2, 1.25, 0, 0, 0, 0, 0, 20 ) ;
    INSERT INTO TMP_COST ( CLAIM_ID, M_ID, CLM_RECEIVE_DATE, LABEL_TYPE, PRODUCT_CODE, ITEM_ROW, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, MBR_DSCNT, MBR_CAP ) VALUES ( '1127', 'M001', '2011-03-23-18.18.17.000000', '254', 'P', '1', '23-MAR-2011', 5.44, 1.25, 0, 0, 0, 0, 0, 0 ) ;
    INSERT INTO TMP_COST ( CLAIM_ID, M_ID, CLM_RECEIVE_DATE, LABEL_TYPE, PRODUCT_CODE, ITEM_ROW, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, MBR_DSCNT, MBR_CAP ) VALUES ( '1128', 'M001', '2011-03-23-18.21.32.000000', '241', 'P', '3', '23-MAR-2011', 668.88, 1.25,  0, 0, 0, 0, 0, 60 ) ;
    INSERT INTO TMP_COST ( CLAIM_ID, M_ID, CLM_RECEIVE_DATE, LABEL_TYPE, PRODUCT_CODE, ITEM_ROW, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, MBR_DSCNT, MBR_CAP ) VALUES ( '1129', 'M001', '2011-03-23-18.23.38.000000', '246', 'P', '4', '23-MAR-2011', 159, 1.25, 0, 0, 0, 0, 0, 0.33 ) ;
    INSERT INTO TMP_COST ( CLAIM_ID, M_ID, CLM_RECEIVE_DATE, LABEL_TYPE, PRODUCT_CODE, ITEM_ROW, RESERVE_DATE, RENT_COST, SALES_TAX, M_PAID, ACC_M_PAID, ACC_RENT_COST, CO_PAID, MBR_DSCNT, MBR_CAP ) VALUES ( '1130', 'M001', '2011-03-28-16.05.06.000000', '599', 'V', '4', '25-MAR-2011', 155.38, 1.95, 0, 0, 0, 0, 0, 0.33 ) ;
    COMMIT ;Results:
    CLAIM_ID     M_ID     CLM_RECEIVE_DATE     LABEL_TYPE     PRODUCT_CODE     ITEM_ROW     RESERVE_DATE     RENT_COST     SALES_TAX     M_PAID     ACC_M_PAID     ACC_RENT_COST     CO_PAID     MBR_DSCNT
    1111     M001     2011-01-05-16.31.47.000000     551     V     2     01/04/2011 00:00:00     2306.2     1.25     20     0     0     2287.45     0
    1112     M001     2011-01-07-19.17.26.000000     221     P     3     01/04/2011 00:00:00     668.88     1.25     130.8     20     2310.52     539.33     0
    1113     M001     2011-01-07-19.18.05.000000     223     P     3     01/04/2011 00:00:00     159     1.25     149.03     150.8     2980.65     11.22     0
    1114     M001     2011-01-14-18.47.44.000000     551     V     1     01/14/2011 00:00:00     1.21     1.95     2.55     299.83     3140.9     0     0.61
    1115     M001     2011-01-19-23.02.32.000000     279     P     1     01/19/2011 00:00:00     14.26     1.95     15.08     306.36     3147.68     1.13     0
    1116     M001     2011-02-08-16.44.54.000000     297     P     3     02/08/2011 00:00:00     668.88     1.25     623.22     321.44     3163.89     46.91     0
    1117     M001     2011-02-08-16.45.25.000000     288     P     3     02/08/2011 00:00:00     159     1.25     149.03     944.66     3834.02     11.22     0
    1118     M001     2011-02-08-16.46.24.000000     287     P     1     02/08/2011 00:00:00     5.44     1.25     6.22     1093.69     3994.27     0.47     0
    1119     M001     2011-02-08-16.47.54.000000     553     V     2     02/08/2011 00:00:00     2306.2     1.25     1154.35     1099.91     4000.96     0     1153.1
    1120     M001     2011-02-15-14.25.54.000000     501     V     1     02/15/2011 00:00:00     2.42     1.95     3.16     3407.36     6308.41     0     1.21
    1121     M001     2011-03-02-16.46.15.000000     289     P     3     03/02/2011 00:00:00     668.88     1.25     623.22     3411.73     6312.78     46.91     0
    1122     M001     2011-03-02-16.48.52.000000     268     P     3     03/02/2011 00:00:00     159     1.25     149.03     4034.95     6982.91     11.22     0
    1123     M001     2011-03-02-16.50.46.000000     267     P     1     03/02/2011 00:00:00     5.44     1.25     6.22     4183.98     7143.16     0.47     0
    1124     M001     2011-03-02-16.52.11.000000     564     V     2     03/02/2011 00:00:00     2306.2     1.25     277.28     4190.2     7149.85     1850.27     179.9
    1125     M001     2011-03-08-05.20.54.000000     227     P     1     03/08/2011 00:00:00     14.26     1.95     2.5     4550     9457.3     13.71     0
    1126     M001     2011-03-23-18.00.36.000000     551     V     2     03/23/2011 00:00:00     2306.2     1.25     115.37     4550     9473.51     2192.08     0
    1127     M001     2011-03-23-18.18.17.000000     254     P     1     03/23/2011 00:00:00     5.44     1.25     2.5     4550     11780.96     4.19     0
    1128     M001     2011-03-23-18.21.32.000000     241     P     3     03/23/2011 00:00:00     668.88     1.25     33.51     4550     11787.65     636.62     0
    1129     M001     2011-03-23-18.23.38.000000     246     P     3     03/23/2011 00:00:00     159     1.25     8.01     4550     12457.78     152.24     0
    1130     M001     2011-03-28-16.05.06.000000     599     V     3     03/25/2011 00:00:00     155.38     1.95     7.87     4550     12618.03     149.46     0Edited by: 788729 on May 14, 2011 5:20 PM

  • How do I limit the number of measures per line in Logic Pro score editor

    I would like to control the number of measures per line in Logic Pro X Score  Editor, currently it puts random numbers of measures per line depending on the accumulated lenth of the measures per line, as if looking for "the best fit". Any ideas how to force four measures per line in my finished score?

    Thanks, This solved my problem, the only thing I still needed to do was to find out how to open the Global format window. I fugured it out by opening the Score editor window / Layout / global format /then I saw the Max # of barlines. If you just go to the Logic Pro / Preferences then you never get to see the global format window unless you know to hit the "Score Project Settings" button on the bottom. But at least you showed me that there was such a option which limited the number of measures so I keep on trying until I fould how to reveal that option. Thanks !

  • CC5.2: Logical and Cross Systems - Best Practices

    Hello,
    we are using CC5.2 in a landscape of multiple SAP systems. In order to streamline the process of creating our rule set I would like to clear up my confusion about the use of logical and cross systems.
    Here my questions:
    1. Are logical systems intended for encapsulating systems of following stages (e.g. DEV1, QA1, PRD1) or to group systems of one stage which have the same structure of risks and therefore can share rules (e.g. DEVECC1, DEVECC2, ...)?
    2. I don't see entries of logical systems in the Rule Architect - wouldn't it make sense to create functions for logical systems instead of uploading function authorizations for each system?
    3. When you create functions for one sample system - is it sufficient to generate the rules for the logical system the sample system belongs to?
    4. Regarding the cross systems functionality: After creating risks across different systems - is it still necessary to create corresponding cross systems and to generate the rules from the cross systems menu?
    Thanks for your help in advance!
    Regards,
    Martin

    Hi Frank,
    thanks for your answer.
    I now see the handling of logical systems as independent from system landscape tiers. After recreating the desired logical system for a second time it now also appears in the Rule Architect and in the upload dialog of function authorizations. I guess that after uploading them it's still necessary to generate the rules for logical systems in the configuration tab under 'logical systems' ?!
    Regarding the cross systems functionality I don't understand the redundancy of the different settings. Actually there are four options for cross system checks. Let's go into detail:
    a) Functions can include actions of different systems...
    b) ...and they can be flagged as cross system functions. --> Should not the system automatically set the analysis scope of a function to 'cross system' when functions include actions of different systems or is this flag used for the analysis of logical systems?
    b) Risks can include functions referencing to different systems. --> In my understanding it is essential that in this case the analysis scope is 'cross systems'. Is it still necessary to create cross systems and to generate rules for those? (Seems a bit redundant.) Or does one option take precedence over the other?
    c) Finally you can setup 'cross systems'. --> How is the relation of cross systems to the other settings mentioned above? Do you have to create cross systems for each combination of systems which are related in risk definitions or function definitions? Or can all related systems be accumulated in one overall cross system?
    Hope, there is not too much confusion now
    Thanks and regards,
    Martin

  • Logical translation of nested logic:equal tags ?

    I see this in a JSP (I've simplified it) that I have to modify:
    <logic:notEqual name="someForm" property="XYZ" value="4">
    <logic:notEqual name="someForm" property="XYZ" value="5">
    <logic:notEqual name="someForm" property="XYZ" value="5">
    <TD>String 1</TD>
    </logic:notEqual>
    </logic:notEqual>
    </logic:notEqual>
    The effect it has is like an "AND".
    So if ((XYZ != 4) AND (XYZ != 5) and (XYZ != 6))
    then show the string.
    Now I wanted to add something that said "but if it IS one of those three... (an OR condition, like "equals this OR this OR this"), then show something else."
    So I tried the above except changed them to logic:equals, and it doesn't work. In fact the behavior doesn't change at all, because I think it's doing "AND" again. And of course, it's never going to equal 4 AND 5 AND 6 at the same time.
    Am I straight on this? How do you create an OR condition? I looked at the <nested:equal> tag a little bit, but I'm not certain I understand what it offers.

    Hi,
    You are not getting the desired result because you are trying to aggregate the depreciation and the accumulated depreciation of the same month and post the result again in the same month. Lets say the code is working for 2009.MAR. You are trying to add the depreciation and accumulated depreciation of 2009.MAR. However, you still dont have the acc depreciation of 2009.MAR. You basically need to take the acc depreciation of the previous month.
    You can try something like:
    *WHEN ACCOUNT
    *IS Depreciation
         *FOR %MON% = 2009.FEB,2009.MAR,2009.APR
              *REC(EXPRESSION = %VALUE% + ([ACCOUNT].[AccumDep],[TIME].Previous), ACCOUNT=AccumDep)
         *NEXT
    *ENDWHEN
    *COMMIT
    You can have a property called Previous to store the previous month of each period in the time dimension.
    Hope you got the idea.

Maybe you are looking for