Expense lines

I have a custom table which stores(expense report lines data) for each invoice number.Currently the number of lines in this table are duplicated.Lets say the standard table has 4 lines for each invoice number, the custom table has 8 rows or more than that.I have the query to find the number of lines in the standard table as
select count(*) from ap_expense_report_lines_all ape
WHERE ape.report_header_id = (select report_header_id from ap_expense_report_headers_all where invoice_num = 'IE739123');
Now what I need to find is the extra set of lines in the custom table (duplicate rows exclusively)
by comparing the number of lines in the standard table for each invoic numeber
Can u please help how to find this?

You can find the duplicaiton by having atelead one unique value other than invoice number.
However you can write s simple plsql -which will read from original table by inv no and compare in the target table line by line -if that line is ok first time update a fiedl with "OK" , if the same inv-line comes againing just update with "DUP"
At last delete all which are having avlue "DUP"
-HOp you got the logic

Similar Messages

  • Profit Center in Expense line item

    Hi
    We have a scenario where at month end we are destroying goods which were returned. We credit and inventory account and debit the Return goods destroyed account.
    In the inventory account, we have a profit center which is appearing from material master. In the expense line item too same profit center was getting posted. Somehow from this month when we did the write off postings, we got the dummy profit center in the expense line item. Inventory acount was correctly being posted.
    It seems that some system is not able to find the profit center for the expense line item. We are not sure what happened.
    Just need some insights on what could be the issue..?
    what we already checked:
    OKB9 - Profitability segment is there for expense line item
    3KEH/3KEI - Expense account not maintaine there too.
    We looked for any enhancements but does not seem to exist in this case.
    Many thanks for your help in advance.
    Regards
    Neeraj

    Ajay
    Many thanks for your quick reply.
    answer to your questions below.
    1. Cost element was created long time back and was never changed.
    2. I checked the earlier posted accounting documents and profit senter was same as in material master but now it is dummy profit center.
    3. CO docs were generated earlier as well as now with profitability segment as cost object.
    Let me know if you need any further information.
    Regards
    Neeraj

  • Assignment field in expense line item  FB60 missing

    Hi
    I got a problem like, in  Quality client, TCODE:FB60 has "assignment field" for expense line item(not in vendor line item). But in Development client this field is missing. How to get the field in development.
    VVR

    Hi murali,
    Thanks for the reply.....But, this is not the problem after i entered the GL . Before giving any GL, on just opened screen, iam not able to see the assignment field at all .......is there any variant needs to be select for that.
    As you said for checking the FSG...but that is only for the particular GL which you have entered...but before entering the GL iam not able to see the field...
    Hope you got clear about the probelm.....
    (in Menu...options...screen variant is there but it is so confusing )
    VVR

  • Stamp Tax on Expense line item

    Hi,
    I'm trying to find a way to calculate the tax based on the expense line in the vendor invoice FB60. So, I can get
    DR.  Expense    110
        CR. Vendor                100
        CR. Stamp Tax(10%)  10
    (to record the expense of $100 plus tax $10)
    Your advice is appreciated in advance!
    Regards,
    Aly

    Hi aly,
    The first one , you like to add the Stamp Tax to your expense line item , it can be done in the tax procedure, by changing the Account key you used against the condition.
    Follow the path
    IMG - Financial Accounting - Financial Accounting Global Settings - Tax on Sales/Purchases - Basic Settings - Check and Change Settings for Tax Processing
    in this select the posting key you used against the condition type (fr ex, MWAS use Account Key MWS) , in the accounting key there will be a posting indicator,
    1          No posting required                        
    2          Separate line item                         
    3          Distribute to relevant expense/revenue items
    You select 3 which will post that 10$ to your expense account.
    The other one how to post to stampduty account again, i will check and comeback to you.
    Thanks and regards
    Praveen.J

  • MIRO with LC2 amount in Expense line

    Dear Friends,
    When we post an invoice through MIRO, the accounting document will be as follow:
    Dr. GR/IR account
    Cr. Vendor
    But here I found a weird case,when we post a MIRO, the accounting document created is:
    Dr. GR/IR account
    Cr. Vendor
    Dr. Expense/Inventory with amount 0 in local curreny  amount and some value in LC2 currency. Here LC is SGD and LC2 is USD. 
    why there's inventory/expense line in the document only with value in LC2 and local currency 0.
    Pleaes help.
    thanks,

    Hi,
        The translation rate will have changed between GR and IR date, hence the posting in LC2.
    Kind regards

  • Depreciation run :Map depreciation expense line with acc. depreciation line

    Dear all my friends,
    after execute Depreciation run, i don't know which line items are matched together.
    i mean, can you show me which depreciation expense line match to which acc. depreciation line.
    many thanks !

    Hi
    start the depreciation log AFBP ... that´ll provide you this information.
    Regards,
    Markus

  • Applying FX rates to multiple Expense Lines

    Issue  Reported
    Is it possible to proving users with an option of applying the same rate to multiple expense lines. For example:
    The exchange rate used by the system is lower than the one charged by the bank – 0.12438 vs. 0.12843. Not a massive difference, but one which matters on large amounts. There is unfortunately no way to change the FX rate used globally by the system; this has to be manually done for each and every expense item

    Hi All,
    As you are aware that you can able to manually change the FX rate per expense item. But if you require to change the FX rate for entire or most of the expense items then it is recommended that you maintain/update the exchange rate globally i.e., in the Travel Admin work center > Update exchange rates.
    Thanks
    Lokesh Sharma

  • Unable to load Some Budget Expense lines

    I am unable to upload budget for some expense lines. When I try to upload for these affected expense lines the system is displaying a message u201CBudget for 2009 exceededu201D.
    Can anyone help me on how to resolve this problem.
    regards
    Davies

    Dear Harmees,
    Unfortunately T.Code IM32 does not exist in the version I am using i.e SAP R/3 Version 4.6c.
    What else can I try to resolve this problem?
    regards,
    Davies

  • Workflow not triggering after undletion of expense line item after release

    Hi Experts.
    There is one issue in which a PO contains inventory line item (an item without account assignment category) and expense line item (an item with account assifnment category).The user releases the PO through workflow.The user then deletes expense line item and after a span of time he undeletes the same line item.Now the business requirement is after undeletion of expense line item the workflow should trigger again.I have consulted with technical team they say that it is not possible by coding and is possible trough customization.

    Hi,
    Please check that Change Version for PO is active.
    IMG: SRM -> SRM Server -> Cross-Application Basic Settings -> Switch On Version Control for Purchasing Documents
    Regards,
    Masa

  • Oracle I Expense Line Number Issue

    Hi Experts,
    I have put custom validations on Credit Card and Cash Transaction page in I Expense. For fetching the line number, i am taking the distribution_line_number column of ap_expense_report_lines_all table. But this is creating one problem. If user enters 2 lines on Credit Card transaction page and 3 on Cash Transaction page, then if an error is on first line of Cash Transaction page then error is populated as Error at Line 3.
    Please knoe if anybody of you have faced the similar issue in the past and is there any code provided by Oracle to find the correct line number

    Hi,
    Thanks a lot for your immediate response.
    But I have few more doubts. The srw.get_page_num will return the current page number only. Is there any srw function to get the total no. of pages?
    Or can you please explain how to get values in the boilder plate. We tried this but boilder plates could not be made invisible. And also if we tried to get the values inside a PL/SQL formula, it is not accessible.
    Awaiting your reply...
    Thanks in advance.

  • MIRO - Automatically generated expense line items

    Dear CO gurus, we are planning to use W/Tax tax posting with MIRO, where the credit gets posted to a B/S Account but the debit gets posted to an expense account (requiring a cost object). These are automatically generated posting based on the W/Tax configuration. I can use OKB9 to direct the postings to one single cost object per company code but it doesn't help. We want the cost object (whether cost center or order or wbs element) from the GR/IR account, which has the correct cost object, to be populated to this automatically generated expense posting.
    We appreciate if you can help us with any User-Exit or any other way, this can be accomplished. We are on ECC 5.00 and are using document splitting.
    Thanks,
    Joe Teli

    Hi
    Can u check the following exits
    EXIT_SAPLG_GLFLEX_EXITS_003.

  • Trip without expenses (receipts) lines

    Hi all,
    When creating a trip via PR05, if we don't enter any expenses in the Receipts tab, is it supposed the WF to be triggered (on saving)?
    Is this the standard behavior?
    I need it to be triggered once the trip has 'per diem' expenses that you only can see if select the 'Simulate' button.
    But these values aren't available anywhere when you save the trip...
    Thanks in advance.
    Nuno

    Raja, I did it already and these are production scenarios...
    but if the trip doesn't have expenses in the Receipts tab, nothing is triggered when saving the trip. But if you select the Simulate button, there's per diem amounts (meals, accom...).
    The event is only triggered if you save the trip after entering an expense line in receipts.
    So, the question is to know if is there any config behind, as Arghadip was saying, to trigger the workflow when saving the trip (event created) without expenses, or is there any other way of doing it...
    thanks

  • SPLITTING MORE THAN ONE LINE ITEM IN ECC6.0

    Hi everyone.
    I am using New GL functionality in ECC6.0. I have a big question regarding multiple objects splitting. Ej: Purchase of a service.
    If I set one cost centre in the expense line item, the profit centre and segment are determined automatically in the vendor line (in the vendor invoice).
    Then I post the payment and, without introducing any cost object, the profit centre and segment are determined automatically in both balance line items. Everything is ok.
    However if in the original vendor invoice I use 2 cost lines with different cost centres: New GL splits everything alright and I get the vendor lines splitted with the right profit centre. When I post the payment, with new GL I don't get any split or balance line are properly posted with a PC.
    Resuming, splitting works properly in both vendor invoice and manual outgoing payment when originally there is only one cost line and one cost centre. However, when using 2 cost line with different cost centres, splitting is only working in the vendor invoice but I can't get it work in the manual outgoing payment.
    Thanks for your help.
    Miguel

    There is a config setting called classify document type for document splitting, or something like that.
    Here you have all of your doc types, and then you assign a business transactions
    The point I am making is that you need to check there, and that the config for the business transactions are the same.
    Can you confirm if the payment document actually posted. If it did then it passed the config rules you have set for doc splitting. Make sure you are looking at like for like and both documents are the general ledger view and not the entry view.

  • FGI0 - FGI5 Issues with Some Profit Center with Line Items

    Hi Experts,
    I am running with some issue, not sure if im missing something. I have created a report form thru FGI4 (with FAGLFLEXT), i have two line items which are related to expenses which are going to cost center and another line item which are related to revenue which is goint to PA segment. In expense line items i just added two characteristics one is chart of accounts and another one is account group for revenue items i have added chart of accounts, account group, profit center group and CO area. later i created a report thru this form and executed, i dont get any values for expense line items, where as for revenue i get the values, i dont why.
    If i remove the profit center group in revenue line items, i get value for both expense and revenue. and i tried this option adding all profit center group for expense line items, then i get nothing for both exp and revenue.
    The reason for having profit center group in line items, is to show reveneue from different profit centers.
    I dont know what i am messing up, can anybody help me out please
    Best Regards
    gj

    Dear Mr Saurab
    Thanks for nice reply . As suggested I passed entry using Tcode 9KE0 and incorporated the Profit Center correction .The document also got posted as type A0 .
    However when we are taking the report for the reference GL & Profit-Center using Tcode S_ALR_86000030 , there is no change in the figure . The figure remain same as appeared before posting of Document using Tcode 9KE0 .
    Kindly guide us on the above please .
    Regards
    B Mittal

  • How to make Cost Center display/default at expense level in PR05

    Dear Friends
    I've a requirement in Travel Mgt where in PR05 at each expense line item level i need cost center to be displayed by default as 100%. Is there any possibility at the config level or Exit level to make it default.
    Currently we are using a Exit: ZXTRVU03 for Cost center & Business area validation. where my client has given us a cost center ranges to make business area as default explicitly only for Travel Mgt. for ex: we have a Cost center range as 74001 - 74018 for this range the default business area for Travel Mgt must be 101 and for HR & FI it can be 101-110 any range. Based on that we have written a program using the Exit ZXTRVU03. Now the problem we are facing is in Master data the employee is falling under the above mentioned costcenter and HR has given a business area which falls under 101-110 (take example as 105)
    Now the issue here is, based on the Master data, when we incur any expense in PR05, the Business area 105is coming by default for any of the expense. Now as per my client, this is wrong. It must be 101 at any cause. So, based on that we have made an enhancement that if user changes the Cost distribution to 100% or make the cost distribution with splits like 50% with home cost center & 50% with another cost center then only our enhancement gets triggered. But user is not satisfied with the solution provided, as we cannot expect users to change the cost distribution unless there is a split. So we are planning to pass a value in the cost distribution field as 100% ( as in std the field itself is blank, but still it denotes as 100%)
    I hope the above screenshot makes it clear. Now instead of manally entering 100% to make the enhancement trigger, is there any possible solution where I pass the value as default 100% to make users life easier.
    Note: we are not maintaining IT0017 for cost center, company code, Business area as we are reading this data through Master data.
    Kindly provide me your valuable solutions.
    Cheers
    Pradyp

    Hi Parakala,
    Maintain Cost centre at each Organization unit at infotype 1008.
    at PR05 it will pick by default.
    Let me know if you need more information.
    with regards,
    Gopala

