Few queries on HR tables

I want to make one sapscript where i can display employee id,name,date of joining,department and payroll.For that i think have to map like this
employee id - pernr of PA0000
employee name - ename of PA0001
date of joining - begda of PA0000 where massn is 'HIRING'
department - organizational unit from PA0001 and relate it to hrp1002 and hrt1002
payroll - I will do later,using functional modules.
my doubt is that massn consists of numbers,i dont which number relates to 'hiring' and dotn have organizational unit in both the tables hrp1002 and hrt1002.So can anyone tell me which number in massn relates to 'hiring' and how to get department name.
thanks in advance.

Hiring should be the first ACTION, how can you perform other actions without HIRING ? Other actions depend on HIRING.
Assigning code 01 may be optional, you can check the table
T529T
INPUT :
MASSN = '01' VARIABLE HERE 01
SPRSL = 'EN' ---> LANGUAGE
OUTPUT
MNTEXT = 'HIRING' --> OUTPUT

Similar Messages

  • Few queries across the BSEG & REGUP tables.

    Hi all.
    Am hoping that you might be able to assist. I have a dataset that has a few tables from a SAP system & I have been asked to run a few queries across the BSEG & REGUP tables.
    I have tried using EBELN, BELNR, AUFNR and REBZG to try and join the two tables but unfortunately these fields are not consistently populated. Is there any other fields that I could use that are common to both tables and should be populated by default ??
    Any assistance that could be provided would be appreciated.

    Hi Ashutosh Kumar
    You can join both table with
                              BUKRS - Company Code
                              BELNR - Accounting Docu. No.
                              GJAHR - Fiscal Year.
                              BSCHL - Posting Key.
                              SAKNR - G/L account number.
    Reward Me Points .
    Thanks
    Pari

  • Few queries about foreign revaluation for vendor/customer open items

    I am trying the transaction F.05 for the first time for vendor & customer open items in foreign currency. I have a few queries:-
    1. The ouput contains 2 exchange rates. One is picked from the transaction header. My query is from where is the other rate being picked up. In my current system, I could make out that exch rate in transaction header is being picked automatically from table OB08....however I am unable to deduce the source of the 2nd exch rate.
    2. What is the significance of "balance sheet preparation valuation". Earlier in test runs, only "new difference" was getting populated. However the user wanted to see "old diff" also. So while doing some trial run in test client, I checked the "bal sheet prep valu" and posted.....after this run, I am getting values in "old diffe" and "new diff" also. And the posted amount is the difference of the two. What is the significance and ideal way?
    3. Should the entry be reversed if I am revaluating at year end? Why I am asking is because in some threads I read that revaluation at year is not to be reversed....
    Thanks,
    SM

    1. To find out difference latest date(Key Date for OI Overview) will be taken by comparing with document posted dated. Based on that system shows diffrences
    2.   The items are valued using the exchange rate valid at the key date. The
          difference determined in local currency is output and posted. The
          valuation can also be done for parallel local currencies and according to
          different valuation approaches (HGB, GAAP).
          The result of the valuation is required for the creation of the financial
          statements. You should therefore carry out the valuation before the
          grouping of receivables and payables with program SAPF101. The valuation
          difference is then noted in the document. Use the valuation areas to
          calculate a different valuation method, or to save the result for further
          processing activities.
    3.   we need to reverse entries .

  • Few queries regarding J3RFLVMOBVED Report

    Hi all,
    I have a few queries regarding the J3RFLVMOBVED Report.
    First and most inconsequential, the report reads Stock Overview (Russia). So why Russia?
    Second, there are two checkboxes in the selection selection screen namely,
    Read List from Database
    Save List to Database
    When I run this report once, it takes about 10 mins to fetch the output. But if I select Read List from Database, I get the result in a matter of few seconds to a couple of minutes.
    So obviously I would like to know the secret behind this magic trick.
    Also, what does Save List to Database do? Im a little apprehensive of trying this option. Just dont understand what it means. Hence did not try it yet. Does it mean that it is saving to a buffer or to the database as suggested(which I feel is highly unlikely).
    I did debug the program. But found it too much to comprehend - pardon my n00biness for that.
    If anybody has looked at this report or a similar one, with the above checkboxes, please help me out.
    pk
    PS: Logging out for the day. Will respond to replies on the morrow.

    Hi Amit,
    The Documentation for this report can be found either in Tcode J3RFLVMOBVED by clicking on the Blue i button or by going to the report J_3RMOBVED and checking the documentation there.
    This part of the documentation is pretty useful:
    Options to keep / receive the report from a database.
    If the option "Keep report in database" is active our report is kept in the databases table "INDX"  with the key "IM". That report can be used operatively for the further analysis.
    The storing is possible on two vevels:
    on a plant level
    on  a company code + GL account level
    In both cases storing is possible only for one period (month).
    Will check out the Notes. Actually services.sap.com has problems opening in my browser. Will have to get that rectified first.
    Thanks for the info.
    pk
    PS: Im on ECC6
    Edited by: kishan P on Feb 4, 2009 4:22 PM

  • A few queries regarding the beauty that is Nokia 5...

    I got this beautiful lil machine a lil over a week back. It looks lovely, and sounds even better. And even though, being a student/intern, it cost me more than my monthly salary, I am mighty pleased I got it. And despite the opposition before, it's a great hit, both at home and work. 
    Just a few queries regarding the usage from my experience so far, the answers to which I could not find in this forum and a few other review sites. [Apologies if I'd missed something.]
     1- First, the battery. It only lasts for a little over a day on full charge. From what I'd heard and read, it looked like it should last quite a bit a more, atleast 2 full days. The phone even hung up a couple of times, while recording/playing video. Upon which I had to remove and reinsert the battery. How seriously wrong is this ?
    2- How do you forcefully exit an application, if need be ? It suggests in the guide, and from the reviews I read, there's supposed to be an exit and a start button with the applications when you bring up the task manager. Where're they?
    3- There's this option where you can insert a Slideshow as your Wallpaper. But when I go to it, select the desired images, [ Tried various random images, yes ]it only shows Options and Back button, when select Back, it just goes, well, back. Nothing really happens to the wallpaper. How does that work ?
    4- This might seem like a petty issue, but it can be pretty annoying. Once you go to Options and tell it you are marking, e.g. in the Inbox or the File Manager, how do you mark multiple items, WITHOUT having to go to Options >Mark >Mark/Unmark for each item ? What's the point of having a seperate Marking option in the first place then, when I could just Move or Delete each item seperately anyway. 
    5- And last, any news on a free full version of a document viewer ? From what I looked up, it costs around US$70, which is about a quarter of the phone's purchase price itself. And that's not a modest sum, that too for a basic application such as this, for a anyone with my status.
    Just so any prospective buyer or amateur user such as myself doesn't get scared off by the seemingly long list of inquiries, the phone's an absolute pleasure to use. Specially, for someone with their first Touchscreen/Symbian experience. I got this phone after a LOT of research, both online and in the field. And it's bloody well worth it so far. 
    I know, it's a huge post, but you'd have my utmost gratitude for an accurately detailed response. Thankyou. =)
    Solved!
    Go to Solution.

    Why of course. Something happening to your phone during the process would brick it, not to mention that the attempt would install something in your phone that voids the warranty, meaning that you just made yourself a very expensive paperweight. ^_^. We're not really allowed to talk about it, other than the fact that with the above possibility, I strongly advise you not to do so. There is a way to do it without hacking it. I know of people who have managed to do it without hacking, but it was on the 5800. Hmm, ok, maybe they'll work for you too though.
    http://forum.dailymobile.se/index.php/topic,4254.0.html 
    If you find my post helpful please click the green star on the left under the avatar. Thanks.

  • Short dump while executing few queries , which has got created on Infoset.

    Hi,
    We went to BI7.0 upgrade from BW3.x now.
    We are getting short dump short dump while executing few queries and work book, which has got created on Infoset.
    When i was executing work book where i was geting popup message saying that "Erro ZSD_XST_F00121 is invalid".When i click that message it went to dump.
    I was getting this error while executing query on infoset.
    We are currently SP Stack 13(Patch level 15).
    I found some note 1067918 as per the shortdum,where it is saying that you need to apply SP Stack14(patch level16).
    Please some one who had earlier this kind of issue.
    I appreciate your answer.

    Dear Krish,
    Yes, It is the patch problem.
    We too faced the same issue on Infosets.
    Apply SP 15.
    Regards,
    Ram.

  • Upgrading to EHP 4.0 - Have few queries on ESS/MSS, Erecruitment.

    Hi,
    We are trying to upgrade our portal to EHP 5.0. We have ESS/MSS and few webdynpro java and webdynpro abap applications on the portal. These are the few queries I have
    1) ESS services : employee search, personal data, LMS(Webdynpro Java) are on EHP 3 as of now. Will the applications remain the same even if we upgrade to  EHP5?
    2) ESS travel management(Webdynpro ABAP) are on EHP 2 as of now. Will this application remain the same even if we upgrade to EHP 5?
    3) E Recruitment (BSP) is on EHP 3 Will this application remain the same even if we upgrade to EHP 5?
    4) We have MSS services: ERec Manager and Appraisal. Will these services affect if we upgrade to EHP 5?
    4) We have few custom applications in Webdynpro abap and webdypro java developed on portal. Will these effect if we upgrade to EHP 5?
    Thanks.
    Regards,
    Priyanka.

    Hi Eric,
    Thanks for your prompt reply.
    Can you let me know which version of ESS/MSS and E-Recruitment business packages are applicable for the above version? And are these versions of ESS/MSS available in market now? Otherwise we can suggest our client to go for a upgrade to EHP 4.
    Appreciate your input.
    Regards,
    Priyanka

  • Ora-01219 database not open; only queries on fixed tables and views.

    Hi everyone
    There is another post stating this error, but since the source is different, I think is okay to make a different post as well.
    Our database was working fine until the other day, when suddenly power went off, UPS was damaged and didn't hold, and when we restarted the database this is what happens:
    Using Enterprise Manager Console, we can make a succesful connection in the same machine, but if we choose Schema, the following error appears:
    ora-01219 database not open; only queries on fixed tables and views.
    When accesing from a different machine:
    ORA-01033: ORACLE initialization or shutdown in progress
    Thanks in advance

    Here is the last entries of alert log
    Fatal NI connect error 12638, connecting to:
    (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
    VERSION INFORMATION:
         TNS for 32-bit Windows: Version 11.1.0.7.0 - Production
         Oracle Bequeath NT Protocol Adapter for 32-bit Windows: Version 11.1.0.7.0 - Production
    Time: 20-JUL-2010 15:48:31
    Tracing not turned on.
    Tns error struct:
    ns main err code: 12638
    TNS-12638: Fallo de recuperación de credenciales
    ns secondary err code: 0
    nt main err code: 0
    nt secondary err code: 0
    nt OS err code: 0
    Tue Jul 20 15:50:50 2010
    Starting ORACLE instance (normal)
    LICENSE_MAX_SESSION = 0
    LICENSE_SESSIONS_WARNING = 0
    Picked latch-free SCN scheme 2
    Using LOG_ARCHIVE_DEST_10 parameter default value as USE_DB_RECOVERY_FILE_DEST
    Autotune of undo retention is turned on.
    IMODE=BR
    ILAT =18
    LICENSE_MAX_USERS = 0
    SYS auditing is disabled
    Starting up ORACLE RDBMS Version: 11.1.0.7.0.
    Using parameter settings in server-side spfile E:\ORACLE\CRIMINALISTICA\PRODUCT\11.1.0\DB_1\DATABASE\SPFILECRIM.ORA
    System parameters with non-default values:
    processes = 150
    memory_target = 816M
    control_files = "E:\ORACLE\ORADATA\CRIM\CONTROL01.CTL"
    control_files = "E:\ORACLE\ORADATA\CRIM\CONTROL02.CTL"
    control_files = "E:\ORACLE\ORADATA\CRIM\CONTROL03.CTL"
    db_block_size = 8192
    compatible = "11.1.0.0.0"
    db_recovery_file_dest = "E:\Oracle\flash_recovery_area"
    db_recovery_file_dest_size= 2G
    undo_tablespace = "UNDOTBS1"
    remote_login_passwordfile= "EXCLUSIVE"
    db_domain = ""
    dispatchers = "(PROTOCOL=TCP) (SERVICE=CRIMXDB)"
    audit_file_dest = "E:\ORACLE\ADMIN\CRIM\ADUMP"
    audit_trail = "DB"
    db_name = "CRIM"
    open_cursors = 300
    diagnostic_dest = "E:\ORACLE"
    Tue Jul 20 15:50:55 2010
    PMON started with pid=2, OS id=1688
    Tue Jul 20 15:50:55 2010
    VKTM started with pid=3, OS id=2236 at elevated priority
    Tue Jul 20 15:50:55 2010
    DIAG started with pid=4, OS id=2332
    Tue Jul 20 15:50:55 2010
    DBRM started with pid=5, OS id=2328
    Tue Jul 20 15:50:55 2010
    PSP0 started with pid=6, OS id=2432
    VKTM running at (20)ms precision
    Tue Jul 20 15:50:55 2010
    DIA0 started with pid=7, OS id=2160
    Tue Jul 20 15:50:55 2010
    MMAN started with pid=8, OS id=2156
    Tue Jul 20 15:50:55 2010
    DBW0 started with pid=9, OS id=2064
    Tue Jul 20 15:50:55 2010
    LGWR started with pid=10, OS id=3176
    Tue Jul 20 15:50:55 2010
    CKPT started with pid=11, OS id=3180
    Tue Jul 20 15:50:55 2010
    SMON started with pid=12, OS id=3184
    Tue Jul 20 15:50:55 2010
    RECO started with pid=13, OS id=3188
    Tue Jul 20 15:50:55 2010
    MMON started with pid=14, OS id=3192
    starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...
    starting up 1 shared server(s) ...
    ORACLE_BASE from environment = E:\Oracle
    Tue Jul 20 15:50:55 2010
    MMNL started with pid=15, OS id=3196
    Tue Jul 20 15:50:56 2010
    alter database mount exclusive
    Setting recovery target incarnation to 2
    Successful mount of redo thread 1, with mount id 1304879008
    Database mounted in Exclusive Mode
    Lost write protection disabled
    Completed: alter database mount exclusive
    alter database open
    Errors in file e:\oracle\diag\rdbms\crim\crim\trace\crim_dbw0_2064.trc:
    ORA-01157: cannot identify/lock data file 9 - see DBWR trace file
    ORA-01110: data file 9: 'E:\ORACLE\ORADATA\STOPCRIM5\STOPCRIM5TABLESPACE.ORA'
    ORA-27047: unable to read the header block of file
    OSD-04006: fallo de ReadFile(); no se ha podido leer del archivo
    O/S-Error: (OS 38) Se ha alcanzado el final del archivo.
    Errors in file e:\oracle\diag\rdbms\crim\crim\trace\crim_dbw0_2064.trc:
    ORA-01157: cannot identify/lock data file 16 - see DBWR trace file
    ORA-01110: data file 16: 'E:\ORACLE\ORADATA\PRUEBACARLOS\PRUEBACARLOSTABLESPACE.ORA'
    ORA-27047: unable to read the header block of file
    OSD-04006: fallo de ReadFile(); no se ha podido leer del archivo
    O/S-Error: (OS 38) Se ha alcanzado el final del archivo.
    Errors in file e:\oracle\diag\rdbms\crim\crim\trace\crim_dbw0_2064.trc:
    ORA-01157: cannot identify/lock data file 17 - see DBWR trace file
    ORA-01110: data file 17: 'E:\ORACLE\ORADATA\PRUEBACARLOS\PRUEBACARLOSINDEX.ORA'
    ORA-27047: unable to read the header block of file
    OSD-04006: fallo de ReadFile(); no se ha podido leer del archivo
    O/S-Error: (OS 38) Se ha alcanzado el final del archivo.
    ORA-1157 signalled during: alter database open...
    Tue Jul 20 16:04:39 2010
    db_recovery_file_dest_size of 2048 MB is 0.00% used. This is a
    user-specified limit on the amount of space that will be used by this
    database for recovery-related files, and does not reflect the amount of
    space available in the underlying filesystem or ASM diskgroup.

  • OBIEE bypasses smaller aggregate table and queries largest aggregate table

    Hello,
    Currently we are experiencing something strange regarding queries that are generated.
    Scenario:
    We have 1 detail table and 3 aggregate tables in the RPD. For this scenario I will only refer to 2 of the Aggregates.
    Aggregate 1 (1 million rows):
    Contains data - Division, Sales Rep, Month, Sales
    Aggregate 2 (13 milliion rows):
    Contains data - Division, Product, Month, Sales
    Both tables are set at the appropriate dimension levels in the Business Model. Row counts have been updated in the physical layer in the RPD.
    When we create an answers query that contains Division, Month and Sales, one would think that OBIEE would query the smaller and faster of the two tables. However, obiee wants to query the table with 13 million records completely bypassing the smaller table. If we make the larger aggregate inactive, then OBIEE queries the smaller table. We can't figure out why OBIEE wants to immediately go to the larger table.
    Has anyone experienced something such as this? Any help would be greatly appreciated.
    Edited by: gwb on Aug 19, 2009 7:45 AM

    Have you try to change the sort order of the logical table source in your logical table ?
    !http://gerardnico.com/wiki/_media/temp/obiee_logical_table_sources_sort.jpg!
    Set the Aggregate 1 first.
    Cheers
    Nico

  • Few queries regarding content/web content migration

    Hi All,
    i have few queries regarding migration of web site and contents (from development to test )which are not clarified after reading oracle docs.
    --> When we do site replication will the content be migrated (data files).
    --> when we migrate content will all ED and RD etc.(all web site object type be migrated).
    --> are both the step necessary for migration when we have to migrate web site.
    thanks
    -somesh

    --> When we do site replication will the content be migrated (data files).It depends how you do it. The "Site Studio Replicator" tool will not move any content, only the site structure. The "Manage Site Replication" page can be used to migrate content with the site structure but I don't recommend it for large sites, I use separate Archiver tasks for moving content. The "Backup and Restore" page stores the entire site in a ZIP file, not advisable for large sites.
    --> when we migrate content will all ED and RD etc.(all web site object type be migrated).Yes. It uses the xWebsites metadata field to identify items that belong to the site.
    --> are both the step necessary for migration when we have to migrate web site.Depends how you do it, but yes, all bits are required.

  • Concurrent delete queries on one table

    Hi folks,
    I just recently started working with SQL server. I did my research and I guess that the post http://social.msdn.microsoft.com/Forums/en-US/7fe7499e-10a5-4371-84a4-aa1df8187a04/can-i-prevent-deadlock-during-concurrent-delete?forum=transactsql hits and somehow
    sovles my problem 100%.
    I am glad to have my issue resolved but I am also interested in understanding what went wrong deep inside as much as learn what I might do better. My scenario:
    4 processes updating disjunct entries at different intervals within the same table and issuing delete queries on that table. Sometimes (maybe once a day) that gives me a deadlock. colums: value, mainclass, subclass, timestamp with a clustered index at timestamp
    (My statement is of the form "delete from table where maintype=sth  and subtype=sth and timestamp=st")
    I'll append a sample deadlock graph. My main questions, which I couldn't answer so far:
    1. Is this expected behaviour or should SQL Server be able to handle such requests, or to put it right do I have to care for structures that avoid the above scenario, do I have to reconfigure or is there sth else to look at?
    2. Is this a configuration problem?
    3. I also do not understand why the report states that the processes fought for page ids when the lock escalation type was set to table.
    4. As far as I got to know until now having a clustered index on the timestamp colum is likely to boost my problem rather than solving it?
    I am really looking forward to any insights you can give.
    Bye,
    Lamu
    <deadlock>
    <victim-list>
    <victimProcess id="process56d746188" />
    </victim-list>
    <process-list>
    <process id="process56d746188" taskpriority="0" logused="0" waitresource="PAGE: 5:1:210559 " waittime="3120" ownerId="2642852343" transactionname="user_transaction" lasttranstarted="2014-09-05T11:16:12.683" XDES="0x5a36bd740" lockMode="U" schedulerid="4" kpid="3204" status="suspended" spid="72" sbid="1" ecid="4" priority="0" trancount="0" lastbatchstarted="2014-09-05T11:16:12.990" lastbatchcompleted="2014-09-05T11:16:12.683" lastattention="1900-01-01T00:00:00.683" clientapp="WIRELESS LOCALIZATION SYSTEM 1.15.0" hostname="S-ITCS-ORTUNG" hostpid="6504" isolationlevel="read committed (2)" xactid="2642852343" currentdb="5" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128056">
    <executionStack>
    <frame procname="adhoc" line="1" stmtstart="94" sqlhandle="0x020000008e714d2c0ee98fc35b8a7712a719321f42c9366a0000000000000000000000000000000000000000">
    DELETE [statisticlog] WHERE [statisticid]=@1 AND [storageid]=@2 AND [timest]&lt;@3 </frame>
    <frame procname="adhoc" line="1" sqlhandle="0x02000000e1914b015d3b4d5ca54af4b548f2990acfe909ec0000000000000000000000000000000000000000">
    DELETE from statisticlog where ((statisticid='node.temperatur') and (storageid='17:85:00:00:1a:18.0')) AND timest &lt; {ts '1970-01-01 01:00:00.000' } </frame>
    </executionStack>
    <inputbuf>
    DELETE from statisticlog where ((statisticid='node.temperatur') and (storageid='17:85:00:00:1a:18.0')) AND timest &lt; {ts '1970-01-01 01:00:00.000' } </inputbuf>
    </process>
    <process id="process7edeee188" taskpriority="0" logused="0" waitresource="PAGE: 5:1:196655 " waittime="3124" ownerId="2642852343" transactionname="user_transaction" lasttranstarted="2014-09-05T11:16:12.683" XDES="0x8747f1740" lockMode="U" schedulerid="2" kpid="7108" status="suspended" spid="72" sbid="1" ecid="2" priority="0" trancount="0" lastbatchstarted="2014-09-05T11:16:12.990" lastbatchcompleted="2014-09-05T11:16:12.683" lastattention="1900-01-01T00:00:00.683" clientapp="WIRELESS LOCALIZATION SYSTEM 1.15.0" hostname="S-ITCS-ORTUNG" hostpid="6504" isolationlevel="read committed (2)" xactid="2642852343" currentdb="5" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128056">
    <executionStack>
    <frame procname="adhoc" line="1" stmtstart="94" sqlhandle="0x020000008e714d2c0ee98fc35b8a7712a719321f42c9366a0000000000000000000000000000000000000000">
    DELETE [statisticlog] WHERE [statisticid]=@1 AND [storageid]=@2 AND [timest]&lt;@3 </frame>
    <frame procname="adhoc" line="1" sqlhandle="0x02000000e1914b015d3b4d5ca54af4b548f2990acfe909ec0000000000000000000000000000000000000000">
    DELETE from statisticlog where ((statisticid='node.temperatur') and (storageid='17:85:00:00:1a:18.0')) AND timest &lt; {ts '1970-01-01 01:00:00.000' } </frame>
    </executionStack>
    <inputbuf>
    DELETE from statisticlog where ((statisticid='node.temperatur') and (storageid='17:85:00:00:1a:18.0')) AND timest &lt; {ts '1970-01-01 01:00:00.000' } </inputbuf>
    </process>
    <process id="process7edeefc38" taskpriority="0" logused="0" waitresource="PAGE: 5:1:196655 " waittime="3119" ownerId="2642852529" transactionname="user_transaction" lasttranstarted="2014-09-05T11:16:12.973" XDES="0x87f3ddbb0" lockMode="U" schedulerid="2" kpid="5216" status="suspended" spid="62" sbid="1" ecid="2" priority="0" trancount="0" lastbatchstarted="2014-09-05T11:16:12.980" lastbatchcompleted="2014-09-05T11:16:12.973" lastattention="1900-01-01T00:00:00.973" clientapp="WIRELESS LOCALIZATION SYSTEM 1.15.0" hostname="S-ITCS-ORTUNG" hostpid="1308" isolationlevel="read committed (2)" xactid="2642852529" currentdb="5" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128056">
    <executionStack>
    <frame procname="adhoc" line="1" stmtstart="94" sqlhandle="0x020000008e714d2c0ee98fc35b8a7712a719321f42c9366a0000000000000000000000000000000000000000">
    DELETE [statisticlog] WHERE [statisticid]=@1 AND [storageid]=@2 AND [timest]&lt;@3 </frame>
    <frame procname="adhoc" line="1" sqlhandle="0x02000000dd48f433f7e565ecccaaf5283c2e99548dd371d20000000000000000000000000000000000000000">
    DELETE from statisticlog where ((statisticid='GWConnect') and (storageid='17:85:00:00:19:c8.0')) AND timest &lt; {ts '1970-01-01 01:00:00.000' } </frame>
    </executionStack>
    <inputbuf>
    DELETE from statisticlog where ((statisticid='GWConnect') and (storageid='17:85:00:00:19:c8.0')) AND timest &lt; {ts '1970-01-01 01:00:00.000' } </inputbuf>
    </process>
    <process id="process681871868" taskpriority="0" logused="0" waitresource="PAGE: 5:1:210559 " waittime="3118" ownerId="2642852529" transactionname="user_transaction" lasttranstarted="2014-09-05T11:16:12.973" XDES="0x87bb39740" lockMode="U" schedulerid="1" kpid="8088" status="suspended" spid="62" sbid="1" ecid="3" priority="0" trancount="0" lastbatchstarted="2014-09-05T11:16:12.980" lastbatchcompleted="2014-09-05T11:16:12.973" lastattention="1900-01-01T00:00:00.973" clientapp="WIRELESS LOCALIZATION SYSTEM 1.15.0" hostname="S-ITCS-ORTUNG" hostpid="1308" isolationlevel="read committed (2)" xactid="2642852529" currentdb="5" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128056">
    <executionStack>
    <frame procname="adhoc" line="1" stmtstart="94" sqlhandle="0x020000008e714d2c0ee98fc35b8a7712a719321f42c9366a0000000000000000000000000000000000000000">
    DELETE [statisticlog] WHERE [statisticid]=@1 AND [storageid]=@2 AND [timest]&lt;@3 </frame>
    <frame procname="adhoc" line="1" sqlhandle="0x02000000dd48f433f7e565ecccaaf5283c2e99548dd371d20000000000000000000000000000000000000000">
    DELETE from statisticlog where ((statisticid='GWConnect') and (storageid='17:85:00:00:19:c8.0')) AND timest &lt; {ts '1970-01-01 01:00:00.000' } </frame>
    </executionStack>
    <inputbuf>
    DELETE from statisticlog where ((statisticid='GWConnect') and (storageid='17:85:00:00:19:c8.0')) AND timest &lt; {ts '1970-01-01 01:00:00.000' } </inputbuf>
    </process>
    <process id="process6e959f0c8" taskpriority="0" logused="10000" waittime="3087" schedulerid="4" kpid="6624" status="suspended" spid="62" sbid="1" ecid="0" priority="0" trancount="2" lastbatchstarted="2014-09-05T11:16:12.980" lastbatchcompleted="2014-09-05T11:16:12.973" lastattention="1900-01-01T00:00:00.973" clientapp="WIRELESS LOCALIZATION SYSTEM 1.15.0" hostname="S-ITCS-ORTUNG" hostpid="1308" loginname="LocSystem" isolationlevel="read committed (2)" xactid="2642852529" currentdb="5" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128056">
    <executionStack>
    <frame procname="adhoc" line="1" stmtstart="94" sqlhandle="0x020000008e714d2c0ee98fc35b8a7712a719321f42c9366a0000000000000000000000000000000000000000">
    DELETE [statisticlog] WHERE [statisticid]=@1 AND [storageid]=@2 AND [timest]&lt;@3 </frame>
    <frame procname="adhoc" line="1" sqlhandle="0x02000000dd48f433f7e565ecccaaf5283c2e99548dd371d20000000000000000000000000000000000000000">
    DELETE from statisticlog where ((statisticid='GWConnect') and (storageid='17:85:00:00:19:c8.0')) AND timest &lt; {ts '1970-01-01 01:00:00.000' } </frame>
    </executionStack>
    <inputbuf>
    DELETE from statisticlog where ((statisticid='GWConnect') and (storageid='17:85:00:00:19:c8.0')) AND timest &lt; {ts '1970-01-01 01:00:00.000' } </inputbuf>
    </process>
    </process-list>
    <resource-list>
    <pagelock fileid="1" pageid="210559" dbid="5" subresource="FULL" objectname="LocSystem.LocSystem.statisticlog" id="lock707200480" mode="U" associatedObjectId="72057594045464576">
    <owner-list>
    <owner id="process6e959f0c8" mode="U" />
    </owner-list>
    <waiter-list>
    <waiter id="process56d746188" mode="U" requestType="wait" />
    </waiter-list>
    </pagelock>
    <pagelock fileid="1" pageid="196655" dbid="5" subresource="FULL" objectname="LocSystem.LocSystem.statisticlog" id="lock6ddb9e400" mode="U" associatedObjectId="72057594045464576">
    <owner-list>
    <owner id="process681871868" mode="U" />
    </owner-list>
    <waiter-list>
    <waiter id="process7edeee188" mode="U" requestType="wait" />
    </waiter-list>
    </pagelock>
    <pagelock fileid="1" pageid="196655" dbid="5" subresource="FULL" objectname="LocSystem.LocSystem.statisticlog" id="lock6ddb9e400" mode="U" associatedObjectId="72057594045464576">
    <owner-list>
    <owner id="process7edeee188" mode="U" requestType="wait" />
    </owner-list>
    <waiter-list>
    <waiter id="process7edeefc38" mode="U" requestType="wait" />
    </waiter-list>
    </pagelock>
    <pagelock fileid="1" pageid="210559" dbid="5" subresource="FULL" objectname="LocSystem.LocSystem.statisticlog" id="lock707200480" mode="U" associatedObjectId="72057594045464576">
    <owner-list>
    <owner id="process56d746188" mode="U" requestType="wait" />
    </owner-list>
    <waiter-list>
    <waiter id="process681871868" mode="U" requestType="wait" />
    </waiter-list>
    </pagelock>
    <exchangeEvent id="Pipe59935a700" WaitType="e_waitPipeGetRow" nodeId="1">
    <owner-list>
    <owner id="process7edeefc38" />
    <owner id="process681871868" />
    </owner-list>
    <waiter-list>
    <waiter id="process6e959f0c8" />
    </waiter-list>
    </exchangeEvent>
    </resource-list>
    </deadlock>

    >1. Is this expected behaviour or should SQL Server be able to handle such requests, or to put it right do I have to >care for structures that avoid the above scenario, do I have to reconfigure or is there sth else to look at?
    Basically yes.  Because your queries are non-trivial the DELETE query plans for different queries may conflict.
    >2. Is this a configuration problem?
    It's influenced by your table indexing, and especially how well your DELETE statements are supported by the physical data structures in your table.  The bigger and more complicated the physical design, the more likely that concurrent DELETES will conflict.
    >3. I also do not understand why the report states that the processes fought for page ids when the lock escalation >type was set to table.
    Page locks are never the result of lock escalation.  Row locks escalate to Table locks.  Period.  When a query uses Page locks it's an optimization to avoid taking lots of row locks to begin with.  But this comes at the possible cost
    of some concurrency.  The
    ROWLOCK query hint, possibly along with the READPAST hint can force more granular locking.
    >4. As far as I got to know until now having a clustered index on the timestamp colum is likely to boost my problem >rather than solving it?
    You minimize the locking conflicts by ensuring that it's very simple to find the rows affected by your DELETE. There's not enough information here to speculate on which physical design (partition scheme, clustered index, non-clustered indexes...) is optimal
    for this.
    A threshold question is whether you really _need_ these deletes to run concurrently on the table.  If not, then you can simply serialize them (eg with TABLOCK).
    David
    David http://blogs.msdn.com/b/dbrowne/

  • Combine 2 Queries (from SAME table) into a SINGLE query

    I have this two queries (from SAME table), and want to combine into one SINGLE query, how?
    How can we use CASE WHEN THEN for such situation? 
    Query1:
    SELECT t_inner.*,
    Floor(t_inner.ProductiveTime/ 3600) || 'hr:' || LPAD(Floor(Mod(t_inner.ProductiveTime,3600) / 60),2,0) || 'min:' AS Productive_Time,
    Floor(t_inner.OperatorDownTime/ 3600) || 'hr:' || LPAD(Floor(Mod(t_inner.OperatorDownTime,3600) / 60),2,0) || 'min:' AS OperatorDown_Time
    FROM
    (SELECT SYSTEMTYPE,
    sum(TIME_TEST + TIME_STEP) AS ProductiveTime,
    sum(TIME_IDLE) AS OperatorDownTime
    FROM PFODS.PPL_TESTSYSTEMS_UTILISATION
    WHERE (SYSTEMTYPE = '0005-072')
    AND (TS_START >= to_date('13/01/2014', 'DD/MM/YYYY'))
    AND TS_End <= to_date('17/01/2014', 'DD/MM/YYYY') + 1 + (1/1440) +(59/86400)
    AND MONO != '9999999999'
    GROUP BY SYSTEMTYPE ) t_inner
    Query 2:
    SELECT t_inner.*,
    Floor(t_inner.MachineDownTime/ 3600) || 'hr ' || LPAD(Floor(Mod(t_inner.MachineDownTime,3600) / 60),2,0) || 'min' AS MachineDown_Time
    FROM
    (SELECT SYSTEMTYPE,
    sum(TIME_IDLE) AS MachineDownTime
    FROM PFODS.PPL_TESTSYSTEMS_UTILISATION
    WHERE (SYSTEMTYPE = '0005-072')
    AND (TS_START >= to_date('13/01/2014', 'DD/MM/YYYY'))
    AND TS_End <= to_date('17/01/2014', 'DD/MM/YYYY') + 1 + (1/1440) +(59/86400)
    AND MONO = '9999999999'
    GROUP BY SYSTEMTYPE) t_inner
    see http://postimg.org/image/koq87iyyz/  and
    http://postimg.org/image/fv3zxa38n

    with the first query, 
    SELECT t_inner.*,
    Floor(t_inner.ProductiveTime/ 3600) || 'hr:' || LPAD(Floor(Mod(t_inner.ProductiveTime,3600) / 60),2,0) || 'min' AS Productive_Time
    FROM
    (SELECT SYSTEMTYPE,
    --sum(TIME_TEST) AS TIME_TEST,
    --sum(TIME_SYSTEM) AS TIME_SYSTEM,
    --sum(TIME_STEP) AS TIME_STEP,
    --sum(TIME_IDLE) AS TIME_IDLE,
    sum(TIME_TEST + TIME_STEP) AS ProductiveTime
    FROM PFODS.PPL_TESTSYSTEMS_UTILISATION
    WHERE (SYSTEMTYPE = '0005-072')
    AND (TS_START >= to_date('13/01/2014', 'DD/MM/YYYY'))
    AND TS_End <= to_date('17/01/2014', 'DD/MM/YYYY') + 1 + (1/1440) +(59/86400)
    AND MONO != '9999999999'
    GROUP BY SYSTEMTYPE) t_inner
    it gives output as from 
    http://postimg.org/image/koq87iyyz/
    with the second query,
    SELECT t_inner.*,
    Floor(t_inner.MachineDownTime/ 3600) || 'hr ' || LPAD(Floor(Mod(t_inner.MachineDownTime,3600) / 60),2,0) || 'min' AS MachineDown_Time
    FROM
    (SELECT SYSTEMTYPE,
    sum(TIME_IDLE) AS MachineDownTime
    FROM PFODS.PPL_TESTSYSTEMS_UTILISATION
    WHERE (SYSTEMTYPE = '0005-072')
    AND (TS_START >= to_date('13/01/2014', 'DD/MM/YYYY'))
    AND TS_End <= to_date('17/01/2014', 'DD/MM/YYYY') + 1 + (1/1440) +(59/86400)
    AND MONO = '9999999999'
    GROUP BY SYSTEMTYPE) t_inner
    it gives output as from 
    http://postimg.org/image/fv3zxa38n/
    I want to come those 2 queries into a single query, such that it gives both outputs as above. Let me know if you need any other information. thanks.

  • Sql queries from internal tables based on context node

    Hi experts,
    I want to select from my inetrnal table which is based on the context node, the rows which do not appear in another internal table based on the context node.
    I have this data:
    data lt_item_level type table of wd_this->element_item_level INITIAL SIZE 0.
    data lt_item_level_cp type table of wd_this->element_item_level INITIAL SIZE 0.
    data lt_po_items TYPE table of wd_this->element_po_items INITIAL SIZE 0.
    I want to do this:
    select * into CORRESPONDING FIELDS OF TABLE lt_item_level_cp from lt_item_level WHERE lt_po_items-po_number NE lt_item_level-item_number.
    But i get an error:
    "LT_ITEM_LEVEL" is not defined in the ABAP Dictionary as a table,
    Is there a way to do it with select or should i loop over my internal tables?
    thank u very much!!

    hi,
    You cannot use Select queries on internal table.  do like this :
    loop at itab into wa where wa-F1 NE wa-F2.
    append wa to itab1.
    endloop.
    Here itab1 will have all the records as per your requiement.
    I hope it is clear.
    Edited by: Saurav Mago on Oct 26, 2009 5:37 PM

  • CPY-0007: Select list has fewer columns than destination table

    hello, I need your help, here is my problem is summarized in my example below
    Exemple
    SQL> copy from XX/X@BD1 to YY/Y@BD2 insert TABL1(COL1,COL2)-
    using select COL1,COL2 from TABL1
    Array fetch/bind size is 15. (arraysize is 15)
    Will commit when done. (copycommit is 0)
    Maximum long size is 80. (long is 80)
    CPY-0007: Select list has fewer columns than destination table
    DESC TABL 1
    COL1, COL2 DESC
    thank u.

    bahan wrote:
    hello, I need your help, here is my problem is summarized in my example below
    Exemple
    SQL> copy from XX/X@BD1 to YY/Y@BD2 insert TABL1(COL1,COL2)-
    using select COL1,COL2 from TABL1
    Array fetch/bind size is 15. (arraysize is 15)
    Will commit when done. (copycommit is 0)
    Maximum long size is 80. (long is 80)
    CPY-0007: Select list has fewer columns than destination table
    DESC TABL 1
    COL1, COL2 DESC
    thank u.
    00007,0, "Select list has fewer columns than destination table\n"
    // *Cause: On an APPEND operation or INSERT (when the table
    //          exists), the number of columns in the SELECT
    //          command is less than the number of columns in the
    //          destination table.
    // *Action: Re-specify the COPY command, making sure that the
    //          number of columns being selected agrees with the
    //          number in the destination table.

  • CPY0007: Select list has fewer columns than destination table

    Hi,
    I have two table TB in both Database A and Database B. TB in Database A has 100 columns, TB in Database B appended one more column which is nullable. I'm copy TB data from A to B using something like:
    insert into TB select * from TB@A where ...
    And I got error:
    CPY0007: Select list has fewer columns than destination table.
    Besides specify the 100 columns plus one new column, any better ways to handle this?
    Thanks a lot.

    This is kind of dangerous genarally but if you know the additional column is on the end this might work.
    insert into TB select a.*, null from TB@A a where ...If this is a regular operation, I would strongly suggest biting the bullet and specifying the column names. Using desc or all_tab_columns and a simple text editor it should take no more than five minutes, which is at least 12 hours less than you have been waiting for a workaround.

Maybe you are looking for