– By Robert “Seb” Meekins, SAP Technical Intern, DataXstream Summer Program 2015
For a bit of background, I was writing a monthly sales report. The user would have been able to select a month and date, and have all of the sales information for that month returned – specifically the customer number, material number, quantity, and material description for each sale. After acting on the database (either a GET, POST, or similar request) it can return the results to the webpage. Webpages using the Gateway offer a very flexible point of sale solution while still affording the powerful SAP order management solution.
- Tip #1: If you’re doing a GET request, and using URI filters for it, your Entity Types inside of your Data Model must include the information coming in from the filters as well as that which is going back out to the website frontend. My mistake was assuming that the information that I wanted returned were the only properties I had to define.
- Tip 4: Understand exactly what is going on in a GET request vs. a POST request. In my project I didn’t have to worry about posting, but understanding a GET request was still a little complicated the first time around. In a GET request, you’re doing a read-only operation. Specifically, you’re passing in constraints (filters) to the SAP Gateway, which will use those to run queries on the database and then return the information. You pass in those filters on the end of the URI. In the gateway, you access those filters using IT_FILTER_SELECT_OPTIONS. See the attached screenshot for how I accessed my month and year data out of the filters:
In conclusion, if you’re just starting out, the simple tasks can have a lot more hang-ups than you might see. Having a clear understanding of what is happening to your data at all levels of the process is vital. Once you have that, you can start to focus on the way it is processed at each level – the frontend, the gateway, or the database – and the language-specific semantics and processes. I may not have built an SAP ERP application, but a basic POS function is a great place to start.