generate invoice support thread

10
Generate invoice for a single sales order Hi, I want to generate invoice for a sales order. For this i was running the Workflow background process with Item type as 'OM Order Line'. However, this will generate invoices for all sales orders ready to be invoiced. How can i generate invoice for a particular sales order? Also i want to generate invoice by code using an API. I got the API for workflow background process but again, how to generate invoice for only one sales order is my question. The API that i got is: wf_engine.background (itemtype=>'OEOL' , minthreshold=>NULL , maxthreshold=>NULL , process_deferred=>TRUE , process_timeout=>TRUE, process_stuck=>FALSE); Thanks, Anoop

Upload: anoop

Post on 10-Nov-2015

258 views

Category:

Documents


3 download

DESCRIPTION

issues regarding generating receivables invoice

TRANSCRIPT

Generate invoice for a single sales orderHi,

I want to generate invoice for a sales order. For this i was running the Workflow background process with Item type as 'OM Order Line'. However, this will generate invoices for all sales orders ready to be invoiced.How can i generate invoice for a particular sales order?

Also i want to generate invoice by code using an API. I got the API for workflow background process but again, how to generate invoice for only one sales order is my question. The API that i got is:

wf_engine.background (itemtype=>'OEOL' , minthreshold=>NULL , maxthreshold=>NULL , process_deferred=>TRUE , process_timeout=>TRUE, process_stuck=>FALSE);

Thanks,Anoop

Hi Anoop,

Please review Sample PLSQL Script to Call Autoinvoice Import Program RAXTRX Using FND_REQUEST.SUBMIT_REQUEST in Release 12 (Doc ID 1127399.1)

Hope that helps,Christine

Hi Anoop,

For the Standard Application, Its seems that it is not possible.Yes, But there is a solution to this and that is as below:1. Put All the remaining lines on Hold.2. When you run the workflow background process, Only the desired lines which you did not put on hold, will be sent to AR and all the remaining will be at "Awaiting Invoice Interface - On Hold". So, When you release the hold from these lines, It will be progressed further.3. Please test the same on test instance first.

RegardsPrashant

Hi Christine,Is it possible to generate invoice for a sale order that is ship confirmed but the status is not yet closed, by using Autoinvoice Import Program?In the LOV to select the min and max order number, only orders present in ra_interface_lines_all are shown. These, i believe, are orders with closed statuses.Thanks,Anoop

Hi Prashant,the workflow background process creates invoices for all Ship Confirmed order lines present in the system. I want to generate invoice only for a particular order. Is there a way to achieve this, either through EBS or by code?

Thanks,Anoop

Hi Anoop,

Please understand the flow from Ship Confirmation to Invoicing. I am mentioning it as below:1. Upon doing the Ship Confirmation, If Defer Interface Check box is Unchecked, Interface Trip Stop (ITS) gets triggered as part of Ship Confirmation.2. If ITS gets completed successfully, It updates the Sales Order with Shipping, Shipped Quantities along with Actual Shipment Date and flow status code gets marked as "SHIPPED". Workflow for the corresponding line gets completed for the SHIP_CONFIRM:SHIP_LINE activity with result code as SHIP_CONFIRM. At Inventory side, SO issue gets generated.3. Once Workflow for the corresponding line gets completed for the SHIP_CONFIRM:SHIP_LINE activity with result code as SHIP_CONFIRM, It moves to next activity i.e. DEFER_FULFILLMENT and the status for this activity gets marked as DEFERRED.4. When You Run the Workflow Background Process, All the Lines which has the Workflow Status as "DEFERRED" gets picked up and completes the activity. In this case, activity DEFER_FULFILLMENT will be completed and subsequently FULFILL_LINE activity will also be completed. This FULFILL_LINE activity will update the Sales Order Line with FULFILLED_FLAG, FULFILL_QUANTITY and other appropriate attributes.5. Once FULFILL_LINE activity gets completes, It goes to LINE_INVOICE_INTERFACE_SUB:INVOICE_LINE activity. Here we check if line is on Hold, If it is on hold, we put the workflow at "Invoice Interface - Eligible". When you release the hold and then do Action > Progress Order, It will be sent to AR otherwise it will wait for Hold to be released.Now, Please check my last update. I am again writing it here:1. Put All the remaining lines on Hold.2. When you run the workflow background process, Only the desired lines which you did not put on hold, will be sent to AR and all the remaining will be at "Awaiting Invoice Interface - On Hold". So, When you release the hold from these lines, It will be progressed further.3. Please test the same on test instance first.

