Advanced Update Rules

Is it possible to have an update rule that, when loading data from the PSA into my ODS, will create multiple entries in the ODS? 
For example; I'm loading a flat file with some sales data.  In the flat file is a PERIOD and an indicator for period TYPE (ie: Monthly or Quarterly).  If the period is flagged as 'monthly' then I want the record to be loaded exactly as it is into the ODS.  If the period is flagged as 'quarterly' then I want to create 2 more records on the fly and divide the sales amount into the 3 total records.  Is this possible using update rules to create multiple records instead of simply one-to-one?
Thanks!

Hi Patrick,
   This is very much possible, You can write code in update rules start routine.
Sample Code:
Data : Lt_data_package like Data_Package accours 0 with header line.
Loop at Data_Package into lt_data_package where indicator = Month.
Endloop.
--> Now you are having all Monthl indicator records in Lt_data_package. Now delete from Data_Package.
Delete data_package where indicator = month.
-->Now process the remaining records in data_package.
Loop at data_pacakge.
-->> here you have to derive months from quater.
lt_data_package-<Total> = data_package-<Total>/3
lt_data_package-<month> = data_package-<Month 3>.
Append lt_data_package.
lt_data_package-<Total> = data_package-<Total>/3
lt_data_package-<month> = data_package-<Month 3>.
Append lt_data_package.
lt_data_package-<Total> = data_package-<total>/3
lt_data_package-<month> = data_package-<Month 3>.
Append lt_data_package.
Endloop.
-->>Now clear the contents of Data_Package.
Refresh data_package.
-->> Pust records form lt_data_package to data_package.
Insert lt_data_package from line 1 to data_package.
Hope it Helps
Srini

