Select  Credit Memo Lines in Add Mode

Hello Experts,
I need help on selecting credit memo lines in add mode. Here is my stored prcedure:
Declare @IN_DocEntry     nvarchar(50)
      ,@IN_TranType     nchar(1)
Declare @DE Int
select @DE = cast(@IN_DocEntry as int)
Create Table #CreditMemo
                                             (DocEntry int not null
                                             ,LineNum int not null
                                             ,TargetType int null
                                             ,BaseRef nvarchar(16) null
                                             ,BaseEntry int null
                                             ,BaseLine int null
                                             ,LineStatus Char(1) null
                                             ,LineTotal numeric(19,6) null)
If exists ( select 1 from RPC1 t0 where t0.DocEntry=@DE)
begin
Insert into #CreditMemo(DocEntry,LineNum,TargetType,BaseRef,BaseEntry,BaseLine,LineStatus,LineTotal)
select DocEntry,LineNum,TargetType,BaseRef,BaseEntry,BaseLine,LineStatus,LineTotal from RPC1 where DocEntry=@DE
end
select * from #CreditMemo
For Instance:
1) say i am in Add Mode on Credit Memo
2) Copied three Invoices on to Credt Memo ( each invoice contains 3 lines, hence 9 lines on Credit Note)
3) Now i would like to select 9 lines which are on Credit Memo and insert into temp table( Note : I haven't added the CM )
When executed the above stored procedure in add mode i get empty list. Please advise me.
Thanks,
Praneeth

Self Resolved

Similar Messages

  • Credit Memo line in ra_interface_lines_all attach to Invoice Header only

    Hi,
    is it possible to bring in a credit memo line via the ra_interface_lines_all table, where the credit memo is attached to the invoice header only.
    I do not want to link each credit memo line to an invoice line.I just want to be able to link the Credit Memo to an invoice.
    Is this possible ? if yes, how ?
    Thanks
    Preeti

    I think that just means they have not been processed.
    Here is a good troubleshooting document:  How To Troubleshoot ORA-01403: No Records Processed After Running Autoinvoice (Doc ID 134570.1)

  • AR credit memo can not add

    Hi
    I try to add AR credit memo with downpayment. Balance of invoice is -0.01
    When i hit add button nothing happens. No error. Document is still in "Add" mode.
    What can be the reason?
    SAP 8.82 PL6
    Regards
    Lukasz

    Hi,
    Not sure this SAP note can help:
    1708110 - How can you refund the amount received for fully paid A/R
    down payment invoice?
    Thanks & Regards,
    Nagarajan

  • GL Account for Credit Memo Lines

    Hi,
    Credit memo is being created against RMA. The RMA has 2 lines - one for finished goods and the other for freight charges. Freight charges are being entered by using Freight and Special charge List price modifier set up(Freight/Special Charge - modifier type) and entering the charges manually at the sales order headers.
    When credit memo is being generated the GL account(class - revenue) that is hit for the freight charges is getting defaulted from the "Freight Account" that is set up at the AR Invoice Transaction Type form. The GL account for the finished goods is getting defaulted from the revenue account defined at AR Invoice Transaction Type form.
    Is it possible, to make a set up so that the GL account for freight charges gets defaulted from the revenue account defined at AR Invoice Transaction Type form. We do not want to change the Freight account combinations in AR Trx Type.
    Regards,
    Saurov

    One is value based condition type and another one is percentage based condition type and this being the case, I am not sure, whether you could succeed in this.
    For information, there is a provision such that in billing document if you have 5 line items and in FI, if you want to consolidate into one line item, the same can be achieved as follows:-
    Go to IMG -- Financial Accounting --> Financial Accounting Global Settings --> General Ledger Accounting --> Business Transactions --> Integration --> Sales and Distribution --> Perform Document Summarization for Sales and Distribution.
    There make the settings according to your requirement but again, I am not sure, whether your requirement can be met.
    thanks
    G. Lakshmipathi

  • Credit Memo DFF does not contain information from the original invoice line

    Hi
    Customer is facing issue mentioned in Note: 364999.1
    Issue: Created a credit memo against the invoice and noticed that the resulting credit memo lines do not contain the DFF information from the original invoice lines.
    I found through Metalink that this issue was reported to Oracle for release 11.5.7.
    Looks like the fix was to provide a check box in RAXSUMSC.fmb.
    - One off Patch for 11.5.7 - Bug / Patch 2803629 (one-off patch)
    - One off Patch for 11.5.8 - Bug / Patch 3411221 (one-off patch)
    - 11.5.9 - nothing available !!!!
    As per bug 2675652 the issue was fixed in a file RAXSUMSC.fmb, version 115.41 This BUG shows that it has been fixed by in 11.5.10
    Customer is using 11.5.9 which has RAXSUMSC.fmb, version 115.40, we cant apply patches for 11.5.7 or 11.5.8 that are available.
    Any pointers on what can be done ?
    Thanks,

    Hi Pat,
    the project code (PC) on the marketing document may only be applied to the business partner (BP), hence the only row in the associated journal entry (JE) with this project code is that of the BP.
    You can link project codes to specific accounts (CoA -> select account -> account details -> project code) & this project code will then be assigned every time the account is found in a JE.
    If you require the project code to be applied to the freight, you may assign this project code to the account you have defined for this freight. The drawback is naturally that the project code will then  be pulled every time this freight is used, regardless of whether or not the PC is associated with the BP or not.
    It is possible to manually assign project codes to every row in a journal entry, hence this should also be possible with SDK. You might explore the possibility whether it might be possible to automatically assign the BP PC to all rows in the JE using a script.
    All the best,
    Kerstin

  • How does Goods Issue know which Batches to deallocate from A/R Credit Memo?

    Hi,
    I am creating an addon that runs after a A/R Credit Memo is created.  It creates a Goods Issue, and enters the Item Code and the Quantity from the line items on the Credit Memo into the Goods Issue.
    After it writes the Goods Issue to SAP, I open up the document it created and see that the line items are in there correctly, and that somehow the batches assigned to those line items are also in there.
    There is nothing in the code that does anything with the Batches, but somehow SAP knows which batches to work with.
    I haven't been able to find any info about it.  Can you please help us understand what is happening?  How does SAP know and make assignments to batches in line items in Goods Issues?
    Thank you,
    Mike

    Hi Michael and Gordon,
    Sorry Gordon, I'm quite sure you misunderstood Michael original question. Michael asked how the add-on he created could link corresponding batch number from an A/R Credit Memo document could be selected by Goods Issue document which generated by the add-on, while he actually never wrote a code to select any batches numbers which available in the system.
    Maybe a little bit of illustration:
    1. Item A, qty 10 - (batch A qty 5, batch B qty 3, batch C qty 2)
    2. A/R Credit Memo occurred, return of Item A with 3 qty (batch A qty 1, batch B qty 1, batch D qty 1). Therefore, item A latest position should be (batch A qty 6, batch B qty 4, batch C qty 2, batch D qty 1). This A/R Credit Memo created by add-on.
    3. Goods Issue document triggered by add-on. The problem is, Michael never write any code to select any batch numbers, and somehow the system choose batch number precisely as occurred in number 2 (A/R Credit Memo document), which is (batch A qty 1, batch B qty 1, batch D qty 1). Therefore the stock position for Item A back to as being displayed in number 1.
    I believe this shouldn't be possible at all. Unless, there is a certain mechanism in SAP that automatically choose batch number to used in Goods Issue document using LIFO (Last In First Out), which is, as far as I know never exist in any SAP B1 version. Yes you could automatically choose batch numbers according to available batch, but you could do this when system prompt you when you tried to issue certain document using SAP application itself, not using add-on.
    And of course, you could write a code to choose certain batches based on certain A/R Credit Memo, but still, you need to write a code, you can't do this without a code, selection of batches is compulsory when you tried to add a goods issue document which consist of items that managed using batches.
    In my opinion, I think it is better for you to re-write those codes and relate batches you want to attach with your Goods Issue document based on corresponding A/R Credit Memo. It is much safer, and the error message you encountered won't happen again in the future.
    Best Regards,
    Hendry Wijaya

  • Credit Memo and A/R Invoice linking

    Hi
    Please help me, how to find relation field  between Credit Memo and A/R Invoice.
    I delete invoice using credit memo with copy from function.
    But when I view last credit memo, i cant find the corelation with my deleted A/R invoice number.
    I found remarks, but i think remarks is not the link for document.
    I really confuse about this. can anyone help me?
    ps: i cant found the relation return and A/R invoice too..
    Thanks so muchh

    Just thought of another trick or two that you might try...
    1.  Open ANY Credit Memo and use the "Find" Icon (the binoculars in the Icon Line) or use "Ctrl+F" to put the credit memo window in find mode.  Put an asterisk in the field where the credit memo number usually is and hit enter...
    It should pop up a list of all credit memos with Remarks - look to see if your credit memo is there.  Or you can sort the whole screen by double clicking on the "Due Date" column of the display. 
    You can view an individual credit memo by highlighting the line (making it yellow) and pressing Enter Key to check that out also...
    2. If that does not work for you, you can always use the SQL route where the OINV.DocEntry = RIN1.DocEntry and get a list that way where you can look through it.
    OINV = Invoice Headers and RIN1 = Credit Memo Lines
    Good Luck - Zal

  • Is it possible to deduct the amount of old A/R Credit Memo from new Sales invoice against the same customer ?

    Dear Friends,
    this issue is for my client which is in Retail Industry.
    In sales when customer is buying items of Price 1000 and want's adjustment of Credit Memo Of Price 700 in this Invoice we have to do the following process :
    1) Change The Payment Terms Immediate To Another like Net 30 (Because there is a default payment terms Immediate for all customer)
    2) Add that invoice of Price 1000.
    3) Open Incoming Payment-->Select Customer-->Select Credit Memo of 700-->Select that price 1000 invoice and collect remaining payment by payment means.
    But this process is difficult to follow in Retail Industry. In all cases they collect the payment by Payment Means in A/R Invoice because there is a Payment Terms Immediate for all customers.
    Is there any process by which we can select the credit memo like process in which we use for advance payment ?
    or   any other way to simplify this process ?

    Hi Swapnil Vichare...
    Create a credit Note 1st , then make a invoice with the credit note amount open.. and using the reconcilation you need to reconcile all the trascation...
    No other possible ways, but using sdk you can develop..
    Regards
    Kennedy

  • Reversing miro quantity at the time of credit memo.

    HI,
    pls suggest me a solution about the miro issue ,here i will explain the scenario.
    Ex:PO was created for the quantity of 100, GR  and Invoice was done for  100 quantity.
    After invoice has been posted, 30 quantity was returned to vendor by movt type 122 from MIGO.
    For this returned quantity of 30,we will have to raise a credit memo.
    So normally from MIRO screen,selecting credit memo option&  PO no. was entered,then system picks full quantity of 100&corresponding amount,
    we use to change the quantity of 30 & corresponding amount manually.
    **Is there any solution,so that system has to propose the quantity &amount for credit memo option in MIRO screen.

    hi,
    Do one think....take help of ABAP consultant..define the below scenerio to him...ask whether its possible or not...
    Use the table EKBE, where system saves all the purchasing data ie. from PO till IR...
    so, now when you have returned the 30 pcs, the table would have got updated for those returns as well...
    So, ask the consultant to trace returns quantities/values (add all if there are partial returns as well) and reflect it in the given field in the MIRO doc..
    Check it out..
    Regards
    Priyanka.P

  • SAP 1099 - not showing credit memo - KG doc type

    Hello,
      When i run the generic w/h report for 1099, it is not showing credit memo , KG doc type .
    The vendor is flagged for 1099 and also the KG doc contains the W/H base and tax code .
    please let me know .
    thanks very much.

    Hi,
    I am sorry, the note is not releasead yet. I will let you know when it would be.
    Meanwhile, please check if the hints below resolves your issue:
    Please run the S_P00_07000134 report (RFIDDYYWT ) with option of 'Further Selection' 'Credit Memo Doc. types'  Technical name of P_CMDCTY with value of KG then desired result will show.
    with Additionally
    please refer the note no  945664
    MANUAL ACTIVITIES:
    1. Goto trasaction se38
    2. Give the program name as 'RFIDYYWT'
    3. Click on Goto->Text Elements->Selection Texts on the Menu bar
    4. Goto editable mode.
    5. Search for parameter 'P_CMDCTY'. Specify the selection text as
    'Credit Memo Doc. types'. Uncheck the adjoining checkbox for Dictionary
    ref.
    6. Activate the changes.
    I hope it helps.
    Best Regards,
    Vanessa Barth.

  • A/R Credit Memo Error..

    Deal All,
    When I Pass the A/R Credit Memo of Excisable Item at that time is Face Following Error.
    Enter Excise Reference Number[Message 140080010-9]
    System not adding the Credit Memo.
    please Suggest me.
    Regards
    Mangesh Pagdhare.

    In A/R Credit Memo ,Tax Tab---add the excise Ref no.
    This no is the similar no you entered in outgoing excise invoice,Excise ref no.
    It will reverse the excise entries also.
    This will solve your problem.
    regards,
    Neet

  • Sales analysis report- showing & totaling both Invoices & Credit memos on o

    I have written a Several sales analysis reports based on INV1 tables and RIN1 tables, (Invoice lines and Credit memo lines) for SAP B1 using crystal. I would like the data from both the invoices & the credit memo to list & total on the same report. But have had no luck doing this.
    Is it possible?
    How would I go about doing it?

    Solved my problem, I used the "Show SQL Query" window on my existing reports copied and pasted them to SQL Management Studio as a View, used keyword Union All to join the two queries (Invoices and Credit memos)  and used the view as the data link to create a new report in Crystal Report writer.
    This got me both of the data files into the report detail line and allow for summing.
    Problem solved.
    Thanks for the input.

  • APP Vendor Credit memo to net off aginst normal invoice

    Hi All
    I would like to know,  what are all the references for "netting off of debit amount of vendor with credit amount while perfroming Automatic Payment run at T.Code F110.
    Ex:  I have a Debit amount against Vendor XXXX of Rs 21000 and Credit amount of Rs. 25000,  At APP system isnot picking up Credit  memo line item of Rs. 21000 for payment.
    please give ur suggession.
    Thanks in advance.

    > Ex:  I have a Debit amount against Vendor XXXX of Rs
    > 21000 and Credit amount of Rs. 25000,  At APP system
    > isnot picking up Credit  memo line item of Rs. 21000
    > for payment.
    Is the credit amount 21000 or 25000?
    Is the credit (invoice) blocked for payment?

  • Multiple credit memo creation for single credit memo request

    Hello,
    The problem is that I am able to repeatedly create multiple credit memos for the same credit memo request.  The system is not stopping me by saying "This order is fully invoiced".
    I observed the following in the customizing:
    1. If the sales document category of the billing document (in VOFA transaction) is 6 (Intercompany credit memo), then I am able to create mulitiple credit memos against the same credit memo request.
    2.  When I change the sales document category of the billing document to O (credit memo), then the system stops me from creating multiple credit memos against the same credit memo request.
    If I want to maintain 6 (intercompany credit memo) in VOFA and still want the system to stop me from creating multiple credit memos for the same credit memo request, then is there is any other customizing to achieve this?
    Thanks,
    Shankar

    Shankar, most likely the billing status of your sales document is not updated. We have experienced the same (or similar?) issue with the intercompany documents and SAP refused to correct it. Here is a fragment of my message exchange with the SAP support:
    We have already read the notes 63459 and 308989. They both do not apply
    to our business process. The document flow mentioned in the notes is as
    follows:
    Sales order - customer billing document - intercompany billing document
    Our document flow is different:
    Contract - customer billing document - Intercompany sales order (could
    be more than one order per customer billing document) - intercompany
    billing document
    The order-related billing status is not being updated on the
    Intercompany sales order.
    The process described in the notes implies one-to-one relationship
    between the customer and inter-company billing documents and the sale
    from a Plant that is assigned to another company. We are in the service
    industry and sometimes the sale revenue has to be shared by 2-4
    companies within our enterprise.
    Good day. It is a standard system behaviour that if the billing document type has SD document cateogry '5' (field TVFK-VBTYP in transaction
    VOFA). So it is an intercompany billing.
    The order-related billing status VBUP-FKSAA is not affected by the
    intercompany billing.
    So its billing status remains opened, and can be billed more times.
    This doesn't seem right to me. Maybe if more customers complain, they will do something about it.
    To some extent this may be managed with copy requirements (VOFM), where you can prevent copying the credit memo line items that have been invoiced. However, this might still lead to the blank documents with 0 value, statuses won't be correct and in VF04 you would see the documents as not invoiced.
    I had to do a core modification to resolve this issue in our system. In LV45P011 include I did the following:
    * Faktura
    *{   REPLACE        DC6K903001                                        1
    *\  IF vbfa-vbtyp_n CA vbtyp_fakt AND vbfa-vbtyp_n NA vbtyp_fkiv.
      IF vbfa-vbtyp_n CA vbtyp_fakt.
    *}   REPLACE
    Hope this helps.
    Edited by: Jelena Perfiljeva on Nov 14, 2008 11:09 PM

  • Credit memo - Price and quantity difference on the same PO item

    Hello,
    When there are both price and quantity differences between the invoice and the PO/GR on the same PO item, we need two lines on the credit memo to adjust the quantity and the price separately.  However, the system gives the error message "Document contains same order item more than once" .  If we suppress this message, then we have the error saying the debit and credit of the credit memo does not balance, as it appears the system only read the first credit memo line and ignore the second.  Does anyone know how to resolve this (without having two different credit memos for the price and quantity differences)?
    Thank you.

    Hi,
    Please note the following few points.
    1.Credit Memo: Credit memo will be posted when you want to reverse a posted invoice.System will reverse the qty and that much amount of invoice.you can post two line items of MIRO for a sigle PO item for qty and amount.you can not have two lines one for qty and other for amount.
    If you feel that there is a differance of posting in amount for the INVOICE and GR (normally for GR , the amount postings witll be same as PO price.) reverse the invoice  at MR8M or post a credit memo in a single line for amunt and qty and post afresh the invoice amount .
    Regards,

