Restricting data in cube using start routine

Hi,
Can anyone help me with my scenariou2026.I am trying to restrict the absence data being loaded into the cube where the absence is less than or equal to twenty.
Firstly I put in a start routine in the update rules against actual time.
DELETER DATA_PACKAGE WHERE  DUR_ACTUAL GT 20
But this didnu2019t work.
Secondly I put this code in the change routine for the key figure actual time
IF RESULT GT 20.
  RETURNCODE = 1.
ELSE.
  RETURNCODE = 0.
ENDIF.
But all the actual time fields were set to 0.
Can anyone please help with the correct code.
Thanks
Forhad

It is hard to say without debugging your code, and inspecting the input package.  Maybe you just need quotes around your values, or something simple like that.
But did you know that it is faster to put a filter in a DTP?  Using a filter, you're pushing the criteria down to the SQL WHERE clause, and limiting the amount of data.
And, you're eliminating the need for ABAP.
Sorry, if you're not on BI7, disregard, because you don't have DTPs.
Edited by: Jerry Coleman on Jan 29, 2009 10:05 AM

Similar Messages

  • How to set request number of info package using start routine

    Hi All,
    I have a specific requirement in which I need to upload only selective request nos from PSA to DSO.
    Any one can suggest how to set request number of info package using start routine or any other mode so that only selective request should proceed using DTP?
    Thanks
    Sangita

    You'll probably want to do this in a start routine.  It is probably not advisable to hard-code the technical name of the InfoPak.  They seem to remain the same upon transport, unlike DTP technical names which are locally generated.
    I would do a SQL select like this in a start routine, and then filter based on the results of the SQL.  You'll probably want to sort the results by date and time, both descending.  Or do a MAX in the SQL.
    Please let me know if this isn't clear.
    select q~rnr q~logdpid q~tdatum q~tuzeit
    from rsreqdone as q
      inner join rsldpio as p
        on p~logdpid = q~logdpid
    where p~objvers = 'A'
    and p~logdpid like 'ZPAK%'
    and p~source = 'your data source'

  • Filter data in transfer rules using start routine

    Hi all!
    I am an absolute newbie here, but I have a question regarding start routines and I noticed many questions get solved around here. My situation is the following: I have to create a start routine where the data to be transferred is filtered on an attribute "DESTINAT" in info object "0BILL_TYPE". DESTINAT can be 'M' or 'D' and depending on that letter, data must flow to a separate ODS.
    Well,I came up with the following:
    somewhere in my start routing I guess I'll have to put:
    loop at data_pak.
    DELETE DATAPAK Where DESTINAT = 'D'
    endloop.
    When I place this in my start routine of my transfer rules leading to the ODS where data must be of DESTINAT type 'M', will this do the trick?
    I want to put the following code in the transfer rules leading to my other ODS, where data must be of type DESTINAT = 'D':
    loop at data_pak.
    DELETE DATAPAK Where DESTINAT = 'M'
    endloop.
    I'm sorry that this is a very basic question, but like I said: I'm a newbie in SAP...

    hi Joris,
    have a lok at the foll  help docs.:
    http://help.sap.com/saphelp_nw04/helpdata/en/b3/0ef3e8396111d5b2e80050da4c74dc/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/21/894eeee0b911d4b2d90050da4c74dc/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/80/1a62bfe07211d2acb80000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/e3/732c42be6fde2ce10000000a1550b0/content.htm
    cheers
    shameem

  • How to use Start Routine for this requirement

    Hello,
    I am having data in 2 ods and should load that data into cube, but there isn't any common object in both the ods's. I need to analyze based on these ods objects. so I thought of pulling some objects into 1ods which are used for analysis and added some objects to ods and cube. Now I have to write a start routine in update rules to fetch the data from the info objects which are present in another ods. Can any one help me in this?
    Rajesh.

    Hi Surya,
    Extract all info from table BKPF
    select * into it_bkpf
    from bkpf
    where gjahr = p_fisyr.
    Select record based on internal table it_BKPF
    The reason why FOR ALL ENTRIES syntax is used because of its cluster table.
    select * into it_bseg
    from bseg
    for all entries in it_bkpf
    where bukrs = it_bkpf-bukrs
    and belnr = it_bkpf-belnr.
    Delete duplicate record based on Company Code and GL No.
    delete adjacent duplicates from it_bseg
         comparing bukrs belnr.

  • How do i get at the data in the data package of the start routine

    I have some very simple code in my start routine but it says data-package is not a table but it is SAP code that defines it this way.  here is my code
    SELECT DOC_NUM S_ORD_ITM CH_ON CREATEDON INTO TABLE T_ORD_BKG_DATA
    FROM DATA_PACKAGE.

    Hi,
    The data package is not a DB table, but an internal table.
    You will have to use a LOOP statement to get at all data :
        LOOP AT SOURCE_PACKAGE INTO w_SOURCE_PACKAGE.
          IF w_SOURCE_PACKAGE-myField = '98'.
          something to do
          ENDIF.
        ENDLOOP. " SOURCE_PACKAGE
    Hope that helps.
    Dieu

  • Unable to load the data into Cube Using DTP in the quality system

    Hi,
    I am unable to load the data from PSA to Cube using DTP in the quality system for the first time
    I am getting the error like" Data package processing terminated" and "Source TRCS 2LIS_17_NOTIF is not allowed".
    Please suggest .
    Thanks,
    Satyaprasad

    Hi,
    Some Infoobjects are missing while collecting the transport.
    I collected those objects and transported ,now its working fine.
    Many Thanks to all
    Regards,
    Satyaprasad

  • Update two ODS using Start routine

    Hi Experts,
    I have two DSOs, One for 0MATERIAL_ATTR and another for 0MAT_SALES_ATTR. My requirement is to write a start routine while updating to YMAT_SALES_ATTR DSO which has a reference of Material from the YMAT_ATTR DSO. The material DSO is already loaded.
    I have a written the Start routine for it. Now I have to Load the Materials to another Error DSO(YSALES_ERR) when the reference is not found. I have to rewirite the same start routine to update another DSO with the above condition.
    I would appreciate some help.
    Thanks,
    Seema

    Hi Brian,
    The Data is already in the first DSO layer where it just acts as a Passthrough. The scenario here is the Material master data and  Materials with sales master data are loaded to the first layer . Then the Materials are loaded to the second layer. We must load the Material sales to the second layer only when it has reference  to  Material(2nd layer) . I have written the Start routine. But still the start routine misses to catch the bad ones.
    Please help me with the code..
    Thanks,
    Seema

  • Delete Requests of a Cube using ABAP routine

    I have written a ABAP code to get all the requests of a cube. Now I want to delete all the requests which are older than 1 year through this ABAP routine. Please help.
    REPORT ZTEST3.
    TYPE-pools RSSM.
    DATA: i_infocube like rsmonicdp-icube.
    TYPES: l_req TYPE RSSM_T_PART.
    DATA: li_req TYPE l_req.
    CALL FUNCTION 'RSSM_ICUBE_REQUESTS_GET'                
    EXPORTING
    i_infocube = 'ZCOPCBC02'
    IMPORTING
    e_t_request = li_req.

    Maybe this might help :
    Delete multiple requests from DSO using RSMONICDP table

  • Problem with data in cube using info source

    Hi,
    I have a problem while loading data using IS -  2LIS_11_VAITM. In the cube its not showing any data even though i deleted and filled the setup tables in R3. In RSA3, its showing 1000 records but only 0 values in Cube.
    I created transformations and DTP. Data comes upto psa.
    Can anyone send me complete LO steps in detail for bi7 both R3 side and bw side upto cube. I need to use multiple LO extractors.
    Thnx

    Hi Reddy,
    I believe that ur compounded objects also holds the proper mapping in the transformantion!!
    Please cross verify ur existing data considering that the combination of the both the compounded objects and ur 0PLAN_NODE. I hope this is the one which is causing issues in ur DSO.
    Check the data once with the combinations.
    thanks
    Hope this helps

  • Remove Blanks by using start routine

    InfoObject A: lengh 12 char  Conversion routine = blank
    InfoObject B: Lengh 15 char Conversion routine = blank
    The source file Item.csv contain 10 blanks for InfoObject A, for example "          02"
    and 12 blanks for InfoObject B. "            898"
    Is any way to remove those blanks? Thanks!

    How about this...
    Global Declarations
    CONSTANTS: c_gbp(3)  TYPE c VALUE 'GBP',
               c_rub(3)  TYPE c VALUE 'RUB',
               c_teru(4) TYPE c VALUE 'TERU'.
    DATA: t_tcurr        TYPE HASHED TABLE OF tcurr
                         WITH UNIQUE KEY mandt kurst fcurr tcurr gdatu,
          wa_tcurr       TYPE tcurr,
          l_datc(8)      TYPE c.
    Routine
    LOOP AT source_package
      ASSIGNING <source_fields>.
      CONVERT DATE <source_fields>-posting_date
        INTO INVERTED-DATE l_datc.                                 "Converts Posting Date into 9s Complement Date
      SELECT SINGLE
      FROM
        tcurr
      INTO
        wa_tcurr
      WHERE
        kurst EQ c_teru
        AND fcurr EQ c_gbp
        AND tcurr EQ c_rub
        AND gdatu GE l_datc.
      IF sy-subrc EQ 0.
        <source_fields>-amount_b = <source_fields>-amount_a * wa_tcurr-ukurs.
      ENDIF.
    ENDLOOP.

  • Need to run start routine only once

    I understand that for every data package from ODS to Cube, the start routine is run.  But I need to run it only once.  Is there anyway to achieve this?  As the programming logic doesn't really do anything to the data package, I don't need it to be in the start routine.  But as I populate a database table using that routine, which in turn is used in update routines, I need to kick it off before the load from ODS to cube happens.  I think an ABAP routine variant can be kicked off in process chains.  Did anyone use the variant and know how to kick off the routine?  Do I have to write this logic in a function module and then kick it off using ABAP variant in Process chains? 
    I would prefer a way to limit my start routine to run once for every data load rather than kicking it off through process chain.  Can someone discuss which is a good approach and how I go about it?  Thanks for your inputs.
    Sam

    Hi Sameer,
    Let me recap you req. You want to populate a database table in your start routine and need to do it once for a load.
    There is no possible way to limit the no. of times a Start routine is run, but you can find some worksaround.
    Is there anyway you can identify that your DB table is updated with new records, i.e.
    1> You delete and refill table every time
    2> You have some kind of time stamps.
    If one of the above case is true, then you can use that as a check in the Start routine to limit the no. of times the DB table is being populated.
    Regards,
    Sree

  • (BW) Run the Start Routine Only Once

    I understand that for every data package from ODS to Cube, the start routine is run.  But I need to run it only once.  Is there anyway to achieve this in ABAP?

    I once had that same requirement, but in a datasource in R3. I'm not sure if the same solution would work in BW, though. I used a memory id to keep the variable value between packets:
    DATA: ... n_globalvar TYPE n ...
    then I added...
    IMPORT n_globalvar FROM MEMORY ID 'ZMEMID01'.
    ...at the start of the routine to retrieve to the variable the value from the memory id.
    At the end of the code, I exported the variable back to the same memory id...
    EXPORT n_globalvar to MEMORY ID 'ZMEMID01'.

  • Can any one explain me abt start routine and transfer routine with example?

    Hi all,
    Can anyone explaing me the use of start routine and update routines with an real time example.
    regds
    hari

    Hi
    Start routine is at a datapackage level and u generally use select statement and delete state ment
    transfer routine is at a data source level.
    for ex i have an 3 ODS (X,Y,Z) and one DS D and one Infosoure I and a cube C
    flow is DS -
    >IS-->ODS's(X,Y,Z)---> and cube C from ODS X, ODS Y,ODS Z
    Transfer Routine:If u write any routine in IS it will be applicable to all the the ODS's when u load data becuase it is at the DS level
    start routine: now if u write a start routine betwn ODS X and  a cube it will be applicable only for the Update rule betwn ODS X and a cube it wont affect the Update rules betwn OD Y and cube or ODS Z and the cube becuase start routine is at a datapackage level
    Transfer routine is in the IS
    hope this is helpful asssingn points if applicable
    thanks
    puneet

  • Diff between the Start routine and Update rules?

    Hi Gurus
    Diff between the Start routine and Update rules?
    Thanks in advance
    Raj

    Hi,
    Routines are like conditions or business rules that could be applied to filter the data while entering the BW system or could be used to apply certain conditions on the info objects itself.Update rule level you manipulate your data and  write your start routine.
    There are 4 types of routines
    1. Start routine- Could be used at two levels (transfer rule level and the Update rule level)
    This Start routine written at the transfer rule level helps filter the necessary data coming from the source system.
    For Example: If you decide to extract data that contain only quantity greater than 500 , then you could specify the Start rouitne to achieve this.
    The Start routine at the Update rule level provides similar functionality but at this point it helps direct specific data to 
    different data targets.  For Example: If there 3 data targets being fed from the Infosource, you may want to apply some condition to each data target, like send year 2000 data ti Data target1, 2001 to data target 2 and so on.  This can be achieved by using Start routine at the Update rule level
    2. Transfer Routine: This feature is available at the transfer rule levels
    While performing the transfer rules operation, there are 4 features available to the developers to create business rules on top pf the Infoobjects.
    1. You could do a one to one mappping of the Infoobject
    2. Provide a constant value
    3. Include a formula
    4. Write an ABAP routine.
    These 4 options refers to the transfer routine
    3. Update Routine:
    The limitations of just having 4 options in the transfer routine is overcome at the update rule level. There are various other 
    sophisticated features avaialable apart from the 4 options mentioned above. These business rules could be specified pertaining to each data target.
    4. Conversion Routine: It provides functionality to do Currency and unit conversion.
    Regards.

  • Not able to debug the start routine

    Dear All,
    I am facing a weired situation.
    I have a transformation(DSO -> Cube) with start routine. I am able to debug the routine in Development System.
    I transported the routine to Production System successfuly, but i am not able to debug the start routine there. I have all the necessary authorisations(SAP_ALL, SAP_NEW)
    I am perplexed. Never seen such issue before.
    Can someone help me here?
    Regards,
    Avinash.
    Edited by: Avinash Kumar on Nov 5, 2008 11:16 AM

    Dear Jerry,
    Thanks for writing.
    I followed the instruction, but it didn't work.
    Can there be any technical reason for data package to be empty, even if the source has data(Note: There is no filter in DTP)?
    Also, i just checked with other start routines...I am not able to debugg there also. System is not entering the debug mode.
    Here, the patch level is: 0010. Can this be the villain?
    Please advise.
    Regards,
    Avinash.
    Edited by: Avinash Kumar on Nov 6, 2008 4:26 AM
    Edited by: Avinash Kumar on Nov 6, 2008 4:51 AM

Maybe you are looking for

  • Using SQL Model Clause

    Version SQL> select *   2  from v$version; BANNER Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi PL/SQL Release 10.2.0.4.0 - Production CORE     10.2.0.4.0     Production TNS for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Produc

  • Need help with applescript and Xcode 4.3.2

    I'm trying to write my first application that will involve a GUI. I can code applescript using script editor with a bit of effort, but I'm want to have users input more than one piece of information in the pop up. So, I download xcode, create my firs

  • Why the micro usb cable doesn't come in the box

    When I bought the apple tv the only this that came in the box was the power conector the remote and the apple tv, I been using my apple tv for month or maybe a year and never had a problem, but today when i wake up and tried to turn on the apple tv,

  • How to Merge Cells in a JTable?

    First, a brief background. I have a 1.3.1 Swing application, and have a custom table framework that is extended from Swing. My table model manages row classes. Each row class has its own collection of renderers and editors. Renderers and editors are

  • Weblogic embedded ldap

    can someone please confirm - can the embedded ldap server within weblogic handle password policies like min length, max expiry etc... I can't believe that it can't do things like this which seem fundamental to any security set-up. If it doesn't can a