Find cleared document according entry date of clearing document.

Hi,
i have poor performance in this issue. I would find cleared document according clearing document. On selection screen are cpudt and cputm clearings documents and i need to find cleared document for these document.
First statement
select bukrs gjahr belnr into table i_bkpf from bkpf where cpudt in so_cpudt and cputm
Second statement
select burks gjahr belnr into table i_itab
for all entries in i_bkpf from bsas where bukrs = i_bkpf-bukrs
<b>and augbl = i_bkpf-belnr and augdt = i_bkpf-budat</b>
Third stat.
select burks gjahr belnr appending table i_itab
for all entries in i_bkpf from bsak where bukrs = i_bkpf-bukrs
<b>and augbl = i_bkpf-belnr and augdt = i_bkpf-budat</b>
all is OK but condition augbl = i_bkpf-belnr and augdt = i_bkpf-budat has very poor performance!!
How to solve it? Do you have any solution?
Thank you very much.

Hi Vidlak,
If you might have noticed, BSAK has a secondary index available (number 1) with the fields :
LIFNR
BUKRS
AUGDT
AUGBL
GJAHR
BELNR
BUZEI
in the same order. Now since you cant obviously build and query on the primary key atleast try to complete the secondary index key. I can see i_bkpf has BUKRS & GJAHR key, and in the index AUGDT comes before AUGBL hence in construct your where clause for the third statement as
WHERE BUKRS EQ I_BKPF-BUKRS AND
             AUGDT EQ I_BKPF-BUDAT AND
AUGBL EQ I_BKPF-BELNR AND
GJAHR EQ I_BKPF-GJAHR.
this should certainly help improve performance.
Also seeing how many FOR ALL ENTRIES clauses u are using, one thing for performance improvement is ensure the table is NOT empty before using it and sort the table with its keys.
Hope its of some help.
Regards,
Aditya

