ABAYTHON

WHAT IS THE DIFFERENCE BETWEEN STATIC VARIABLE AND INSTANCE VARIABLE

PARAMETER INSTANCE VARIABLE STATIC VARIABLE Access The instance variable is accessed through the object of the class. An object must be created for the class in order to access the instance variable The static variable is accessed through the class name. Object is not needed to access the variable value. Lifetime Instance variables exists till …

WHAT IS THE DIFFERENCE BETWEEN STATIC VARIABLE AND INSTANCE VARIABLE Read More »

How to compare OPEN-SQL – SELECT and INTERNAL TABLE READ Query

Ztt_db_table2 is the table name PARAMETER OPEN-SQL – SELECT INTERNAL TABLE – READ, Table expressions, LOOP AT SINGLE RECORD SELECT SINGLE * FROM ztt_db_table2 INTO ls_contact a) READ TABLE lt_contact INDEX 1 INTO ls_contact. b) READ TABLE lt_contact WITH KEY contact_id = 101 INTO ls_contact. c) DATA lt_contact TYPE TABLE OF ztt_db_table2 WITH NON-UNIQUE KEY …

How to compare OPEN-SQL – SELECT and INTERNAL TABLE READ Query Read More »

How to compare OPEN-SQL INSERT and INTERNAL TABLE-INSERT Query

Ztt_db_table2 is the Database table name PARAMETER OPEN-SQL-INSERT INTERNAL TABLE-INSERT Structure i) INSERT ztt_db_table2 FROM ls_contactii) INSERT INTO ztt_db_table2 VALUES ls_contact i) APPEND ls_contact TO lt_contactii) INSERT ls_contact INTO TABLE lt_contactiii) INSERT ls_contact INTO lt_contact INDEX 1 Internal table i) INSERT INTO ztt_db_table2 FROM TABLE lt_internal_tableii) INSERT INTO ztt_db_table2 FROM TABLE lt_internal_table ACCEPTING DUPLICATE KEYS …

How to compare OPEN-SQL INSERT and INTERNAL TABLE-INSERT Query Read More »

Difference between OPEN-SQL MODIFY and INTERNAL TABLE MODIFY Query

ztt_db_table2 is the Database table name Parameter OPEN-SQL MODIFY INTERNAL TABLE – MODIFY structure MODIFY ztt_db_table2 FROM ls_structure a) MODIFY lt_internal_table FROM ls_structure TRANSPORTING contact_address WHERE contact_id = 102b) MODIFY lt_internal_table FROM ls_structure INDEX 2 TRANSPORTING contact_name contact_address Internal table MODIFY ztt_db_table2 FROM TABLE lt_internal_table ——- Note: if the database table name and internal table …

Difference between OPEN-SQL MODIFY and INTERNAL TABLE MODIFY Query Read More »

Difference between Open-SQL DELETE and Internal table DELETE query

ztt_db_table2 is the Database table name Parameter OPEN-SQL – DELETE INTERNAL TABLE – DELETE WHERE DELETE FROM ztt_db_table2 WHERE contact_id = 102 DELETE lt_internal_table WHERE contact_id = 102. STRUCTURE DELETE ztt_db_table2 FROM ls_structure DELETE TABLE lt_internal_table FROM ls_structure INTERNAL TABLE DELETE ztt_db_table2 FROM TABLE lt_internal_table ——- INDEX ——- DELETE lt_internal_table INDEX 2.DELETE lt_internal_table FROM 2 …

Difference between Open-SQL DELETE and Internal table DELETE query Read More »

How to create Secondary Database connections in SAP ABAP

In addition to the primary database, other databases can be accessed using secondary database connections. Using Open-SQL: The keyword ‚CONNECTION’ and the database connection name is specified in the query. The connections are maintained in the Transaction ‘DBA COCKPIT’. Syntax: SELECT ….. FROM db_table CONNECTION connection_name INTO …. Example: The Secondary Database name is secondary_db …

How to create Secondary Database connections in SAP ABAP Read More »

How to use MODIFY to modify or insert records in Database table in SAP ABAP

Using the MODIFY statement, we can modify the existing records in a Database table. If the records does not exist in a Database table, then it can insert records in to Database table. This can be achieved in the following two ways. Through Structure. Through Internal table. Structure It is used to modify a single …

How to use MODIFY to modify or insert records in Database table in SAP ABAP Read More »

How to update Data records in a Database table in SAP ABAP

Using the ‘UPDATE’ keyword, we can modify one or more Data records in an internal table. The data records can be modified in the following different ways. Through Structure. Through Internal table. Through ‚WHERE‘ Clause. Through Structure: Single line of record can be modified using structure. Therefore define a structure with reference to the Database …

How to update Data records in a Database table in SAP ABAP Read More »

How to insert Data records in to Database table in SAP ABAP

With the help of ‘INSERT’ keyword, we can insert one or more records in to an internal table. Data records can be inserted in the following two different ways: Through structure. Through Internal table. Through structure. DATA ls_contact TYPE ztt_db_table2. ls_contact – contact_id = 104. ls_contact – contact_name = ‘Bala’. ls_contact – contact_address = ‘Street …

How to insert Data records in to Database table in SAP ABAP Read More »

How to delete records from a Database table in SAP ABAP

Using the DELETE statement, you can delete one or more records from a Database table. It can be deleted in the following three different ways. Through ‘WHERE’ clause. Through structure (work area). Through Internal table. Through ‘WHERE’ clause. The data records from the Database table are deleted based on the condition mentioned in the ‘WHERE’ …

How to delete records from a Database table in SAP ABAP Read More »