Posts

Showing posts with the label Inner Join

Mastering SAP ABAP: Enhancing Reports with Left Outer Join, Column Labels, and Formatting Techniques

Image
 Welcome back everyone, We have implemented inner join in our last blog, So let’s continue it. Requirement :- Suppose, there are 7 elements in header table and for only 5 elements of header table, we have elements in item table. Now, the Customer wants that the matching data between should be displayed, also rest elements of header table should be displayed in the output. Solution :- In that scenario, we will use left outer join. Code :- *********************************************************** *Start of Program *Declaring the final type structure TYPES: BEGIN OF ty_final, order_number TYPE zar_order_number, order_date TYPE zar_order_date, payment_mode TYPE zar_payment_mode, total_amount TYPE zar_total_amount, currency TYPE zar_curency, order_item_number TYPE zar_order_item_number, item_cost TYPE zar_total_amount, END OF ty_final. ********************************

Navigating the Database Landscape: Joins Unveiled in SAP - A Practical Guide

Image
 Welcome back everyone, We have started to discuss about joins in the last blog, So let’s continue it. In our last blog, we were using for all entries, and for using for all entries, We had seen that we had to write multiple select queries to fetch data from multiple tables. Now we will see how we can get data from multiple tables using joins. Q. Whether we should use for all entries or we should use joins to get data from multiple tables ? Ans :- When we are working on traditional database systems (like Oracle, DB2, Sybase ), we should use for all entries in i.e. We will write individual queries to fetch data from multiple tables. But for HANA database we should prefer Joins. Q. Why we should not use Joins in traditional databases ? Ans :- It is because when we use joins, it fetches data from multiple tables and because of that load on the traditional database system is high and therefore, we should prefer for all entries in but HANA is a very powerful database and we can use

Mastering ABAP Reports: Building a Classical Report with Input Selection and Data Retrieval from Order Header and Item Tables

Image
 Welcome back everyone, In our last blog we were discussing about Classical Reports. So , let’s create a program on some complex scenario than yesterday. Requirement :- 1. Suppose we have our Order header and Order item table. 2.Now, On the selection screen, we want to take input as order number using select options, make select option as mandatory and also write select option in a box. 3. On the basis of above input, we want to display the below output :- 4. Use the below logic :- Solution :- I think we are clear with the requirement, So let’s develop a classical report Process :- Step 1 :- Create a executable Program in ABAP Editor. Step 2 :- Create the type structure for both header and item table and also declare a final type structure to display the output. Step 3 :- Declare the internal table and work area for the above three type structure. Step 4 :- Defining a block for selection screen and writing select option in it. Step 5 :- Go to text el