How to find which Credit Memo belongs to which AR Invoice?

Hi all.
I wish to get a report where I can know which credit memo is used to cancel which invoice as I found in my report that some of the invoices still showing even the users has cancelled it using credit memo.
I know I might refer to ORIN & OINV but I can't  find any relation between these two tables.
Kindly advice me on the above matter.
Thanks.
Best Regards,
xavier

Hi,
Please check this :
select distinct case when t5.trgetentry is not null then t2.Docnum Else NULL end as [AP Credit Memo] ,
CASE when t4.Baseref is not NULL then t4.Baseref Else NULL end as [AP Invoice Number],
t1.cardcode
from JDT1 T3 inner join OPCH t1 on t3.transid = t1.transid and t3.shortname <> t3.account
inner join ORPC t2 on t3.transid = t1.transid and t2.doctotal = t1.doctotal
inner join RPC1 t4 on t4.docentry =t2.docentry and t4.baseref = t1.docnum
inner join PCH1 t5 on t5.docentry = t1.docentry and t5.trgetEntry = t2.docentry
order by cardcode
select distinct case when t5.trgetentry is not null then t2.Docnum Else NULL end as [AR Credit Memo] ,
CASE when t4.Baseref is not NULL then t4.Baseref Else NULL end as [AR Invoice Number],
t1.cardcode
from JDT1 T3 inner join OINV t1 on t3.transid = t1.transid and t3.shortname <> t3.account
inner join ORIN t2 on t3.transid = t1.transid and t2.doctotal = t1.doctotal
inner join RIN1 t4 on t4.docentry =t2.docentry and t4.baseref = t1.docnum
inner join INV1 t5 on t5.docentry = t1.docentry and t5.trgetEntry = t2.docentry
order by cardcode
Hope it helps.
Kind Regards,
Jitin
SAP Business One Forum Team

