Posts

ODATA topics necessary for SAP Ui5 / FIORI

Image
  The main purpose of OData services is to implement ‘Database Functionalities’. Types of OData services :- ODATA ABAP Service :- Interact with backend system of ( SAP ECC/CRM/SRM/SCM ) ODATA HANA Service :- Interact with backend system ( SAP HANA ). ODATA External Services :- Interacts with backend system ( Non SAP system ). ODATA ABAP Service :- These OData services are mainly executed under SAP NetWeaver gateway component with database operations ( Select, Insert, Delete, Update ). SAP NetWeaver gateway support two formats mainly XML format JSON format ( preferred because it is a light wight format ) From frontend if we indicate format with xml then SAP NetWeaver gateway component will hold the data under entity set in XML format. Suppose, we have this employee Data 1001 Vijay 34 XML format JSON Format Advantages of OData Services :- OData services are independent of frontend, these can be accessed in various front end apps like SAP Ui5 or FIORI, .NET, P

Introduction to OData | Ui5 | Fiori

Image
  SAP UI5 is a framework to develop responsive web applications. Framework :- A Framework is a collection of libraries. Library :- A Library is a collection of classes Class :- A Class is a collection of attributes, functions, aggregations and events. Responsive :- A web application which is used to work in all the devices with same code. It has ability to adapt itself according to the devices. SAP ABAP Applications :- In case of SAP ABAP Apps, almost all the functionalities are executed under server. So, ABAP Apps are technically known as Stateful applications. In stateful applications server will be busy and over loaded, so performance is degraded. SAP Ui5 / Fiori Apps :- In Case of SAP Ui5 / Fiori Apps, almost 95% of functionalities will be executed under client side. So, SAP UI5 / FIORI apps are technically known as stateless apps. In stateless apps the server will be free and not over loaded so we can expect best performance. SAP ABAP Apps Vs SAP Ui

Finding Kernel BADI using Debugging

Image
  Enhancements SPOT is like a container to the new ( Kernel ) BADI. In the explicit enhancements we saw the Enhancement spot which were used to store the enhancements, In similar manner we have Enhancement SPOT in the new BADI which act like a container for it. We can see kernel BADI’s for the material below. Let’s take a requirement which we will implement to understand this concept more clearly. Requirement :- While creating a material through MM01 transaction code. We see this screen where we provide the details for the material which will be created. Here we see we have two buttons Additional data and Organization levels. Now my user don’t want that these two buttons should be available here while creating the material. Finding BADI according to requirement :- There are basically three ways through which we can find our kernel BADI. Put the break-point on statement - CALL BADI or GET BADI. ( i.e. by using debugging, mostly preferred by the prog

Introduction to Kernel BADI

Image
  BADI is a kind of Enhancements ( We will use Customer namespace for enhancements using BADI ). BADI stands for Business ADD In’s. BADI is based on object Oriented Concept. In Object Oriented Concept, BADI mainly works on Classes and Interfaces. Important T Codes for BADI :- SE18 is the transaction code for BADI definition. In SE18 we just perform the definition part, which we do in Interfaces of OOPS concept. SE19 is the transaction code for BADI Implementation. In SE19 we perform the implementation part in the same way which we do in Classes of OOPS concept. There are two types of BADI :- Classic BADI New BADI ( Kernel BADI ) BADI’s which have enhancements spots are known as new BADI or kernel BADI. We will see more in the next part

Classical BADI Part 3

Image
  In this portion we will see the third way to find a classical BADI and then we will implement it based on a real life scenario. Let’s take a requirement. While creating a material through MM01 I want if basic unit of measure is each then material group must be 00ROH. Finding the Classical BADI Step 1 :- Go to MM01 transaction code. Step 2 :- Click on System → status. Step 3 :- Copy the program name. Step 4 :- Then go to SE38 transaction code and select the attributes radio button and pass the name of the program and click on display button. Step 5 :- Copy the name of the package. Step 6 :- Go to SE84 transaction code → Enhancements → Business Add-Ins → Definitions. Step 7 :- Pass the package name and click on execute button. It will show us all the BADI present in that particular package. For our requirement the suitable BADI is BADI_MATERIAL_CHECK. Implementing BADI for the given requirement :- Step 1 :- Go to SE19 transaction code

Classic BADI Part 2

Image
  In the previous part we saw, how we can find our classic BADI through debugging. In this part we will see how we can find the classic BADI for our requirement other than using debugging. Requirement :- Let’s take a requirement other than what we have used in the previous part. Our requirement is that during creating of the material from MM01 transaction code, if basic unit of measure is EA (each) then material group should not be 00ROH. Finding Classical BADI :- Step 1 :- Copy the Program name of MM01 transaction code. Step 2 :- Go to SE38 transaction code and select the attributes tab radio button and pass the program name and click on display button. Step 3 :- Now go to SE18 transaction code → Select the BADI Name radio button and click on F4 help → Click on New Selection and pass the package name. Step 4 :- Click on OK button. It will show us the list of all the BADI available for the given package. Since, we have to perform some checks on t

Understanding and Implementing Classic BADI

Image
  SAP has provided us a class CL_EXITHANDLER for classical BADI purpose. We will use GET_INSTANCE method of CL_EXITHANDLER class to find the classic BADI for our requirement. Let’s take a requirement to understand it more clearly :- Requirement :- While creating a material through MM01 transaction code, The Customer wants that if I am providing basic unit of measure as KG then I should get a error, when I click on save button. Ways to find a Classical BADI :- There are mainly three ways to find a Classical BADI , I will discuss the first one here and then I will discuss the rest of the two in the next part. In this part, we will find our required Classical BADI through debugging. Finding Classical BADI for the above requirement :- Step 1 :- Go to SE24 transaction code and display class CL_EXITHANDLER → double click on GET_INSTANCE method. Put a debugger as shown above. Step 2 :- Now go to mm01 transaction code for our requirement. S