Kind Regards,Prashant Pathak

Hi Prashant,Thanks for the detailed reply. I now have a better understanding of the process. But one question that i still have is, when you run Workflow Background process(WBP) to generate the invoices, say you only want to generate invoice for one particular order, but WBP generates invoice for all the lines in "different" sale orders, which are not put on hold.But what if i want it to generate invoice for the eligible lines in a single order (and not generate invoice for eligible lines in other sales orders). Is it possible?I am not sure if the applying hold solution will be practical in this case, unless we are talking about only a single order with multiple lines.Thanks,Anoop

Hi AnoopLet's be clear the Workflow Background Process does not generate invoices!As previously explained, this process will move the workflow from a Fulfilled status to a Closed Status, and during this operation will populate the Invoice Interface table. It is the Autoinvoice process that creates the invoices, and when running this program it is possible to identify which specific or range of sales orders you wish to convert into an invoice/s.It sounds like your concurrent programs have been linked together such that Workflow when completed, triggers Autoinvoice, therefore unless you specify more parameters all eligible lines will be processed.The workaround is to hold all order lines to prevent them processing to Invoice Interface, as previously mentioned or look at your concurrent processing to split the workflow engine and autoinvoice processes.RegardsMHi Anoop,I see Putting a Hold on Sales Order line is the only solution to hold the invoice.I am giving you an example:1. We have 4 Sales Orders i.e. SO# 101, 102, 103 and 1042. All the SOs are Ship Confirmed.3. If you want Invoice to be generated only for SO# 103. So, Before running the workflow background process, Place the lines for SO#101, 102 and 104 on Hold and then run the workflow background process.4. When You run the workflow background process, It will Interface the Data to AR for SO# 103 only.5. For SO# 101, 102 and 104, Data will be interfaced to AR when you Release the Hold and progress the Order. If you do not Progress the Order, System will progress it by its own as there is a timeout defined for this.Prashant

Hi M,Thanks for the reply. How can i provide extra parameters when running Workflow background process? Is it possible? Or should i customize workflow background process in some way. Currently, the only parameter that i'm passing is "OM Order Line" as Item type, process deferred as "Yes" and process timeout as "Yes".Thanks,Anoop

Hi Prashant,I was confused whether for generating invoice for a sale order, i should put on hold all lines in all other sales orders, which is why i had to ask again?Thanks for the reply. I was hoping for a more straight forward way to achieve this but this works if its the only way.I will test it on test instance and implement it.Thanks again,Anoop

Hi AnoopWBP is not your issue. Somehow, your system design has been implemented whereby the Master Autoinvoice Program is launched after the WBP has completed. If you view your requests you will see the additional programs spawned after WBP. If you want to create one invoice for one order, you need to break that link, or as otherwise suggested place all sales order lines on Invoice Interface hold, and only release the ones you want to process.RegardsM

Thanks M,I will check on it and see what i can do about the workflow. Just let me know if you have any pointers on this issue.Regards,Anoop

Hi,The various requests run when i run Workflow background process are: ADS, (Autoinvoice Master Program) with parameters 1, 204, 1001, ORDER ENTRY, 2014/08/28, , , , , , , , , , , , , 66468, 66468, , , , , , , Y, Autoinvoice Import Program with parameters MAIN, T, 1001, ORDER ENTRY, 2014/08/28, , , , , , , , , , , , , 66468, 66468, , , , , , , Y, Y, , 204 Prepayment Matching Program (Prepayments Matching Program) with parameters AutoInvoice Batch, 5832057

These 3 requests are run multiple times when i run Workflow background process, which corresponds to each order that is eligible.

This document was generated from the following discussion:Generate invoice for a single sales order