Deep Insight into Big Data: Understanding Big Data Basics

What is Big Data?

Big data refers to the large collection of structured, semi-structured and unstructured data mostly collected from Internet connected devices. This represents the massive amount of data an organization is exposed to daily and cannot be managed by traditional database management systems. It led to the evolution of model-driven paradigm to data-driven paradigm. It is always important how an organization use this large data to yield insights that results in better informed decisions. The importance of big data is not in the amount of data but how you use this data.

Characteristics of Big Data

The term big data refers to large data set (Volume), structured, semi-structured and unstructured data (Variety), arriving faster than before (Velocity).  These are 3V.

3V:

Volume:       

            The volume of data stored today is growing exponentially and exploding. Now the data volume has grown from terabytes to zettabytes.

Velocity:

            Represents both the rate at which the data is generated and needs to be handled.

Variety:

            As data collected is not from a single source the variety of data also differs according to the source like emails, web, text or sensors by structured or unstructured data.

Now as big data evolved in due course of time the characteristics also evolved from 3Vs to 6Vs.

6V:

As data grows tremendously in todays internet world, today’s big data is tomorrow’s small data.   

What is the difference between OOP and Functional programming

ParameterObject Oriented ProgrammingFunctional Programming
DefinitionA programming paradigm based on the concept of objects which contains data in the form of fields called attributes and code in the form of methodsA programming paradigm based on the concept of procedure calls
Paradigm
ApproachBottom-up ApproachTop-down Approach
Data ControlIn OOP data in each function is controlled on its ownIn POP every function has different data so no control over it.
EmphasisEmphasis on objectsEmphasis on functions
CommunicationObjects communicate with each other by message passingParameters communicate with each other by parameter passing
InheritanceInheritance is supported by three modes : private, protected and publicInheritance is not supported
Access ControlAccess control is done with access modifiersAccess modifiers is not supported
Data HidingData can be hidden is using EncapsulationNo data hiding. Data is accessible globally
Overloading or PolymorphismOverloading functions, constructors and operators are possibleOverloading is not possible
SecurityMore secured language because external functions can’t access another data.Due to global data, it is less secured language
Code reusabilityExisting code can be reusedNo code reusability
Problem SolvingUsed for solving big problemsNot used for solving big problems
ExampleC++, Java,C#, PHP, PythonCOBOL, C, FORTRAN, BASIC, PASCAL

What is the difference between check box and check box hotspot cell type in CL_SALV_TABLE?

CheckboxCheckbox Hotspot
It is used just as a display of checkbox. It mentions that the particular line of record is selected.It can be used to trigger an event of type LINK_CLICK.
The value of the checkbox cannot be changed.The value of checkbox can be changed.
It is not used to manipulate the values of the fields of ALV Table.It can be used to manipulate the values of the fields of ALV Table. The ALV Table must be refreshed with the refresh method call {lr_alv_grid -> REFRESH ()}.

How to use various cell types in new SAP ALV Display of type CL_SALV_TABLE?

               The various cell types can be used both in container mode and complete mode. The cell types are constructed based on the Attribute of the Interface ‘IF_SALV_C_CELL_TYPE’.

Type of cellAttribute of IF_SALV_C_CELL_TYPEDisplay mode container / completeEvent
Text=> TextBoth
Checkbox=> CheckboxBoth
Checkbox hotspot=> checkbox_hotspotBothlink_click
Button=> ButtonBoth link_click
Dropdown=> dropdownContainer
Hotspot=> HotspotBoth link_click

The method set_cell_type of the column object ( cl_salv_column_table ) can be used to set the cell type for the cells in the ALV Display.

DATA lr_all_columns TYPE REF TO cl_salv_columns_table.

DATA lr_single_column TYPE REF TO cl_salv_column_table.

lr_all_columns = lr_alv_grid->get_columns ().

lr_single_column ?= lr_all_columns->get_column (‘Contact_name’ ).

lr_single_column->set_cell_type (if_salv_c_cell_type =>Button).

How to optimize the width of the column of type CL_SALV_COLUMNS_TABLE

               The width of the column is optimized through three methods.

  1. Optimize all columns.
  2. Optimize one single column.
  3. Manually set the width of columns.

The optimization is based on the content of the ALV Table.

  1. Optimize all columns.

In order to optimize all the columns of the ALV Table, call the set_optimize method of the columns object.

DATA lr_all_columns TYPE REF TO cl_salv_columns_table.

lr_all_columns = lr_alv_grid->get_columns ( ).

lr_all_columns->set_optimize ( ).

  • Optimize one single column.

‘SET_OPTIMIZED ( )’ method of the cl_salv_column_table is used to optimize the single column of the ALV Table.

DATA lr_all_columns TYPE REF TO cl_salv_columns_table.

DATA lr_single_column TYPE REF TO cl_salv_column_table.

lr_all_columns = lr_alv_grid -> get_columns ( ).

lr_single_column ?= lr_all_columns -> get_column ( ‘Contact_name’ ).

lr_single_column -> set_optimized ( abap_true ).

  • Manual adjustment of column width.

The method set_output_length of the class cl_salv_column_table can be used to set the width of the particular column to a specific predefined value.