Similar Messages

  • Last Entry Date for Each Quarter

    Hi,
    I want to find out the last entry date for each quarter. The query I am using is this:
    SELECT 
    Country.Name as Country,
    CONVERT(DATE,MAX([CreationDate])) as LastDateOfClipEntry,
    DATEPART(Year,([CreationDate])) as Year,
    DATEPART(Quarter,([CreationDate])) as Quarter
    FROM 
    [dbo].[Clip]
    JOIN Office on Office.Code = Clip.Office
    JOIN Country on Country.Code = Office.Country
    WHERE YEAR(CreationDate) IN (@YEAR)
    GROUP BY Country.Name,DATEPART(Year,([CreationDate])) ,DATEPART(Quarter,([CreationDate]))
    ORDER BY Country.Name
    Now based on the column group I added in my report the result is coming correct but not properly formatted as I want.
    Below is the snapshot how its coming now:
    I don't want the extra blanks coming for each occurrence. There should be only one line for Australia and in the single line it should show the last entry date for that quarter. How can I achieve that ? Below is the snapshot showing current config:
    Thanks a lot in advance. Any help would be appreciated.
    Vivek Kamath

    Hi Vik2907,
    According to your description, you have a matrix which shows you those unexpected cells. Right?
    In this scenario, the reason caused this problem is the group setting. Mostly, you set the row group on a wrong field. As we tested in our local environment, if you set the row group on LastDateOfClipEntry, it will render the data as the screenshot you post.
    Please check both Row and Column Group setting, make sure they are group on proper field.
    Reference:
    Tables, Matrices, and Lists (Report Builder and SSRS)
    Understanding Groups (Report Builder and SSRS)
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • Entry Date for sales upload

    hi all,
    i am currently trying to find out if there is a way by which we can find out what was the exact date on which the particular sales was uploaded in the fi. i have checked the gl account balances but am not able to find the option for entry date in the layout.
    please suggest alrernate to find the date on which the file was uploaded.
    Regards
    Arvind Kumar

    Hi Arvind,
    If you have the billing doc number,
    Go to t-code VF03 and display the document.
    From the menu --> Go To --> Header --> Header
    You can see the "Created on" date.
    If you have the FI doc number,
    Go to t-code FB03 and display the document.
    From the menu --> Go To --> Document Header
    You can see the Entry date.
    Regards,
    Mike

  • Has anybody else noticed that Find/Change searched according to -

    Has anybody else noticed that Find/Change searched according to date added?  It doesn't go page by page — it searches in the ORDER that text was added to a document.
    For instance, if you started with Pages 300-400, then added text to page 200, then added text to pages 100-200, THAT IS THE ORDER Find/Change will search.  Crazy, no?
    By the way, does anyone know how to FORCE Find/Change to always center a spread?  Currently, it moves the various pages all over the place during a search …

    We are using Exchange 2010 and IOS 6.0.1 and seeing this issue with exceptions associated to recurring meetings on both the iPad and iPhone. 
    Oddly, you can make the first change (time of meeting, for example) to an exception in the series and have the change sync from Outlook 2010 to the iPad. If you attempt to make a second change to the same exception, the 2nd change does not sync to the IOS device.  Thoughts?

  • How can I find clearing document item from BSE_CLR?

    Hi All,
    I can find cleared document item be partial paid in table bse_clr by field BUKRS, BELNR, GJAHR, BUZEI.
    but I can't find clearing document item in table bse_clr, is there any other table stored the clearing document item data?
    best regards,
    Eric

    hi
    Use table BSAD,BSAS,BSAK  for cutomers, gl accounts and vendors respectively
    Regards

  • Entry date of parked document once it is posted

    Hi,
    I posted one FI invoice today, which was parked on entry date 13.07.2007.
    before posting that document the entry date in BKPF i.e CPUDT was 13.07.2007, but once it got posted today CPUDT changed to 28.08.2007. CPUDT was overwritten, now if i want to track all the documents which were parked on 13.07.2007 i am not able to find this one.
    Can you pls tell me if there is any table where this info is maintained.
    Thanks,
    Sonali

    Hi Sonali,
    Probably your question has been answered by now, but what the heck.I was looking for an answer to this question too, caused I wanted to calculate to complete processing time for an invoice, from creation to booking. Im using the files BSEG-ZFBDT with KOART = K. This field is the baseline date used for calculating the date on which the invoice has to be paid. I think you can use this field.
    Using CDHDR could be possible too, but would take a lot of performance.
    Kind regards,
    Erik

  • My old emails and documents are not showing up in email or finder both from the same date and I cannot find them anywhere. I do not believe I have any archive settings on. Any idea how I get them to show up?

    my old emails and documents are not showing up in email or finder both from the same date and I cannot find them anywhere. I do not believe I have any archive settings on. Any idea how I get them to show up?

    Hello gpbondi,
    The following article provdies step-by-step instructions for downloading your purchases both in iTunes and on your devices.
    Download past purchases
    http://support.apple.com/kb/HT2519
    Cheers,
    Allen

  • Accounting document entry date

    Is there a function to get the Accounting document entry date? Given the batch number (charg) and Number of material document (mblnr)
    Thanks.

    hi ,
    try this FM <b>AC_DOCUMENT_RECORD</b>, to get the Accounting Documents . For Export parameters just search for this FM in MIRO program , put a break-point, where u will come to know how to use this FM .
    Option 2 : Get the MBLNR  for the CHARG from MKPFMSEG ,and get AWKEY from this like MBLNRMJAHR pass this one to BKPF to get the Accounting Document @ Header Level.
    Regards
    Prabhu

  • Document entry date = system date, confusion for mult country implementatio

    Hi All,
    We are implementing in US and Malaysia. The server is located in Malaysia. The time difference between US and Malaysia is 16 hrs. Thus when US  users enter documents and want to get the list of documents posted, the have to convert their time to the Malaysia time and then put that specific date and time. This is confusing even though we have maintained the time zone for the user.

    HI Paul,
    The user setting mentioned by you, helps in the determination of the posting date. My query is with regard to entry date. For e.g the server is in Malaysia. one company is in US. Thus when the user in US needs to check their document based on the entry date, they cannot check based on the time and date based on US date, they have to conver the entry time and date to the server time and then put in the selection criteria to get the document list...Hope this clarifies my query.

  • Wanted brief idea about posting date, document date, entry date

    Hi guyz!
    basically am an tech consultant. But wanted to have brief idea about the following business process. scenario is like this:
    in inventory management, we are doing some inter facility transfer. i.e., for a particular plant, we are having multiple storage locations. so due tosome reasons, we are transfering stock from one storage location to another storage location. so in this context can anybody say what are the followings:
    1. posting date
    2. document date
    3. entry date
    waiting for proper response.
    manas

    Hi Manas,
    The Document Date is the date in which the business transaction for the Documente(e.g., a transfer of posting) took place. The document date is the date on which the original document was issued.
    The document date can, for example, refer to the creation date of the delivery note issued by the vendor or the internal goods receipt slip.
    The Posting Date determines the posting period and defines in which fiscal period a document will post (regardless of the Document or Entry date). It is the date which is used when entering the document in Financial Accounting or Controlling. The periods that are permitted for posting are determined by Accounting Services. This is the date that G/L Account Balances are updated.
    The fiscal year and the period for which an update of the accounts specified in the document or cost elements is made, are derived from the posting date. The Posting Date will override the Fiscal Period entered on a document if they are different.
    When entering documents, the system checks whether the posting date entered is allowed by means of the posting period permitted.
    The posting date can differ from both the entry date (day of entry into the system) and the document date (day of creation of the original document).
    The Entry Date is the date the transaction was actually "permanently entered" into R/3.
    Note: It is possible that an invoice was issued with a Document Date of 6/15/98, entered into R/3 on 7/15/98 (Entry Date) with a Posting Date of 6/30/98 (to post the Document in the previous fiscal year). Many times, all three of these dates are the same.
    Thanks,
    Susmitha.
    Mark helpful answers.

  • Where can i find clear information about sap function modules?

    where can i find clear information about sap function modules?
    for example,
    if i want to know whats the use of function module  "SAPGUI_PROGRESS_INDICATOR" .
    where i can find all the detail info..
    is there any sap transaction code for knowing about all function modules and there use?
    Regards
    Smitha

    Hi:
    For documentation, you have to find it out in se37 but it is not neccessary every Fm would have.
    Now question is about its used (if you know th e function module)-> go in se37-> put function module -> select where used list -> select used in like - program, class, BSP application etc -> click on ok; it would give the list of its used and just go in that find  how it is being used.
    if you have to find the function module for table - > go in se11 -> select table name -> click on where used list -> select function module  interface and click on ok, it would give the list of  its used.
    Otherwise go in g o o g l e dot  c o  m.
    Regards
    Shashi

  • Entry date blank in FAGLL03

    Hi All,
    New GL is active,
    In FAGLL03, the entry date is blank for all the documents,
    i have to click on each documents and see the entry date of each. But it should show the entry date in FAGLL03 itself.
    Appreciate your quick response,
    Thank you,
    Vidya

    Hi Vidya,
    In the FAGLL03 you can display data from different tables and different
    selection logics.
    1st
    If an account is 'OpenItem/LineItem' managed, the displayed data is
    selected in a Join of the index tables BSIS/BSAS and the NewG/L line
    item table.
    2nd
    If an account has the 'Clearing Specific to ledger Groups' se, the
    displayed data is selected in a join of the tables FAGLBSIS/FAGLBSAS
    and the NewG/L line item table.
    3rd
    In the case of an account which is NOT 'OpenItem/LineItem' managed, th
    displayed data is selected from BKPF, NewG/L line item table and the
    BSEG table.
    Referring to your case, the ledger group is only available in the
    BKPF and the FAGLBS*S tables.
    The CPUDT is even only available in the BKPF.
    As all the different logics to select use the same 'fieldcatalog' to
    display the data, there might be some fields which are not filled
    in relation to the master data settings of the accounts.
    To avoid this, you should define the two fields as special fields:
    BKPF LDGRP
    BKPF CPUDT
    This can be done in the IMG path:
    Financial Accounting (New)
      General Ledger Accounting (New)
        Master Data
          G/L Accounts
            Line Items
              Define Special Fields for Line Item Display
    After you defined and stored them there, please also run the report
    BALVBUFDEL.
    About the special fields in general, refer to the 984305.
    I hope this can help further.
    Kind Regard,
    Fernando Evangelista

  • Finding DMS documents via classification values

    Hi,
    I have a list of characteristic values, from which i need to find the DMS documents which use that characteristic, and have those values.
    I have used table AUSP, but when i find that characteristic, the value fields are empty, therefore i don't find anything.
    Could someone please help by either telling me which tables to check in order to find these values, or if there is a function module which allows you to enter a characteristic value, and find all documents using that value.
    Thanks in advance.

    Hi All,
    We can use the function module - CV100_CLASS_SEARCH
    Please refer the following example
    data: wa_class type dmscls_simple_selection,
           it_class type standard table of dmscls_simple_selection.
    wa_class-characteristic = 'CH_TRF_RPT'."Characteristic name
    wa_class-value = 'ASDASD'."Characteristic Value
    append wa_class to it_class.
    clear wa_class.
    call function 'CV100_CLASS_SEARCH'
       exporting
         classno                    = 'CL_DMS_RPT'"Classifcation Name/Class Name
         classtype                  = '017'"Class type
         max_hits                   = 9999
         slanguage                  = sy-langu
    *   PF_LIST_TYPE               =
       tables
         tdraw                      = it_draw
        class_selection            = it_class
    *   CLSC_CLASS_SELECTION       =
         stdokar                    = it_dokar
         stdoknr                    = it_doknr
         stdokvr                    = it_dokvr
         stdoktl                    = it_doktl
    * EXCEPTIONS
    *   NO_RESULT                  = 1
    *   BAD_QUERY                  = 2
    *   OTHERS                     = 3
    if sy-subrc <> 0.
    * Implement suitable error handling here
    endif.
    Note: Only fill class selection table along with importing parameters

  • MIRO Invoice Entry Date

    Hello All -
    There are multiple dates on the invoice when it is entered via MIRO - Invoice Date, Posting Date, Baseline date, etc.   I would like to find the date that the invoice was first entered into SAP.  This should be a system generated date similar to the 'Created On' date that can be found in EKKO for the date the PO was created in SAP. 
    Can anyone tell me what date field that would be for the MIRO invoice and what table I can find it in?
    I found Document date and entry date in RBKP but I can't tell which one is the date that the entry was actually created in SAP and system generated and which date is manually entered.
    Please help.
    thanks
    Jane

    A deletion indicator is not really a hard stop for anything, except you customize warning messages into error messages.
    Repeat the case  in your test system. to see which messages come up

  • Entry Date 00.00.0000 in MSS reports

    Hi Expert,
    When i try to execute standard mss reports, for ex Entries/Leaving Date, or service anniversaries the entry field is 00.00.0000. But if i execute the report via gui (Manager desktop) then the entry field would filled by correct value. Can somebody help me ? Thanks in advance.
    Best Regards.
    Hendri

    you need to maintain the feature and on how the reports are run
    You need to implement the note 562031 instructions in the system as this is not part of standard delivery, Please apply it
    and verify in your test system it will work
    ie
    Currently, the system operates as follows: The modules for the
    determination of the respective date (HR_ENTRY_DATE and HR_LEAVING_DATE)
    are called up with the key date and not with the start and end date of
    the personnel action within which the key date exists. If HR_ENTRY_DATE
    doesn't find an entry date on given key date it returns 00.00.0000. This
    is an expected system behaviour.
    Sometimes this system response is partially not desired, instead, you
    want the system to determine the entry date and the date of leaving with
    the start and end date of the personnel action within which the key date
    exists during a key date selection. Therefore, the attached note 562031
    was released. If you would like to change the system operation implement
    the note 562031 accordingly.
    Additionaly, take into consideration, that you could use a key date
    selection at Person Selection Period (instead of Data Selection Period).
    This could likely be helpful in your case. Consider different selectioncriteria

