Post multiple Receipts from SAP B1if Monitor to SAP BusinessOne
This blog post informs you about how to post multiple Invoices/Receipts from SAP B1if Monitor to SAP BusinessOne.
Generally all 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 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.
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 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’
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.
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)
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.
Hope this helps helps you to understand how the posting is working and how using tools like Postman more than 10 Receipts can be posted from SAP B1if Monitor to SAP BusinessOne.
In this blog, you have learnt how to post multiple receipts from SAP B1if Monitor to SAP BusinessOne.
Hope you enjoyed the blog. Best of luck with your SAP Customer Checkout journey.
Feel free to comment and give feedback about the blog.
My name is Bikash Bansal. I work for SAP SE, Germany. My current role is of Product Owner for SAP Customer Checkout.
You can find more blogs from me about SAP Customer Checkout here .
Thanks for this blog, Bikash. We haven't needed this functionality specifically (and probably would have been able to figure it out from the browser dev tools), but it's still excellent information.
I know that, as you said, the long-term plan is to do the integration from CCOM, but I would still like to take the opportunity and pose the question: Which FP (or Q) do you currently consider the most likely for this integration to arrive? (I know, no commitment and all, just a simple "best guess").
Thanks again and best regards!
Hello Joerg Aldinger,
We get tickets, emails, and also Customer Influence for this topic. So a solution was needed.
You are totally right, a pure techie would have used the browser tools already to find a solution. I did nothing different 🙂 The idea was to help understand changing status of database field does not help and why it does not help.
Regarding CCOM integration for SAP B1, i can just say that its not coming in FP12(Q3, 2021) and also not in FP14(Q4 2021). Beyond that there is no prioritized list yet. My best guess would be late 2022 or beyond.
The topic is important but other roadmap topics always end up with higher priority 🙂
Hope it helps.
Thanks for that information, Bikash Bansal .
I know some partners already have a partial CCOM -- B1 synchronization in place. I guess we may have to form some kind of "partner alliance" to collaborate on that if we need it sooner... 😉
Thanks a lot, Bikash Bansal. I tried the above and it works like a charm.
Time to execute the POST call in Postman (test environment):
Then of course you need to wait further until B1if fetches and processes the receipts from CCO Monitor.
I am sure it will help customers with thousands of inconsistent receipts in CCO Monitor.
Thank You for testing and your positive feedback Gunther.
Excellent Bikash Bansal. This is perfect following the above steps using ARC similar to Postman we successfully tested batches from 100, 1000, 5,000 to 10,000 postings leaving the job to run overnight.
Im sure this will be a big help to other customers.
Thank You for test and your positive feedback Richard Atkinson
Thanks for the info.
Is there any way we can cancel bulk receipts; not one by one?
I see the webservice is calling only one POSKEY.
For example replacing the last part with "false&bpm.pltype=json" and add POSKEYs in the request body (will this format be accepted by B1if?).
Hi Mohamed Abdulsattar
In reposting there is SAP BusinessOne involved, we put it to B1if queue etc.
For cancellation there is only a change of status. Cancellation is working for 1 record.
If there is a need for mass cancellation, you can do it database level or contact our support team, who can help you with that.
All these can also be done programmatically using tools like Postman.
Thanks Bikash Bansal.
We made a simple app to loop on a list of POSKEYs and cancel them one by one.
Is it allowed to edit in database tables directly? Running an updated script and change the status from INC to CAN?
If yes, can you please share any documentation that shows the limitations of manual operations we can perform on CCO Monitor/Manager database (if any)?
Hi Mohamed Abdulsattar
It is not recommended to change anything in the database without involving SAP Support team.
many thanks for that helpful guide. I had to post more than 3500 receipts after an issue with B1if. I testet in several steps 10, 100, 300, 1000 in one block. It took between 70 seconds (100) and <19 minutes (1000) but would have taken hours to do it 10 by 10 by10...
Thank you for the positive feedback.