Update Rule routine to get last 4 characters of a field

I am aware I can do this using a formula.  However, can someone assist in writing the routine which gets the last four characters of a field.  The field is part of the COMM_STRUCTURE? Thanks

Hi,
For determining the length of the field, you have to use first the statement DESCRIBE so you get the figure into a variable (I do not have a SAP system right now, so errors can occur in the following):
<b>data length type i.
describe comm_structure-field length into length.
length = length - 4.
result = comm_structure-field+(length)(4).</b>
However, please shift your field is RIGHT JUSTIFIED earlier than using these statements. Please consider the instruction SHIFT. That will insure you that you get the right characters.
Regards

Similar Messages

  • Update Rule routine to get Totals of the key figure

    Hey BW folks....
    i have  a requiremnt in the report wherein I have to get the total salary of all the employees in the cost center. As cost center has many employees I want to calculate total salary of the those employees in tht cost center only.So  basically total salary will be depending the no.of employees in tht cost center.I tried  doing it in query not working. So Wht abap code I will have to write in the update rules to achieve this
    eg:
    |        salary(kf) |  total salary
    cc1           |e1   |   $5000    |  
    |e2   |   $3000    |
    |e3   |  $2000     |
    |-- |--$10,000(for tht cost center only)
    cc2   so on and so forth
    Suggestions will be reciprocated with lots of points
    Nick

    You should try doing it in query; update rule will not guarantee you correct results.
    What is this other KF that you are using to multiply, is it a KF in the cube?
    Try defining a CKF with 'constant selection' on Cost-center, this should give you the total value per cost center for each row (I think). You can then use this in your formula
    sal_kf * other_KF / CKF

  • Update rule/routine for 0PUR_C04

    hi experts,
    can someone give the update rule/routine for uploading 0ORDER_VAL(effective order value) into the cube 0PUR_C04 and the calculations for it?
    and also some explantion on how this effective purchase order value 0ORDER_VAL is calculated*??
    thanks

    Hi Surya,
    If you are using standard content for 0PUR_C04, you can get the update rule in standard update rules, which you can see in Business content on Metadata repository. For standard content four data source used to fill cube. Purchasing Group (2LIS_02_S011 ), Purchasing Data (2LIS_02_HDR), Pur.Data  (2LIS_02_SCL) and Purchasing Data (2LIS_02_ITM). The mapping for different update rules are done as:
    2LIS_02_S011: Direct Mapping
    2LIS_02_HDR: No Update
    2LIS_02_SCL: Routine (mm_convert_effwr)
    fill the internal table "MONITOR", to make monitor ent *ries
    IF ( COMM_STRUCTURE-PROCESSKEY = '001' or "Bestellu *ng
    COMM_STRUCTURE-PROCESSKEY = '011' or
    COMM_STRUCTURE-PROCESSKEY = '021' or
    COMM_STRUCTURE-PROCESSKEY = '004' or "LP
    COMM_STRUCTURE-PROCESSKEY = '014' or
    COMM_STRUCTURE-PROCESSKEY = '024' )
    AND COMM_STRUCTURE-BWAPPLNM EQ 'MM'
    AND COMM_STRUCTURE-ORDER_VAL <> 0.
    perFORM LOC_CURR_CONVERT
    USING COMM_STRUCTURE-ORDER_VAL
    COMM_STRUCTURE-DOC_DATE
    COMM_STRUCTURE-ORDER_CURR
    COMM_STRUCTURE-LOC_CURRCY
    COMM_STRUCTURE-EXCHG_RATE
    CHANGING RESULT.
    if the returncode is not equal zero, the result will not be updated
    RETURNCODE = 0.
    else.
    RETURNCODE = 4.
    endif.
    if abort is not equal zero, the update process will be canceled
    ABORT = 0.
    2LIS_02_ITM: No Update
    Hope this will give you some lead.
    Regards,
    Kams

  • 0PS_C02 update rules are not getting activated when i install 4rm BI conten

    Hi All,
    In BI Dev. sys for PS module-  Project System - Dates 0PS_C02 cube-  update rules are not getting activated when i install from the business content and its giving the error  " IC=0PS_C02 IS=0PS_DAT_PRJ error when checking the update rules                Message no. RSAU461" .
    I deleted the inactive update rules(6 nos) and installed again from BI Content, then the same issue raising.
    Can anyone help me out as i stuck up with this to move to go-live.
    Thanks,
    Sakali

    Hi Vassu,
    here are some of the reasons for getting error in update rules activation.
    1. Check the formula or routines that are used in Update rules and check is there any syntax errors.
    2. check whether the mappings are correct or not.
    3. check the info objects which ur used for mapping are in active or not..
    (or) if the info object may be deleted which ur using for mappings.
    Thanks
    Sai Chand.

  • Update Rule Routine Problem

    Hi
    i have wriiten a update rule routine.
    in that routine i am fetching comp code ,GL Acct. from SKB1 table and match those records wth Data Package records.
    Data Package has both Open and Closed items. so i need to match the Comp Code and GL Account which i have fetched from SKB1 with Data Package Comp Code and GL account which records will be matched they will go to Target ODS otherwise Delete from Data Package.
    But data is not coming properly in Target ODS.
    i have debug the routine and found , there are 10 records(Comp Code + GL Acct.) has been fetched from SKB1
    and Data Package has Total 416 Records. Only 20 Records has been gone to Target ODS while I have seen the 216 Comp Code and GL Account combination has been successfully matched with 10 Records of SKB1
    Below is the code in Start routine.
    Note: Data Package has Multiple Records for a Combination of Company Code and GL Account which is present in SKB1.
    How can i resolve this problem.
    ********Logic to Fetch Open items GL Account**************
    *Fetch data from SKB1*********
    SELECT /BIC/ZMCFBUKRS
           /BIC/ZMCFSAKNR
           FROM /BIC/AZOCFSKB100
           INTO TABLE TB_ZOCFSKB1
           FOR ALL ENTRIES IN DATA_PACKAGE
           WHERE /BIC/ZMCFBUKRS = DATA_PACKAGE-COMP_CODE
           AND  /BIC/ZMCFSAKNR = DATA_PACKAGE-GL_ACCOUNT
           AND /BIC/ZMCFXOPVW = 'X'.
    ***Fetch records from FI GL Data Package which match with
    ***internal table TB_ZOCFSKB1
    LOOP AT DATA_PACKAGE INTO WA_DATA_PACKAGE.
    READ TABLE TB_ZOCFSKB1 INTO WA_TB_ZOCFSKB1 WITH KEY
    /BIC/ZMCFBUKRS = WA_DATA_PACKAGE-COMP_CODE
    /BIC/ZMCFSAKNR = WA_DATA_PACKAGE-GL_ACCOUNT
    binary search.
          IF sy-subrc ne 0.
            DELETE TABLE DATA_PACKAGE FROM WA_DATA_PACKAGE.
          ENDIF.
    ***Clear Work Area****************
          CLEAR WA_TB_ZOCFSKB1.
          CLEAR WA_DATA_PACKAGE.
        ENDLOOP.
    ***Refresh internal table*********
       REFRESH TB_ZOCFSKB1.
      ENDIF.
    if abort is not equal zero, the update process will be canceled
      ABORT = 0.
    Edited by: AtulMohan Mishra on Feb 9, 2011 11:22 AM

    Hi,
    It is very important that you SORT the internal table before you do a READ with Binary Search.
    SORT TB_ZOCFSKB1 BY /BIC/ZMCFBUKRS /BIC/ZMCFSAKNR.
    You are sure to miss results unless you do.

  • Why data in PSA doesn't  change when update rule routine is modified?

    Hello guys,
    why data in PSA is not changed after I modifiied the update rule routine. I created a infopackage which is only to PSA, but it shows me any change. If I changed this infopackage to the one which is assigned to "PSA firstly, and then to Infoobject", then I saw the changes in infoobject, but in PSA, still nothing changed.
    I can't figure out the reason. Any hint is welcome!
    Thanks in advance.
    Regards,
    Liying

    HI..
    1) PSA data is like of source system data
    2)Update rules are how you update your keyfigures to Data Tragets.
    Since you have put upto PSA that is the first data staging in BW so there wont be any change of the data even if you write routines at update rules.
    Hope it is clear
    Reg
    Ram

  • BW 3.5 Update rule routine and start routine convert to BI 7.0 Endroutine.

    I have bw 3.5 update routine and update rules start routine( r/3 to ODS). i need to replicate that routine into BI 7.0 endroutine with the same logic with some minor changes(DSO to DSO).
    IN BW 3.5 the data is getting from r/3 where as in BI7.0 the data fetching from DSO itself but the logic is same as bw 3.5.
    following is the start routine:
    DATA: G_FISCPER_TO TYPE /BI0/OIFISCPER,
          G_CALMONTH   LIKE /BI0/PCALMONTH-CALMONTH,
          G_MONAT      TYPE /BIC/OIYRDFMONAT.
    ABORT = 0.
    ------ Globale Variable füllen --------------------------------------*
      CALL FUNCTION 'Y_RDF_FISCPER_FOR_INFOPACKAGE'
        EXPORTING
          I_ISOURCE    = '0FI_AA_001' (*** this is infosurce getting from r/3, in 7.0 this one is DSO 'B")
        IMPORTING
          E_FISCPER_TO = G_FISCPER_TO
          E_MONAT      = G_MONAT
        EXCEPTIONS
          OTHERS       = 1.
      IF SY-SUBRC = 0.
        CALL FUNCTION 'Y_RDE_FISCPER_TO_CALMONTH'
          EXPORTING
            I_PERIV    = 'K4'
            I_BDATJ    = G_FISCPER_TO(4)
            I_POPER    = G_FISCPER_TO+4(3)
          IMPORTING
            E_CALMONTH = G_CALMONTH
          EXCEPTIONS
            OTHERS     = 1.
        IF SY-SUBRC NE 0 OR G_CALMONTH IS INITIAL.
          CALL FUNCTION 'Y_RDN_MONITOR_SET'
            EXPORTING
              I_MSGID   = 'YRDFBW'
              I_MSGNO   = '027'
              I_MSGV1   = '0FI_AA_001'
              I_MSGV2   = 'YRDF_FIAA_PERIOD'
            TABLES
              T_MONITOR = MONITOR.
          ABORT = 1.
        ENDIF.
      ELSE.
        CALL FUNCTION 'Y_RDN_MONITOR_SET'
          EXPORTING
            I_MSGID   = 'YRDFBW'
            I_MSGNO   = '027'
            I_MSGV1   = '0FI_AA_001'
            I_MSGV2   = 'YRDF_FIAA_PERIOD'
          TABLES
            T_MONITOR = MONITOR.
        ABORT = 1.
      ENDIF.
    Update routine:
    RETURNCODE = 0.
      ABORT = 0.
      CLEAR RESULT.
      IF NOT COMM_STRUCTURE-ASSET_MAIN BETWEEN '000000200000' AND
                                               '000000299999'.
        CALL FUNCTION 'Y_RDF_GET_CCTR_0ASSET'
          EXPORTING
            I_COMP_CODE  = COMM_STRUCTURE-COMP_CODE
            I_ASSET      = COMM_STRUCTURE-ASSET
            I_ASSET_MAIN = COMM_STRUCTURE-ASSET_MAIN
          IMPORTING
            E_COSTCENTER = RESULT
          EXCEPTIONS
            OTHERS       = 1.
        IF SY-SUBRC NE 0 OR RESULT IS INITIAL.
          CALL FUNCTION 'Y_RDN_MONITOR_SET'
            EXPORTING
              I_MSGID   = 'YRDFBW'
              I_MSGTY   = 'E'
              I_MSGNO   = '061'
              I_MSGV1   = COMM_STRUCTURE-COMP_CODE
              I_MSGV2   = COMM_STRUCTURE-ASSET
              I_MSGV3   = COMM_STRUCTURE-ASSET_MAIN
            TABLES
              T_MONITOR = MONITOR.
          RETURNCODE = 1.
        ENDIF.
      ENDIF.
    How can i write this in BI7.0?
    Thanks

    Hi ,
    solved on my own. Thankyou very much..
    thanks & regards,
    M.S
    Edited by: M.S on Oct 27, 2009 6:57 AM
    Edited by: M.S on Oct 27, 2009 6:59 AM

  • How to access basic cube data as part of update rule routine?

    Dear colleagues:
    I am developing a routine as part of the update rule to define a characteristic value to feed an infocube. However, I need to peek up a data that is available on another infoprovider, in this case a basic cube.
    So far, I have done that by peeking up data form ODS as part of the update routine, but this is the first time I need to peek up a data from a basic cube.
    <b>Does that works the same way as ODS?</b>
    Best regards
    Waldemar

    Hi Krzysztof Konitz:
    I have posted an inquire about getting that from the PSA. By mistake I have posted that once before your reply and another after that. Then I red you reply.
    However, you replay solved the problem.
    Best regards
    Waldemar

  • Calculation in update rule/routine in order to modify DATA_PACKAGE

    Hello all,
    I want to load some finance data from two ODS objects into an InfoCube. In the update rule I have build a start routine in order to compare two values of  two internal tables (itab1 and itab2) which gets loaded with data from the both ODS.
    When the value of the itab1 is higher of itab2 then I want to subtract the value from itab2 from itab1.
    After that I want to MODIFY the DATA_PACKAGE in order to update later the cube with an new lower value.
    The DATA_PACKAGE is defined as standard table as well as itab1 and itab 2 but I get the error message that the line type is not compatible.
    How I have to build the MODIFY statement in order to calculate and update values in the DATA_PACKAGE?
    Any helps would be great.
    Best regards from Munich/Germany,
    Stefan Leontiadis

    Hi Stefanos,
    My thought is probably not the best in terms of performance, but it should work.  The problem you'll hit is not having the entire data set from both ODS Object loads in memory at the same time.
    To cover this, you can declare a table in the global section of the start routine, let's call it GT_REF_DATA.  Next, perform a SELECT ffrom <other ODS Object> FOR ALL ENTRIES IN DATA_PACKAGE WHERE <selection> into GT_REF_DATA in the local section of the start routine.
    In the individual update routine, you can do a READ TABLE GT_REF_DATA INTO LS_REF_DATA WITH KEY <selection> to get the record you want to compare.
    Here's where you have to be careful.  If I understand your logic right, you can do:
    IF LS_REF_DATA-field < COMM_STRUCTURE-field.
      RESULT = COMM_STRUCTURE-field - LS_REF_DATA-field.
    ELSE.
    RESULT = COMM_STRUCTURE-field.
    ENDIF.
    That avoids processing everything in the start routine and your MODIFY problem.  If you prefer the start routine, you can work with the DATA_PACKAGE directly.  Just remember that DATA_PACKAGE has a header line, so you can simply LOOP AT DATA_PACKAGE, change the value in DATA_PACKAGE, then MODIFY DATA_PACKAGE.
    The way I prefer to do things is to create a separate internal table that is the same type as DATA_PACKAGE.  I fill the internal table with all values to store to the InfoCube (even those you don't change from DATA_PACKAGE).  At the end of the routine, CLEAR DATA_PACKAGE then APPEND LINES OF itab TO DATA_PACKAGE.
    I know there's lots of options above.  Let me know if I got your logic wrong or you have questions.
    Cheers,
    Adam

  • Update Rule Routine: Compare system date

    Can anyone help me with regards to writing some ABAP code in update rule?
    I would like to check if the value of a date characteristics is equal to system date in data source. If its value is equal to system date, assign '0' value to another numeric characteristics. Otherwise, it will get the difference between system date and the date characteristics. I have rewritten the routine as follows. But there is no effects on the result. Am I correct?
    if COMM_STRUCTURE-<date characteristics> = SYST-DATUM.
      RESULT = '0'.
    else.
      RESULT = COMM_STRUCTURE-<numeric characteristics>.
    endif.
    Many thanks in advance.

    I have rewritten the code as follows. ZLASTPURD is a numeric characteristics. The code is written in the routine of ZLASTPURD in update rule. But it takes no effect. The case "COMM_STRUCTURE-/BIC/ZLASTPURD ='0'" means another date characteristics is equal to system date, the value of ZLASTPURD is blank after modifying the code. However, the code is workable for  "RESULT = COMM_STRUCTURE-/BIC/ZLASTPURD.". Is there anything wrong?
    data lastpurdays type I.
    lastpurdays = '1'.
    if COMM_STRUCTURE-/BIC/ZLASTPURD = '0'.
      RESULT = lastpurdays.
    else.
      RESULT = COMM_STRUCTURE-/BIC/ZLASTPURD.
    endif.
    Many thanks in advance.

  • Update rule - Routine Char -ABAP issue

    Dear Experts,
    Infocube u2013 Update rule u2013Chars-
    MM_BEMOT(Indicator)  IS a FIELD which I am introducing in the update rule.
    I don't get any value from Data_package.
    MM_BEMOT_ITAB has 2 entries.(50,06). It is not updating 2 entries u2013
    It is updating the same entry 2 times 50.
    Infocube - I have to update like
    Order,Indicator,Type,Cost element,amount
    45167 06 01 12345 10.00
    45167 50 01 12345 10.00
    Startroutine - I am reading the data from DSO and moving those data into
    MM_BEMOT_ITAB . MM_BEMOT_ITAB has 2 entries now. I have to update 50,06 values into
    MM_BEMOT.
    READ TABLE MM_BEMOT_ITAB
    WITH KEY ORDER = COMM_STRUCTURE-ORDER
    COSTELMNT = COMM_STRUCTURE-COSTELMNT.
    result value of the routine
    LOOP AT MM_BEMOT_ITAB.
    IF SY-SUBRC = 0.
    RESULT = MM_BEMOT_ITAB-MM_BEMOT.
    endif.
    ENDLOOP.
    Advance thx
    ENDIF.

    You may have to put the following line in your update rule after changing the result.
    RETURNCODE = 0.
    Regards.
    Sanjay
    Message was edited by:
            Sanjay Sinha

  • Need hints to bring BC400(ABAP) knowledge to BW update rules/routines.

    Hi,
    I have just completed the BC400 (ABAP) course at SAP but the instructor had no clue about BW.
    From se80, he thought how to create packages, programs, functions modules, classes/Interfaces, etc. but whenever, I asked how these fit into the BW update rules and transfer rules, he said he knew nothing about BW.
    For example, how do I bring in a program written in se80 into my update rule or transfer routine which updates and ODS or cube?
    i.e. The main reasoning for learning this BC400(ABAP) is to be comfortable in writing update rule or transfer routine to update ODS/Cubes in BW but the instructor failed me in making the link between the ABAP class and BW.
    Can you give me some guide on this?
    Can I work in se80 as I was taught and bring codes from there to update a cube?
    i.e. if I need to write an update routine to update a cube from an ODS, can this be done in se80 (on BW)
    I will appreciate any guidelines to bring in my new found knowledge to the BW environment.
    Thanks

    Most Bw transformations are already includes inside programs or cmods or BTEs
    By double cliking on start routines and end routines it already takes you into the ABAP enviroment
    Have a look at the sappress book - user exits and BADIs in BW (it's not a brillaitn book by any means - it's just about passable and is short on detail - but it will get you a head start)

  • Update rule routine

    hi all
    i need to write a routine at the update rule level for currency type....
    currency type has data of type 00,01,02 loaded to psa and then to infocube
    i need only 00 data to be loaded into cube, so want to write a routine
    can you please provide the coding for the same so that i can write at the update rule level for curr type field
    Regards

    PROGRAM CONVERSION_ROUTINE.
    Type pools used by conversion program
    TYPE-POOLS: RS, RSARC, RSARR, SBIWA, RSSM.
    Declaration of transfer structure (selected fields only)
    TYPES: BEGIN OF TRANSFER_STRUCTURE ,
      InfoObject 0COMP_CODE: CHAR - 000004
      HEADER_COMP_CO(000004) TYPE C,
      InfoObject 0PLANT: CHAR - 000004
      HEADER_PLANT(000004) TYPE C,
      InfoObject 0MATERIAL: CHAR - 000018
      HEADER_MATERIAL(000018) TYPE C,
      InfoObject 0MATL_TYPE: CHAR - 000004
      HEADER_MAT_TYPE(000004) TYPE C,
      InfoObject 0MATL_GROUP: CHAR - 000009
      HEADER_P_GROUP(000009) TYPE C,
      InfoObject 0LOTSIZE_IT: QUAN - 000013
      LOTSIZE(000007) TYPE P,
      InfoObject 0UNIT: UNIT - 000003
      LOTSIZE_QTY_UNIT(000003) TYPE C,
      InfoObject 0FISCPER: NUMC - 000007
      PERIODE(000007) TYPE N,
      InfoObject 0FISCVARNT: CHAR - 000002
      FISCAL_Y_VARIANT(000002) TYPE C,
      InfoObject 0PCPITEMCAT: CHAR - 000001
      ITEM_CATEGORY(000001) TYPE C,
      InfoObject 0PCP_RES: CHAR - 000035
      COST_ITEM(000035) TYPE C,
      InfoObject 0COMPONENT: CHAR - 000018
      MATERIAL(000018) TYPE C,
      InfoObject 0VAL_CLASS: CHAR - 000004
      VALUATION_CLASS(000004) TYPE C,
      InfoObject 0PLANT_COMP: CHAR - 000004
      PLANT(000004) TYPE C,
      InfoObject 0SEND_CMPC: CHAR - 000004
      COMPANY_CODE(000004) TYPE C,
      InfoObject 0CO_AREA: CHAR - 000004
      CONTROLLING_AREA(000004) TYPE C,
      InfoObject 0COSTCENTER: CHAR - 000010
      COST_CENTER(000010) TYPE C,
      InfoObject 0ACTTYPE: CHAR - 000006
      ACTIVITY_TYPE(000006) TYPE C,
      InfoObject 0WORKCENTER: CHAR - 000008
      WORK_CENTER(000008) TYPE C,
      InfoObject 0VENDOR: CHAR - 000010
      VENDOR(000010) TYPE C,
      InfoObject 0INFO_REC: CHAR - 000010
      INFO_RECORD(000010) TYPE C,
      InfoObject 0ABCPROCESS: CHAR - 000012
      PROCESS(000012) TYPE C,
      InfoObject 0AMOUNT: CURR - 000015
      VALUE(000008) TYPE P,
      InfoObject 0AMOUNTFX: CURR - 000015
      VALUE_FIXED(000008) TYPE P,
      InfoObject 0AMOUNTVR: CURR - 000015
      VALUE_VARIABLE(000008) TYPE P,
      InfoObject 0OI_MENGE: QUAN - 000015
      QUANTITY(000008) TYPE P,
      InfoObject 0BASE_UOM: UNIT - 000003
      QUANTITY_UNIT(000003) TYPE C,
      InfoObject 0PRICEUNIT: DEC - 000005
      PRICE_UNIT(000003) TYPE P,
      InfoObject 0CURRENCY: CUKY - 000005
      CURRENCY(000005) TYPE C,
      InfoObject 0CURTYPE: CHAR - 000002
        CURRENCY_TYPE(000002) TYPE C,
      InfoObject 0COSTELMNT: CHAR - 000010
      COST_ELEMENT(000010) TYPE C,
      InfoObject 0COSTCOMP: NUMC - 000003
      COST_COMPONENT(000003) TYPE N,
      InfoObject 0CCOMPSTRUC: CHAR - 000002
      COST_COMP_STR(000002) TYPE C,
      InfoObject 0SCRAPQTY: QUAN - 000015
      SCRAP_QTY(000008) TYPE P,
      InfoObject 0COMP_SCRAP: QUAN - 000015
      COMP_SCRAP_QTY(000008) TYPE P,
      InfoObject 0COSTVAR: CHAR - 000004
      COSTING_VARIANT(000004) TYPE C,
      InfoObject 0COSTVERS: NUMC - 000002
      COSTING_VERSION(000002) TYPE N,
    END OF TRANSFER_STRUCTURE .
    Global code used by conversion rules
    $$ begin of global - insert your declaration only below this line  -
    TABLES: ...
    DATA:   ...
    $$ end of global - insert your declaration only before this line   -
          FORM COMPUTE_CURTYPE
    Compute value of InfoObject 0CURTYPE
    in communication structure /BIC/CS0CO_PC_PCP_10
    Technical properties:
        field name      = CURTYPE
        data element    = /BI0/OICURTYPE
        data type       = CHAR
        length          = 000002
        decimals        = 000000
        ABAP type       = C
        ABAP length     = 000002
        reference field =
    Parameters:
    -->  RECORD_NO       Record number
    -->  TRAN_STRUCTURE  Transfer structure
    <--  RESULT          Return value of InfoObject
    <->  G_T_ERRORLOG    Error log
    <--  RETURNCODE      Return code (to skip one record)
    <--  ABORT           Abort code (to skip whole data package)
    FORM COMPUTE_CURTYPE
      USING    RECORD_NO LIKE SY-TABIX
               TRAN_STRUCTURE TYPE TRANSFER_STRUCTURE
               G_S_MINFO TYPE RSSM_S_MINFO
      CHANGING RESULT TYPE /BI0/OICURTYPE
               G_T_ERRORLOG TYPE rssm_t_errorlog_int
               RETURNCODE LIKE SY-SUBRC
               ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel datapackage
    $$ begin of routine - insert your code only below this line        -
    DATA: l_s_errorlog TYPE rssm_s_errorlog_int.
    If <SOURCE_FIELDS>-CURTYPE NE '00'
    Delete DATA_PACKAGE.
    RESULT = .
    returncode <> 0 means skip this record
      RETURNCODE = 0.
    abort <> 0 means skip whole data package !!!
      ABORT = 0.
    $$ end of routine - insert your code only before this line         -
    ENDFORM.
          FORM INVERT_CURTYPE
          Inversion of selection criteria for InfoObject 0CURTYPE
          This subroutine needs to be implemented only for SAP RemoteCubes
          (for better performance) and for the Report/Report Interface
          (drill through).
    -->  I_RT_CHAVL_CS       Ranges table for current InfoObject
    -->  I_THX_SELECTION_CS  Selection criteria for all other InfoObjects
    <--  C_T_SELECTION       Selection criteria for fields of
                              transfer structure
    <--  E_EXACT             Flag: Inversion was exact
    FORM INVERT_CURTYPE
      USING    I_RT_CHAVL_CS      TYPE RSARC_RT_CHAVL
               I_THX_SELECTION_CS TYPE RSARC_THX_SELCS
      CHANGING C_T_SELECTION      TYPE SBIWA_T_SELECT
               E_EXACT            TYPE RS_BOOL.
    $$ begin of inverse routine - insert your code only below this line-
      DATA:
        L_S_SELECTION LIKE LINE OF C_T_SELECTION.
    An empty selection means all values
      CLEAR C_T_SELECTION.
      L_S_SELECTION-FIELDNM = 'CURRENCY_TYPE'.
    Selection of all values may be not exact
      E_EXACT = RS_C_FALSE.
    $$ end of inverse routine - insert your code only before this line -
    ENDFORM.

  • Update Rule Routine not deleted properly

    Hi all
    I have deleted a routine from an update rule, removed the key figure from the infoprovider and reactivated both the ODS and the update rule.
    The update rule therefore no longer contains the datafield.
    Unfortunately the the code for the routine still exists in the system (RSAABAP and other tables) and references in this routine to other fields are preventing me carrying out other actions, so I need to properly remove the routine from the system.
    I cannot go back to the old generated code for the update rules as there is no version management.  I have tried putting the field back on the ODS and recreating the routine, but the system generates a new key for the routine so it looks as though I have lost the link completely.
    Any suggestions?  Is there a way of deleting an object type R3TR ROUT consistently without doing it through the Update rules change screen?
    Regards
    Hayley

    Hi,
    Let me give the solution, we are also having the same issues..
    thanks in advance
    sree

  • Problem in the update rule routine in BIW production

    hi,
      I have encountered a problem in the update rule, the problem is, there is a routine to calculate the age of a person, age is a key figure,
    The problem is that the key figure is not being calculated.
    we had encountered the same problem in the bw developent, we reinstaled the update rule, and the age was calculated correctly. Where as in production we cannot instal from business cotent, should we transport the perticular update rule once again?
    if there is any other solution, please let me know.
    Thanks in advance.
    regards chetana.

    I think retransporting is the only option available to you. You cannot modify anything in your production system.
    IF you have a chance to speak with basis people,ask them to open the system status to modifiable for few minutes.
    and make necessary changes in production and bring it back to normal (This is not a best practise in all situations).
    hope this helps.
    Praveen

Maybe you are looking for