Partitioning for Performance

Hi All,
Currently we have a STAR Schema with ORDER_FACT and ORDER_HEADER_DIM , ORDER_LINE_DIM, STORE_DIM, TIME_DIM and PRODUCT_DIM.
We are planning to partition ORDER_FACT for performance improvements both reporting and loading. We have around 100 million rows in ORDER_FACT. Daily we inserted around 1 million rows and update around 2 million rows.
We are trying to come up with some good stratgies and we have few questions..
1) Our ORDER_FACT does not have any date columns except INSERT_DATE and LAST_UPDATE_DATE , more of timestamp columns. ORDER_DATE would be the appropriate one but we do not store it in fact. We have ORDER_DATE_KEY which is surrogatekey of TIME_DIM.
Can a range partition (monthly) still be performed ? ( I quess we need a ORDER_DATE column in our fact )
If somebody has handled this situation in some other way , any guidance will be helpful.
2) Question below is assuming - we have a partitioned ORDER_FACT on ORDER_DATE.
Currently we are doing a merge (Update/Insert) on ORDER_FACT. We have a incremental load (only newly inserted or updated rows from source) are processed.
Update/Insert is slow.
Can we use PEL (Partition Enabled loading ) and avoid merge (Update/Insert) ?
PEL is fine for new rows , since it replaces empty partition in target with a loaded partition from source . How to handle updation and insertion of rows in partition which has existing rows?
Any help on these would be helpful.
Thanks,
Samurai.

Speaking from our experience, at some point you need to build your fact rows so you need an insert/update prior to PEL anyway, and you would need your partitions closely matched to your refresh frequency for it really to be effective.
So what we have done is focus on the "E" part of ETL.
Our remote source database is mirrored on our side via Streams. This mirrors into a local copy that we can run various reports/ processes/ queries against without impacting production.
We also perform a custom aply that populates a second local copy of the tables, but these ones are partitioned daily and are used for our ETL. So, at the end of the day we have a partitioned set of data that contains only the current status of rows that have changed over the day. Now, of course, this is problematic for ETL because you need to have all of the associated information with those changes in order to do your ETL.
(simple example, data in a customer's address record changes. Your ETL query undoubtably joins the customer record and the address record to build your customer dimension row. But Streams only propogates the changed address record so you wouldn't have the customer record in that daily partition for your join)
So, we have a process that runs after the Streams aply is finished that walks the dependency tree and populates all dependant data into the current daily partition, so - at the end of our prep process we have a partitioned set of data that holds a complete set of source tables where anything has changed across any dependencies.
This gives us a small, efficient daily data set to run our ETL queries against.
The final piece of the puzzle is that we access this segment via synonyms, and the synonyms are pointed at this day's partition. We have a control structure that manages the list of partitions and repoints the synonyms prior to running the ETL. The partition loading and the ETL synonym pointing are completely decoupled so, for example, if we ever needed to suspend our ETL to get a code fix in place we can let the partition loading move ahead for a day or two and then play catchup loading the partitions in sequence and be confident that we have each end-of-day picture there to use.
By running our ETL against only the changed data, we acheive huge efficiencies in query performance. And by managing the ETL partitions, we don't incur the space costs of a second full copy of the source as we prune out the partitions once we are satisfied with the load at the end of a month (with full backups of course in case there is ever a huge problem to go back and correct).
Now for facts, of course, we expect these to be insert only. Facts shouldn't change. For dimensions we use set based fail over to row based (target only), with a couple specified to be Row Based Target Only as they are simply too large to ever complete in Set Based Mode.
Yes, this is a bit of a convoluted process - exacerbated by our need to have a full local copy for some reporting needs and the partitioned change copy for the datamart ETL, but at the end of the day it all works and works well with properly designed control mechanisms.
Cheers,
Mike