Maybe you are looking for

  • Using SQLITE result as variable in FlexEvent

    The desktop application I'm writing mainly calls XML files from a remote server and then displays the feeds. One of these displays is the current weather. The feed I'm connecting to makes use of a variable for the city. To custom this I have created

  • My iphone 5 display has broken and i want to know there is any procedure to replace iphone ,it is out of warrenty

    display has broken and i have to replace my iphone 5 , there is any procedure to do this if yes then please help

  • Read on macbook

    Read iBooks on MacBook? I don't understand why I would ever buy an iBook from Apple if can't read it on my Mac, when the Kindle application makes it easy to read across my Kindle, iPhone, iPad, and MacBook Pro.  Is an App going to be released for thi

  • DBMS_LOGSTDBY.BUILD Seems to Hang

    Hi Group, One step on the logical standby creation is to execute the package DBMS_LOGSTDBY.BUILD, however it has been executing for almost three days and it does not return the sql promt, I read about metalink note 747495.1 DBMS_LOGSTDBY.BUILD Seems

  • Can i swap m2n78-la pn 573400-001 with m2n78-la5 pn. 503098-001

    i have a m2n78-la  pn 573400-001 that no longer works and i need to replace it but am having trouble finding one with the same part number, will i be able to replace it with one with a different part number and still have all the holes in the right p