Medius – Scan and process invoices integration
Medius is a software that has an add-on to SAP. My company uses it to process invoice complete with PO look up, goods receipt, checking for duplicates and more. This article focuses on how easy it is to do the integration with them.
***** Disclaimer ***
As usual this reflects my opinion. It is not my company’s opinion nor Medius’s opinion. It is only the technical side.
***** End Disclaimer ***
My company has a Hana on-premise system. This was an Add-on we could use. For me it was as easy as having Basis install the add-on. Then no changes, right? As usual their are things specific to our company. Those needed some changes.
The changes were easy. No really, they were easy. I’ve integrated a lot of different software packages and I loved this one (from a pure technical side).
Medius provides enhancement points and BADIs that link directly to their software. We had to make some decisions about where we wanted things to show up on the Medius side. Then they even pointed me to the enhancement that we should use to make the changes on the SAP side. Their documentation was incredible.
Our largest enhancement area was the purchase orders (PO). We – like many other companies – were using conditions to split out the freight cost and the actual cost. We also had separate POs for freight. That made for a bit of a challenge when it came to matching the paper invoice with the PO.
One of the changes that we did was remove the freight conditions. We wanted them to be flexible/changeable from SAP, so we put them into our own Z table. Of course, we did more than this one enhancement. But I wanted to show how easy it was it was to meet that requirement. It was quick too! That’s always a bonus.
METHOD remove_conditions. * Any condition in the ZPARAMETERS table will not be sent to Medius * /MEDIUS/SPURCHASE_ORDER>-/MEDIUS/SPO_ITEM-DELIVERY_COSTS DATA: po TYPE /medius/lpurchase_order, dontsend TYPE RANGE OF /medius/spo_delivery_cost-conditiontype, ls_val LIKE LINE OF dontsend. po = ct_purchase_order. SELECT value INTO TABLE @DATA(value) FROM zparameters WHERE search_key = 'MEDIUS_COND'. "Get any conditions that should not be sent ls_val-sign = 'I'. ls_val-option = 'EQ'. CLEAR ls_val-high. LOOP AT value ASSIGNING FIELD-SYMBOL(<val>). CLEAR ls_val-low. ls_val-low = <val>-value. APPEND ls_val TO dontsend. ENDLOOP. IF dontsend IS NOT INITIAL. LOOP AT po ASSIGNING FIELD-SYMBOL(<po>). LOOP AT <po>-po_items ASSIGNING FIELD-SYMBOL(<po_itm>). LOOP AT <po_itm>-delivery_costs ASSIGNING FIELD-SYMBOL(<del>). DATA(indx) = sy-tabix. IF <del>-conditiontype IN dontsend. "If the condition is in the ZPARAMETERS delete it DELETE <po_itm>-delivery_costs INDEX indx. ENDIF. ENDLOOP. ENDLOOP. ENDLOOP. ENDIF. CLEAR ct_purchase_order. ct_purchase_order = po. ENDMETHOD.
Our delivery cost was no longer a line on the PO in Medius. Once a goods receipt is done that gets added. That magic happens on the Medius side. The purchase order may/may not have the delivery cost. It could be on a different PO. It is all matched in Medius.
That was one of our “largest” changes. I wanted to share it with you, because although there were many small changes to add our custom fields – this was the big one. Notice how easy it is to work with Medius? I sure did!
Of course, everything took a while to put together. There were changes on the Medius side. It wasn’t as simple as I make it sound in this blog. But it was the easiest SAP integration I’ve done. As for how well it’s working… I’m not sure, because I don’t really support it. Meduis supports it. However, I haven’t heard complaints.
PS Feel free to correct my code – people must be cringing at how many loop/endloops I had.