R12 OM: Autocreate delvieries across sales orders and launch pick release using APIs
This post is one possible solution for this question in this thread in the forums. The requirement was to auto-create deliveries across the sales orders and launch pick release for the same. When pick releasing is completed, it should create one picking batch (move order) for all these deliveries.
Here are the steps to follow to test the script.
- Create an item with and assign it to an organization (M1)
- Create inventory for the same by receiving quantity using Miscellaneous Receipt in inventory.
- Add item to the price list.
- Create four different sales orders with different ship to addresses for this item.
- Book the orders. Scheduling happens.
- Now if you navigate to the shipping transactions screen you will see that delivery details are created with the status of Ready To Release for all these orders.
- Take all the delivery details for each of these orders.
- Pass them as parameter to the first script that is available here.
- Once this script is completed, you should see the deliveries are created and assigned to these delivery details. Since all these orders have different ship to addresses, obviously different delivery ids are created.
- Now use the second script to launch the pick release.Download the script here.
- This will kick off a concurrent request for Pick Selection List Generation program.
- Once request is finished successfully, you will see a same move order is created for all the lines.
Of course you can do the same using the screen.
After the step 6 from above use the steps below:
- If your order numbers in range pass then in From order to To order in the shipping transaction screen and click Find button.
- You should see four lines (since each order has one line only)
- Keep the cursor on the first line
- Hold the shift key
- Mouse click on the last line
- This will select all the lines (highlighted in blue)
- From actions use Autocreate Deliveries and press Go
- This will create deliveries for all the four lines (different delivery numbers)
- Select all the lines again as described above
- From actions Launch Pick Release and Go
- This will kick off the Pick Selection List Generation program
Remember to review your Delivery Grouping Rules, Pick Releasing Rules, Pick Slip Grouping Rules (assigned to the pick releasing rules) for the organization where you are going to auto-create deliveries and launch pick release. They play a huge role in this process.
Even if you do not run the first script, second script will call autocreate deliveries (done in the fist script) and then launch pick release automatically. Give it a try.
Please note that for the second script (to launch pick releasing) I had to use group API (wsh_interface_grp) as I could not find any public API for the same. If you find one and tested it successfully, please share here. But the for the first one I used public API wsh_delivery_details_pub.autocreate_deliveries.
Customer acceptance is a process where you cannot recognize revenue and COGS until customer has accepted the delivery. As we have discussed in the earlier article, starting R12, when goods are shipped always Deferred COGS account is debited (instead of actual COGS) irrespective of customer acceptance. As we could delay this recognition, now we can add this extra step of customer acceptance. The following is the table of revenue contingencies that are used in customer acceptance process. Of course we can create custom contingecies, but the removal events are always seeded. So these contigencies are more identified with the removal events rather than contingency name itself.
These contingencies can be defaulted into order line based on the setup. As shown in the associated table, value for the OM system parameter, Fulfillment Acceptace Required can be set as Yes. This allows acceptance name to be chosen from the LOV in the order lines when an order line is being created. These are hidden fields in the Others tab and folders can be used to open them up. But if contingency assignment rules are setup, say with bill to customer name parameter and value as Business World, and if the order is entered for the same customer as bill to, acceptance contingency automatically gets defaulted once the order line is saved ( this is delayed request in the order line creation and not part of the defaulting rules). The following the list of parameters that can be used to setup the assignment rules.
In Revenue Management Super User, when these contingencies are assigned to a rule with any of the parameters as shown in the table, order creation process matches the values in the order with the setup rules. If the matching is found, then the contingency is defaulted into the order line. Even if there is no setup done, contingency can be manually assigned to the order line.
We all know this. When we ship the order and run the Interface Trip Stops program, inventory gets reduced and orders get updated to move forward in the workflow to the next activity. Interface Trip Stops program calls the OE_FLEX_COGS_PUB to generate the COGS account as per design. This gets passed on to the mtl_material_transactions table in the distribution_account column. When Cost Manager runs, distribution_account from mtl_material_transactions is picked up to generate accounting as shown.
The role of COGS workflow is not changed. It is still the same which generates the account of our choice per workflow design. It still passes the generated account to the mtl_material_transactions table into the distribution_account column. But what changed in R12 is accounting. In order to match Revenue with COGS accounting in terms of timing, COGS account cannot be used at the time shipping. Instead revenue recognition process of the invoice for that order line should generate COGS accounting.
Generate COGS Recognition Events: The role of this program is to record a logical material transaction, which is used to create final COGS entry. This program takes information from the above tables and creates one logical inventory transaction in mtl_material_transactions with a new transaction type called COGS Recognition. In the same program these transactions will be costed (not by the cost manager) creating the following accounting entries. The COGS account in this entry is taken from the distribution_account in mtl_material_transactions table (which was generated earlier by COGS workflow).