Online Classes SAP ERP ABAP Data

SAP ERP ABAP 7.4 (Object oriented) DATA

•Define variables with the DATA statement
•Define constants
•Apply type conversions
•Explain arithmetic expressions
•Perform date calculations
•Use parameters (checkboxes and radio buttons)
•Create selection screen boxes

Predefined Data Types and Their Attributes
data types
Predefined Data Types and Their Attributes
in SAP ABAP we have many type of data type to hold the value into the variables, from above table you can have a idea about the data type and meaning of datatype.

Type-Specific Output

below chart will give us the idea about type Specific output.
specific output

Data Types in ABAP

like other programming languages SAP ABAP have data types, which are divided into two categories, Elementary and structured, the Structured is further divided into Structure and internal table.
data type in ABAP

Data Declaration - DATA Statement

To store values in any variable we need to do the data declaration, we can only assign a value to a variable if the contain and value have the same datatype.

Data Declaration

Rules for assignment of field names
  • A name consists of a max. of 30 characters
  • (letters, digits, special characters).
  • The following special characters should not
  • be used: ( ) + . , :
  • SPACE is a predefined field.
  • In an ABAP statement, the name
  • of a keyword addition (e.g., VALUE, TYPE,
  • FORMAT) cannot also be used as a field name.

Syntax - DATA Statement

data statement are used to declare dynamic objects like other programming languages, the dynamic objects are created in memory, so to clear the space occupied by these variable we use CLEAR keyword to free memory resources.
Data Statement

Naming Standards for Program Objects

Name Conventions are very important in programming language, so to understand code to have more readable picture sap define some naming convention for Global variables we start variable with gv_ and for local variables we use lv_

Data type variable

Value Assignment

value assignment
Note:
MOVE function is now obsolete in ABAP 7.40
Assigning value field using ‘=‘ symbol is preferred.

Type Conversion

In any programming language type conversion are very important in ABAP we have following type Conversion.

type conversion

Data Declaration

  • Data types can be used independently.
  • The definition of user-defined data type is based on a set of pre-defined elementary data types.
  • You can define data types either locally in the declaration part of a program using the Types statement or globally in the ABAP dictionary.
Data Declaration

Constants

once a value is set to a constant variable during declaration it is not changeable.

Number literal

715, -431
Sequence of digits, negative numbers
with preceding minus sign

Text literal

'ABC', 'This is a text'
Sequence of characters enclosed
in quotes, max. of 255 characters

Constant


Data Declaration - CONSTANTS Statement Classic ABAP

in classic ABAP we declare constants inside a constants block each variable have its type and value in assigned during declaration.

Naming Standards for Program Objects of Constants

for local constants we start the variable name with lc_for local constants we start the variable name with lc_ and for global constants we start variable name gc_.

naming Standards

Inline Data Declaration for ABAP 7.40

Inline Declaration using lhs-variable with a simple assignment

Before 7.40

DATA text TYPE string. text = `...`.

With 7.40

DATA(text) = `...`.

Example:

Constants

User-defined Data Types - TYPES Statement

in ABAP we can make our own user defined data types which are mostly dynamic objects
they can use to hold the custom data based on the programme needs.

user defined data types

TYPES Statement - Examples

type statements are used to declar variable in Elementary data type and structured data type/
type statement example
for naming convention, we use ls_ for local structure and gs_ for global structure


Sub-Fields (Offset and length)

Sub Fields

String Processing: CONCATENATE

inorder to join to string values together we use concatenate in abap, it can be done using following code.

Summer_holiday_sample

String Processing: SPLIT Statement

to split the string in ABAP we using SPLIT keyword the example can be seen easily below.

Declaring Input Fields with PARAMETERS

to get the value from user we can use input parameters in SAP ABAP, there are different type of input control avaliable please check the example below,

parameter_fields

Maintaining Selection Text

to set the parameter text we can use text elements please review the below example 
maintain selection text

Parameters as Checkboxes

check_box_parameter

Parameters as Radio Buttons

radio buttons

Creating Selection Screen Boxes

selection screen Boxes

Arithmetic Expressions

like other programming language ABAP also suupport Arithmatic Expressions, ABAP have plus , minus  divide, muliply operator and support SQRT, EXP , LOG , SIN , COS and STRLEN functions
arithmetic Expression

Date Calculations

the example of operation can be seen below.
Data calculations

Comments

  1. Online Classes Sap Erp Abap Data >>>>> Download Now

    >>>>> Download Full

    Online Classes Sap Erp Abap Data >>>>> Download LINK

    >>>>> Download Now

    Online Classes Sap Erp Abap Data >>>>> Download Full

    >>>>> Download LINK pK

    ReplyDelete

Post a Comment

Popular posts from this blog

SAP ABAP SELECT STATEMENT

SAP ADOBE FORMS

ABAP AUTHORIZATION CONCEPT