Expensive statement on DB

Hi,
The following statement is expensive on the database. Kindly provide me the certain change to improve the performance.
  refresh i_hrp1000.
  select objid begda endda mc_short from hrp1000 into table i_hrp1000
         where plvar = c_plvar
         and   otype = c_otype
         and   istat = c_istat
         and   langu = sy-langu.
Rgs
Krishna

Hi Krishna,
try to add additionla parameters and  set some default values to minimize the select statement.
    select single
           objid begda endda mc_short
           from hrp1000
           into l_pdesc
           where otype = c_otype
           and objid = pernr-plans    "<<  pass this
           and istat = '1'                  "<<pass this
           and begda le sy-datum   "<<pass this
           and endda ge sy-datum.  "<<pass this
Regards,
Prabhudas

Similar Messages

  • Is sort an expensive statement

    Hi Experts,
    Is it good practice to use sort statement  before ,
    Select for all entries statment.
    Before select for all entries statement we are checking about if not Itab[] is initial.
    Is sort an expensive statement.
    Thanks in Advance
    Irfan Hussain

    Hi Irfan
    you have sort the internal table on the same field in which your for all entries condition is then it will improve your performance.
    for ex.
    sort itab by vbeln.
    select * inot table itab1 from vbap for all entries in itab where vbeln eq itab-vbeln.
    regards
    kishore

  • Least expensive statement...

    I wrote a least expensive statement and that is :
    select 1 from v$parameter where 1=2;
    Are there any others that are more least expensive statements ?
    Thanks,
    Siva

    SELECT null FROM dual

  • Database load from expensive statements

    Hello Experts,
    My Query is what is the highest threshold value of CPU Load. i think this value is average CPU load of the month in EWA report.
    In our Ewa report
    values are like
         Buffer Load [%]     Disk Load [%]     CPU Load [%]
         19                            34                                            35
    Currently my system is running on SAP4.7, DB -> Oracle 10g 10.2.0.4, OS -> HP-UX 9000/800
    Our current DB size is 4 TB.per month databse growth is around 230 Gb
    We are planning for harware capcity when our database will rise to 10 TB in 2 years time.
    Waiting for your response

    Hello Experts,
    I am trying to use Quick Sizer, but unable to open the Beginner link.
    and can someone help, how to use the quick sizer tool.
    Regards

  • Travel Expense Type- Not coming correctly in HTML Form

    I am using HTML forms in travel management. When I simulate a travel expense statement, in the sections
    I T E M I Z A T I O N
    Additional Information for Itemization
    the name of the travel expense type come as truncated. It takes only 15 characters, while actually it can be 30.
    Any solution how it can be increased?

    Solved

  • How to automatically settle diners expenses on trips

    Hi Knowledgeable Ones,
    Does anyone know how to automatically settle Diners club (Credit Card Clearing) expenses after uploading the diners expense statement.
    Once done we require the Diners expenses only to be settled and transferred to the various GL's that have already been configured.
    Can this be done via config or do we need to look at creating a custom program?
    Any info will be appreciated.
    Thanks
    Maahir

    tlanghauser,
    I would create a 14 column table headed 1) Category, 2-13) the twelve months (Jan-Dec), and 3) Total. Then, each row would contain one of the categories. Be careful to spell these categories exactly as in the monthly tables.
    The basic formula for each cell is: =SUMIF(Jan :: Category,$A2,Jan :: Cost)
    (Note comma between $A2 and Jan)
    and, of course, the Total is: =SUM(B2:D2)
    This approach not only give your totals to-date, but an analysis of expenses by month.
    pw

  • Peoplesoft Expenses loading third party expenses eg Fuel card

    The information in Expenses states that expenses loads are only for credit cards. However the Customer here would like to use expenses for processing other third party expenses that are not credit card based. Eg their fuel card. They would also prefer that this is not a customization.
    The fuel card is used by employees. A single combined account is received from the fuel card supplier. They want their employees to then be able to go in, as they would for any other expenses, and set the department/project coding details or potentially mark it as a personal expense. Then for it to follow the approval and payment processes that the credit card expenses would follow.
    The fuel card is a good example but they also have uniforms, phones, and stationary that they would also like to go through the expenses module - each via a load from a third party.
    Is this possible within Expenses? Is there a feed from Purchasing to Expenses which could do this? Any other suggestions as to something I may have missed?
    Thanks

    Hi,
    1. How we need to interface the credit card transactions to Payables?
    2. Will Concur send credit card details to Payables?
    Can you please provide me the process (how you people are integrating concur with payables)?
    Thank you very much.
    Thanks
    BMK

  • Itinerary table is not shown in Expense Report (IFbA ABAP)

    Hi,
    We're working in SAP ECC 6.0.4. We enter transaction PR05, choose a travel and click on Results button which opens the Adobe Form "Expense Report/Travel Expense Statement". In some cases the Itinerary table is shown but in others it isnu2019t shown even there is data in PTRV_HEAD table.
    We've seen that the trips for which the itinerary table are not shown have the characteristic of not having additional destinations. In 4.7 the table is shown correctly (without IFbA).
    How can we correct this problem?
    Best regards.

    Hi Varsha,
    Please pay attention when you are requesting motnly period for
    start date : 1st July 2008
    end date : 1st july 2008
    After saving the period is changed to
    Start Date : 7/1/2008
    End Date  : 7/31/2008
    When you are requesting weekly period for the same interval, after sving the dates are changed again, according
    you settings of first day of the week. It it is Monday it could be as following
    Start Date : 6/30/2008
    End Date  : 7/6/2008
    So you are asking data for not quite the same period.
    Do you have data for monthly period in that interval?
    Regards,
    Victoria Gur

  • Changing expense reimbursement amount - travel management

    Hi,
    Is it possible to change the individual receipt amount(to 20%). Any user exit / BADI for this requirement ? Thanks.

    Yes its possible, kindly check the following EXIT's and BADI's
    Enhancement FITR0001        User exit: Delete/Reorganize trip statistics
    FITR0002        User exit: Create/Change trip statistics
    FITR0003        User exit: Save trip (PR01, PR04, PR05)
    FITR0005        User Exit: Save Trip (PR01, PR04, PR05)
    RPRCST01     Customer Exit for Travel Expenses
    Business Add-in
    TRV_DEFAULT_VALUES    Default Value for InfoType 0017
    TRIP_WAF_INTERFACE     Customer Enhancement: Interface for Offline Travel Expenses
    TRIP_RECURRENT_DEST  Change Settlement Method for Recurring Trips
    TRIP_RECEIPT_WIZARD    Receipt Wizard Customer Enhancements
    TRIP_POST_FI                  Customer Enhancements to FI Travel Management Interface
    TRIP_IMP_EXP                 Customer Enhancements Data Import/Data Export
    TRIP_EXCEL_SHEET       Creation of an EXCEL Sheet for Entry of Travel Expenses
    TRIP_APPROVAL            Automatic Approval of Travel Expenses
    FITV_REP_TRAVEL_EXP  Exit for Report Travel Expense Statement
    FITV_REP_CCC              Transfer Payment Amount with Inflationary Currencies
    FITV_PERSNO_AUTH_CHK Exit for Authorization Check on Personnel Number
    FITV_CCC_M_LINE      Manipulation of M Line in a CCC File
    AFTER_TRIP_SETTLEMNT Customer Enhancement Travel Management - Settlement
    Regards
    vijay

  • User EXIT/BADI for new creating commitment in transaction TRIP

    Hi,
    We have a requirement where we do not want to create commitment at the time of creation of expense statement by employee (we are creating expense statement using tcode TRIP), it should post to actual budget at the time of posting of expenses to FI  through tcode PRRW.
    Is there any BADI/Userexit by which we can achieve this.
    Thanks & Regards,
    Jyoti

    no reply recd. so closing this question

  • How can i reduce time of execution

    Hi all,
        I have a report program having HR logical database (PNP). This report were developed 1 year back. which is running well. This program were designed that it should take 1.20 hour execution  time. But since one week it is taking 3 hours. So i need to find why it is taking this much of time. I didn't get any clue to find out. please guide me how i can solve this issue.
       Right answer will be appriciated. Thanking you

    Hai,
    To reduce time of execution go for runtime analysis.
    I think this documentation will help you out...
    RUNTIME ANALYSIS
    The runtime analysis is an additional development workbench tool that is quite useful for analyzing performance of an ABAP / 4 Program or transaction. With this tool, the system can display information about:
    •     Executed instruction
    •     Accessed execution time.
    •     Tables and Types of access.
    •     Chronological execution flow
    The runtime analysis tool creates lists that reveal expensive statements, summarize table accesses. Runtime analysis is specifically designed for tuning individual programs and transactions.
    The Runtime Analysis tool measures ABAP/4 statements that are potentially expensive in terms of CPU time. The most significant of these are:
    Statement used for database access like select.
    Statement used for modularization such as module, perform, call function.
    Internal table statements like append, collect.
    Starting Runtime Analysis
    •     From ABAP/4 development workbench select Test – Runtime Analysis.
    •     From ABAP/4 editor, select utilities – more utilities – Runtime Analysis.
    •     From ABAP/ source code screen, select Execute – Runtime Analysis.
    •     From R3 screen, select System – Utilities – Runtime Analysis.
    •     Entering Transaction code SE30 in the command field.
    Following screen is the initial screen for SE30 transaction.
    On the initial screen, select the needed object you want to analyze i.e. program or transaction. Enter the name of the object. Click on execute. The system will execute the specified object and will generate a trace file or performance data file, which can then be analyzed when the transaction or program is finished.
    Analyzing a performance data file
    These files are created at operating system level and many times occupy large memory space, so be sure to remove the files, which are no longer needed.
    To analyze the files:
    •     Click on Analysis
    •     Following screen is displayed
    •     From GOTO option you can get overview of runtime analysis.
    The options are as follows:
    •     Hit List – Displays a list with the most system expensive instructions.
    •     Tables – Displays the most important tables, the number of accesses and the time needed for the accesses.
    •     Group hit list – Displays a list with the performed instructions classified by instruction type.
    •     Call hierarchy – Presents a chronological listing with the flow of calls during the execution of a program.
    During Runtime Analysis, the system measures the statements and stores these measurements in a performance data file. If you measure the same program or transaction several times, the data can vary. Many factors make it difficult to reproduce identical result. E.g., Network traffic.
    When you evaluate this file, the system displays the overview - Runtime Analysis Evaluation screen including a bar chart for total execution time. From this screen, you can analyze several types of information like:
    •     Hit list: displays the list with the most `system-expensive’ instructions.
    •     Tables: displays the most important tables, the number of accesses and the time needed for the accesses.
    •     Group hit list: displays a list of performed instruction classified by its type.
    •     Call hierarchy: presents a chronological listing with the flow of calls during the execution of program.

  • Workflow : Travel request attachment

    HI,
    I have a question regarding workflow. When a traveler fills a travel request using TRIP and saves it, workflow starts. The request goes to manager for approval. The problem is that when the manager clicks the attachment, it opens with PR05 not with TRIP.
    Any solution please ?

    Thanks for the reply.
    Yes, we may display all information which we need. I was just wondering if there is a way to attach the travel request (trip)while processing Request approval and later attach expense statement(pr05) when the expenses are entered. Just want to make sure if that is possible or not.
    Regards!

  • Secondary index on vbfa table

    I have very expensive statement running against VBFA table. It comes from a customer report and doing SQL:
    SELECT /*+ FIRST_ROWS */ "VBELV"
    FROM "VBFA"
    WHERE "MANDT" = :A0 AND "VBELN" = :A1 AND ROWNUM <= :A2
    It has execution plan:
    SELECT STATEMENT ( Estimated Costs = 96.009 , Estimated #Rows = 41 )
    |
    --- COUNT STOPKEY
    |
    INDEX RANGE SCAN VBFA~0
    As you can see it is very expensive statement because VBFA is huge table and because I have only VBFA~0 index with columns:
    UNIQUE Index VBFA~0
    COLUMN DISTINCT VALUES
    MANDT      1
    VBELV       1.589.207
    POSNV      4.184
    VBELN       3.202.114
    POSNN       58.173
    VBTYP_N    18
    In order to improve performance of this report , would you recomend creating secondary index and would it be on columns: MANDT, VBELN, VBELV
    I have not seen this type of secondary index in SAP community (most of the time I see sec.index on mandt, vbeln and posnn columns) so that is why I want to double check it before I deploy it.
    Regards,
    Andrija

    Hi,
    Indexes speed up access to rows in a table. They can be created for a single column or for a series of columns.
    MANDT AND VBELN does not have index then create indexes on these columns.
    The explain statement can be used to check the effect of creating or deleting indexes (see index) on the choice of search strategy for the specified SQL statement. You can also estimate the time needed by the database system to process the specified SQL statement. The specified QUERY or SINGLE SELECT statement is not executed while the EXPLAIN statement is being executed.
    To be frank to analyze you shd generate trace file and you need to analyze.
    Oracle claims that <b>first_rows_n</b> optimization results in faster response time for certain queries, we must remember that the performance is achieved via a change to the costing.
    Use the FIRST_ROWS hint when you need only the first few hits of a query. When you need the entire result set, do not use this hint as it might result in poorer performance.
    So collect stats,Analyze table create index your query will execute faster.
    Analyze in trace file generated.Want to know indexes are used or not have a look on Explain Plan.
    Regards
    Vinod

  • Functional Area Determination for Balance Sheet Accounts

    Hi all,
    We are on 4.7C and want to activate Functional Area updation on Vendor Invoices but when we go to FB60 and create manual Vendor Invoice the Field FKBER does not appear. We have made the FSG optional on the reconciliation account already.
    We have tried updating FA, to another Balace Sheet account via GL posting and have succeeded.
    Are we missing something, thanks in advance.
    Thanks,
    Mayank

    Dear,
    Functional ares are used for Cost Sales Accounting per functional area. It will only report the income-expense statement for the functional area.
    Note: Balanace sheet accounts can not be mapped to functional are. This is standard behaviour.
    Regards,
    Chintan Joshi

  • Accrual/Deferral entries

    Dear friends,
    What is the purpose of Accruals/Deferrals enteries. Pls explain me with one example. Where do we use this entries? can we reverse this entries in month end or year end? Pls clarify my doubts.
    Regards
    Murali

    Hi,
    Accrual/Deferral entries are used for monthly provisions.  It is part of month-end closing activity where we need to keep provision for certain expenses which are supposed to be accounted in a particular month and not accounted for.
    We can also use sample documents for creating month-end provisions.  However, there are few problems if we keep provision using sample documents, which are explained herebelow:
    1)  The person who keeps provision is not the same who is going to make payment.  Here the person who is making payment on receipt of Bill/expense statement, may not know that a provision has already created in books of account in previous month.  Thereby duplication of expenses will occur.
    2)  The amount may not exactly match.  Here the amount what we are keeping provision may not exactly match with Bill/expense statement.  Thereby there will be credit/debit lying in provision for expenses account/s.
    To overcome the above problems, Accrual/Deferral document concept has come.  In Accrual/Deferral, we create the provision for certain accounts for one particular month (entry with month-end date), which will be reversed on next month first date.  That means, when we receive the actual bills/expense statement, we need to directly debit the expenses instead of provision account.  Since provision is created in the previous month end date and reversed back on the first day of next month.
    Most Important: Please note that Accrual/Deferral documents are not used in year-end closing activities.  It will be used only during month-end activities.
    I hope it is clarified to you about the concept behind Accrual/Deferral.  In case you still have any questions, please come back.
    Regards,
    Srinivas

Maybe you are looking for