DATA lr_all_columns TYPE REF TO cl_salv_columns_table.

DATA lr_single_column TYPE REF TO cl_salv_column_table.

lr_all_columns = lr_alv_grid -> get_columns ( ).

lr_single_column ?= lr_all_columns -> get_column ( ‘Contact_name’ ).

lr_single_column -> set_output_length ( 50 ).

The above manual adjustment of column width will be ignored, if the columns are optimized with the set_optimize ( ) method.

How to explain Method overloading and Method overriding in German language?

Method Overloading – Methoden überladung

               Die Klasse hat mehrere Methoden mit dem selben Namen. Die Methode hat aber unterschiedlicher Signatur. Der Parameter hat verschiedene Datentyp. Die Anzahl der Parameter sind unterschiedlich.

Method Overriding – Überschreiben der Methode                Überschreiben der Methode ist zwischen der Klasse. Die Methode von der übergeordneten Klasse wurde in der untergeordnete Klasse überschrieben. Die überschriebene Methode in untergeordnete Klasse hat die gleiche Signatur. Aber die überschriebene Methode wurde nochmal implementiert. Sie kann ganz andere Inhalt beinhalten. Es ist nicht gleich wie in Obere Klasse.

What is the difference between overloading and overriding in OOPs?

DescriptionOverloadingOverriding
AchievedIt is achieved by having different methods with the same name and different signatureIt is achieved by redefining the method in the sub class. The class is originally defined in the super class.
SameThe methods names are the same. Only the signature varies.The method definition (name) including the signature are similar. It is only redefined. But the implementation of the method is changed.
RelationshipThe relationship is between the methods in the same class.The relationship is between the methods in the super and sub class.
ABAPIt is not explicitly supported in SAP ABAP. But it can be implicitly implemented through the concept of OPTIONAL keyword in method definition.This overriding can be explicitly implemented in SAP ABAP. The REDEFINITION keyword is used in the method definition of sub class.
ExampleA movie can be dubbed in different languages. The title and the characters are similar. Only the parameters such as Dialogue Delivery are different. Thus the movie is overloaded in different languages.A movie can be remaked. Its parameters are similar. But the storyline and its content can be changed according to the viewers. Thus the movies are redefined.

How to set the column position using the class CL_SALV_COLUMNS_TABLE?

The column position in the ALV Display can be controlled using the set_column_position method of the class CL_SALV_COLUMNS_TABLE. There are two parameter used in the method call. The column name identifies the column to be positioned. The position parameter mentions the position of the column in ALV Display.

Let us look at the following example:

DATA lr_salv_columns_table TYPE REF TO cl_salv_columns_table.

lr_salv_columns_table = lr_alv_grid->get_columns ().

lr_salv_columns_table->set_column_position ( columnname = ‘CONTACT_ADDRESS’

position = 3).

What is the difference between data reference and object reference in SAP ABAP

PARAMETERDATAOBJECT
DEFINITIONDATA lr_ref TYPE REF TO data.DATA lr_object TYPE REF TO object.
CREATIONCREATE DATA lr_ref TYPE REF TO (‘ZIF_INSTANCE’).CREATE OBJECT lr_object TYPE (‘ZCL_CLASS’).
DEREFERENCEIt can be dereferenced. The object or any value can be assigned to dereferenced reference variable.
lr_ref->* = lr_object
Object references cannot be dereferenced. This notation
->* cannot be used.
CONVERSION OR CASTINGHow to convert a value or an object in to a reference:
it can be converted in the following two ways.
lr_ref->* = value or object
lr_ref = REF #(value/obj)
How to cast an object.
lr_object2 = CAST zcl_object2( lr_object ).
USAGEused to create data referencesUsed to create objects for classes.
ASSIGNMENTAn object or any value cannot be assigned to a data reference variable. It must be deferenced in order to assign a value.
lr_ref->* = lr_object.
lr_ref->* = ‘string_value’
Only objects can be assigned. It can be assigned directly without dereference.
DATA lr_object TYPE REF TO object.
DATA lr_object2 TYPE REF TO object.
CREATE OBJECT lr_object TYPE (‘ZCL_CLASS’).
lr_object2 = lr_object.
POSSIBLE SYNTAX ERRORAs mentioned before, values cannot be assigned directly without dereference.
For example:
lr_ref = ‘String_value’. This line of code will result in the below Error.
“The type of ‘lr_interface1’ cannot be converted to the type of ‘lr_ref’
If the types of data objects are different, then it must be casted during the assignment. Otherwise you will get the below error.
‘The type of ‘lr_object’ cannot be converted to the type of ‘lr_object2’.

How to create an object dynamically in SAP ABAP

Name of the class: ZTC_CHECK_CLS.

Name of the method: METHOD_ONE.

DATA lr_check_cls TYPE REF TO object.

CREATE OBJECT lr_check_cls TYPE (‘ZTC_CHECK_CLS’).

CALL METHOD (‘ZTC_CHECK_CLS’)->(‘METHOD_ONE’).

If the class ‘ZTC_CHECK_CLS’ is not available in your repository. it will throw a runtime error as the object is created only during the runtime.