Coding in Update Rules accessing a Z-Table

Hi,
I have a datarecord that looks as follows:
0MATERIAL:                     1000
ZMC (Manufacturing Company)      03
ZFAC (Facility ID)               16
ZSHIP (Total Shipments)         500 Units
<b>There is a Z-Table in R/3 (ZPLANT) that maps ZMC and ZFAC to R/3 Plants (ZPLANT).</b>
Assuming this Z-Table is available in BW <b>what would the  coding in the update rules into a Cube  look like to do that mapping?</b>
Thanks again
Christian

dear Christian,
try use start routine, assume the table in bw is zplant and has fields zmc and zfac ...
PROGRAM UPDATE_ROUTINE.
$$ begin of global - insert your declaration only below this line -
TABLES: zplant.
DATA: l_tabix like sy-tabix,
it_plant like zplant occurs 0 with header line.
$$ begin of routine - insert your code only below this line -
fill the internal tables "MONITOR" and/or "MONITOR_RECNO",
to make monitor entries
data : it_data_package like DATA_PACKAGE occurs 0 with header line.
first select the master data to internal table, this to
avoid each time has to fetch from database table for
single record, for better performance
select * from zplant
into table it_plant.
if table zplant has high volume data, you can use for * select * from zplant
into table it_plant.
all entries
for all entries in data_package
where material ? = data_package-material.
loop at data_package.
l_tabix = sy-tabix.
move-corresponding DATA_PACKAGE to it_data_package.
read it_plant with key [field name e.g zplant] = it_data_package-[/bic/zplant] BINARY SEARCH
if more key add it_data_package-[fieldname] - without * AND
if sy-subrc = 0.
it_data_package-/bic/zmc = it_plant-zmc.
it_data_package-/bic/zfac = it_plant-zfac.
modify data_package from it_data_package index l_tabix.
endif.
endloop.
take a look some sample code
Re: Is it possible to read a third ODS in update rules between two ODS?
Re: Update Rules
hope this helps.