Similar Messages

  • HR   how to find which personal area belongs to which country

    HR
    how to find which personal area belongs to which country
    thank you,
    Regards,
    Jagrut Bharatkumar shukla

    Hi,
        You can use the table T001P for finding that  for eg.,
    <b>Select molga from t001p where werks = 'Your Personnel area code'.</b>
    Thanks
    Yogesh

  • How can we create credit memo with reference to INV

    Hi,
    Pls tell how can we post credit memo with reference to Invoice which is posted through SD.
    Is there any use with reference to field in T.Code FB75.
    Thanks in advance,
    Padmaja

    Hi Vijay,
    I could not found any field for Inv. reference in the Payment Tab of T.Code FB75.
    Is there any facility in SAP to create Credit Memo for a particular customer with reference to Invoice. All the details of that Invoice should get updated in the credit memo automatically.
    Thanks in advance,
    Padmaja

  • How to create a credit memo for an existing sales order !

    Can any body help for how to create a credit memo for an existing sales order !

    Hi,
    It is actually possible to create credit memos from sales orders though it is not followed in most of the scenarios.
    We have got a scenario in commodity trading that a sales order will be created with positive value. Once the swaps are settled by the portfolio mngt team, if we have to give some money to the payer, then a credit memo will be greated (as in their case all invoices will have only +ve value as net value) with reference to the sales order. In the copy control, the main field to be taken care of at itme level is the PRICING TYPE for which a value of F has to be maintained. This will convert the sign of the values and fix them. Now a credit memo will be created for teh saels order.
    In this case, the document cateogyr of sales order will be C in VBAK, but it will be K in VBFA table which is the table for document flow.
    Hope this answers your question. You can reward if it helps you.
    Otherwise the normal process is
    SALES ORDER---INVOICECREDIT MEMO REQUEST----CREDIT MEMO

  • How to find which model of iPhone 5 I am using? and is that GSM or CDMA?

    How to find which model of iPhone 5 I am using? A1428 or A1429 ? Is there any short code you can dial in and check the model number ?
    And which is GSM or CDMA out of this model.

    If you purchased the phone in the US with an AT&T contract then you have the locked CDMA A1428 version of the iPhone 5. 
    At the moment and if the contract is a new contact, then you won't be able to get the phone unlocked at the moment and no, you won't be able to use it in your home country.  You will also have LTE 4G compatibility issues too and your phone will only work on 3G and also you need to remember that iPhones are only covered by country specific warranty, so it is only covered in the US, so if you go home and then have a problem with your phone, you will have to come back to the US to get it repaired.
    You need to approach AT&T about whether they will unlock your phone for you as they are the ONLY ones that can do it, but the answer to your question is no and if you had wanted to use your phone at home, then you should not have purchased it in the US.  The best that you can hope for at the moment is to use it on international/roaming.
    If you purchased your phone in the US, then it will be a CDMA phone.  You don't have a GSM phone, but GSM phones are unlocked anyway and these are the ones that are selling in Canada and the UK.
    If you have your phone on an AT&T contract then ultimately, AT&T are the only ones who can help you with any questions regarding unlocking and they are the only ones who can unlock it for you, noone else.

  • MRRL : How can we create Credit Memo for these Invoices

    Hi Gurus,
    How can we create Crerdit memo in case when the Invoice has been posted thru MRRL?
    Is there any way the we can do Subsequent Credit / debit for the ERS vendor (posted by MRRL) as well?
    Thanks in advance
    Shashidhar

    Hello
    How can we reverse fi document created through MRRL transaction.
    FI document cannot be reversed reason being -Error-Invoice doc. 5105692828/2009 was created via evaluated receipt settlement.
    GR material document cannot reversed reason being-Error-Deficit of PU IR quantity 1,456.000 CS
    Not possible even to return the delivery to Vendor , Movement type 122
    Thanks
    Dinabandhu

  • How to find which authentication used to site collection and site using powershell

    Hi,
    How to find  how-many web app, sitecollection, site used Windows authentication,claim authentication and classic, secure store authention , adfs authentication using powershell code in sharepoint 2013.
    If sites are used adfs authentication how to find which email id used for that.
    Thanks,

    Authentication is only defined at the Web Application level, and the only valid auth methods are Classic (Windows (Basic/NTLM/Kerberos)), Claims (Windows (Basic/NTLM/Kerberos)), FBA Claims, , SAML Claims (ADFS), and Anonymous.
    You can find out what authentication scheme(s) are enabled via:
    $wa = Get-SPWebApplication http://webApp1$wa.IisSettings["Default"] #replace with the zone name you're interested in
    The output will look similar to this:
    PS C:\Users\trevor> $wa.IisSettings["Default"]
    AuthenticationMode : Forms
    MembershipProvider : i
    RoleManager : c
    AllowAnonymous : False
    EnableClientIntegration : True
    ServerBindings : {Microsoft.SharePoint.Admini
    stration.SPServerBinding}
    SecureBindings : {}
    UseWindowsIntegratedAuthentication : True
    UseBasicAuthentication : False
    DisableKerberos : True
    ServerComment : SharePoint
    Path : C:\inetpub\wwwroot\wss\Virtu
    alDirectories\spwebapp180
    PreferredInstanceId : 42768054
    UseClaimsAuthentication : True
    ClaimsAuthenticationRedirectionUrl :
    UseFormsClaimsAuthenticationProvider : False
    FormsClaimsAuthenticationProvider :
    UseTrustedClaimsAuthenticationProvider : False
    UseWindowsClaimsAuthenticationProvider : True
    OnlyUseWindowsClaimsAuthenticationProvider : True
    WindowsClaimsAuthenticationProvider : Microsoft.SharePoint.Adminis
    tration.SPWindowsAuthenticat
    ionProvider
    ClaimsAuthenticationProviders : {Windows Authentication}
    ClaimsProviders : {}
    ClientObjectModelRequiresUseRemoteAPIsPermission : True
    UpgradedPersistedProperties : {}
    So on this Web Application in the Default Zone you can tell I have Windows Claims enabled, not using Kerberos (so using NTLM), and Trusted (SAML/ADFS) is not enabled, neither is Forms or Anonymous.
    Trevor Seward
    Follow or contact me at...
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • How to find which function module write the relevant idoctype?

    Dear All,
    how to find which function module write the relevant idoctype?

    Hi,
    Generally the function modules of the idoc types are having a naming convention as IDOC_INPUT for inbound processing and IDOC_OUTPUT for outbound processing followed by the idoc type name
    for example : For IDOC type ORDERS
    the inbound function module will be IDOC_INPUT_ORDERS and for outbound IDOC_OUTPUT_ORDERSP
    In this way you can find the function module for a particular IDOC
    P.S: Hope this is what you have asked for
    Regards
    Sarves

  • How to Find Which Programs running in my Domain Computers

    How to Find Which Programs running in my Domain Computers.

    In addition, there are other third tools you can use. Here is a script from the TechNet Scripting Gallery:
    List All Installed Software
    Returns a list of all software installed on a computer, whether or not by Windows Installer. This script reads installed applications from the registry. (See Richard Mueller's comment on how to output it to a CSV file)
    http://gallery.technet.microsoft.com/scriptcenter/8035d5a9-dc92-436d-a60c-67d381da15a3/view/Discussions
    Of course that's just running it against one computer. There's also a script in the above link (scroll to the bottom) that will find installed software of a list of computers in a network and also detect the defined forbidden installed software, and
    another script that will uninstall that software remotely.
    Overall however, if you want to do this network wide with much a much easier method (although more complex to setup), I agree with using SCCM or Spiceworks. There is also Altiris, and a number of other third party solutions that you can use.
    Maybe if you can provide more specific information on the end result of the solution you are looking for, we can provide more specifics to help you.
    Ace Fekay
    MVP, MCT, MCSE 2012, MCITP EA & MCTS Windows 2008/R2, Exchange 2013, 2010 EA & 2007, MCSE & MCSA 2003/2000, MCSA Messaging 2003
    Microsoft Certified Trainer
    Microsoft MVP - Directory Services
    Complete List of Technical Blogs: http://www.delawarecountycomputerconsulting.com/technicalblogs.php
    This posting is provided AS-IS with no warranties or guarantees and confers no rights.

  • How to find which datasource are using  tables AFRU ,CAUFV and AUFM

    *how to find which datasource are using  tables AFRU ,CAUFV and AUFM*

    Hi,
    You can enter your table names in SE11 transaction and click "Display" and again click "Where -Used-List". Then it will show all the places where these tables are used(Datasources)
    Hope this helps.....
    Regards,
    SUman

  • How to find which query taking more cpu

    Hi,
    How to find which query taking more CPU
    at a particular point of time .
    Chhers,

    Take a look at Server Standard Reports. It has a few CPU usage oriented reports.
    You can also track CPU usage by server-side tracing:
    http://www.sqlusa.com/bestpractices/createtrace/
    Glenn Berry's CPU usage query:
    SELECT TOP(25) p.name AS [SP Name], qs.total_worker_time AS [TotalWorkerTime],
    qs.total_worker_time/qs.execution_count AS [AvgWorkerTime], qs.execution_count,
    ISNULL(qs.execution_count/DATEDIFF(Second, qs.cached_time, GETDATE()), 0) AS [Calls/Second],
    qs.total_elapsed_time, qs.total_elapsed_time/qs.execution_count
    AS [avg_elapsed_time], qs.cached_time
    FROM sys.procedures AS p WITH (NOLOCK)
    INNER JOIN sys.dm_exec_procedure_stats AS qs WITH (NOLOCK)
    ON p.[object_id] = qs.[object_id]
    WHERE qs.database_id = DB_ID()
    ORDER BY qs.total_worker_time DESC OPTION (RECOMPILE);
    LINK:
    http://dba.stackexchange.com/questions/52216/sql-server-2008-high-cpu-historical-queries
    Query optimization:
    http://www.sqlusa.com/articles/query-optimization/
    Kalman Toth Database & OLAP Architect
    SELECT Video Tutorials 4 Hours
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • How to find which transparent tables compose cluster tableuFF1AKONV

    How to find which transparent tables compose cluster table&#65306;KONV

    Hi,
    Welcome to SDN.
    Try doing this ....
    1). Goto se12 and display the table BSEG
    2). Click on the Delivery & Maintenanace tab
    3). Double click on the Pool/Cluster field
    4). On the next screen do a where used list
    You will find all the related tables.
    Regards,
    Amit
    Reward all helpful replies.

  • How will i configure credit memo & debit memo

    how will i configure credit memo & debit memo...

    Hi,
    [Credit Memo|https://www.sdn.sap.com/irj/sdn/bpx-miningmetal?rid=/business_maps/guid/eg1slxvyat1odhrwoi8vzxn3b3jrcgxhy2uuc2fwlmnvbs9zb2nvdmlldy9ty3bnzxquyxnw%0d%0ap3bhy2thz2vpzd0mdmlldz1zbwnyzw5kzxiyjmlkptfgque1qjqzruqyqzrenzlbrjewndzeq0nc%0d%0amthcn0i4jiz4c2wtymfzzt1odhrwoi8vzxn3b3jrcgxhy2uuc2fwlmnvbs9zb2nvdmlldy9ty3bn%0d%0azxrfbwltzs5hc3a/dxjspxnkbl9uzxcvjiz3zwitdxjspwh0dhbzoi8vzxn3b3jrcgxhy2uuc2fw%0d%0almnvbs9zb2nvdmlldy9ty3bnzxrfbwltzs5hc3a/dxjspsymehnslwxpc3q9c2rux2dlbmvyywxf%0d%0acmvuzgvylnhzbhq7c2rux2xpbmtyzxdyaxrpbmcuehnsddtnzw5lcmf0zuhutuxfu0rolnhzbhqm%0d%0ajnbhy2thz2utawq9jizyzxnvdxjjzxr5cgu9c2rux3nvbhv0aw9ux2nvbxbvc2vyx2z1bgxwywdl%0d%0ajizwyxjlbnrssuq9l2j1c2luzxnzx21hchmvnkjfody2rjk5oeiwney4njlbnzc4mzm4mungqtcx%0d%0anzavnzzcrtrfrjm3ruq3nde0mefenemymtm0qtzdody3njevrjvbrtm5mjc4mue1ndjgqujfqzi3%0d%0amjheouiyrtrfntyvrjazqtm4qtyzm0rdndnfm0iwnzu3ruu0qkfeotyyn0yvn0uymzk4oeferddd%0d%0anei5mjg5mdjeouzcoumwreyzq0mueg1sjiz0axrszt1dcmvkaxqgtwvtbybqcm9jzxnzaw5njiz2%0d%0aaxj0dwfspxrydwu=&prtmode=default]
    [Credit Memo Processing |help.sap.com/saphelp_crm40/helpdata/en/00/3853f5993679408a1e25fb84a43c32/content.htm ]
    [A/P Credit Memo |help.sap.com/saphelp_sbo2004a/helpdata/en/1b/ded618b0f6ac419a46900612a32daf/content.htm ]
    [F-27 - Enter Credit Memo|web.mit.edu/cao/www/AR/ar2/ar_F-27.htm]
    [Credit/Debit Memo Request |http://sapdude-sapsd.blogspot.com/2007/07/creditdebit-memo-request.html]
    [Debit Memo|help.sap.com/bp_blv1500/BL_US/HTML/Scenarios/V4D_Scen_EN_US.htm]
    Assign Points if helpful.
    Thanks and Regards,
    Naveen Dasari.

  • How to find which instance in the RAC cluster the application is connected

    How to find which instance in the RAC cluster the application is connected to ?
    Raees

    well if you know the user through which your application is connected to instance, you can easily find out by querying gv$session view.
    select inst_id,sid,serial#,program,username from gv$session where username is not null;
    Thanks
    Gaurav

  • How to find which version of JDK is loadjava using

    Hi All,
    How to find which version of JDK is loadjava using?
    I am using Oracle : 9.0.1.5.1 and I need to use class javax.crypto.Cipher which is shipped with JDK 1.4.2, but loadjava is unable to import javax.crypto.*;
    Any inputs would be greatly appreciated.
    Thanks and regards,
    Abba

    Abba,
    From memory only (since I haven't verified it), "loadjava" is a script, so you can have a look at its contents. I believe it actually uses JDK 1.1.8 (which is part of the Oracle installation). In any case, Oracle 9i is compatible with JDK 1.3 only.
    Oracle 10g is compatible with JDK 1.4.
    Good Luck,
    Avi.

  • How to find which sql or process that is causing lots of swap space

    Hello,
    There is a lot of swap space going on constantly. The SGA is 18gigs and PGA is 2 gigs. The swap space is 19gigs. How to find which processes or sql statements that are using a lot of sga and paging? The database is 10.1.0.5. and the tool OEM 10g. Thank you in advance.

    v$sort_usage or v$temp_segusage give temporary tablespace usage.
    To get PGA memory by session, you could use insteadv$process.

Maybe you are looking for