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 is on 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.  Actually that isn’t true, but it was 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.   All we had to do was make some decisions about where we wanted things to show up.  Then they even pointed me to the enhancement that we should use.  Their documentation was incredible.

Our largest enhancement area was the purchase orders.  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.

The change was did was remove the freight conditions.  We wanted them to be flexible so we put them into our own Z table.

 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.

Now 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.   Now 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 made it sound.  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.  But I haven’t heard complaints.

PS Feel free to correct my code –  people must be cringing at how many loop/endloops I had.