Create a Credit Memo from invoice

Hi,
When I Create a Credit Memo from invoice, I get the next error : -5002 , "-"
What is that?
regards

Hi Joe,
I have tested your code and it seems to me that it is working fine. Make sure that the numbers of the document that you are using is correct and that you are doing it for the same business partner. Try doing the exact same thing in SBO. Please remember that you can have different document numbers and document entries for every document. The BaseEntry refers to the DocEntry field in the OINV table and not the DocNum field. The DocNum field is the one you see on screen in top right corner of AR Invoice screen.
Hope it helps,
Adele
PS: Sorry for previous text that was in this message. I had it all wrong
Message was edited by: Adele le Roux

Similar Messages

  • Create a Credit Memo from invoice  (Sales)

    Hi
    How Can I Create a Credit Memo from invoice (Sales)?
    Thanks

    Hi Joe,
    Check our SDK sample C:\Program Files\SAP\SAP Business One SDK\Samples\COM DI\VB.NET\05.OrderAndInvoice to understand the procedure. You will have to create your own sample by using Invoice and Creditmemo you just have to instantiate your document object as oCreditNotes.
    Check the documentation as well of the Document Object.
    Regards,
    Felipe

  • Create a Credit Memo from purchase invoice

    Hi everyone,
    I am trying to create a credit memo from a purchase invoice, but it retuns the following error:
    "RFC is missing"
    I am using the JCO classes to develop this application. this is a sample of my code:
    IDocuments document = SBOCOMUtil.newDocuments(company,new Integer(19));
    document.setCardCode("P00055");
    document.setDocDate(new java.util.Date());
    document.getLines().setBaseEntry(new Integer(2852));
    document.getLines().setBaseLine(new Integer(0));
    document.getLines().setBaseType(new Integer(18));
    int lRetCode = document.add();
    if(lRetCode != 0){
        System.out.println(company.getLastError().getErrorMessage() );
    Do you have any idea about what is the problem?
    Many Thanks.

    Hi everyone,
    the problem was solve. I had to specified the FederalTaxID field on the document.
    just added the following field:
    document.setFederalTaxID("000000000000");
    Thanks.

  • Subtracting a Credit Memo from Invoice

    I have looked all over the forum for the right answer and cant locate what I need.
    I am witting a Royalty Report and need to find the best way to subtract credit memo's from invoices.
    I know that the OINV.DocEntry = RIN1.BaseEntry but the numbers are not correct.
    If anyone can help on a query or more info on the best way to do this I award points..
    Thanks,
    Craig

    hi,
    Check this links
    LINKING CREDIT MEMO TO INVOICE
    Credit Memo and A/R Invoice linking
    Jeyakanthan

  • BAPI to create SD credit MEMO from Flat file

    Hello All:
       New with BAPi wondering if anyone have sample code to access structured flatfiles and create transactions with the data from flatfiles. The one I am most interested is Credit Memo, however if any other transactional documents will also help as well!
    Sincerely Yours

    Thanks. Problem solved.
    Regards,
    Yayati Ekbote

  • Free goods are not copying in credit memo from invoice

    Dear Gurus,
    I have made a invoice having two line items 1.normal goods with sale price and 2.free sample goods(part of promotional scheme) without any sale price.
    but while making credit memo for receiving goods back in cancellation of invoice , i am facing problem for free goods. system is not copying the free goods in credit memo and copying only normal goods.
    what can be problem for not copying? whether i am following some wrong procedure or some configuration is missing.
    please advise me with your valuable suggestions.
    Thanks in advance
    Parag

    hello, friend.
    first of all, the free goods are not relevant for credit memo since the customers never paid for these in the first place.
    however, i observed that after cancelling the invoice, you still issued a credit memo?  this may not be the proper process.  when you cancel the invoice, entries into the customers Accounts Receivables are reversed as well (we are assuming no payments are posted yet).  so there is no need to issue credit memos. 
    if you are referring to another process, please clarify the same.
    regards.

  • CS: Credit memo from Repair Order (RA)

    Dear Experts,
    I am trying to create a credit memo from my sales orderin lieu of return of a defective product,  I am using the repair procedure which generates item category IRGN for credit memo.
    My question; Since using repair procedure gives me a sub-item I am not sure how to go about billing it and also can I bypass the credit memo request creation and directly create Credit memo, how?
    Kindly advise with your inputs on this scenario.
    Thanks

    Solved. Used Invoice(for Repair) to create credit memo.

  • Credit Memo from Retro Billing

    Hello Gurus!!
    Can anyone please help me
    Scenario:
    I have created a credit memo from retro-billing due to price drop, and released the credit memo to accounting.
    Problem:
    When we look at the accounting document of the credit memo it doesn't have a controlling document and profitability analysis.
    I have simulated the document at KE4ST, and here is the error message I got
    Document is not profit-related and thus could not be transferred
    Message no. KF755
    Diagnosis
    Sales document was not transferred to Profitability Analysis (CO-PA) because it is not relevant for the analyses in CO-PA. This can be due to one of the following reasons (among others):
    The document type is not profit-related, such as an inquiry
    The sales document shows zero for the quantity
    The sales document has been denied
    The sales document is locked due to credit reasons
    Please anyone give me an idea on how can I resolve this..
    Thank You!!!!

    Hi Carla,
    I saw your the issue you posted on SDN.
    We are facing exactly the same problem. We could not see the solution how you resolved this problem.
    Can you tell us how have you resolved this ??
    Would be great help to us.
    Thanks,
    Apte C.M.

  • DFF Values Default in Credit Memo from AR Invoice

    Hi,
    We have entered an AR Invoice with DFF values at the Line Level.
    We are creating a Credit Memo directly from the Invoice.Almost all the information in the Credit Memo defaults from the Invoice which is being credited. The DFF information is not defaulted from the Invoice Line level.
    We have to manually enter them.
    Is there someway to default the DFF values from the Invoice onto the Credit Memo ?
    We are on R12.1.3
    Regards,
    Hari Charan

    Hi Hari Charan,
    in 11i this seems to be not possible, as there is an enhancement request available for the same. However for R12 there is a patch suggested by oracle in the below documentation ...Please review the note in detail
    Transactions Form Issue: Credit Memo Does Not Inherit Descriptive Flexfields of Invoice [ID 1316534.1]
    Regards,
    Ivruksha

  • Invoice and Credit Memo from ECC to SUS

    Hi Gurus
    Is it possible to replicate Invoice or a credit Memo from ECC to SUS if the PO was delvired to vendor through SUS.
    with Regards
    Manjunath

    HI ,
    part1 :
      ERS Invoice from ECC is transfered to SUS system for display purpose to Vendor in MM-SUS scenario. IDOC "GSVERF01" is used for this purpose.
    part 2 : Invoices can be created in SUS system by vendor against ASN ( Advanced Shipping Notification or purchase Order . The invoice is transfered to ECC system through XI. Message Interface for the same is "InvoiceRequest_Out" .
    For reference please check
    http://help.sap.com/saphelp_srm70/helpdata/en/74/344c430fab4d0bbc30996d56cc293a/frameset.htm
    Regards,
    Kalandi

  • Error while creating a credit memo with reference to invoice

    HI aLL,
    I am facing one issue while creating a credit memo request in VA01 with reference to invoice.
    Our project stock is valuated stock.
    When we try top copy the error pops up" Valuated project stock not allowed with customer stock." and the line item is not copied in the credit memo.
    Diagnosis:The entered wbs manages a valuated project stock,at the same time sales order stock is maintained on sales order line item.this combo is not allowed as different valuation methods within a project is not allowed.
    Tarun Kapur

    Dear Tarun!
    1.Within a project we can get stock only in PROJECT or in SALES ORDER STOCK.....a single material can not be a both place at particular time ..so keep only one
    Project Stock or Sales Order Stock..
    2.Check DIP PRofile (ODP1) in usage BILLING AND RESULT ANALYSIS -Charectiristic -SDOC TYPE CMR.....are you selecting right document to which you want to copy .....
    Rewards Points if usefull
    Regards
    SMITH

  • R12: Create on-account Credit Memo with invoicing and accounting rules

    In R12.1.2: when using the AR_INVOICE_API_PUB it seems to be impossible to create a on-account Credit Memo with invoicing and accounting rules. The next errors are returned by the API:
    - AR_INAPI_INV_RULE_NOT_REQUIRED
    Do not include an invoicing rule if the transaction type's class is Debit Memo or Credit Memo.
    - AR_INAPI_RULE_NOT_ALLOWED
    Do not enter an invoicing or accounting rule for on-account credit memos
    Please advice how to create on-account Credit Memo with invoicing and accounting rules using an API.
    Edited by: nl05517 on Jan 17, 2011 10:43 PM

    We will use the AR_CREDIT_MEMO_API_PUB api.

  • Error while creating an Credit memo in AR + R12

    Hi All,
    I am trying to create a credit memo in AR, based on the transaction i.e., an invoice of AR.
    But i am not able to create.
    I am encounter the following error
    "Your credit memo transaction can only credit an invoice or a debit memo line
    Failure encountered in AR_CREDIT_MEMO_API_PUB.Create_request call to arw_cmreq_cover.ar_request_cm".
    My code is as follows:
    DECLARE
    l_dummy varchar2(240);
    l_customer_trx_id ra_customer_trx.customer_trx_id%type;
    l_line_credits_flag ra_cm_requests.line_credits_flag%type;
    l_line_amount number;
    l_freight_amount number := 0;
    l_cm_lines_tbl arw_cmreq_cover.cm_line_tbl_type_cover;
    l_cm_reason_code varchar2(150);
    l_comments varchar2(150);
    l_msg_count number := 0;
    l_msg_data varchar2(20000) := null;
    l_return_status varchar2(1);
    l_request_id NUMBER;
    l_batch_source_name varchar2(150) default null;
    cm_trx_id number;
    BEGIN
    fnd_global.apps_initialize(1018094,50559,222,0);
    mo_global.set_policy_context('S',204);
    arp_global.init_global;
    l_customer_trx_id := 549724 ; --527689;
    l_comments := 'Creation of Credit memo';
    l_batch_source_name := 'Invoice';
    l_cm_lines_tbl(1).customer_trx_line_id := 833940;
    l_cm_lines_tbl(1).quantity_credited := -1;
    l_cm_lines_tbl(1).price := 1000.00;
    l_cm_lines_tbl(1).extended_amount := -1000.00;
    l_cm_lines_tbl(2).customer_trx_line_id := 833941;
    l_cm_lines_tbl(2).quantity_credited := -2;
    l_cm_lines_tbl(2).price := 1000.00;
    l_cm_lines_tbl(2).extended_amount := -2000.00;
    AR_CREDIT_MEMO_API_PUB.CREATE_REQUEST(
    P_API_VERSION => 1.0,
    P_INIT_MSG_LIST => FND_API.G_TRUE,
    P_COMMIT => FND_API.G_FALSE,
    P_VALIDATION_LEVEL => FND_API.G_VALID_LEVEL_FULL,
    P_CUSTOMER_TRX_ID => l_customer_trx_id,
    P_LINE_CREDIT_FLAG => 'N',
    P_CM_REASON_CODE => 'DAMAGED PRODUCT',
    P_CM_LINE_TBL => l_cm_lines_tbl,
    P_SKIP_WORKFLOW_FLAG => 'Y',
    P_CREDIT_METHOD_INSTALLMENTS => null,
    P_CREDIT_METHOD_RULES => null,
    P_BATCH_SOURCE_NAME => l_batch_source_name,
    P_ORG_ID => 204,
    X_REQUEST_ID => l_request_id,
    X_RETURN_STATUS => l_return_status,
    X_MSG_COUNT => l_msg_count,
    X_MSG_DATA => l_msg_data);
    FND_MSG_PUB.count_and_get (
    p_encoded => FND_API.g_false,
    p_count => l_msg_count,
    p_data => l_msg_data );
    dbms_output.put_line('Return Status ==> '||l_return_status);
    dbms_output.put_line('Credit Memo request_id ==> '||l_request_id);
    dbms_output.put_line('l_msg_count ==> '||l_msg_count);
    FOR I IN 1..L_MSG_COUNT LOOP
    DBMS_OUTPUT.PUT_LINE(SUBSTR(FND_MSG_PUB.GET(P_MSG_INDEX => I, P_ENCODED => 'F'), 1, 254));
    END LOOP;
    IF l_return_status <> 'S' THEN
    NULL;
    ELSE
    select cm_customer_trx_id
    into cm_trx_id
    from ra_cm_requests_all
    where request_id = l_request_id;
    dbms_output.put_line(' CM trx_id = '|| cm_trx_id );
    END IF;
    EXCEPTION
    WHEN OTHERS THEN
    dbms_output.put_line('exception error!');
    dbms_output.put_line(substr(sqlerrm, 1, 80));
    fnd_message.retrieve(l_dummy);
    dbms_output.put_line(l_dummy);
    END;
    Please advise me where i am wrong .... Thanks in Advance.
    Regards,
    Basha.
    Edited by: zaheer on Aug 1, 2011 8:43 PM

    I am encounter the following error
    "Your credit memo transaction can only credit an invoice or a debit memo line
    Failure encountered in AR_CREDIT_MEMO_API_PUB.Create_request call to arw_cmreq_cover.ar_request_cm".Please see these docs.
    Listing of AutoInvoice Error Messages and Troubleshooting Tips to Resolve each Error [ID 1138254.1]
    Credit Memo Errors During Autoinvoice Process - Invalid reference line attribute value (REFERENCE_LINE_ATTRIBUTE1-15) [ID 405445.1]
    Thanks,
    Hussein

  • Due date calculation for the credit memo with invoice reference.

    Hi,
    When we create the credit memo with reference to invoice, the due date for the credit memo is getting copied from Invoice. In this case if the invoice is due on 31.12.2008 and the credit memo is created on 10.09.2009, then the credit memo due date is appearing as 31.12.2008. It should be 10.09.2009 as per the setting in VOFA billing type customisation in "Credit Memo w/vldt".
    I would like to know how to customise the below requirement.
    If the reference invoice is due after the credit memo creation, the the credit memo should due as per the invoice date.
    If the invoice due is past & then the credit memo due date should be Immediate i.e. Due Immediately.
    Thanks in advance for help.
    Regards,
    Nithin

    I doubt there is such option. From the past projects I do remember that we made a change in the form to print the document date as 'Due Date' for credit memos. Credit memos were paid at once when they were processed and I think that payment term was copied from the original invoice, which made their due date far in future.

  • Apply credit memo to invoice using API

    Dear All ,
    my question is how to apply a credit memo to invoice .
    I want to make a credit memo then apply invoice to this credit memo , you can check this in the transaction form by creating a credit memo then check application from action menu then apply the invoice.
    So i want to simulate this process using API.
    i searche and f ound there is API called Ar_cm_application_pub.activity_application but it is not clear to me .
    So if anyone know this API and how to use it and any example for it .
    thanx in advance .

    No Answer??!!!!

Maybe you are looking for