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
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.
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 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.
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.
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_
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.
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.
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
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_.
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:
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.
TYPES Statement - Examples
type statements are used to declar variable in Elementary data type and structured data type/
for naming convention, we use ls_ for local structure and gs_ for global structure
Sub-Fields (Offset and length)
String Processing: CONCATENATE
inorder to join to string values together we use concatenate in abap, it can be done using following code.
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,
Maintaining Selection Text
to set the parameter text we can use text elements please review the below example
Parameters as Checkboxes
Parameters as Radio Buttons
Creating 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
Date Calculations
the example of operation can be seen below.
Online Classes Sap Erp Abap Data >>>>> Download Now
ReplyDelete>>>>> Download Full
Online Classes Sap Erp Abap Data >>>>> Download LINK
>>>>> Download Now
Online Classes Sap Erp Abap Data >>>>> Download Full
>>>>> Download LINK pK