This blog post informs you about how to post multiple Invoices/Receipts from SAP B1if Monitor to SAP BusinessOne.
Generally all sales receipts from SAP Customer Checkout reaches SAP B1if Monitor and they are then posted to SAP BusinessOne. Incase there exists any configuration or other issues, then the sales receipts are stuck in the SAP B1if Monitor with status "Inconsistent". After correcting the configuration issues, one can select these inconsistent invoices and post them in SAP BusinessOne.
From SAP B1if Monitor, you can already select 10 Receipts and post them at a time. However more than 10 receipts cannot be selected. This is for various reasons. First it was designed in this way, second performance is a topic you need to be careful about, and finally since our long-term plan is to post receipts from SAP Customer Checkout manager into SAP BusinessOne - it does not make sense to invest time in enhancing the SAP B1if monitor.
Our expectation is that low number of receipts because of configuration is stay in status inconsistent in Monitor. However we were contacted several times by partners to help them release more than 10 receipts at a time. Lets say 50 or 100 receipts at a time. Hence i decided to write this blog regarding how this is possible.
This blog is for information purpose only. Specially to share how this is working behind the scenes. How many receipts you try to release at a time using this approach(which is not standard delivered) is your decision based on your system throughout etc.
First of all changing the status of the receipts in database from "Inconsistent-INC" to "New-NEW" is not enough and not recommended. Basically this will do nothing. There is no job which is taking all receipts in status NEW and trying to post it.
When you repost using the SAP B1if monitor UI, multiple things are happening. The original receipt is marked as cancelled(for tracking and Auditing purpose), a new receipt is created in status NEW, and most importantly a entry to the B1if queue monitor is made to process this NEW receipt. When the B1if queue monitor processed the receipt the status changes from NEW to Released-REL or Inconsistent-INC based on whether the posting to SAP BusinessOne was successful or not successful.
And below i will share with you how exactly you can trigger the same request without using the SAP B1if Monitor tool. I will use Postman tool to explain how this can be achieved. However multiple other ways exists to achieve that. And also any licensing requirements for Postman or other tool is the responsibility of the customer/partner.
Following Steps are needed 1. Find a list of PoSKeys - the technical keys of the receipts which needs to be posted. 2. Prepare Postman for the call and execute the call. 3. Verify the results.
Step 1: Find a list of PoSKeys - the technical keys of the sales receipts which needs to be posted.
If you have not changed anything, then the name of the database where the SAP B1if Monitor data is stored is CustomerCheckout. So you fire a query to find out all the Inconsistent (Status is INC) receipts. You do this to find out the technical keys which is needed in step 2. select POSKey,ReleaseStatusCode from [dbo].[PointOfSaleReceipt] where ReleaseStatusCode = 'INC' and TypeCode = '1'
Step 2: Prepare Postman for the call and execute the call. This can be achieved in many other ways, i use Postman as i find it easy and intuitive. I hope you have some basic understanding of what Postman is. Otherwise just google it 🙂
The main things i did in the Postman tool. Also high-lighted in the screenshot. Also the URL and Body payload sample is posted. I would not recommend to put there 1000 PoSKeys. Maybe 50 or 100 maximum.
A)Select POST B)Entered the URL, given below. Do not forget to change the IP Address. Same like your SAP B1if or SAP B1if Monitor IP Address C)Selected Basic authentication and entered User and Password D)Selected Body as JSON E) Entered PosKeys in the right format
PoSKeys (comma separated - I have just 2 but u can put 20, 40 ,100 - based on your system thoroughput) ["21070110-4747-3241-0516-0AB4000A46AA","21070110-4747-3242-5414-0AB4000A42B1"]
Step 3: Verify the results. After you execute the call using the SEND button, you will see a response as High-lighted. All the call is executed, all these PoSKeys(Receipts) status will change to Cancelled. New Receipts(with same ID but different PoSKeys) will be seen in the monitor in status NEW initially and later will change to Released or Inconsistent based on posting to SAP BusinessOne.
How to handle cash transactions If you also have cash transactions which are inconsistent then they can be identified using the below SQL statement. Kindly notice that the typecode is changed to 2. And also the right call for cash transaction to B1if is mentioned below.
SQL Statement for cash transaction select POSKey,ReleaseStatusCode from [dbo].[PointOfSaleReceipt] where ReleaseStatusCode = 'INC' and TypeCode = '2'