Maybe you are looking for

  • ITunes 10.5.2, windows 7, and Unresponsive Exit

    I recently bought a new computer, but I have had this issue on both with the latest iTunes update.  I can execute the program without a hitch, the first time.  It works completely normal.  The issue is when I close iTunes.  The program remains in the

  • How to Reorganize CSM200 Shared Storage in Solaris 10 x86 Oracle 10gR2

    I could use some guidance from those who are more experienced in RAC administration in a Solaris environment with ASM. I have a three-node RAC with Oracle 10gR2 instances on top of Solaris 10 x86 where the shared storage is a Sun CSM200 disk array wh

  • Itunes 8 wont import mp3 files

    When I sync my ipod, it gives me an error message of about 40 mp3s that wont copy to the library because itunes doesnt support the audio format. The weird part is that these files werent added recently. I've had them on my ipod/library for awhile. Th

  • Switching to Mac, how to set up After Effects

    I just received my new Mac Pro and subscribed to Adobe Cloud.  I'm setting up After Effects and need to set my Media Cache for fast processing.  I am reading that I should set it to write to a separate hard drive from what I am saving my project to,

  • 270x Faulty behaviour after Windows boot

    Hello i own a 270x from January 2014, the unit that im using is the 2º, the first one broke in the first 4 days of use. Until now it was working fine, but yesterday when i was playing cs go, the screen freeze in 1 solid color, and i was forced to doa