Monday, November 9, 2020

Interface in SAP OO ABAP

 Q-What is  Interface?

A-An interface is not a class. It is an entity which can’t have implementation. In Interface we only declare method and in the implementating class we implement it .An interface can only contain empty method declaration and components .Interface methods are by default public ,but we can change the visibility in Implmentating class using ALIASES .Interface always statrs with 'IF' we want to create custom interface we use ZIF .

Ex-Here I am using Interface ZIF_EMP .We can create interface using Tcode SE24 .

Now to use interface methods GET_NAME,GET_EMIL we have to create implementing class in SE24 ,and then we can inherit methods in Implementing class ,here in my case it is 
ZCL_IF_DET2 .











No comments:

Post a Comment

Procure to PAY Cycle

  SAP Tcodes in Procure to Pay ( P2P ): In the Procure-to-Pay (P2P) process in SAP ECC several transaction codes (T-codes) are commonly used...