Similar Messages

  • Update rule access to be given

    Hello Experts,
                            I have to give access of update rule and transfer rule display access to one of the users, which Authorization objects to be maintained in his role? currently I have SAP BW 3.5 version.I tried searching in Role maintenance but couldn't find any specific object as there are values for cube or ods. I have added S_DEVELOP object of ABAP workbench but still user is unable to see update or transfer rule.
    Please suggest.
    Regards,
    Priyanka Joshi

    Hi ,
      To get access , the one who does not have access go to display transformation/tranfer rule in Rsa1first  ,which would throw an authorization error .
      then go to /osu53 ,here he will get a dump of the required authorisation.
      take a screenshot of the dump and send it to basis team,they will provide the required authorisation .

  • Coding in Update Rules

    Hi,
    I need generate the report from the following two cubes, Multiprovider does not provide the solution.
    Here is the two cubes,
    CUBE 1 - 0CATS_C01 - Time sheets Approved
    0NETWORK Network
    0R_ACTIVITY Activity Number
    CUBE 2 - 0PS_C04 Project Systems
    0NETWORK Network
    0ACTIVITY Activity Number
    0WBS_ELEMT Work Breakdown Structure Element
    I need to create an update rule to derive wbs element from network/activity, network and activity are in one cube and wbs in the other one.
    It would be great, if someone would send me an sample code.
    Thank you

    Hi Senthil,
    1. Create a new cube, add all the required characteristics.
    2. Generate export data sources from the extings infocubes. You cant transport generated datasources from CUBE. You have to generate in production aswell.
    3. create update rules from both the cubes to new cube.
    4. load data. test it.
    5. transport it to quality & production.
    More info:
    Data Marts:
    http://help.sap.com/saphelp_nw04/helpdata/en/80/1a6110e07211d2acb80000e829fbfe/content.htm
    Hope it Helps
    Srini
    Assigning points, way of saying thanks in SDN(if it helps)

  • Types of update rules

    Hi experts,
    What are the types of update rules?
    Regards,
    Siva

    Hi......
    Yes either you can say what are the different update types.........that Praveen has already ansered..............or you can say.........
    You can say what are the diffrent types of update routines...then the answer is :
    1) Start Routine in Transfer Rules
    2) Transfer Routine in Transfer Rules.
    3)Start Routine in Update Rules
    4)Update Routine in Update Rules.
    The routines that you write in transfer rules are applicable to all the Data targets that get the data from that particular Infosource, when you are going to write some code in Transfer rules, you have to understand that you are going to manupilate the data that is going to get into BW .
    If you are going to write in Update Rules , then that logic is going to apply only for that particular Data target .
    Eg : Let suppose I have a Flat file that gets data from 3 countries, US, Canada and Mexico.
    Now I have prepared the data source for the same . But I dont want to have the data of Mexico in to BW itself.
    So I will write a Start routine at TR to eliminate the data of Mexico.
    My Next step is I want the data of US into one ODS and Canada data in to another ODS.
    For this I handle the dataflow at Start routine in Update rules, to eliminate Canada data for US ODS and Vice Versa.
    start routine in transfer rules
    Look up to load master data
    excluding
    Start Routine in Transfer Rules
    Sample code in Update Rule to restrict data selection?
    Append Datapak - transfer start routine
    Excluding Blank field in Infopackage Filter
    Trans Routine ABAP help ..
    transfer routine
    Date key figure: Convert DATS format to DEC format
    Date Conversion in Flat File
    Transfer Routine ABAP
    conversion exit
    Date Conversion
    Problem with  conversion char to numc in transference rules
    conversion routine..?
    update routine
    How to call a function in Update Rules to reverse a key figure sign
    Need Sample Code for Update Rules
    Date calculation
    Difference between data in PSA and Data in Infocube
    No RETURNCODE <> 0 allowed in update routines in transfer mode
    the diffrerece between DEC and (yyyymmdd) 8 char in Time defination
    Access master data in update rules
    Date key figure: Convert DATS format to DEC format
    start routine in update rules
    Is it possible to read a third ODS in update rules between two ODS?
    update rule coding while loading data from ODS to CUBE
    Start Routine in Update Rules to populate additional fields from ODS
    Coding in Update Rules accessing a Z-Table
    Start routine
    Regards,
    Debjani...........

  • Start routine and update rules

    Hi,
    What is accessed first:-
    Start Routines or Update Rules?
    What is the use of global variables in start routine?
    Please reply.
    Thanks.

    Hi......
    You have different types of Routines in BW .
    1) Start Routine in Transfer Rules
    2) Transfer Routine in Transfer Rules.
    3)Start Routine in Update Rules
    4)Update Routine in Update Rules.
    The routines that you write in transfer rules are applicable to all the Data targets that get the data from that particular Infosource, when you are going to write some code in Transfer rules, you have to understand that you are going to manupilate the data that is going to get into BW .
    If you are going to write in Update Rules , then that logic is going to apply only for that particular Data target .
    Eg : Let suppose I have a Flat file that gets data from 3 countries, US, Canada and Mexico.
    Now I have prepared the data source for the same . But I dont want to have the data of Mexico in to BW itself.
    So I will write a Start routine at TR to eliminate the data of Mexico.
    My Next step is I want the data of US into one ODS and Canada data in to another ODS.
    For this I handle the dataflow at Start routine in Update rules, to eliminate Canada data for US ODS and Vice Versa.
    Global variables in Start routine
    You can have global variables, internal tables populated by the
    startup routine. This data will be available to the field
    routines. Create yourself a start routine, declare some
    variables in the global section, and then create a field
    routine. You will be able to use the globally declared objects
    in the field routine
    Please check below help link for routines in sap netweaver 2004s
    http://help.sap.com/saphelp_sem60/helpdata/en/e3/732c42be6fde2ce10000000a1550b0/frameset.htm
    How to guide "How to transformations routines".Please check the below link:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/dc1d9990-0201-0010-16aa-db3c4eb8b642
    start routine in transfer rules
    Look up to load master data
    excluding
    Start Routine in Transfer Rules
    Sample code in Update Rule to restrict data selection?
    Append Datapak - transfer start routine
    Excluding Blank field in Infopackage Filter
    Trans Routine ABAP help ..
    transfer routine
    Date key figure: Convert DATS format to DEC format
    Date Conversion in Flat File
    Transfer Routine ABAP
    conversion exit
    Date Conversion
    Problem with  conversion char to numc in transference rules
    conversion routine..?
    update routine
    How to call a function in Update Rules to reverse a key figure sign
    Need Sample Code for Update Rules
    Date calculation
    Difference between data in PSA and Data in Infocube
    No RETURNCODE <> 0 allowed in update routines in transfer mode
    the diffrerece between DEC and (yyyymmdd) 8 char in Time defination
    Access master data in update rules
    Date key figure: Convert DATS format to DEC format
    start routine in update rules
    Is it possible to read a third ODS in update rules between two ODS?
    update rule coding while loading data from ODS to CUBE
    Start Routine in Update Rules to populate additional fields from ODS
    Coding in Update Rules accessing a Z-Table
    Start routine
    Hope this helps you..........
    Regards,
    Debjani.........
    Edited by: Debjani  Mukherjee on Oct 1, 2008 4:58 PM

  • Access master data in update rules

    Hi,
    I try to calculate a weight in my update rules. Therefore I need the product weight and the number of peaces. I try to read the product weight from master data. The problem is, that it always calculates zero as the result. Is it possible to read master data in update rules?
    If I try to calculate the weight in the transfer rules, I get the message in the monitor, that the transfer rules don't finish. Do you have an idea what to do?
    Regards,
    Gabi

    Hi Robert,
    here is my code in the update rule.
    fill the internal table "MONITOR", to make monitor entries
      DATA: l_s_errorlog TYPE RSMONITOR.
      data: temp_prod_weight type /BIC/PZL2_P_ID.
    general values
      RESULT = COMM_STRUCTURE-/BIC/ZL2_POTMW.   "weight
      UNIT = COMM_STRUCTURE-UNIT_OF_WT.
      RETURNCODE = 0.
      ABORT = 0.
    calculate weight from master data, if it is zero
      IF COMM_STRUCTURE-/BIC/ZL2_POTMW = 0
      or COMM_STRUCTURE-/BIC/ZL2_POTMW = '0'
      or COMM_STRUCTURE-/BIC/ZL2_POTMW is initial.
        select single /BIC/ZL2_NETW UNIT_OF_WT
        from /BIC/PZL2_P_ID
        into corresponding fields of temp_prod_weight
        where /BIC/ZL2_P_ID = COMM_STRUCTURE-/BIC/ZL2_P_ID
        and objvers = 'A'.
        if sy-subrc <> 0.
          l_s_errorlog-MSGTY = 'I'.
          append l_s_errorlog to MONITOR.
          RESULT = 0.
    abort, if calculation is not possible
          ABORT = 1.
        else.
          RESULT = temp_prod_weight-/BIC/ZL2_NETW
    COMM_STRUCTURE-/BIC/ZL2_POTMQ.
          UNIT = temp_prod_weight-UNIT_OF_WT.
        endif.
    ENDIF.
    convert unit
      CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
        EXPORTING
          INPUT                      = RESULT
        NO_TYPE_CHECK              = 'X'
        ROUND_SIGN                 = ' '
          UNIT_IN                    = COMM_STRUCTURE-UNIT_OF_WT
          UNIT_OUT                   = 'KG'
        IMPORTING
        ADD_CONST                  =
        DECIMALS                   =
        DENOMINATOR                =
        NUMERATOR                  =
          OUTPUT                     = RESULT
        EXCEPTIONS
          CONVERSION_NOT_FOUND       = 1
          DIVISION_BY_ZERO           = 2
          INPUT_INVALID              = 3
          OUTPUT_INVALID             = 4
          OVERFLOW                   = 5
          TYPE_INVALID               = 6
          UNITS_MISSING              = 7
          UNIT_IN_NOT_FOUND          = 8
          UNIT_OUT_NOT_FOUND         = 9
          OTHERS                     = 10
      IF SY-SUBRC <> 0.
        l_s_errorlog-MSGTY = 'I'.
        append l_s_errorlog to MONITOR.
        UNIT = COMM_STRUCTURE-UNIT_OF_WT.
        RESULT = COMM_STRUCTURE-/BIC/ZL2_POTMW.
      ELSE.
        UNIT = 'KG'.
      ENDIF.
    I'm loading via PSA, but I have problems to debug the code. If I set a break point in my code (command break-point), I can't stop at it.
    Thanks,
    Gabi

  • How to find all the cubes update rules transfer rules ,programms ,ds,ect

    HI SDN
    Is there any tables for finding update rules,cubes,multiproviders in the system.
    can any body tells me the tables for the objects all the objects
    thx

    Hi Rubane,
    These the tables which gives relevant info,
    Here are few of those -
    Thought it may be of some use if we make a list of useful BW tables
    for instance
    v_rszglobv = variables
    /bic/f (cubename) is the fact table of a content cube
    /bic/D (cubename) P is the package dimension of a content cube
    /bic/D(cubename) U is the unit dimension of a content cube
    /bic/D(cubename) T is the time dimension of a content cube
    /bic/D(cubename) I is the userdefined dimension of a content cube
    /bic/m (object name) master data of object
    /bic/t (object name) text data of object
    /bic/H (object name) hierarchy data of object
    you can replace the BIC with BI0 for business content object and cubes
    RSDIOBJ - index of all InfoObjects
    RSSELDONE - Monitor: Selections for executed request
    RSREQDONE - Monitor: Saving of the QM entries, state of the uploads, all info about the upload via request number, field: RNR
    ODS Table names
    1.New data: /BIC/A (ODS NAME)40
    2.Active data: /BIC/A (ODS NAME)00
    3.Change log: /BIC/B ( NUMBERS)
    RSRREPDIR which is the table containing all your reports.
    RSTSODS - table that contain relation between "ODS Name" and PSA Table.
    TBDLS - Logical system customization, when you run TA: BDLS
    EDP21 - Partner Profile, when you run TA: WE20
    RSBASIDOC - Assignment of source systems to BIW systems incl. IDoc type
    In V_COMPDIR_COMPIC you can also see all your reports. The advantage is that you can see the name/text of the query, not only the technical id.
    RSDCUBEIOBJ Objects per InfoCube (where-used list)
    RSDODSOATRNAV InfoObject in ODS (navigational attributes)
    RSDODSOIOBJ InfoObject in ODS
    RSDIOBJT InfoObject texts
    RSDIOBJ Directory of all InfoObjects
    RSDKYF Key figures
    RSDBCHATR Master data attributes
    RSBBSQUERYDIR BW: Directory of the Query Sender
    RSBBSQUERY BW: Query Receiver
    RSBBSQUERYT BW: Texts for Query Receiver
    TQOP Compare Operators for View Maintenance Query
    TQOPT Compare operators for view maintenance query (texts)
    TQLOT Logical operators for view maintenance query (texts)
    ROMSDIOBJ BIW: Assignment of master data attributes to InfoObjects
    RODCHA BIW: InfoObjects / characteristics
    RODIOBJCMP BIW: InfoObjects / compounding
    RODKYF BIW: Key figures
    ROAPPLT BIW: Name of the application components
    RSUICDONE BIW: Selection table for user-selection update ICs
    RODTIM BIW: Time characteristics
    RODUNI BIW: Units
    RSIST InfoSource texts
    RSIS InfoSource (transaction data)
    RSISOSMAP Mapping Between InfoSources and OLTP Sources
    RSOSFIELDMAP Mapping Between OLTP Source Fields and InfoObjects
    RSUPDDAT Update rules key figures
    RSUPDKEY Update rule: Key per key figure
    RSUPDROUT Update rules - ABAP routine - check table
    RSRWBINDEXT Titles of binary objects (Excel workbooks) in InfoCatalog
    RSRWORKBOOK 'Where-used list' for reports in workbooks
    RSDDIME Dimensions directory
    RSDDIMEIOBJ InfoObjects per dimension (where-used list)
    RSDDIMET Dimension Texts
    RSZCOMPDIR Directory of reporting components
    RSZELTATTR Attribute selection per dimension element
    RSZELTDIR Directory of the reporting component elements
    RSZELTTXT Texts of reporting component elements
    RSZELTXREF Directory of query element references
    RSZGLOBV Global Variables in Reporting
    RSDCUBET Texts for the InfoCubes
    SMEN_BUFFC-Table for Storing Favorites.
    tables which hold the list of BEx Queries, Web Reports, and Workbooks,
    RSRREPDIR
    RSZCALC
    RSZCEL
    RSZCHANGES
    RSZCOMPDIR
    RSZCOMPIC
    RSRWORKBOOK
    RSZCOMPDIR - Directory of reporting components
    RSZELTDIR - Reporting Component Details
    RSBCT_NAVKEY_T  
    RSBCT_NAVKEYDET 
    check it in the following table
    RSDDAGGL
    RSDDAGGLF
    RSDDAGGRDIR
    RSDDAGGRDIR_M
    RSAABAP - Routines
    Thanks,
    Sudhakar.

  • UoM Conversion in Update Rule -

    Dear Experts,
    We are trying to do UoM Conversion during data loading by writing a code in Update Rules that would do conversion based on conversion factors maintained in 0MAT_UNIT. We are following the "How-To" paper by SAP.
    The SAP "How-To" paper does not refer to Table T006 for UoM Conversions. It checks for conversion factor only in 0MAT_UNIT master data. However when we define a new UoM Conversion type in T-code RSUOM, we can select an option by which system refers to Table T006 for conversion.
    I am not sure if there would be consistency in conversions at the time of data loading and reporting. Because our update rules would not check Table T006 while reports might refer to T006 for UoM Conversion.
    Can someone please fill up the gap?
    Regards
    X

    Hi Abhijith,
                     Check here......
    Re: UOM Conversion
    Quantity Conversion Function Module
    "UNIT" in Transformation
    Re: How to write conversion routines in bw
    about conversion routines
    Re: how to write  routine  for unit conversion
    Regards,
    Vijay.

  • Access to unmapped field of ODS in the update rule of CUBE

    Hi Gurus,
    I have 8 fields in ODS out of which only 5 are mapped to the characteristics in the CUBE. I have to write a start routine in the update rules of the cube. But, I need to access one field, which is in ODS but not mapped to characteristic in the cube.
    So, is it possible to use that field in the logic of start routine. Or do I have to create a new characteristic in the CUBE for that 6th field also.
    Thanks,
    Regards,
    aarthi
    [email protected]

    Hi
    You certaily should insert your infobject field in the cube to populate it. After This you can choose if populate it by direct mapping or by routine.(start routine or transfer routine)
    A classic example of start routine to populate infobject from master data
    tables : /bi0/pcostcenter.
    data : lt_data_package like DATA_PACKAGE occurs 0 with header line,
    lt_costcenter like /bi0/pcostcenter occurs 0 with header line.
    select * from /bi0/pcostcenter into table lt_costcenter.
    lt_data_package[] = DATA_PACKAGE[].
    loop at lt_data_package.
    read table lt_costcenter with key costcenter = comm_structure-costcenter.
    if sy-subrc = 0.
    lt_data_package-/bic/zpcaccgh = lt_costcenter-/bic/zpcaccgh.
    modify lt_data_package.
    endif.
    endloop.
    DATA_PACKAGE[] = lt_data_package[].

  • Using an internal table from a strt rountine in an update rule

    I created a start routine and i now want to take the value from the internal table and set my result to it in my update rule.  I try that and it says it isn't a header table but I defined it this way.  here is the code
    DATA: T_BILL_DATA LIKE STANDARD TABLE OF /BIC/AZBIL_O5300,
       Ls_data like line of T_BILL_DATA.
    $$ end of global - insert your declaration only before this line   -
    FORM compute_key_field
      TABLES   MONITOR STRUCTURE RSMONITOR "user defined monitoring
      USING    COMM_STRUCTURE LIKE /BIC/CS2LIS_12_VCSCL
               RECORD_NO LIKE SY-TABIX
               RECORD_ALL LIKE SY-TABIX
               SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
      CHANGING RESULT LIKE /BIC/VZSD_C51T-SALESORG
               RETURNCODE LIKE SY-SUBRC
               ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
    $$ begin of routine - insert your code only below this line        -
    fill the internal table "MONITOR", to make monitor entries
    result value of the routine
      READ TABLE T_BILL_DATA WITH KEY
      DOC_NUMBER = COMM_STRUCTURE-DOC_NUMBER
      S_ORD_ITEM = COMM_STRUCTURE-S_ORD_ITEM
      REFER_DOC =  COMM_STRUCTURE-DELIV_NUMB
      REFER_ITM =  COMM_STRUCTURE-DELIV_ITEM
      BINARY SEARCH.
      RESULT = T_BILL_DATA-SALESORG.

    Hi LMM,
    The definition is not correct, your table doesn't have header line.
    try this,
    DATA: T_BILL_DATA LIKE STANDARD TABLE OF /BIC/AZBIL_O5300 with header line.
    Hope it helps.
    Thanks,
    Soumya

  • Data package's data coolection in one internal table of Update rule in bw

    Hello Gurus,
    I have a requirement in bw which demands to create update routine, in which I need to find the vendor for the material, which doesn't have vendor by some business rule but, here in this case data is divided into different datapackages so here in this case material data is splited over different datapackages.
    One material can have n no of records with differnt plants.
    My only question is like can we collect all datapackage data in one internal table.
    Ex: if there are total 5 datapckages, so in update rule can we collect all these datapackages records?
    Please suggest your opinion.
    Thanks in advance,
    Snehal.
    Moderator message: please have a look in the BW forums.
    Edited by: Thomas Zloch on Jan 11, 2011 1:49 PM

    hi,
    i think your problem is need of a work area...
    Using "FOR ALL ENTRIES IN lt_zhrp"  You must use " check lt_zhrp is not initial "
    DATA: lt_zhrp TYPE STANDARD TABLE OF zhrp,
          lt_zhrt TYPE STANDARD TABLE OF zhrt.
    *new
    data: wa_zhrp type lt_zhrp.
    SELECT tabnr
    FROM zhrp
    INTO CORRESPONDING FIELDS OF TABLE lt_zhrp
    WHERE objid = lv_posid.
    LOOP AT lt_zhrp INTO wa_zhrp.
      SELECT low
      FROM zhrt
      INTO CORRESPONDING FIELDS OF TABLE lt_zhrt
      WHERE tabnr =  wa_zhrp-tabnr  " lt_zhrp-tabnr
      AND attrib = 'NET_VALUE'.
    ENDLOOP.
    Edited by: Miguel Antunes on Apr 28, 2010 4:22 PM

  • Database access in update rules

    Hi all,
          I am planning to write an ABAP routine for a update rule. Now I want to know whether I can find out some data from some tables. These data are a part of my master data.
          Let me explain; I have a field in the communication structure called BookID and two dimensions in the cube called BookID and AuthorName. Now both these dimensions are characteristic infoobjects with some master data already uploaded.
          I have to write a update rule routine, where I'll fetch the AuthorName from the BookID. AuthorName is an attribute of BookID.
          Can you tell me if this is possible? If yes, then which are the database tables I need to look at? Also, some code examples will really help.
          If it's not possible, please suggest some way to do it. Currently I have AuthorName as "Master data attrib. of" BookID. But still it doesn't update the records. New records are being created with only BookID. No AuthorName.
          Please help.
    Thanks,
    Satyajit.

    hi,
    are you going to update AuthorName in master data BookID or AuthorName in the cube ? do the AuthorName set as 'navigational' attribute of BookID ?
    Both are possible for update.
    Master data has 3 tables (beside other table) : text, attribute and hierarhy.
    For master data that's not time-dependent, attribute are stored in /bi0/p[infoobject name] - without 0, e.g infoobject 0customer has /bi0/pcustomer table for attribute. for our own created infoobject it's stored in /biC/p[infoobject name], e.g ZCUSTOMER has /bic/pZcustomer table.
    For update in infocube, if you didn't set it as navigational attribute, you may use Update Method 'Master data attrib. of'.
    sample code :
    data : it_data_package like DATA_PACKAGE occurs 0 with header line,
           begin of it_authorname occurs 0,
              /bic/zbookid like /bic/pzbookid-/bic/zbookid,
           end of it_authorname,
           l_tabix like sy-tabix.
    tables : /bic/pzbookid.
    select /bic/zbookid
    from /bic/pzbookid
    into corresponding fields of table it_authorname
    for all entries in data_package
    where /bic/zbookid = data_package-/bic/zauthorname.
    loop at DATA_PACKAGE.
    endloop.

  • Ho to read intern table in update rule?

    Hello experts,
    I have the following start routine:
    PROGRAM UPDATE_ROUTINE.
    $$ begin of global - insert your declaration only below this line  -
    TABLES: /BIC/AZD_ODS_C00.
    DATA: ITEM_TABLE TYPE STANDARD TABLE OF /BIC/AZD_ODS_C00
          WITH HEADER LINE
          WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
    DATA: gv_flag type c.
    $$ end of global - insert your declaration only before this line   -
    $$ begin of routine - insert your code only below this line        -
    fill the internal tables "MONITOR" and/or "MONITOR_RECNO",
    to make monitor entries
    SELECT * FROM  /BIC/AZD_ODS_C00 INTO TABLE ITEM_TABLE.
    SORT ITEM_TABLE BY /BIC/ZABOOKID ASCENDING.  
           LOOP AT ITEM_TABLE.
            AT NEW /BIC/ZABOOKID.
            GV_FLAG = 'X'.
            ENDAT.
           ENDLOOP.
    if abort is not equal zero, the update process will be canceled
      ABORT = 0.
    How can I read intern table ITEM_TABLE in a update rule?
    And will gv_flag be still available in update rule?
    thanx
    hiza
    Message was edited by:
            Hiza
    Message was edited by:
            Hiza

    Hi,
    I am just giving you a sample code which I had used
    just try to read this will help you
    PROGRAM UPDATE_ROUTINE.
    $$ begin of global - insert your declaration only below this line  -
    TABLES: ...
    DATA:   ...
    $$ end of global - insert your declaration only before this line   -
    The follow definition is new in the BW3.x
    TYPES:
      BEGIN OF DATA_PACKAGE_STRUCTURE.
         INCLUDE STRUCTURE /BIC/CSZRINF001.
    TYPES:
         RECNO   LIKE sy-tabix,
      END OF DATA_PACKAGE_STRUCTURE.
    DATA:
      DATA_PACKAGE TYPE STANDARD TABLE OF DATA_PACKAGE_STRUCTURE
           WITH HEADER LINE
           WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
    FORM startup
      TABLES   MONITOR STRUCTURE RSMONITOR "user defined monitoring
               MONITOR_RECNO STRUCTURE RSMONITORS " monitoring with record n
               DATA_PACKAGE STRUCTURE DATA_PACKAGE
      USING    RECORD_ALL LIKE SY-TABIX
               SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
      CHANGING ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
    $$ begin of routine - insert your code only below this line        -
    fill the internal tables "MONITOR" and/or "MONITOR_RECNO",
    to make monitor entries
    break-point.loop at DATA_PACKAGE.if DATA_PACKAGE-/BIC/ZREMPID GE 5.delete DATA_PACKAGE.endif.endloop.
    if abort is not equal zero, the update process will be canceled
      ABORT = 0.
    $$ end of routine - insert your code only before this line         -
    Regards
    Rahul

  • Need help in Update rule coding - URGENT

    Hi Gurus,
              I am creating an update rule there i need to compare some filed with the fields in inforsouce so here what should be the name used for the infosource can i use something like this
    read table TAB where
          <fields1>       =  DATA_PACKAGE-<field1>.
    where DATA_PACKAGE is the infosource
    is this the rite method
    waiting for reply
    Ravi

    Hi,
    Use this in Update Routine.
    IF COMM_STRUCTURE-field1 = 'value1' AND
    COMM_STRUCTURE-field2 = 'value2'.
    RESULT=field3*100.
    ELSE.
    RESULT=field*10.
    END IF.
    here field name will be in format of :     /bic/fieldname
    Regards,
    rik

  • Return tables in Routines used in an Update Rule

    I previously had a routine configured as an update method in an Update Rule.  On the configuration screen where I specified the Routine name, I checked "Return Table". 
    Now I've deleted this Routine and I am using the Source Key Figure as the Update Method.  However the "Return Table" box is still checked and if I uncheck it, it goes back to "Checked" status as soon as i scroll to the next key figure and then back to the original key figure. 
    While this doesnt sound like too serious a problem, I think it's causing my Update rules to fail during activation with the message, The field "RESULT" is unknown, but there is a fiel rows 1698."  (SAP typo, not mine).
    Following the suggestions in the Help for this error do not work either.  When I try to choose Extras -> Display Activated Program, I receive a second message "Unable to find a tool to process the request".
    Can anyone help?

    Wardell,
    sounds like a bug to me. Open a message to SAP support to get a fix.
    Regards,
    Marc
    SAP NetWeaver RIG