Similar Messages

  • Advanced Update Rules Routine

    I have a routine in my update rule that performs a lookup to another ODS.  To improve my performance I would like to try writing a temporary variable to memory that can then be referenced when loading each record.  For example here's some pseudo code:
    1) if vendor already exists then do nothing
    2) set AP key and set Purchasing key for performing lookups
    (ie: AP key = Company Code + FiscalYearPeriod + AccountingDocumentNumber)
    (ie: Purchasing key = Company Code + FiscalYearPeriod + PurchasingDocumentNumber)
    3) does temporary AP variable exist and does it match AP key?
         3a) if yes then EXIT and return temporary AP variable
         3b) if no then perform ap lookup based on AP key
         3c) was lookup successful - was vendor found?
    if yes then set temporary AP variable and EXIT and return value
    if no then continue
    4) does temporary Purchasing variable exist and does it match Purchasing key?
         4a) if yes then EXIT and return temporary Purchasing variable
         4b) if no then perform purchasing lookup based on Purchasing key
         4c) was lookup successful - was vendor found?
    if yes then set temporary Purchasing variable and EXIT and return value
    if no then EXIT (Do nothing - essentially leave blank)
    My question is 1) Whether it's indeed possible to pass this temporary variable and 2) can you give me a sample of code that I would use to read/write the variable?
    Thanks so much!

    You can use Import/Export to cluster database. This way you can share the same variable value between different programs/routine.
    EXPORT value TO DATABASE INDX(Indx) ID 'Variable Id'.
    IMPORT value FROM DATABASE INDX(Indx) ID 'Variable Id'.
    For more details you can refer the following:
    http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3c53358411d1829f0000e829fbfe/frameset.htm
    Regards,
    RB

  • Is it possible to update the human task payload without using worklist API but only using advance routing rule.

    Hi,
    I have one human tasks in BPEL process in which i am using different stages and with using advance routing rules i am routing my task payload to one stage to another.My payload has Task Status and Branch,after approving the human task from first stage I want to send modified value of the Task Status to the next stage without using worklist API or manual updation but only using the advance routing rules,is it possible ??? If anyone have any idea about this than please enlight me with your valuable solutions and  advices...
    Thanx
    Regards
    Ajral

    Hi SamGoe,
    According to your description, my understanding is that you want to update the PoerPoint slide from SharePoint 2010 slide library automatically.
    It seems to be not necessary to use Macros. SharePoint provides an OOB way to notify you to check for update to the slide library slides when you open the presentation. PowerPoint does this because you selected the option
    Tell me when this slide changes when you copied the slides from the library.
    More information, please refer to the link below:
    http://office.microsoft.com/en-us/powerpoint-help/sharepoint-slide-libraries-ii-use-slides-in-the-library-RZ010254089.aspx?section=6
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • Can not view update rules on production BW server

    This can be quite a time-consuming problem as I can't always tell if the latest update rules are successfully transported to production. 
    Most every where else in production I can choose to DISPLAY however this is not the case with update rules only.
    Is this a typical setting for most companies?  Can I turn off this setting so I can at least DISPLAY the update rules?

    hi,
    as far as I know you can only see any rules (transfer, update etc.) in BW in change mode.
    if you know where to change this setting (i.e. to see rules) - do it
    you only have to remember to change it on dev and transport.
    Regards,
    Andrzej
    ps. work around would be to debugg it with simulate data package processing, how to do this?
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/biw/advanced sap bw data transformation
    page 12
    Message was edited by: Andrzej Krysiuk

  • Fields missing in Update rules

    I am creating snap shot DSO for inventory management and after that i created the update rules for it linking it to the info source 2LIS_03_BX. When i do this i am missing the info objects that i created to include in the DSO. How do i solve this issue as those info objects are very important and i have to create the routines for it.
    I have got the units for those fields and they are mapped but the info objects itself are missing.
    Thanks for any help in advance
    Naveen

    HI Naveen,
    Yes, you can include the missing infoobject in DSO. for that you need to follow bellow steps:
    a). Delete the data from DSO.
    b). you have to include the infoobject in DSO.
          Double click on  DSO>select chage mode->select keyfield /data field node--->right click select Infoobject Direct Input.
    c). Activate the DSO
    Brief Description about 2LIS_03_BX :
    The 2LIS_03_BX is used to extract an opening stock balance on a detailed level (material, plant, storage location and so on). At this moment, the opening stock is the operative stock in the source system. "At this moment" is the point in time at which the statistical setup ran for infosource 2LIS_03_BX.Loading the opening stock balance InfoSource 2LIS_03_BX into data target.In the InfoPackage, choose the upload mode u201CCreate opening balanceu201D.
    Regards,
    Suman.

  • 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

  • ABAP Runtime error while activating Update rules.

    Hi Gurus,
    Actually we are in NW 2004's SP9.
    While activating the update rules of cube "0PY_PPC01" it is going to ABAP runtime error. It is giving the key words like "MESSAGE_TYPE_X"
    "%_T005K2" or "INSTANTIATE". And i apply NOTEs also i am unable to fix it.
    Can any one give  correct NOTE number that can fix it or any suggestions.
    Thanks in advance.
    Thanks
    Raju.k

    Hi Sven,
    Now we are also in SP11, But the thing is all the other UR are working fine Except
    this UR. Even there is no perticular NOTE number for this.
    Thanks
    Raju.k

  • Activating Update Rules in BW Production Systems? How

    Hi all...
    How do we activate Update rules in Production systems?
    As we dont have the activate button high lighted in update rules.
    Urgent.
    Thansk in Advance.

    Hi,
    Since the production system is not chnagable you will will not get the activate button. you can only see the updaterules in display mode.
    You should activate the update rule in the Dev environment and capture the same in a transportable request and transport the same to Production environment.
    If it is very urgent and the transport from Dev would take time. You can as the basis to open the productyion client from tcode scc4, once the procuction client is open you will be able to activate the update rules in production system itself.
    assign points if useful
    regards
    Venkata Devaraj

  • How to calculate the runntime of a routine in an update rule

    I'm facing a performance problem with the loading of an ODS.  After some analysis I'm almost sure that the problem is due two routines (in the update rule) that are looking into master data tables 200.000 times ( quantity of records loaded every day).  But before moving that logic back into the extractor I need to be sure that the runntime will be reduced.  Is there any way to obtain the amount of time spent by those routines?.  I have been checking into the transactions ST03N and STAD but I'm not able to find this information.
    Thank you very much in advance.
    My best regards.
    Pablo Mazzucchi

    Hi,
    For performance problem you can try to get the look data in an internal table at start routine and use them and read for the fields you need which will help you in decreasing the run time vs hitting the database direclty for getting the look up information.
    This will bring you a noticable change in run time of data load.
    Lets wait if some other has routines to get run time of the routine
    Thanks,
    Arun.

  • Transporting Update Rules

    Hi,
    I am transporting update rules for a Cube.
    The InfoSource has been generated from a DSO and created update rules to the above said Cube.
    In the transports I am getting the below error.
    Start of the after-import method RS_UPDR_AFTER_IMPORT for object type(s) UPDR (Activation Mode)     
    Update rules 46H2HBH6BRHP9R29L0XREHQP3 read in version M                                            
    Update rules 46HK9D48LBRIH89ZBZVTZERTZ read in version M                                            
    Error when activating update rule 46H2HBH6BRHP9R29L0XREHQP3                                         
    Activation of the update rules for ZICUBE01 8ZDSO1                                              
    IC=ZICUBE01  IS=8ZDSO1 error when checking the update rules                                       
    Error when activating update rule 46HK9D48LBRIH89ZBZVTZERTZ                                         
    Activation of the update rules for ZICUBE04 8ZDSO04                                               
    IC=ZICUBE04  IS=8ZDSO04 error when checking the update rules                                       
    The InfoCube(It is already there in Q apd P) has been locked in a different user transport as he added a field to it and not yet transported.
    Is this the problem?
    Thans in advance..
    Message was edited by:
            Indira SR

    Hi indira,
    make neccessary changes to the request if u created earlier i.e u can delete the original request or change the discrption to "Dont delete" and release it, if u unable to delete each task in that particular request.
    Second step is activate all the infosources and cubes and Update rules.
    Then create transport request individually i.e One for IS and One IC and another for Update rules..It would be easier to trace in case of any error.
    Release the requests 4m DEV, and important thing is import these requests in Q or P in hierachiel manner i.e
    1. IS
    2. IC
    and the Update rules request.

  • Error in the update rules

    Hi All,
       I added a BUOM Unit for a keyfigure and activated the cube.While I am activating the update rules it shows the error message unit for the Keyfigure is not recognized in the update rules . Kindly let me Know what i need to do for this error.
    Thanks In Advance...
    Raghu

    Hi,
    Make sure that the mapping for the unit of your KF is also selected in update rule.
    With rgds,
    Anil Kumar Sharma .P

  • Error when transpotring Update Rules

    Dear colleagues.
      When transporting an update Rules into our Quality enviroment the system pops up the following error:
    IC=ZWEPP_C02 IS=ZWE_BOM_RMX_IS syntax error:  rows 0.
    I've verified the Update Rules on the Quality System and everything is correct but it remains inactive due to the transport fails.
    I would appreciate your feedback.
    Thanks in advance.

    Dear khaja.
      I send you the transport log as well as the Return Code.
    Error when activating update rule 5MYASZMBOIQZSRR60674OBKJ3
    IC=ZWEPP_C02 IS=ZWE_BOM_RMX_IS error when generating InfoCube Update program
    IC=ZWEPP_C02 IS=ZWE_BOM_RMX_IS syntax error:   rows 0 (When generating the update program for data target ZWEPP_C02, InfoSource ZWE_BOM_RMX_IS, a syntax error occured in row 0.  Message no. RSAU466)
    Errors occurred during post-handling RS_AFTER_IMPORT for ROUT L
    Please, let me know if you need anything else.
    Thanks.

  • ASSERTION FAILED error while migrating update rules

    Hi all,
    We are migrating the 3.x datasource for sd - lo cockpit.
    Migration steps are as follows...
    1. Make a copy of the infosouce. Activate it.
    2. Migrate transfer rules. Activate it.
    3. Migrate datasource.
    4. Migrate Update rules for the respective info providers.
          But while migrating update rules  ASSERTION_FAILED runtime error occurs.
           the assert condition was violated.
           CL_RSTRAN_TEMPLATE========CP or CL_RSTRAN_TEMPLATE======CM003
    Please help i tried all the means to rectify but none succeds.
    It is occuring for each datasource .
    Thanks in advance.
    aravind

    Hello
    Assertion statement is like a conditional break point in ABAP. When you are trying to migrate the update rules,it is failing with Assertion statement it means there is some error with your update rules. Either the mapping is wrong or the the target to which it is mapped is in inactive state. Please check these and retry your migration.
    Regards,
    Krishna Tangudu

  • DSO error while creating update rules

    Hi All,
              i am new to BI 7.0 , while creating update rules for datastore object , i have given the infosource name, and tried to activate it, then i got the error,
    ERROR:  infoobject 0recordmode is missing from the infosourse
    Can any one help, points are assured for the suggestions
    Thanks in advance
    Peddinti

    Hi,
      Add 0recordmode info object to your info source and again try to create DTP, 0recordmode is requried in DSO to keep data with history.(like before image,after image,etc), by adding this you dont have any problem, at the time of creating info source itself system will prompt you that this info object is missing do you want to add here say yes.
    Regards
    Sankar

  • How to debug start routines of update rules from ODS to InfoCube

    Dear gurus,
      I have an update rule from ODS to InfoCube. I wrote a start routine in the update rule. Now I want to debug it. I went to monitor and simulate update the data package and only got the prompt "No data exists in the corresponding PSA table". So how can I debug this start routine?
      Thanks in advance.
    Jin Ming

    Jin,
    In order to use PSA between ODS and InfoCube, you may have to use an exclusive InfoPackage and load separately. In that InfoPackage, choose the radio button to use a PSA.
    I think you are currently updating the InfoCube directly without using a separate InfoPackage.
    Look for an InfoSource under DataMarts (search for 8<ODS Technical name>) and create your InfoPackage there.
    Good luck.

