Reg:Logic required

Hi ,
We are working on one development for this we are using exit:MV45AFZZ and written code on it.The logic we have written is when ever the field FPLT:FAKSP is blank at contarct level ,then it should trigger an intimation mail .First time it is triggering mail and even when we go go second and third time and make some change other than field FAKSK again it is triggering mail.How to stop further mails ,it should trigger only when we make change in field FAKSK only .Pls help.
Regards,
Sash .
Use meaningful subject for your future questions
Edited by: Vijay Babu Dudla on Feb 26, 2009 7:54 AM

Hi ,
The requirement is when ever the user removes a billing block at filed FPLT:FAKSP then it should trigger a mail .Logic we have taken is :Pass the VBAK:VBELN to FPLA:VBELN and pick the FPLNR then send it to FPLT and check FAKSP ,if it is space then trigger a mail .Pls suggest exit and required coding.
Thnaking you in advance.
With Regards,
Sash.

Similar Messages

  • Reg logic required for selection-screen.

    Hi,
    i have one requirement
    on selection screen 2 radio button
    1 for service
    2 for account
    Parameter      FILE     LOCALFILE     Filename
    If the radiobutton ACCOUNT is selected the default name for file will be:
         ‘Rev_acc_com_&system_time_stamp&.dat’
    Elseif the radiobutton SERVICE is selected the default name for file will be:
         ‘Rev_srv_com_&system_time_stamp&.dat’
    some body can give the logic for this.

    take the following solution
    data: tstamp type TZNTSTMPS.
    data: filename type string.
    call function 'CONVERT_INTO_TIMESTAMP'
    exporting
       I_DATLO  = sy-datum
       I_TIMLO   = sy-uzeit
    importing
       E_TIMESTAMP = tstamp.
    if ACCOUNT is selected then
    concatenate 'Rev_srv_com_' tstamp '.dat' into filename.
    else if SERVICE is selected then
    concatenate 'Rev_srv_com_' tstamp '.dat' into filename.
    the filename variable will be containing ur required file name..
    reward points if useful....

  • Logic required  for Sort in ALV

    Hi All,
    I am dowloding the ALV report layout in excel sheet thorough mailing functionality.
    I want to implenemnt the dynamic sort. Here I am writing this.but i want the logic for below code.
          CALL FUNCTION 'LT_DBDATA_READ_FROM_LTDX'
            EXPORTING
      I_TOOL             = 'LT'
              IS_VARKEY          = W_VARKEY_EU
            TABLES
              T_DBFIELDCAT       = IT_DBFIELDCAT_EU
            T_DBSORTINFO       =  IT_DBSORTINFO
             T_DBFILTER         = IT_FILTER_LAYOUT
             T_DBLAYOUT         = IT_DB_LAYOUT.
    LIT_DBSORTINFO[] = IT_DBSORTINFO[].
        SORT LIT_DBSORTINFO[] BY KEY1.
        DELETE ADJACENT DUPLICATES FROM LIT_DBSORTINFO[] COMPARING KEY1.
        LOOP AT LIT_DBSORTINFO[].
          CLEAR: LW_SPOS,
                 LW_UP,
                 LW_DOWN,
                 LW_SUBTOT,
                 LW_COMP,
                 LW_EXPA,
                 LW_GROUP.
          CLEAR IT_DBSORTINFO[].
          READ TABLE IT_DBSORTINFO WITH KEY
                                    KEY1  = LIT_DBSORTINFO-KEY1
                                    PARAM = 'SPOS'.
          IF SY-SUBRC = 0.
            LW_SPOS = IT_DBSORTINFO-VALUE.
          ENDIF.
          CLEAR IT_DBSORTINFO.
          READ TABLE IT_DBSORTINFO WITH KEY
                                    KEY1  = LIT_DBSORTINFO-KEY1
                                    PARAM = 'UP'.
          IF SY-SUBRC = 0.
            LW_UP = IT_DBSORTINFO-VALUE.
          ENDIF.
          CLEAR IT_DBSORTINFO.
          READ TABLE IT_DBSORTINFO WITH KEY
                                    KEY1  = LIT_DBSORTINFO-KEY1
                                    PARAM = 'DOWN'.
          IF SY-SUBRC = 0.
            LW_DOWN = IT_DBSORTINFO-VALUE.
          ENDIF.
          CLEAR IT_DBSORTINFO.
          READ TABLE IT_DBSORTINFO WITH KEY
                                    KEY1  = LIT_DBSORTINFO-KEY1
                                    PARAM = 'SUBTOT'.
          IF SY-SUBRC = 0.
            LW_SUBTOT = IT_DBSORTINFO-VALUE.
          ENDIF.
          CLEAR IT_DBSORTINFO.
          READ TABLE IT_DBSORTINFO WITH KEY
                                    KEY1  = LIT_DBSORTINFO-KEY1
                                    PARAM = 'COMP'.
          IF SY-SUBRC = 0.
            LW_COMP = IT_DBSORTINFO-VALUE.
          ENDIF.
          CLEAR IT_DBSORTINFO.
          READ TABLE IT_DBSORTINFO WITH KEY
                                    KEY1  = LIT_DBSORTINFO-KEY1
                                    PARAM = 'EXPA'.
          IF SY-SUBRC = 0.
            LW_EXPA = IT_DBSORTINFO-VALUE.
          ENDIF.
          CLEAR IT_DBSORTINFO.
          READ TABLE IT_DBSORTINFO WITH KEY
                                    KEY1  = LIT_DBSORTINFO-KEY1
                                    PARAM = 'GROUP'.
          IF SY-SUBRC = 0.
            LW_GROUP = IT_DBSORTINFO-VALUE.
          ENDIF.
          LOOP AT IT_ALV_DATA FROM W_LOOP_FROM_EU TO W_LOOP_TO_EU.
            LW_TABIX = SY-TABIX.
            READ TABLE IT_FIELDCAT INTO LW_FIELDCAT WITH KEY
                               FIELDNAME = LIT_DBSORTINFO-KEY1.
            IF SY-SUBRC = 0.
              ASSIGN COMPONENT SY-TABIX OF
                         STRUCTURE IT_ALV_DATA TO <LFS>.
              IF SY-SUBRC = 0.
                CLEAR LW_CHAR.
                LW_CHAR = <LFS>.
                  IF LW_SPOS= 'SPOS'.
                  LOGIC Required
                    ENDIF.
                  ELSEIF LW_OPTION = 'DOWN'.
                 LOgic required
                    ENDIF.
                        ENDIF.
          ENDLOOP.
        ENDLOOP.
    regards,
    Ajay reddy

    Hai,
    Let
    1)general data
    2)all customers
    3)company code data
    4)sales organization data
    are the check box names,Then
    Just use the piece  of code below:
    <b>IF general data = 'X'.
       COUNT = COUNT + 1.
    ENDIF.
    IF all_customers = 'X'.
       COUNT = COUNT + 1.
    ENDIF.
    IF company_code_data = 'X'.
       COUNT = COUNT + 1.
    ENDIF.
    IF sales_organization_data = 'X'.
       COUNT = COUNT + 1.
    ENDIF.</b>
    Now check whether more than one Check Boxes are selected or not
    <b>IF COUNT GT 1.
    "* Do the oprations  what ever you want here  
    ENDIF.</b>
    <b>Reward points if it helps you.</b>
    Regds,
    Rama chary.Pammi

  • ALV ...Logic required

    Hi every body,
       I have one requirement like an alv report will display
    output which contains a material number.
    <b>If i click On the material number it shud go to MM03...Accounting view
    Logic required for this.</b>I am a beginner ...Plz help me...
    Thanks in advance.
    Message was edited by: raja gurrala

    Hi,
    See the code sample,
    INCLUDE <icon>.
    * Predefine a local class for event handling to allow the
    * declaration of a reference variable before the class is defined.
    CLASS lcl_event_receiver DEFINITION DEFERRED.
    DATA : o_alvgrid          TYPE REF TO cl_gui_alv_grid ,
           o_dockingcontainer TYPE REF TO cl_gui_docking_container ,
           o_eventreceiver    TYPE REF TO lcl_event_receiver,
           wa_layout TYPE lvc_s_layo ,
           wa_variant TYPE disvariant.
    CONSTANTS : c_a(1) TYPE c VALUE 'A' ,                     " All Layouts
                c_x(1) TYPE c VALUE 'X'.
    CLASS lcl_event_receiver DEFINITION.
      PUBLIC SECTION.
        CLASS-METHODS:
    * Hot Spot Click
           handle_hotspot
             FOR EVENT hotspot_click OF cl_gui_alv_grid
                IMPORTING e_row_id
                          e_column_id
                          es_row_no,
    * Double Click
    handle_double_click
          FOR EVENT double_click OF cl_gui_alv_grid
              IMPORTING e_row
                        e_column
                        es_row_no,
    ENDCLASS.                    "lcl_event_receiver DEFINITION
    * Implementation
    CLASS lcl_event_receiver IMPLEMENTATION.
    *&      Method handle_hotspot
    * This method is called when the user clicks on a hotspot to drill down.
    * The following types are exported from the ALV
    * LVC_S_ROW
    * LVC_S_COL
    * LVC_S_ROID
      METHOD handle_hotspot.
    * The hotspot processing coded in the form below.
        PERFORM f9900_handle_hotspot USING e_row_id
                                           e_column_id
                                           es_row_no.
      ENDMETHOD.                    "handle_hotspot
    *&      Method handle_double_click
      METHOD handle_double_click.
    * The double click processing should be coded in the form below.
        PERFORM f9901_handle_double_click USING e_row
                                                e_column
                                                es_row_no.
      ENDMETHOD.                    "HANDLE_DOUBLE_CLICK
    FORM f9900_handle_hotspot  USING    p_row_id
                                        p_column_id
                                        p_row_no.
    *Read internal table for proper value.
      READ TABLE  i_output
                  INDEX p_row_id
                  INTO wa_output.
    * Call the transaction MMBE
      SET PARAMETER ID 'MAT' FIELD wa_output-matnr.
      CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN .
    ENDFORM.                    " f9900_handle_hotspot
    *&      Form  f9901_handle_double_click
    *       Double Click
    FORM f9901_handle_double_click  USING    p_row
                                             p_column
                                             p_row_no.
      READ TABLE i_output INDEX p_row INTO wa_output.
      CASE p_column.
        WHEN 'MATNR'.
          IF NOT wa_output-matnr IS INITIAL.
            SET PARAMETER ID 'MAT' FIELD wa_output-matnr.
            CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN .
          ENDIF.
      ENDCASE.
    ENDFORM.                    " f9901_handle_double_click
    U can use either hot spot or double click event.
    If u r using hotspot set the hotspot = 'X' in fieldcatalog.
    Hope this helps.
    OR another method without oops concept
    FORM user_command USING r_ucomm LIKE sy-ucomm
                      rs_selfield TYPE slis_selfield.
    data:lv_matnr    LIKE v_mmim_lc-matnr,   "Material
    read table i_output into w_output index rs_selfield-tabindex.
    lv_matnr = w_output-matnr.
    SET PARAMETER ID 'MAT' FIELD lv_matnr.
    CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN .
    Clear:     lv_matnr.
    ENDFORM.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
    *   I_INTERFACE_CHECK                 = ' '
    *   I_BYPASSING_BUFFER                =
    *   I_BUFFER_ACTIVE                   = ' '
         i_callback_program                = v_repid
         i_callback_pf_status_set          = 'SET_PF_STATUS'
    <b>     i_callback_user_command           = 'USER_COMMAND'</b>
         i_background_id        = 'ALV_BACKGROUND'
        IS_LAYOUT               = I_LAYOUT
        it_fieldcat             = i_fieldcat "field catalog
       I_SAVE                   = 'A'
       IS_VARIANT               = G_VARIANT
        TABLES
            t_outtab                       = i_output "output table
       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.
    Kindly reward points if this helps u, revert back with queries.
    Message was edited by: Judith Jessie Selvi

  • Reg the logic required

    Hi,
    LOOP AT it_output INTO wa_output.
    if wa_output-bldat  <= p_date.
        CALL FUNCTION 'DAYS_BETWEEN_TWO_DATES'
          EXPORTING
            i_datum_bis                   = p_date
            i_datum_von                   = wa_output-bldat
      I_KZ_EXCL_VON                 = '0'
      I_KZ_INCL_BIS                 = '0'
      I_KZ_ULT_BIS                  = ' '
      I_KZ_ULT_VON                  = ' '
      I_STGMETH                     = '0'
      I_SZBMETH                     = '1'
         IMPORTING
           e_tage                        = wa_date
    EXCEPTIONS
       days_method_not_defined       = 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.
        IF wa_date <= 30.
          MOVE wa_output-wrbtr TO amount.
          amount = amount + wa_output-wrbtr1.
          move amount to wa_output-wrbtr1.
        ELSEIF wa_date > 30 AND wa_date =< 60.
          MOVE wa_output-wrbtr TO wa_output-wrbtr2.
          amount1 = amount1 + wa_output-wrbtr2.
          move amount1 to wa_output-wrbtr2.
       ELSEIF wa_date > 60 AND wa_date <= 90.
          MOVE wa_output-wrbtr TO wa_output-wrbtr3.
    .     amount2 = amount2 + wa_output-wrbtr3.
          move amount2 to wa_output-wrbtr3.
       ELSEIF wa_date > 90.
          MOVE wa_output-wrbtr TO wa_output-wrbtr4.
          amount3 = amount3 + wa_output-wrbtr4.
          move amount3 to wa_output-wrbtr4.
          append wa_output to it_output.
    ENDIF.
       append wa_output to it_output.
        MODIFY it_output FROM wa_output.
    ENDLOOP.
    in this code the the wa_output is not filling all the data,
    it is picking all the data ,,when it come out of the loop wrbtr3 is
    becoming 0, but wrbtr4 is getting the value..........it is getting value becoming the wa_date is more the 90....
    wrtbr3 also i need to get...
    pls on this issue
    some body can help to fill the all the fields when it come out of the loop,

    Hi,
    Why are you modifying the output table after appeninding it? Is there any reason for that?
    when you are reading a record where date is more than 90, are sure there is value in wrbtr3? if there is no value this field wa_output-wrbrt3 will be empty because the loop is reading a different record.
    If you still have doubts get in touch with me.
    Thanks,
    Anil

  • Logic Required

    Hi All,
    Pl find the requirement below.
    We have a inventory report in that we were showing the stock as on date and the value of that stock.
    This inventory data ( Stock Only) will come from AFS( SAP System) as well as Non-SAP System.To calculate the stock value we are capturing the Moving avarage value from MBEW Table ( Data Source : 0MAT_PLANT_ATTR).It's kf so i have added KF in the 0MAT_PLANT and directly i was inserting this in Query level and doing caluclation.
    Issue : In MBEW Table level moving average price will be maintained at material level and it will contain only the latest price.Means If moving price changes several times in MBEW table it will contain latest one and it will be updated the same in BI also.When i am calculating the inventory for back months it will take the new price and stock value will come .This should not happen.
    Ex :
    Material                Month         Stock           Moving avarage  Price        Value
    A                           jUL'10             10             120 /-                            10*120
    B                          SEP'10              10              150                              10*150
    As per the above example if i run report in Jul'10        value will come as 1200   after two months i will go back and check the value of stock for Jul'2010 will be 1500.But actually it was 1200.
    Solution : As informed by FS-Consultants there is one more table MBEWH contains historic information moving avarage prise based on period and month.But when i have chaked there is no standard extractorbased on MBEWH and how can i include in the reporting(How to impliment the logic).
    Regards
    Ramakanth.

    Hi All,
    Pl find the requirement below.
    We have a inventory report in that we were showing the stock as on date and the value of that stock.
    This inventory data ( Stock Only) will come from AFS( SAP System) as well as Non-SAP System.To calculate the stock value we are capturing the Moving avarage value from MBEW Table ( Data Source : 0MAT_PLANT_ATTR).It's kf so i have added KF in the 0MAT_PLANT and directly i was inserting this in Query level and doing caluclation.
    Issue : In MBEW Table level moving average price will be maintained at material level and it will contain only the latest price.Means If moving price changes several times in MBEW table it will contain latest one and it will be updated the same in BI also.When i am calculating the inventory for back months it will take the new price and stock value will come .This should not happen.
    Ex :
    Material                Month         Stock           Moving avarage  Price        Value
    A                           jUL'10             10             120 /-                            10*120
    B                          SEP'10              10              150                              10*150
    As per the above example if i run report in Jul'10        value will come as 1200   after two months i will go back and check the value of stock for Jul'2010 will be 1500.But actually it was 1200.
    Solution : As informed by FS-Consultants there is one more table MBEWH contains historic information moving avarage prise based on period and month.But when i have chaked there is no standard extractorbased on MBEWH and how can i include in the reporting(How to impliment the logic).
    Regards
    Ramakanth.

  • Logic required to findout "Release To Date" of the Purchase order

    Hi
    We are developing a custom program to release purchase orders as per clients requirements. In that, in the output, we need to display the "Release To Date" of the purchase order. Consider the release codes are R1,R2& R3, and currently the PO is released by R1, then we need to show "Release To Date" as R1. Simillerly once R2 also released the PO, we need to show "R1 R2" in the Release To Date field. This you can see in the Release Tab of the PO.
    Now we need to adopt the same logic in our custom program also. Which table i can find the release to date details. The latest release code of the PO also good enough to build the logic to findout the "Release To Date"
    Any pointers would be of great help.
    Thanks
    Venkat.

    Hi Venkat,
    Check up these tables
    T16FC, T16FD, T16FG, V_T16FC
    Regards,
    Hareesha
    If it's help's reward the pts

  • Program logic required

    Hi all,
    I have requirement saying that transfer data from one program to another transaction selection screen.
    Requirement is.
    In a programi will l have final data in one internal table.
    This data i need to send it for another program selection screen as input.
    Please provide me the logic.
    Thanks in advance

    use the first program as an include for the second program
    then in the intilisation of the second program
    use the values of the internal table of 1st program.
    regards,
    srinivas
    <b>*reward for useful answers*</b>

  • Reg : Logic for Report

    Hi ,
    I would like to know one logic for preparing functional specification for one MM report. This report should fetch all materials that are below safety stock.
    Please help me.

    HI,
    The logic is you take the current unresticted stock of a material from MARD table, field name is LABST.now you check for the safety stock of the particular in MARC table Field name-EISBE.
    Now compare the current stock with the safety stock,generate a report for the materials whose present stock is less than the safety stock.
    for this requirement safety stock should be maintained in the material master,other wise your report will not work.
    Regards,
    velu

  • Programming Logic required for pulling the records for past month /week

    Hi All
    I need help in the SQL programming logic.
    Oracle Database Version: 10.2.0.3.0
    Requirement
    In a data warehouse environment, I need to programme for weekly and monthly automated batch jobs to insert the data from Data_tbl to Reporting_tbl for generating reports. Tables descriptions are given below.
    Table1 - Data_tbl (Source table –this table gets updated everyday).
    Record_dt     first_name     last_name
    Table2 - Reporting_tbl_(Target table)
    Cycle_dt     first_name     last_name
    1. Monthly Report
    In the SQL Query, I have where clause condition—
    Where Record_dt >=’01-nov-08’ and record_dt<=’30-nov-08’
    Using the above condition in development, I am pulling the data from source table for the past month data. This will be repeated every month and it should be automated.
    i.e., if I run this report any time in dec 2008, it should pick records of dates from Nov 01st to Nov 30th 2008. if I run this report any time in Jan 2009, it should pick records of dates from Dec 01st to Dec 31st 2008.
    Date Values should be assigned for past month. Value of Cycle_dt in target table should be end date of past month like 30-nov-2008, 31-dec-2008.
    2. Weekly Report
    In the SQL Query, I have where clause condition—
    Where Record_dt >=’01-dec-08’ and record_dt<=’07-dec-08’
    Here week start day is Monday and end day is Sunday.
    If I run the report between Dec 08th to Dec 14th , it should pull records of dates from Dec 01st to Dec 07th 2008.
    On Dec 15th, it should pick from Dec 08th to Dec 14th.
    Value of Cycle_dt in target table should be end date of past week like 07-Dec-2008, 14-Dec-2008.
    Please help me with the logics for both Monthly and Weekly reports.
    Thanks

    Hi,
    For the monthly report, instead of
    Where Record_dt >=’01-nov-08’ and record_dt<=’30-nov-08’say:
    Where   Record_dt >= TRUNC (ADD_MONTHS (SYSDATE, -1), 'MM')
    and     record_dt <  TRUNC (SYSDATE, 'MM')SYSDATE is the current DATE.
    TRUNC (SYSDATE, 'MM') is the beginning of the current month. (Notice the condition above is less than this date, not equal to it.)
    ADD_MONTHS (STSDATE, -1) is a date exactly one month ago, therefore it is in the previous month.
    For the weekly report, instead of:
    Where Record_dt >=’01-dec-08’ and record_dt<=’07-dec-08’say
    Where   Record_dt >= TRUNC (SYSDATE - 7, 'IW')
    and     record_dt <  TRUNC (SYSDATE, 'IW')TRUNC (dt, 'IW') is the beginning of the ISO week (Monday-Sunday) that contains dt. Again, notice the end condition is strictly less than the beginning of the current week.

  • Logic Required in HR ABAP Program

    Hi,
    First i have to check the Change Date on Infotype 0000 Actions infotype (P0000-AEDTM).  If the change date falls within the Period Selection date specified then i have to include the employee in the report.
    the included fields are:
    P0000-AEDTM,P0001-BUKRS,PERNR,ENAME,P0000-MASSN,P0000-MASSG,P0000-BEGDA,P0001-ORGEH,P0001-PLANS,P0001-STELLP0001-ABKRS,P0001-WERKS,P0001-BTRTL,Q0001-MSTBR,Q0001-ENAME(supervisor name)
    If the change date (P0000-AEDTM) does not fall within the Period Selection Date, i have to check the Change Date in Infotype 0001 Organization Assignment infotype (P0001-AEDTM). If the change date falls within the Period Selection date specified then i have to include the employee in the report. Include in report only that information which has been changed from the previous Infotype 0001 record, except for Change Date, Company Code, Personnel Number and Name, which must always be included in the report.
    For this requirement i have written the below code:
    LOOP AT p0000 WHERE aedtm >= pn-begda AND
                          aedtm <= pn-endda.
       wa_final-massn = p0000-massn.
        wa_final-pernr = p0000-pernr.
        wa_final-aedtm = p0000-aedtm.
        wa_final-massg = p0000-massg.
        wa_final-begda = p0000-begda.
        wa_final-begda = p0000-begda.
        rp-provide-from-last p0001 space  p0000-begda p0000-endda.
        wa_final-bukrs = p0001-bukrs.
        wa_final-kostl = p0001-kostl.
        wa_final-mstbr = p0001-mstbr.
        wa_final-ename = p0001-ename.
        APPEND wa_final TO it_final.
        CLEAR wa_final.
    ENDLOOP.
    if sy-subrc ne 0.
    LOOP AT p0001 WHERE aedtm >= pn-begda AND
                            aedtm <= pn-endda.
          lv_endda = p0001-begda - 1.
          READ TABLE p0001 WITH KEY pernr = p0001-pernr endda = lv_endda INTO w0001.
          IF sy-subrc = 0.
          if p0001-kostl ne w0001-kostl.
            wa_final-kostl = p0001-kostl.
          endif.
         if p0001-mstbr ne w0001-mstbr.
            wa_final-mstbr = p0001-mstbr.
         endif.
          wa_final-pernr = p0001-pernr.
          wa_final-aedtm = p0001-aedtm.
          wa_final-bukrs = p0001-bukrs.
          wa_final-ename = p0001-ename.
           APPEND wa_final TO it_final.
           CLEAR wa_final.
          Endif.
    Endif..
    is this code correct? or do i have to do any modifications?

    This is like retro payroll run see the payroll program.
    RPCUCALC00 and you will find the logic over there how it will run retroactive payroll
    Best Regards

  • Tables Proration/Spliting Logic required

    Hi Friends
    I have 3 internal tables:
    IT_0001:
    PERNR     BEGDA     ENDDA     WERKS     BTRTL     ABKRS     KOSTL     ORGEH
    10774     20080101     20081028     US11     14     CB          0
    10774     20081029     99991231     US11     14     CB     1125100     30084829
    IT_0008_1:
    PERNR     BEGDA     ENDDA     TRFGR     BAND1
    10774     20080101     20080803     1     1
    IT_0008:
    PERNR     BEGDA     ENDDA     TRFST     BAND
    10774     20080804     20081231     6     6
    WITH THE ABOVE TABLES COMBINATION,BY SPLITING THE TABLES BASED ON BEGDA,ENDDA
    MY FINAL TABLE HAS TO COME AS FOLLOWS:
    IT_FINAL:
    PERNR     BEGDA     ENDDA     WERKS     BTRTL     MOLGA     BAND     BONUSPRCNTAGE
    10774     20080101     20080803     US11     14     10     1     8
    10774     20080804     20081028     US11     14     10     6     8
    10774     20081029     20081231     US11     14     10     6     8
    Can any one please provide me the logic for this.
    Thanks for your cooperation.
    Regards,
    Sree

    Hi Gourav
    Thanks for your suggestion!
    Let me ask the same question in this way then:
    Please correct me the code where I am wrong:
    Logic for Proration calculation for Bonus Percentage when Band
          maintained in TRFGR field.
                SORT it_0001_1 BY pernr begda endda.
                SORT it_0008_1 BY pernr begda endda.
                LOOP AT it_0001_1 INTO wa_0001_1.
                  LOOP AT it_0008_1 INTO wa_0008_1 WHERE pernr = wa_0001_1-pernr.
    To check the end date is 12/31/9999, if yes then set it to bonus year end date
                    IF wa_0008_1-endda = c_year OR wa_0008_1-endda0(4) > gv_endyear0(4).
                      wa_0008_1-endda = c_aug_e.
                      MODIFY it_0008_1 FROM wa_0008_1 TRANSPORTING endda.
                    ELSEIF wa_0001_1-endda = c_year.
                      wa_0001_1-endda = gv_endyear.
                    ENDIF.
    ***Condition to split the records based on the records in PA0001 and Pa0008 tables data
                    IF wa_0001_1-begda >= wa_0008_1-begda AND wa_0001_1-endda = wa_0008_1-endda.
                      wa_final-pernr = wa_0001_1-pernr.
                      wa_final-begda = wa_0001_1-begda.
                      wa_final-endda = wa_0001_1-endda.
                      wa_final-werks = wa_0001_1-werks.
                      wa_final-btrtl = wa_0001_1-btrtl.
                      wa_final-kostl = wa_0001_1-kostl.
                      IF wa_0001_1-kostl IS NOT INITIAL.
                        APPEND wa_final TO it_final.
                      ELSE.
                        APPEND wa_final TO it_costcenter.
                      ENDIF.
                      EXIT.
                    ELSEIF wa_0001_1-begda >= wa_0008_1-begda AND wa_0001_1-endda > wa_0008_1-endda.
                      wa_final-pernr = wa_0001_1-pernr.
                      wa_final-begda = wa_0001_1-begda.
                      wa_final-endda = wa_0008_1-endda.
                      wa_final-werks = wa_0001_1-werks.
                      wa_final-btrtl = wa_0001_1-btrtl.
                      wa_final-kostl = wa_0001_1-kostl.
                      IF wa_final-begda < wa_final-endda.
                        IF wa_0001_1-kostl IS NOT INITIAL.
                          APPEND wa_final TO it_final.
                        ELSE.
                          APPEND wa_final TO it_costcenter.
                        ENDIF.
                        gv_date  = wa_0008_1-endda.
                        IF ( gv_date+4(4) EQ c_leap ).           " to check date is feb 28th
                          gv_mod = wa_0008_1-endda+0(4) MOD 4.
                          gv_mod1 = wa_0008_1-endda+0(4) MOD 4.
                          IF ( gv_mod EQ 0  OR gv_mod1 EQ 0 ).   " to check for leap year
                            wa_0008_1-endda+4(4) = c_leap1.
                            wa_final-pernr = wa_0001_1-pernr.
                            wa_final-begda = wa_0008_1-endda.
                            wa_final-endda = wa_0001_1-endda.
                            wa_final-werks = wa_0001_1-werks.
                            wa_final-btrtl = wa_0001_1-btrtl.
                            wa_final-kostl = wa_0001_1-kostl.
                            IF wa_0001_1-kostl IS NOT INITIAL.
                              APPEND wa_final TO it_final.
                            ELSE.
                              APPEND wa_final TO it_costcenter.
                            ENDIF.
                          ENDIF.
                        ENDIF.
                      ENDIF.
                      EXIT.
                    ELSEIF wa_0001_1-begda >= wa_0008_1-begda AND wa_0001_1-endda < wa_0008_1-endda.
                      wa_final-pernr = wa_0001_1-pernr.
                      wa_final-begda = wa_0001_1-begda.
                      wa_final-endda = wa_0001_1-endda.
                      wa_final-werks = wa_0001_1-werks.
                      wa_final-btrtl = wa_0001_1-btrtl.
                      wa_final-kostl = wa_0001_1-kostl.
                      IF wa_final-begda < wa_final-endda.
                        IF wa_0001_1-kostl IS NOT INITIAL.
                          APPEND wa_final TO it_final.
                        ELSE.
                          APPEND wa_final TO it_costcenter.
                        ENDIF.
                        gv_date  = wa_0008_1-endda.
                        IF ( gv_date+4(4) EQ c_leap ).             " to check date is feb 29th
                          gv_mod = wa_0008_1-endda+0(4) MOD 4.
                          gv_mod1 = wa_0008_1-endda+0(4) MOD 4.
                          IF ( gv_mod EQ 0  OR gv_mod1 EQ 0 ).     " to check for leap year
                            wa_0008_1-endda+4(4) = c_leap1.
                            wa_final-pernr = wa_0001_1-pernr.
                            wa_final-begda = wa_0008_1-endda.
                            wa_final-endda = wa_0001_1-endda.
                            wa_final-werks = wa_0001_1-werks.
                            wa_final-btrtl = wa_0001_1-btrtl.
                            wa_final-kostl = wa_0001_1-kostl.
                            IF wa_0001_1-kostl IS NOT INITIAL.
                              APPEND wa_final TO it_final.
                            ELSE.
                              APPEND wa_final TO it_costcenter.
                            ENDIF.
                          ENDIF.
                        ELSEIF wa_0001_1-begda >= wa_0008_1-begda AND wa_0001_1-endda >= wa_0008_1-endda.
                          wa_final-pernr = wa_0001_1-pernr.
                          wa_final-begda = wa_0001_1-endda + 1.
                          wa_final-endda = wa_0008_1-endda.
                          wa_final-werks = wa_0001_1-werks.
                          wa_final-btrtl = wa_0001_1-btrtl.
                          wa_final-kostl = wa_0001_1-kostl.
                          IF wa_0001_1-kostl IS NOT INITIAL.
                            APPEND wa_final TO it_final.
                          ELSE.
                            APPEND wa_final TO it_costcenter.
                          ENDIF.
                        ENDIF.
                      ENDIF.
                      EXIT.
                    ENDIF.
                    CLEAR: wa_0008_1,
                           gv_date.
                  ENDLOOP.
    ***** 23/07/2008
                  LOOP AT it_0008 INTO wa_0008 WHERE pernr = wa_0001_1-pernr.
    To check the end date is 12/31/9999, if yes then set it to bonus year end date
                    IF wa_0008-endda = c_year OR wa_0008-endda0(4) > c_end0(4).
                      wa_0008-endda = c_end.
                      MODIFY it_0008 FROM wa_0008 TRANSPORTING endda.
                    ELSEIF wa_0001_1-endda = c_year.
                      wa_0001_1-endda = c_end.
                    ENDIF.
    ***Condition to split the records based on the records in PA0001 and Pa0008 tables data
                    IF wa_0001_1-begda <= wa_0008-begda AND wa_0001_1-endda = wa_0008-endda.
                      wa_final-pernr = wa_0001_1-pernr.
                      wa_final-begda = wa_0008-begda. "CHANGED FROM 0001 TO 0008
                      wa_final-endda = wa_0008-endda. "CHANGED FROM 0001 TO 0008
                      wa_final-werks = wa_0001_1-werks.
                      wa_final-btrtl = wa_0001_1-btrtl.
                      wa_final-kostl = wa_0001_1-kostl.
                      IF wa_0001_1-kostl IS NOT INITIAL.
                        APPEND wa_final TO it_final.
                      ELSE.
                        APPEND wa_final TO it_costcenter.
                      ENDIF.
                      EXIT.
                    ELSEIF wa_0001_1-begda <= wa_0008-begda AND wa_0001_1-endda > wa_0008-endda.
                      wa_final-pernr = wa_0001_1-pernr.
                      wa_final-begda = wa_0008-begda. "look here
                      wa_final-endda = wa_0008-endda.
                      wa_final-werks = wa_0001_1-werks.
                      wa_final-btrtl = wa_0001_1-btrtl.
                      wa_final-kostl = wa_0001_1-kostl.
                      IF wa_final-begda < wa_final-endda.
                        IF wa_0001_1-kostl IS NOT INITIAL.
                          APPEND wa_final TO it_final.
                        ELSE.
                          APPEND wa_final TO it_costcenter.
                        ENDIF.
                      ENDIF.
                    ELSEIF wa_0001_1-begda <= wa_0008-begda AND wa_0001_1-endda < wa_0008-endda.
                      wa_final-pernr = wa_0001_1-pernr.
                      wa_final-begda = wa_0008-begda.
                      wa_final-endda = wa_0001_1-endda.
                      wa_final-werks = wa_0001_1-werks.
                      wa_final-btrtl = wa_0001_1-btrtl.
                      wa_final-kostl = wa_0001_1-kostl.
                      IF wa_final-begda < wa_final-endda.
                        IF wa_0001_1-kostl IS NOT INITIAL.
                          APPEND wa_final TO it_final.
                        ELSE.
                          APPEND wa_final TO it_costcenter.
                        ENDIF.
                      ENDIF.
                    ENDIF.
                  ENDLOOP.
    ****23/07/2007
                ENDLOOP.
    ***Updating the IT_0001_1 and IT_COSTCENTER tables with band information.
                IF it_final[] IS NOT INITIAL.
                  LOOP AT it_final INTO wa_final.
                    gv_tabix = sy-tabix.
                    LOOP AT it_0008_1 INTO wa_0008_1  WHERE pernr EQ wa_final-pernr
                                                      AND   begda LE wa_final-begda
                                                      AND   endda GE wa_final-endda.
                      READ TABLE it_cgroup INTO wa_cgroup WITH KEY werks = wa_final-werks
                                                                   btrtl = wa_final-btrtl.
                      IF sy-subrc EQ 0.
                        wa_final-band = wa_0008_1-trfgr.
                        wa_final-molga = wa_cgroup-molga.
                        MODIFY it_final FROM wa_final INDEX gv_tabix TRANSPORTING band molga.
                        CLEAR: wa_0008_1,
                               wa_final,
                               gv_tabix.
                      ENDIF.
                    ENDLOOP.
      ***TRFST CALCULATION.
                    LOOP AT it_0008 INTO wa_0008  WHERE pernr EQ wa_final-pernr
                                                  AND   begda LE wa_final-begda
                                                  AND   endda GE wa_final-endda.
                      READ TABLE it_cgroup INTO wa_cgroup WITH KEY werks = wa_final-werks
                                                                   btrtl = wa_final-btrtl.
                      IF sy-subrc EQ 0.
                        wa_final-band = wa_0008-trfst.
                        wa_final-molga = wa_cgroup-molga.
                        MODIFY it_final FROM wa_final INDEX gv_tabix TRANSPORTING band molga.
                        CLEAR: wa_0008,
                               wa_final,
                               gv_tabix.
                      ENDIF.
                    ENDLOOP.
                    CLEAR: wa_final.
                  ENDLOOP.
                ENDIF.
    Actually I have developed code but it's not giving the required results.
    That's why I asked for the solution .My intension in asking the solution is to get various types of approaches of the solution but not to waste the comunity time.
    Anyhow thanks!
    Regards,
    Sree

  • Reg-Logic for Query!

    Hi All,
    In my application, there is an requirement for generating Autogen Sequence in two ways.
    First Way: Using Autogen button.
    For Ex: If the old symbol: ABCDEF00, the next Autogen sequence should be i.e, new symbol: ABCDEG00 .
    Similarly if the symbol has old symbol:zzzzz00 new symbol should be AAAAA00.
    As of now my logic is working perfectly accordingly to the above scenario.
    Note: We will be changing only first 5 characters and last two digits I am appending as 00.
    Second Way: Manually there can enter the symbol.
    The problem I am facing in second method, since there can enter/ create a symbol using Alphanumeric.
    For Ex: old Symbol: ABCD100, the next will be ABCD200 and soon till ABCD900.. Once the symbol ends with 9 then next sequence is replacing with some special characters as ABCD:00
    Note: Symbol should not accept any special characters. If the symbol ABCD900 then next should be ABCD000. ‘9’ should be replaced with ‘0’ and soon. My logic will not work for alphanumeric.
    Can anyone help me out my logic should accept both characters as well as numeric’s.
    Following is the logic which currently i am using
    DECLARE
    v_symb_code VARCHAR2(7);
    new_sym_code VARCHAR2(7);
    v_count NUMBER;
    v_auto_count NUMBER;
    symb_code_new VARCHAR2(7);
    BEGIN
    SELECT COUNT(*) INTO v_auto_count FROM T_AUTOGEN_SYMBOL;
    IF v_auto_count=0 THEN
    SELECT symb_code INTO v_symb_code FROM t_symbol WHERE SYMB_MODIFIED_DATE=(SELECT MAX(SYMB_MODIFIED_DATE) FROM t_symbol) AND ROWNUM=1;
    ELSE
    SELECT ATGS_SYMB_CODE INTO v_symb_code FROM T_AUTOGEN_SYMBOL;
    END IF;
    LOOP
    SELECT
    -- 1st digit of new value
    DECODE(SUBSTR(SUBSTR (v_symb_code, 1, 5),5,1),'Z',
    DECODE(SUBSTR(SUBSTR (v_symb_code, 1, 5),4,1),'Z',
    DECODE(SUBSTR(SUBSTR (v_symb_code, 1, 5),3,1),'Z',
    DECODE(SUBSTR(SUBSTR (v_symb_code, 1, 5),2,1),'Z',
    DECODE(SUBSTR(SUBSTR (v_symb_code, 1, 5),1,1),'Z','A',
    DECODE(SUBSTR(SUBSTR (v_symb_code, 1, 5),1,1),'A','B','B','C','C','D','D','E','E','F','F','G','G','H','H','I','I','J','J','K','K','L','L','M','M','N','N','O','O','P','P','Q','Q','R','R','S','S','T','T','U','U','V','V','W','W','X','X','Y','Y','Z',
    CHR(ASCII(SUBSTR(SUBSTR (v_symb_code, 1, 5),1,1))+1))),
    SUBSTR(SUBSTR (v_symb_code, 1, 5),1,1)),
    SUBSTR(SUBSTR (v_symb_code, 1, 5),1,1)),
    SUBSTR(SUBSTR (v_symb_code, 1, 5),1,1)),
    SUBSTR(SUBSTR (v_symb_code, 1, 5),1,1))
    ||
    -- 2nd digit of new value
    DECODE(SUBSTR(SUBSTR (v_symb_code, 1, 5),5,1),'Z',
    DECODE(SUBSTR(SUBSTR (v_symb_code, 1, 5),4,1),'Z',
    DECODE(SUBSTR(SUBSTR (v_symb_code, 1, 5),3,1),'Z',
    DECODE(SUBSTR(SUBSTR (v_symb_code, 1, 5),2,1),'Z','A',
    DECODE(SUBSTR(SUBSTR (v_symb_code, 1, 5),2,1),'A','B','B','C','C','D','D','E','E','F','F','G','G','H','H','I','I','J','J','K','K','L','L','M','M','N','N','O','O','P','P','Q','Q','R','R','S','S','T','T','U','U','V','V','W','W','X','X','Y','Y','Z',
    CHR(ASCII(SUBSTR(SUBSTR (v_symb_code, 1, 5),2,1))+1))),
    SUBSTR(SUBSTR (v_symb_code, 1, 5),2,1)),
    SUBSTR(SUBSTR (v_symb_code, 1, 5),2,1)),
    SUBSTR(SUBSTR (v_symb_code, 1, 5),2,1))
    ||
    -- 3rd digit of new value
    DECODE(SUBSTR(SUBSTR (v_symb_code, 1, 5),5,1),'Z',
    DECODE(SUBSTR(SUBSTR (v_symb_code, 1, 5),4,1),'Z',
    DECODE(SUBSTR(SUBSTR (v_symb_code, 1, 5),3,1),'Z','A',
    DECODE(SUBSTR(SUBSTR (v_symb_code, 1, 5),3,1),'A','B','B','C','C','D','D','E','E','F','F','G','G','H','H','I','I','J','J','K','K','L','L','M','M','N','N','O','O','P','P','Q','Q','R','R','S','S','T','T','U','U','V','V','W','W','X','X','Y','Y','Z',
    CHR(ASCII(SUBSTR(SUBSTR (v_symb_code, 1, 5),3,1))+1))),
    SUBSTR(SUBSTR (v_symb_code, 1, 5),3,1)),
    SUBSTR(SUBSTR (v_symb_code, 1, 5),3,1))
    ||
    DECODE(SUBSTR(SUBSTR (v_symb_code, 1, 5),5,1),'Z',
    DECODE(SUBSTR(SUBSTR (v_symb_code, 1, 5),4,1),'Z','A',
    DECODE(SUBSTR(SUBSTR (v_symb_code, 1, 5),4,1),'A','B','B','C','C','D','D','E','E','F','F','G','G','H','H','I','I','J','J','K','K','L','L','M','M','N','N','O','O','P','P','Q','Q','R','R','S','S','T','T','U','U','V','V','W','W','X','X','Y','Y','Z',
    CHR(ASCII(SUBSTR(SUBSTR (v_symb_code, 1, 5),4,1))+1))),
    SUBSTR(SUBSTR (v_symb_code, 1, 5),4,1))
    ||
    DECODE(SUBSTR(SUBSTR (v_symb_code, 1, 5),5,1),'Z','A',
    DECODE(SUBSTR(SUBSTR (v_symb_code, 1, 5),5,1),'A','B','B','C','C','D','D','E','E','F','F','G','G','H','H','I','I','J','J','K','K','L','L','M','M','N','N','O','O','P','P','Q','Q','R','R','S','S','T','T','U','U','V','V','W','W','X','X','Y','Y','Z',
    CHR(ASCII(SUBSTR(SUBSTR (v_symb_code, 1, 5),5,1))+1)))||'00' INTO new_sym_code
    FROM dual;
    symb_code_new := UPPER(new_sym_code);
    SELECT COUNT(*) INTO v_count FROM t_symbol WHERE symb_code=symb_code_new AND ROWNUM<2;
    /*IF v_count<1 THEN
    SELECT COUNT(*) INTO v_count FROM t_symbol_wip WHERE symb_code=symb_code_new AND ROWNUM<2;
    END IF;
    DELETE FROM T_AUTOGEN_SYMBOL;
    INSERT INTO T_AUTOGEN_SYMBOL(ATGS_SYMB_CODE,ATGS_MODIFIED_BY,ATGS_MODIFIED_DATE) VALUES(symb_code_new,v('APP_USER'),SYSDATE); */
    EXIT WHEN v_count <1;
    v_symb_code:=symb_code_new;
    DBMS_OUTPUT.PUT_LINE(v_symb_code);
    END LOOP;
    :P39_SYMBOL := symb_code_new;
    END;

    I'd use a slightly different approach with the same end result: use and store numbers instead of this "Autogen sequence". When you use a number, you can easily add 1 or subtract 1. You probably only need that string for display. So use a function like below:
    SQL> create function number2weirdstring (p_num in number) return varchar2
      2  as
      3    --
      4    -- The string looks like this AAAAA00.
      5    -- Define for each A what the acceptable characters can be
      6    -- For instance I'm defining them to accept [a-z] and [A-Z]
      7    -- And they are mapped to [0-25] and [26-51]. This leads to
      8    -- 52^5 possible combinations.
      9    --
    10    l_character1 varchar2(1);
    11    l_character2 varchar2(1);
    12    l_character3 varchar2(1);
    13    l_character4 varchar2(1);
    14    l_character5 varchar2(1);
    15  begin
    16    l_character5 := chr( case when mod(p_num,52)                    < 26 then 97 else 39 end + mod(p_num,52) );
    17    l_character4 := chr( case when mod(trunc(p_num/52),52)          < 26 then 97 else 39 end + mod(trunc(p_num/52),52) );
    18    l_character3 := chr( case when mod(trunc(p_num/52/52),52)       < 26 then 97 else 39 end + mod(trunc(p_num/52/52),52) );
    19    l_character2 := chr( case when mod(trunc(p_num/52/52/52),52)    < 26 then 97 else 39 end + mod(trunc(p_num/52/52/52),52) );
    20    l_character1 := chr( case when mod(trunc(p_num/52/52/52/52),52) < 26 then 97 else 39 end + mod(trunc(p_num/52/52/52/52),52) );
    21    return l_character1 || l_character2 || l_character3 || l_character4 || l_character5 || '00';
    22  end number2weirdstring;
    23  /
    Functie is aangemaakt.And to show how the function works:
    SQL> select number2weirdstring(0)
      2       , number2weirdstring(25)
      3       , number2weirdstring(26)
      4       , number2weirdstring(51)
      5       , number2weirdstring(52)
      6       , number2weirdstring(52*52-1)
      7       , number2weirdstring(52*52)
      8       , number2weirdstring(12893571)
      9    from dual
    10  /
    NUMBER2WEIRDSTRING(0)
    NUMBER2WEIRDSTRING(25)
    NUMBER2WEIRDSTRING(26)
    NUMBER2WEIRDSTRING(51)
    NUMBER2WEIRDSTRING(52)
    NUMBER2WEIRDSTRING(52*52-1)
    NUMBER2WEIRDSTRING(52*52)
    NUMBER2WEIRDSTRING(12893571)
    aaaaa00
    aaaaz00
    aaaaA00
    aaaaZ00
    aaaba00
    aaaZZ00
    aabaa00
    bNKrp00
    1 rij is geselecteerd.You only need to modify the function to accept the characters you want. But hopefully this example will get you started.
    Regards,
    Rob.

  • Mapping logic required-UDF

    Hi,
    My sender structure is as follows
    <zaction>(1:1)
    --Trans
    <Zcode>(0:999)
    --Code
    --Id
    My target field is
    <code>(0:999)
    --ID
    My requirement is
    if code= CE,CB,CH,CJ,CI,CO then don't create target field ID.
    else
    if code=AF and Trans=01 then ID=axv0001
    or
    if code=AF and Trans=02 then ID=axv0002
    if none of the above conditions matches pass ID received from sender.
    I am confused at using context type UDF. As suppress result is completely supressing the target field. it's not looking into the rest of logic. Can you provide me an appropraite UDF for this logic please.
    TIA,
    Mahesh

    Hello,
    You can use this context type UDF:
    Arguments: inTrans
    inCode
    inID
    for(int a=0;a<inCode.length;a++){
         if(inCode[a].equals("CE")|inCode[a].equals("CB")|inCode[a].equals("CH")|inCode[a].equals("CJ")|inCode[a].equals("CI")|inCode[a].equals("CO")){
              result.addSuppress();
         else if(inCode[a].equals("AF")&inTrans[0].equals("01")){
              result.addValue("axv0001");
         else if(inCode[a].equals("AF")&inTrans[0].equals("02")){
              result.addValue("axv0002");
         else{
              result.addValue(inID[a]);
    Logic is like this:
    For code
    Trans -> removeContext -> \
    Code --> removeContext -> UDF -> code
    ID ----> removeContext -> /
    For ID
    Trans -> removeContext -> \
    Code --> removeContext -> UDF -> splitByValue:eachValue -> ID
    ID -----> removeContext -> /
    Hope this helps,
    Mark
    Edited by: Mark Dihiansan on Nov 9, 2011 3:47 AM

  • Input template worksheet logic requirement

    Hello,
    I need to accomplish the following requirement that I need some help with. Lets say the user selects Forecast_Vmay2012, the may 2012 value of a specific account ABC should sum Jan-Apr 2011 XYZ Account values. This needs to be flexible, in other dimension member Forecast_vmay2012 has current month property with value of 5. Just like that, Forecast_Vaug2012 has value of 8 etc. based on this, the worksheet logic needs to sum previous year's initial current month -1(in our initial example current month value is 5, so sum 1st 4). Any idea on how to accomplish it?
    Thanks.

    Hi Zack
    Based on the information provided and from my understanding. If you know that there a static calculations or in your example: Account ABC should SUM XYZ account values then you can use nested IF statements with the AND / OR operators.
    Please find below a link to an example using complex and nested IF statements.
    [http://www.experiglot.com/2006/12/11/how-to-use-nested-if-statements-in-excel-with-and-or-not/]
    Will using script logic not be able to meet your requirements ? or is there a large amount of calculations which need to occur?
    The downside to this approach will unfortunately be that your workbook will be large and depending on the amount of data, potentially slow in performance.
    Hope this helps
    Kind regards
    Daniel

Maybe you are looking for

  • Numerous missing files/folders in photoshop elements 11.0

    numerous missing files/folders programdata folder in photoshop elements 11.0 What is the best way to renew the folder - ? delete all information about 11.0?

  • Macbook Pro died and won't turn back on

    Hi, I have a Macbook Pro 13' (it's about 1.5 years old). I was on it a couple of hours ago when I got the running on reserve battery indicator. Before I could plug the charger in, it died. I have had the charger in for over 2 hours now and it still w

  • Mac Mini i7 (Mavericks) will not boot from the external drive

    Mac Mini i7 (Mavericks) will not boot from the external drive with Disk Warroir 4.4. or Drive Genius or Lion. Not even from the external Firewire hard drive with Mavericks

  • Tomcat 4.0.x and JAXB

    Hi, I am trying to use JAXB 1.0 early-access with Tomcat 4.0.x Has anyone got this to work? My trouble began with a strange "ClassNotFound" exception on a class that was clearly there (javax.xml.bind.MarshallableRootElement") -- I could load other cl

  • .99 cent plan and messaging bundle question

    all my friends have verizon and i only planned on texting so i got the basic plan(no fee) and the messaging bundle. now that ive really thought about it i want to get the 99 cent plan so i can talk to all my friends. so my question is, if i have the