Similar Messages

  • Own partition for osx - difference in performance?

    hi folks.
    just finished to import my files from a powermac G5 (10.5.11) to my new macbookpro i5 2,3 GHz 4 MB RAM via migration assistant. on my G5 i had only one main partition where i had my osx, my pictures, mp3 and so on.  total amount about 230 GB. everything looks pretty fine on my mbp.
    now. i have one big 230 GB partiton on my mbp.
    will it make any difference performance wise if giving my osx (and the main used programms?!?!!)  10.6.7 on my mbp i5   it´s own partition and create a second partition for pictures, music files and so on...?
    a bit off topic, but
    is it actually a good choice to import from a  G5 10.5.11 ppc system to a mbp i5 10.6.7 intel system via migration assistant or would it preferable to do everything handish and start from the scratch??
    thanks for your help in advance...

    Hi again:
    after that migration assistant procedure the account/user name of my old powermac G5 appears in my new mbp. so my new mbp is now called powermac G5. am i able to change this? the only way i see to do, is to create a new account and delete the "powermac G5" account...
    This is the way to change the "short name" :
    http://docs.info.apple.com/article.html?path=Mac/10.6/en/8756.html
    I cannot remember if I have done it, but I believe you can change the "long name" by going to system preferences>accounts and typing the new long name in the box.
    Barry
    Message was edited by: Barry Hemphill (to add the link) 

  • Can i set up my drive as encrypted with different partitions for different versions of osx?

    i have some questions about setting up an encrypted drive with different versions of osx installed on separate partitions, and how this choice effects time-machine and the emergency recovery disk.
    I have a new/refurbished macbook pro with a SSD.  it already has mavericks installed.  i want to fully wipe the drive and reinstall everything my self because I'm odd like that.
    first wiping the current drive
    Does the recovery partition get wiped if i use disk-utility to reformat the drive. Even thought the recovery partition does not show up as a partition, when i look at it with disk-utility? i would like to know I've wiped all partitions so that no little bugger gets left with out me knowing. Disk-utility does not show the recovery partition and this makes me concerned it might not wipe it.
    Does mavericks automatically make a recovery partition during the installation process? Or do i need to make a new 1gb partition for the recovery disk?
    Can i have two different partitions on my drive with separate installations of OSX on it? (one for work that i don't update the system os till my current project is done, and the other for experimenting with new software.)
    will time machine back up both of the partitions or just one?
    can i accomplish all this from a bootable usb drive or do i need to do this in target disk mode? 
    do i need to use a more capable utility than the stock apple "disk-utility"?
    when reformatting the drive should i format it as encrypted or let file vault do this after i install mavericks?
    how much does encryption slow down performance for things like photo/video/music production?

    Do a backup before you do anything.
    Does the recovery partition get wiped if i use disk-utility to reformat the drive
    It shouldn't
    Does mavericks automatically make a recovery partition during the installation process?
    Yes.
    Can i have two different partitions on my drive with separate installations of OSX on it?
    Yes.
    will time machine back up both of the partitions or just one?
    It will as long as one partition is not excluded in the Time Machine/Options.
    do i need to use a more capable utility than the stock apple "disk-utility"?
    No, just boot into the Recovery Volume (command  - R on a restart).
    file vault do this after i install mavericks?
    I would let File Vault do that.

  • How to create ddl for partitioning for a child table?

    Hi folks,
    I am new to the partitioning topic. I red some manuals and tutorials but I did not found exactly what I need. So I would ask for your help.
    I have two tables.
    The partitioning of the master table is clear:
    create TABLE ASP_PARTITION_TABLE_MASTER
    MASTER_ID VARCHAR2(20) NOT NULL
    , TIMESTAMP DATE
    , DATA VARCHAR2(20)
    , CONSTRAINT ASP_PARTITION_TABLE_MASTE_PK PRIMARY KEY
    MASTER_ID
    USING INDEX
    ENABLE
    PARTITION BY RANGE (TIMESTAMP)
    PARTITION PARTITION1 VALUES LESS THAN (TO_DATE('20090101','YYYYMMDD')) NOCOMPRESS
    , PARTITION PARTITION2 VALUES LESS THAN (TO_DATE('20100101','YYYYMMDD')) NOCOMPRESS
    , PARTITION PARTITION3 VALUES LESS THAN (TO_DATE('20110101','YYYYMMDD')) NOCOMPRESS
    This table should be partitioned by a timestamp.
    Now comes the difficulty:
    I have a child table which has the master_id as foreign key. The slave table should also be partitioned by the timestamp - but this one occurs only in the master table.
    CREATE TABLE ASP_PARTITION_TABLE_SLAVE
    SLAVE_ID VARCHAR2(20) NOT NULL
    , FK_MASTER_ID NUMBER(10)
    , DATA1 VARCHAR2(20)
    , DATA2 VARCHAR2(20)
    , COLUMN1 VARCHAR2(20)
    , CONSTRAINT ASP_PK_SLAVE PRIMARY KEY
    SLAVE_ID
    ENABLE
    ALTER TABLE ASP_PARTITION_TABLE_SLAVE
    ADD CONSTRAINT ASP_FK_MASTER_IS FOREIGN KEY
    SLAVE_ID
    REFERENCES ASP_PARTITION_TABLE_MASTER
    MASTER_ID
    ON DELETE CASCADE ENABLE;
    How can I create such a range partition for the slave table?
    PS: Currently we are using oracle 10.2 but we will upgrade to oracle 11g in near future.
    Thanks in advance,
    Andreas

    @sb92075:
    seems if I should give more details:
    the parent table is holding the master_id, the timestamp and plenty of general information which is valid for all children.
    Each parent has between 5 and 50 children which contain different data items. So our child table is much bigger than the parent table.
    Our selects are joining parent and child table filtered by the timestamp and some other indexed rows, so we are not saving the same timestamp redundantly.
    @bluefrog
    With the partitioning we would like to reach the following goals:
    1. gain more performance (quicker response time)
    2. get the ability to archive and drop partitions which are older than a specific timestamp. (We only need to keep the data of the last 1.5 years so we would like to drop the complete partition / tablespace instead of using a delete-statement which generates much load (transaction, archive, logging)).
    Thank you for your links. I will have a look on it.
    But due to the archiving issue we would also like split up the child table by the timestamp of the parent table.
    Regards, Andreas

  • Sql Server Partitioning for Update

    hi ... 
    i have created on my sql server database a table that hold transactions on my database , some of updating process take more time for update .
    my question is is the partitioning for this table will be useful and decrease the updating time , or will be the same
    Thanks for attention

    IMO, I would never partition a table which had 10,000 rows.  You might want to if there is a good partitioning key and you expect this table to get much larger in the future. 
    In any case, on a 10,000 row table, I can't see any scenario where partitioning will significantly improve performance.
    You would be much better off either improving the indexing and/or rewriting the queries to be more efficient. 

  • How to identity segment when to setup partition for large table?

    I have a table with size is about 3G. There is a code column in this table with distinguish 20 value. I am try to create list partition on this column.  How can I assign segment for different value for this partition?In my database, only less than 10 segments available. If I want the better performance, each partition should be on different segment or different device? Sould each sement have enough size to hold all data? what happen if the segment is smaller? for example, if I honly have 4 sgements each with 500M?
    If I remove or change the strategy of partition, for example, change the type to range, if the system can release the partitions on segment automatically?

    This section of the performance and tuning guide addresses all of these concerns.  Give it a good read and post questions that you have about the documentation:
    http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc00841.1570/html/phys_tune/title.htm

  • Disk partitions for ASM

    A client of mine is installing ASM and I have concerns about their proposed configuration. I'd like to run it past this forum to see if my concerns are justified.
    This is a non-RAC 11g install on RHEL5. We have 32 disks (2 vtracks X 16) of 144GB each. This storage will be used for 2 DEV databases running on the same machine. They want two diskgroups per database-- one for the Flash Recovery Area, and another one for everything else.
    The client's SA wants to spread the IO out across all the disks, so he has made 4 partitions on each of the 32 disks: one partition for each diskgroup. So the final allocation of disks is going to look something like this:
    create diskgroup DEV1_DATA
      normal redundancy
      failgroup vtrak1_1
      disk
        'ORCL:DISK01_P1'
        'ORCL:DISK16_P1'
      failgroup vtrak2_1
      disk
        'ORCL:DISK17_P1'
        'ORCL:DISK32_P1'
    create diskgroup DEV2_DATA
      normal redundancy
      failgroup vtrak1_2
      disk
        'ORCL:DISK01_P2'
        'ORCL:DISK16_P2'
      failgroup vtrak2_2
      disk
        'ORCL:DISK17_P2'
        'ORCL:DISK32_P2'
    create diskgroup DEV1_FRA
      normal redundancy
      failgroup vtrak1_3
      disk
        'ORCL:DISK01_P3'
        'ORCL:DISK16_P3'
      failgroup vtrak2_3
      disk
        'ORCL:DISK17_P3'
        'ORCL:DISK32_P3'
    create diskgroup DEV2_FRA
      normal redundancy
      failgroup vtrak1_4
      disk
        'ORCL:DISK01_P4'
        'ORCL:DISK16_P4'
      failgroup vtrak2_4
      disk
        'ORCL:DISK17_P4'
        'ORCL:DISK32_P4'
    ;OK? So here's my problem:
    This means that two separate databases will be sharing the same physical device and that this will result in IO contention. Am I not right? Or is ASM smart enough to deal with this?
    The client says that the more disks we spread data across, the better the performance will be. But I am doubtful.
    Trouble is, I have never set up ASM in this way; I have only added whole disks to diskgroups. Would anyone care to comment on this setup? Are my fears justified?
    Thanks.

    Hello,
    This means that two separate databases will be sharing the same physical device and that this will result in IO contention. Am I not right? Or is ASM smart enough to deal with this?
    ASM is smart enough to deal with 2 database or more, but my concern should be if ASM instance is down or crashes it will take both the database down.
    The client says that the more disks we spread data across, the better the performance will be. But I am doubtful.
    Always test,  and i tend to agree with the client but that doesn't mean it wil be the case all the time. So once again test.
    Trouble is, I have never set up ASM in this way; I have only added whole disks to diskgroups. Would anyone care to comment on this setup? Are my fears justified?
    I didn't quite get this question, can you elobrate more here.
    Regards
    Edited by: OrionNet on Mar 9, 2009 4:40 PM

  • Design table for performance (order - ordervisibility)

    I have tables like order, orderitem, etc. and requirements for order visibility:
    - One order can be seen by many users
    - One user can see many orders
    create table order (orderid number, ...);
    create table ordervisibility (orderid number, username varchar2(20));
    Order size is estimated to be >=500Mio. Application is a data warehouse with reporting.
    The relationship order - user will be skewed: some users will be allowed to see many orders while some will only see a small percentage.
    How should we design the system for performance?
    We think about creating table ordervisibility as index-organized table. Or are there better approaches like partitioning? Or is the approach with tables order na ordervisibility already suboptimal?

    <<<What is your 4 digit Oracle version (result of SELECT * FROM V$VERSION)?
    The system does not exist yet. Version will be derived from the requirements or most likely the latest version (e.g. 11.2.0.3 EE with partitioning option)
    <<<Are you wanting to prevent users from seeing other orders? You said one user can see many orders but are they NOT supposed to see other orders?
    Yes, you are right. We want to prevent other users to see orders that do not belong to them.
    <<<What determines which orders a user is allowed to see? A state code, a region code?
    The user in the OLTP system decides who can see orders (the user creating the order and maybe other users he selects)
    <<<Does this database, data and system already exist or is this a new design? Are there any other security mechanisms already in place? Is any of your data currently encrypted?
    The system does not exist yet. No other security mechanisms are planned (e.g. encryption).
    VPD is considered to implement the visibility (or alternatively views.)

  • Does a partition for Boot Camp slow down your system?

    I'm gonna make a partition on my disk for bootcamp. Does adding a partition slow down your system when using Mac OS? I assume boot camp assistant creates a partition wherever there is enough required free space. And if this free space is in the middle of the disk, doesn't the system have to skip back and forth over the partition to access data?
    Or does boot camp assistant create the partition at the end of the disk?
    Thanks for your replies.

    Boot Camp partition is generally created at the end of the disk so to speak. While the partition is created, files are moved and arranged so that there is a contiguous space for the partition.
    NO it does not affect the OSx performance at all as long as you have enough free space in the OSx partition for it to perform satisfactorily.
    Axel F.

  • Help? Trying to create partition for Windows...

    Okay so I'm trying to create a partition for Windows XP and I go to the Boot Camp Assistant and I have it set to 32 GB and I click partition and it says that I have to "repair the disk." So I go to the Disk Utitlity and I tried verifying my Mac HD and it couldn't even verify. Here's the description:
    Verifying volume "Macintosh HD"
    Performing live verification
    Checking Journaled HFS Plus volume
    Checking Extents Overflow file
    Checking Catalog file
    Incorrect number of thread records
    Incorrect number of thread records
    Checking multi-linked files
    Checking Catalog hierarchy
    Checking Extended Attributes file
    Checking volume bitmap
    Checking volume information
    The volume Macintosh HD needs to be repaired.
    Error: Filesystem verify or repair failed
    Someone please tell me what does this all mean and tell me how to make the error go away

    Hello akl88066
    To repair the Macintosh volume, you will need to boot and make the repairs from the install disk as described in the link below!
    http://docs.info.apple.com/article.html?path=Mac/10.5/en/8492.html
    Dennis

  • Please suggest Partition for following example urgent

    Hi all
    my table have one column Year
    I need to create 2 partition year_1,year_2 for year column but synario is
    If 2004 ,2005 2004 must go into year_2 and 2005 must go into year_1
    also for 2006 must go into year_1 and 2005 into year_2
    Please suggest type of partition if possible with example
    Regards

    > I need to create 2 partition year_1,year_2 for year column
    <snipped>
    An exceedingly bad idea to partition a date range like this - stuff some data into one partition and some other data into another partition, without any logical condition that governs what data must go into which partition.
    So do not create just two partitions. Decide on the partitioning strategy you want based on criteria such as:
    a) volume of data
    b) access to data (i.e. predicates used)
    c) data management requirements (e.g. removing or aging old data from the table)
    Satyaki's example shows you the basics of how this should be done. A partition by year. Or, monthly or even daily partitions. And possibly even sub-partitions.
    You will be achieving nothing in terms of performance or data management by trying to stuff date ranged data into two partitions as you are indicating.
    As for future yearly partitions? Create yearly partitions for the next 10 years. Or 20 years. Or 100 years. They will be empty. Small space footprint. Ready to be used.
    In this case there are relatively few (yearly) partitions - far less than having to deal with 1000's of daily partitions where it is often a better idea to automate adding of new partitions using a DBMS_JOB.

  • Getting this error while opening a folder : This file does not have a program associated with it for performing this action. Please install a program or, if one is already installed, create an association in the Default Programs control panel

    Hi,
    While trying to open a folder on my Windows 7 Home Premium, an error comes "This file does not have a program associated with it for performing this
    action.  Please install a program or, if one is already installed, create an association in the Default Programs control panel." I tried searching on the net but did not get great support for the issue when it happens with folder opening.

    Hi Nikunj Shah,
    First, I suggest you download
    Microsoft Safety Scanner or
    Malicious Software Removal Tool to run a full scan.
    The error messages here seems to be caused by the corrupted registries, which related with the folder association.
    You may take a try to merge the following registry settings to reset the folder association, before that, remember to backup your registry settings first:
    How to back up and restore the registry in Windows
    Copy and paste the following commands into Notepad, and save it to a .reg file:
    =================
    Windows Registry Editor Version 5.00
    [HKEY_CLASSES_ROOT\Folder]
    "ContentViewModeLayoutPatternForBrowse"="delta"
    "ContentViewModeForBrowse"="prop:~System.ItemNameDisplay;~System.LayoutPattern.PlaceHolder;~System.LayoutPattern.PlaceHolder;~System.LayoutPattern.PlaceHolder;System.DateModified"
    "ContentViewModeLayoutPatternForSearch"="alpha"
    "ContentViewModeForSearch"="prop:~System.ItemNameDisplay;System.DateModified;~System.ItemFolderPathDisplay"
    @="Folder"
    "EditFlags"=hex:d2,03,00,00
    "FullDetails"="prop:System.PropGroup.Description;System.ItemNameDisplay;System.ItemTypeText;System.Size"
    "NoRecentDocs"=""
    "ThumbnailCutoff"=dword:00000000
    "TileInfo"="prop:System.Title;System.ItemTypeText"
    [HKEY_CLASSES_ROOT\Folder\DefaultIcon]
    @=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
      00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,00,68,00,\
      65,00,6c,00,6c,00,33,00,32,00,2e,00,64,00,6c,00,6c,00,2c,00,33,00,00,00
    [HKEY_CLASSES_ROOT\Folder\shell\explore]
    "MultiSelectModel"="Document"
    "ProgrammaticAccessOnly"=""
    "LaunchExplorerFlags"=dword:00000018
    [HKEY_CLASSES_ROOT\Folder\shell\explore\command]
    "DelegateExecute"="{11dbb47c-a525-400b-9e80-a54615a090c0}"
    [HKEY_CLASSES_ROOT\Folder\shell\open]
    "MultiSelectModel"="Document"
    [HKEY_CLASSES_ROOT\Folder\shell\open\command]
    "DelegateExecute"="{11dbb47c-a525-400b-9e80-a54615a090c0}"
    @=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
      00,5c,00,45,00,78,00,70,00,6c,00,6f,00,72,00,65,00,72,00,2e,00,65,00,78,00,\
      65,00,00,00
    [HKEY_CLASSES_ROOT\Folder\shell\opennewprocess]
    "MUIVerb"="@shell32.dll,-8518"
    "MultiSelectModel"="Document"
    "Extended"=""
    "LaunchExplorerFlags"=dword:00000003
    "ExplorerHost"="{ceff45ee-c862-41de-aee2-a022c81eda92}"
    [HKEY_CLASSES_ROOT\Folder\shell\opennewprocess\command]
    "DelegateExecute"="{11dbb47c-a525-400b-9e80-a54615a090c0}"
    [HKEY_CLASSES_ROOT\Folder\shell\opennewwindow]
    "MUIVerb"="@shell32.dll,-8517"
    "MultiSelectModel"="Document"
    "OnlyInBrowserWindow"=""
    "LaunchExplorerFlags"=dword:00000001
    [HKEY_CLASSES_ROOT\Folder\shell\opennewwindow\command]
    "DelegateExecute"="{11dbb47c-a525-400b-9e80-a54615a090c0}"
    [HKEY_CLASSES_ROOT\Folder\ShellEx\ContextMenuHandlers\BriefcaseMenu]
    @="{85BBD920-42A0-1069-A2E4-08002B30309D}"
    [HKEY_CLASSES_ROOT\Folder\ShellEx\ContextMenuHandlers\Library Location]
    @="{3dad6c5d-2167-4cae-9914-f99e41c12cfa}"
    [HKEY_CLASSES_ROOT\Folder\ShellEx\ContextMenuHandlers\Offline Files]
    @="{474C98EE-CF3D-41f5-80E3-4AAB0AB04301}"
    [HKEY_CLASSES_ROOT\Folder\ShellEx\DragDropHandlers\{BD472F60-27FA-11cf-B8B4-444553540000}]
    @=""
    [HKEY_CLASSES_ROOT\Folder\ShellEx\PropertySheetHandlers\BriefcasePage]
    @="{85BBD920-42A0-1069-A2E4-08002B30309D}"
    [HKEY_CLASSES_ROOT\Folder\ShellEx\PropertySheetHandlers\Offline Files]
    @="{7EFA68C6-086B-43e1-A2D2-55A113531240}"
    [-HKEY_CLASSES_ROOT\Folder\ShellNew]
    [HKEY_CLASSES_ROOT\Folder\ShellNew]
    "Directory"=""
    "IconPath"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,\
      74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,\
      00,68,00,65,00,6c,00,6c,00,33,00,32,00,2e,00,64,00,6c,00,6c,00,2c,00,33,00,\
      00,00
    "ItemName"="@shell32.dll,-30396"
    "MenuText"="@shell32.dll,-30317"
    "NonLFNFileSpec"="@shell32.dll,-30319"
    [HKEY_CLASSES_ROOT\Folder\ShellNew\Config]
    "AllDrives"=""
    "IsFolder"=""
    "NoExtension"=""
    ==================
    Once done, right-click the REG file and choose Merge. Alternately, you can open the Registry Editor and then using the
    Import option from the File menu, to merge the REG file contents.
    Let me know if you need any further help.
    Best regards
    Michael Shao
    TechNet Community Support

  • Abap Logic for performance tuning not working when using Internal tables

    Hi,
    I wrote this piece of code that is working correctly that is select SUM of cost from DSO where Plant is the same for Sales Items.
    LOOP AT RESULT_PACKAGE INTO rp.
    SELECT SUM( /N/S_STRDCOST ) FROM /N/ADSP_DPIT00 INTO
    rp-/N/S_STRDCOST
    WHERE /N42/S_SALESITEM = rp-/N42/S_ITEMID AND /N42/S_PLPLANT EQ
    rp-/N42/S_SOURCE.
    MODIFY RESULT_PACKAGE FROM rp.
    Clear rp.
    ENDLOOP.
    Now I try to rewrite it for performance tunning using internal table  but I am getting 0 values. can't figure out whats the problem and been struggling fixing it.
    TYPES : begin of ty_DSO_TABLE,
             /N42/S_STRDCOST TYPE /N/ADSP_DSPC00-/N/S_STRDCOST,
             /N42/S_ITEMID TYPE /N/ADSP_DSPC00-/N/S_ITEMID,
           end of ty_DSO_TABLE.
    DATA: it_DSO_TABLE type hashed table of ty_DSO_TABLE with unique key
    /N/S_ITEMID,
         wa_DSO_TABLE type ty_DSO_TABLE.
    Field-symbols:  <rp> TYPE tys_TG_1.
    LOOP AT RESULT_PACKAGE assigning <rp>.
      clear wa_DSO_TABLE.
    Read table IT_DSO_TABLE into wa_DSO_TABLE with table key /N/S_ITEMID
      = <rp>-/N/S_ITEMID.
      if sy-subrc ne 0.
          select SUM( /N/S_STRDCOST )  into CORRESPONDING
          FIELDS OF wa_DSO_TABLE from
          /N/ADSP_DPIT00 WHERE /N/S_SALESITEM =  <rp>-/N/S_ITEMID AND
          /N/S_PLPLANT EQ <rp>-/N/S_SOURCE.
         if sy-subrc eq 0.
              <rp>-/N/S_STRDCOST = wa_DSO_TABLE-/N/S_STRDCOST.
         endif.
    endif.
    ENDLOOP.
    Any idea whats wrong with the code
    thanks

    Hi Vaidya,
    According to the code which you have written, there is no value in table IT_DSO_TABLE when you are trying to read the values.And after the read statement you have given a condition for sy-subrc. Hence the select statement is actually not even getting executed. *Also you have not assigned the final value back to the ResultPackage.*_
    So Kindly correct your code as follows:
    Data: wa_dso type ty_DSO_TABLE.
    LOOP AT RESULT_PACKAGE assigning <rp>.
    clear wa_DSO_TABLE.
    select SUM( /N/S_STRDCOST ) into CORRESPONDING
    FIELDS OF wa_DSO_TABLE from
    /N/ADSP_DPIT00 WHERE /N/S_SALESITEM = <rp>-/N/S_ITEMID AND
    /N/S_PLPLANT EQ <rp>-/N/S_SOURCE.
    if sy-subrc eq 0.
    <rp>-/N/S_STRDCOST = wa_DSO_TABLE-/N/S_STRDCOST.
    MODIFY RESULT_PACKAGE FROM <rp>.
    endif.
    ENDLOOP.
    Hope this helps you.
    Regards,
    Satyam

  • Model wage type for performance pay and additional pay

    Hi gurus,
    my client wants performance pay and additional pay in the additional payments. I am confused what model wage types to be copied for this. i tried copying m2sf for these but the prob is if if the employee is joining in the mid of month say 15th , then if i am trying to give performane pay of 10,000 rs then it is calculating only 15 days pay n giving 5000 in the payroll n payslip.
    if i try to copy the other wage types like m200,m281 n m282, i have the same problem . but if i copy m280 for both of these w.ts ,then it is giving the flat amount irrespective of the joining date of employee. but my question is does it have any implications on the calculation of the tax. coz i observed different model wage types deduct different amounts of tax. i.e if i copy m281 for performance apy n give the value as 10,000 then ,it give some x amount of tax on 10,000 similarly if i copy some other model w.t , for same amount of 10,000 it gives some other amount of tax.
    im really confused ,plzz help

    Hi ramm,
    I have checked the w.t amount in /434
    /434 Total Incom                                                   182,060.00
    n my other w.t amounts are:
    4MOB Mobile Reim                                                    25,000.00
    4PER Performance                                                    15,000.00
    5CEA Child Educa                                                       193.55
    5CON Conveyance                                                      1,451.61
    5HRA House Rent                                                      4,838.71
    5SPL Special All                                                    19,354.84
    /001 Valuation b01                          179.90
    /002 Valuation b01                          179.90
    /118 PTax Basis 01                                                  75,516.13
    /119 PTax Basis 01                       96,774.19                  35,516.13
    2CAN Canteen Ded01                                                   2,000.00-
    2NOT Notice Deuc01                                                   2,000.00-
    2OTH Other Deduc01                                                   1,500.00-
    5BAS BASIC      01                                                   9,677.42
    I dont know how to check the slabs, i am new to payroll,can u guide plzz

  • Every time I update or repair in the control panel it comes up with a error message like, this file does not have a program associated with it for performing this action, please install a program if it is installed create an association to the default pro

    EVERYTIME I UPDATE SOFTWARE OR GO INTO THE CONTROL PANEL TO ITUNES TO REPAIR OR CHANGE IT GIVES ME AN ERROR MESSAGE
    THIS FILE DOES NOT HAVE A PROGRAM ASSOCIATED WITH IT FOR PERFORMING THIS ACTION. PLEASE INSTALL A PROGRAM, IF IT IS INSTALLED CREATE AN ASSOCIATION TO THE DEFAULT PROGRAMS CONTROL PANEL

    STOP SHOUTING!  Or at the very least, get the CAPS lock key fixed.
    Remove iTunes.
    Download and install the current version of iTunes from http://www.apple.com/itunes/download

Maybe you are looking for

  • I have a itunes card that was stolen

    someone stolen my iTunes card and they used it r ready wat do i do ... but i have the itunes card & number

  • How to play explicit YouTube content?

    Youtube ratings are based on user feedback which causes some documentaries from my bookmarks to simply not show up on Apple TV. How can I fix this?

  • SCAN IP failover

    Installed RAC11gR2 on windows server, SCAN IP will failover and fallback if shutdown and then startup one of the nodes. However, when i unplug the public network cable, the SCAN IP can failover but won't faillback when plug in the cable again. And th

  • How to bock syslog CCH323-3-CALL_SETUP_FAILED

    Is there a way or will there be a solution on how to block a specific messages before sending it to a syslog server. So far, they can be blocked by severity groups. For example, i would like to block the the following level 3 message: %CCH323-3-CALL_

  • Sending invoice direclty from SAP server to customers

    Hi, after configuring Smtp connection between SAP ECC and Exchange server. i'm able to send documents to people who's mail address are maintained in user master record . su01 > maintaining e-mail address for all sap users. whith in this list i'm able