Maybe you are looking for

  • How to replace curved apostrophe with straight apostrophe?

    How do I search/replace for curved apostrophe to straight apostrophe? How do I search/replace for curved open and close quotes to straight quotes? I have smart quotes turned off (which turns ON curved apostrophe). The source material was copied and p

  • How can i find out my apple id that i installed mavericks with?

    how can i find out my apple id that i installed mavericks with? None onf my apps are opening. The guy at the apple store told me to reinstall my OS. I cant reinstall without my apple id and all the ids that I thought it was dont seem to work.

  • Optimal Ethernet Network for FCS Usage

    Hi I recently purchased a G5 Dual 1.8 G5 PCI-X. I also have a G4 QuickSilver 867 with an upgraded processor (Sonnet 1.8 Ghz). According to the specs, they both have Gigabit Ethernet built in. My question is this.... To maximize the transfer of files,

  • Completely appalled by Adobe

    I have worked for a year to develop an app and published it to the Apple Store using InDesign and DPS.  This week I created alternate layouts for Android.  I have everything set up to publish to Google Play.  When I went to publish it using DPS I fou

  • How to use "Esc" key to call a function in scripting

    I mean when I'm executing a script,if I want break a loop, I can just press the "Esc" key.I think this is very handly.But I also want to call a function when "Esc" is pressed,is this possible, and how can I do this?