Posts

Showing posts with the label ABAP Development

How to Create and Use an SAP Function Module for Order Details Retrieval in ABAP

Image
 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 data

Mastering ABAP: A Step-by-Step Guide to Function Modules and Groups for Modularized Programming

Image
  Function Modules :- It is a modularization technique. The transaction code to create a function module is SE37. To create a function module, we need to create a function group. Function Group :- Function group is a container for the function modules. The transaction code to create a function group is SE80. A function group can store up to 99 function modules. Requirement :- let’s create a function module for sum of two numbers. 1. Creation of function group :- Step 1 :- Go to SE80 transaction code → Object Navigator. Step 2 :- From the drop down select function group. Step 3 :- Give a name of function group. Step 4 :- press enter. Step 5 :- Click on yes a popup screen will appear. Step 6 :- Give short description → press enter → Assign package and transaction request and press enter. Step 7 :- Right click on function group and click on activate to activate the function group. Step 8 :- You will see two includes, will be added after ac

ABAP Event Magic: Navigating Interactive Classical Reports for Dynamic Displays

Image
 Welcome back everyone, We were discussing about Interactive Classical Report events, So, let’s continue it. System Variables in Interactive Classical Report Events :- SY-LISEL :- It is a system variable which returns the contents of the selected line. SY-LSIND :- It is a system variable which returns the index of the displayed list. Interactive Classical Report Events :- 1. At Line-Selection :- When user double clicks on the line or select a line and press F2 or select a line and click choose at that time at line-selection event triggers. Suppose, user double click on the below line :- Then the output should be showing the respective line items for the respective header items in a new page :- Note :- F2 is the shortcut key for double click. It is a reserve key by SAP used for double click purpose. Let’s take a requirement to understand the At Line Selection event. Requirement :- Let’s use our order header and order item table, which we have been using so bar.