How to Create and Use an SAP Function Module for Order Details Retrieval in ABAP
![Image](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiekgJ5-07CBsjk6XFkcMwyp6myN72wulA9JO4DtPZoNx6AxAt99VNQEzT9WPLlQRnZM9ZyWuAUpPJcHdPKc4jSWo15ZC9U4grCzugV7Hv10VO4FnkCg3r393VDj0905gRv50HxGSg1dZKCiILzon5EFdjFqIfrlHTtB2HvWpO_AFtPWwGhyphenhyphenh8Z2XPgkoc/s320/Screenshot%202024-02-06%20060403.png)
Let’s take real life scenario to develop a function module. Requirement :- Create a function module that takes Single Order Number as input. Displays details of Order Number (Order Header + Order Item ). Suppose below is my header and item table. Header. Item Table Solution :- Step 1 :- Go to SE37. Step 2 :- Give a name and click on create button. Step 3 :- Provide the function group and short description and click on save button. Step 4 :- In import tab we will declare single input as a parameter. Step 5 :- Let’s create a type structure which contains fields from both header and item table which will be given in export section. Step 6 :- Create a table type for same structure. Step 6 :- Pass the type structure and table type in export section of function module to create a internal table and work area. Step 7 :- Open Source Code, Create a type structure for order header and order item table. Step 8 :- Write select query to fetch ...