
Explore the business requirement for creating a SAP sales order via REST API, detailing a deep structure with internal tables, gate and post methods, and testing with Postman.
Identify mandatory fields for the SAP sales order and build the deepest structure, defining item conditions, table types, and item tables from bottom up.
Learn to create a resource provider and a resource handler class, configure templates and signatures, and test a REST API for sales orders.
Explore the GET method implementation for SAP sales orders via REST API, detailing data structures, condition records, item conditions, and serialization of responses to JSON using Postman.
Learn to test a rest api using Postman by sending a get request, handle errors, and debug responses to validate sales order data.
Test the post method from postman to create a sap sales order via rest api, including body payload, item details, serialization, and error handling.
Build a rest api to display the customer ledger and open line items using a deep structure with header fields and a table type for item details.
Create a function group and a remote function module in ABAP, with inputs for customer id and company code, computing balance with reduce operator from joined customer and company data.
Create a resource provider class in sap by inheriting from cl_rest_resource, redefining get to read url parameters and fetch customer balance via z_customer_balance function module, returning a json response.
Create a resource handler class that extends cl_rest_http_handler, redefine root_handler, and attach a cl_rest_router to map the customer__balance endpoint to the handler using a single resource provider class.
Create a sicf node, configure the handler class, and activate the service to expose the sap rest api endpoint. Test the endpoint with parameters and prepare accompanying documentation.
Test the rest api using Postman by configuring the url, query parameters, and basic authentication, then send the request and verify a 200 json response.
This course is design for the ABAP consultant, with basic abap knowledge,
Student can learn in this course, How to create a rest api for the sales order with deep structure ,
with GET and POST method implementation, as a third party tool I have use POSTMAN tool for testing the web service.
Once it is created and tested successfully in SAP and POSTAMN , these web service we can use with any application which can consume this http , based web service
Business Requirement: Develop a rest api, which is to be consume by non-sap system for the creation of Sales Order in to sap and which will return the created sales order number back to the calling system and in case any error occurs while creating the SO, return the error messages.
Both Get and Post Method required
Technical Design: As for the sales order creation, we required to capture the header details, line items, business partner involve and condition records, for this we need to create the Deep Structure.
Any structure that contain at least one Table Type (internal table) , reference type or string as a component is known as Deep structure.
Steps for Creation of Rest API
1: Create Deep structure
2: Create Resource Provider class
3: Create Request Handler Class
4: Create SICF service node
5: Implement of GET method in Resource Provider class
6: Test GET method from POSTMAN tool
7: Implement POST method use BAPI for creation of sales order BAPI_SALESORDER_CREATEFROMDAT2
8: Test POST method through POSTMAN