Maybe you are looking for

  • CS4 Bridge not interfacing with Photoshop.

    I am evaluating the new Photoshop CS4 (it is purchased copy and not running on the 30 day trial) and have run into a problem in using Bridge CS4. I am able to open an image using Photoshop's File Open command BUT when I attempt to do so in Bridge I g

  • BAPI_DOCUMENT_SETSTATUS for mass release of documents

    Dear Expert,                   I am using BAPI_DOCUMENT_SETSTATUS for mass release of documents, but when i am trying to release document getting error saying u201CDocument does not exist" but when go to CV03N i can see that document. Regards Bhuwan

  • RGB Color in SMARTFORM

    Hi experts, In transaction smartstyles, i can colour the font i use in smartforms. However i can only use the colors in the palette. Can in define a Custom Color, indicating the RGB coordenates? Thanks in advance. Valter Oliveira.

  • Error code MM#5

    hi there i am wondering if anyone can help me i recently unblocked my blackberry 8900 handset to enable the wide range of networks available however when i now put my 02 sim card into the handset it shws the network as o2:uk and also pick up full sig

  • Problem w/ Case Statement and Video Capture

    Hey! I've got a question about a topic which seems pretty trivial, but has been giving me quite the trouble for some time now. I was hoping that someone on this forum would be able to help me catch and fix my mistake. Basically what I'm trying to do