Maybe you are looking for

  • Apple TV in recovery mode, Apple TV in recovery mode

    Hello people, For some odd reason every time I plug my apple tv 3rd gen into the computer it says its in recovery mode. It is not jailbroken, stolen, etc. and its on the latest software. Even after restoring it still shows the message. Can someone pl

  • Problem with K8NM

    hi all hope someone can help i've just finished assembling a new PC for my parents and i have a huge problem here is the configuration: motherboard MSI K8NM AMD 3000+ HD 160 Gb maxtor MSI RX9550 128Mb video card 2 DVD drives 512 MB ram everything is

  • Problem in Master-Detail blocks

    Master table : M_sysid, item_code, qty Detail table : D_sysid, M_sysid, bno, qty Requirement : The sum(qty) in detail should always match with master's qty, if the item is a batch item. Post should not be used in the form. The system should not throw

  • IPhoto and/or Image Capture do not recognize iPhone 3G and/or 4

    SYSTEM DETAILS: Operating System: Snow Leopard - 10.6.6 iTunes 10 - 10.1.1 (4) iPhoto '09 - v8.1.2 (424) Image Capture - 6.0.1 (428) iPhone (3G and 4) - iOS 4.2.1 OPEN USER ACCOUNT 1: When connecting iPhones to Mac the following actions take place: i

  • Can anyone clarify APPLETS?

    I am developing an applet to run online. The applet is supposed to call a program to check indentation of students pascal programs stored on local PCs. the pascal programs are stored on disk (A drive) and the students go online to the applet to fill