Most of my customers are factories that use SAP and I've got a webapp (j2ee) that deals with the (rather complex) customs routines in Brazil. The way it works today is that my clients send me the invoices (normally a PDF file or an Excel spreadsheet) and my employees (who work inside these factories and have access to their SAP system) input that information in our system. That is pretty error-prone as it often involves typing quantities, amounts, etc.
In order to avoid all that typing/messing around with Excel spreadsheets, my idea is to have a button on my webapp that invokes an applet to read a purchase order from SAP (along with all the items, quantities and whatnot) and send that data to our webapp using XML or JSON over https.
Has anyone done something similiar to that? Is it the best way to tackle that? Also, can I legally get the Java SAP connector without being a SAP customer myself? As far as I can tell from my Google searches, the answer is no...