AMAZON BEST DEALS

https://amzn.to/3Fq4ABu

Wednesday, 27 January 2016

SAP ABAP - Finding Relationship Between Tables

How to find relationship between tables

1. Go to transaction SQVI
2. Create a View
3. Enter title
4. Choose the Data source as Table Join
5. Go to insert table and add table as per your requirement.


Here you can find various tabs through which you can find out join condition, reference field etc.



SAP ABAP - Data Dictionary

 Transparent tables:

1) Used to hold application data (master or transaction data)
2) 1:1 relation with the database table
3) Same name, same number of fields,

Pooled tables: (table pools)

Many to one relation ship with the database
Table pools holds number of pool tables
Table pools hold a large number of very small tables (10 to 100 rows each)
Used to hold control data (e.g. screen sequences,program parameters or temporary data).
Used to hold customizing data (country codes, region codes, .pricing conditions)

Cluster tables: (table clusters)

Many to one relation ship with the database
Table clusters is combinations cluster tables.
Table cluster holds data from a few (2 to 10) very large tables.
In order to combine tables in clusters, at least  parts of the keys must agree (performance good ) , but not in the case of pool.


Table: Creation

Delivery and maintenance:

Delivery class: identifies the owner of the data in this table, the owner is responsible for maintaining table contents.  Customer or sap or ……..


Technical settings: settings we can control how database tables are created in the database.
Data class:  Determines the in which table space the table is stored when table is created
Size category   Probable space requirement of the table in the database
                              Buffering
Table maintenance generator

Table maintenances generator is nothing but  making a table available for adding records anddeletingrecords.    The transaction code used is SM30.

Step 1
Create parameter transaction (i.e. via SE93)
Step 2
Enter transaction details. Within the Proposed values section there are a number of value which can be setup, simply use drop down menu to view the list. The 2 values assigned in the following example are as follows:
       
                VIEWNAME:        Set table name to maintained
               UPDATE:               Open table for update
Foreign key:
FK is a field in table that is connected to another table via foreign key relation ship.
Purpose of foreign key relationship is to validate the data being entered into one table by checking against a valid set of values in another table.
Limitations:
Check table field must be primary key in that table.
Domain names and check table field must be same.
Cardinality: For each value in the check table, how many rows of data are allowed in the foreign key table.
Value Table:
Its like default check table (But not), value table is automatically proposed as the
Check table when creating a foreign key.
Currency and quantity fields:
Each currency field must be linked to a currency key field, and each quantity field must be linked to a field containing the units of measurement.
The value in the reference field determines the currency of the amount. ( and also quantity)
Indexes :
Efficiency mechanism for quickly finding rows
with in a table.

Tuesday, 26 January 2016

SAP ABAP Interview Questions & Answers

Interview Questions & Answers:

What types of objects can be created in the ABAP Dictionary?

Tables
Views
Data Elements
Structures
Table Types
Type Groups
Domains
Search Helps
Lock Objects

What types of tables can be created in the ABAP Dictionary?

Transparent Tables
Pooled and Clustered Tables

Which field differentiates a table from client-dependent and client-independent?

The MANDT field of the table specifies whether the table is client independent or not.

What is the difference between Pooled tables and Cluster tables?

Cluster tables and Pooled tables have many to one relationship with the underlying database.
A table pool corresponds to a table in the database in which all records from the pooled tables assigned to it are stored.
Several logical data records from different cluster tables can be stored together in one physical record in a table cluster.
  • A pooled table cannot have the name having more than 10 characters.
  • All the key fields of the pooled table must be of character data type.
  • In pooled tables, the maximum length of the key field/data fields should not exceed the length of varkey/vardata of the pool respectively.
  • In cluster table the records having the same key are stored in a single key in the cluster.
  • If there is an overflow of the data records a continuation record is created with the same table key.

What is the difference between Database tables and Views?

The Table has a physical storage of data whereas views do not have physical storage of data.
The view is derived from one or more tables which is created only with the required fields from the database table(s). It can also be created with table inner joins and specifying conditions for data retrieval.

What are the different types of Views?

  • Projection view - Just retrieves some fields from a single table.
  • Help View - This is used for search help.
  • Database View - This is inner join view of one or more tables
  • Maintenance View - Helps in creating maintaining data of the application object. The data can be distributed among several tables.

Can I use all the views in the ABAP program ?

No. You can use only projection view or database view in your ABAP program.

What is Table Maintenance Generator?

The Table Maintenance Generator is used to create table maintenance program to add, modify or delete records in the database table. This can be accessed using transaction SE54 or in SE11 using the menu Utilities->Table Maintenance Generator.

What is One step, two step in Table Maintenance Generator?

This specifies the screens to be created in the Table Maintenance Program.
Single step: Only overview screen is created i.e. the Table Maintenance Program will have only one screen where you can add, delete or edit records.
Two step: Two screens namely the overview screen and Single screen are created. The user can see the key fields in the first screen and can further go on to edit further details.

How do you activate the database table after making changes to it?

After making changes to the table, inorder to reflect the changes go to transaction SE14 and Choose Edit and then choose Activate and Adjust Database.
OR
You can directly activate it from the SE11.

In which table are the programs stored in?

The programs are stored in the table TADIR and the development class packages in TDEVC.

I have recently added a few fields to a custom table. But I don't get these fields in the table maintenance program?

You have to delete and recreate your own existing table maintenance program to see your new fields.

What is the difference between INSERT and MODIFY?

Whenever you need to create new records in the database table use INSERT. Whenever using INSERT be sure that a duplicate entry having the same values for the primary key fields are not present. Else it may throw a dump.
When you use MODIFY it makes a check for the matching key field values. If present it modifies the matching record, else it creates a new record in the database table.

How do I create index on a database table?

Go to transaction SE11, open your database table. Choose the menu, Goto->Indexes to create index. Give your index name and choose the fields of the table. Be careful, an additional index may vanish with the next upgrade or hotpackage.

What is the difference between Check Table and Value Table?

The Check Table is the dependent table to which the relationship is defined using foreign keys. The contents of the check table field are shown in the input help for the referenced field.
The Value table is the table attached to a field at the domain level, where the entry to the field can be only from the value table. They are not used in the Input Help.

What is the difference between Domain and Data Elements?

The Domain specifies the Technical attributes of the field such as the data type, length and the value range.
The data element is an elementary type defining the description/text for the field when displaying on the screen and Parameter ID.

When I create new entries in the table the field values are always in Uppercase. How do I get the data with mixed case?

The reason for this is that the Domain for the field in the table might have Lowercase checkbox unchecked. Check the Lowercase checkbox to preserve the case of your data.

What is the need of reference table and reference field in Currency/Quantity fields?

The reference table and reference field are the fields which specify the currency key or Unit of Measure. Suppose if the user specifies a currency amount say 1000$, the currency amount field would indicate the amount 1000 and the currency key indicates that the currency specified is in Dollars.

SAP ABAP- Creation Of a Table Pool and Pool Table

Creation Of a Table Pool and Pool Table

In this Tutorial, we create a Table pool first and then create/ (add a table to Table pool) a Pooled Table.  
Step 1:

 Go to transaction SE11. Go to Utilities à Other Dictionary Objects


Step 2:
Select Radio button Table pool/Cluster Give table Pool Name: ZTBL_POOL.
Then press F5 or choose Create.  

Step 3:

Then Select Radio button Table Pool. Press Enter.

Step 4:  

Then you go to maintain Poll Screen there give Short Description.

Step 5:

Then go to Technical settings.

Step 6:

In the “Maintain technical Settings” screen Provide Size category.
 





SAP ABAP - Creating a secondary index

Creating a secondary index
There are two types of indexes: Primary index and secondary index. Primary index is automatically created using the primary keys defined. 
Secondary index could be created as per the user requirement. This article discusses about creating a secondary index. 
Go to transaction SE11.
 For our demo purpose, we have considered the table ZAUTHOR. 
To know if there are any secondary indexes available, click on Goto à Indexes
 Following popup appears:


From the above screenshot, it is evident that there are no secondary indexes already created. 
Click on Create à Create Index
 Enter the name of the index. 


Fill in the details – Short description and the fields in the index.
 Save and activate. 
Now you can observe the index created above in the list now:
 Maximum number of secondary indexes we can have are 9.

SAP ABAP- Creating Search Helps (Elementary and Secondary)

Creating Search Helps (Elementary and Secondary)
Go To SE11 T-code.


Select the radio button of search help.


Provide the search help name. Select the create button. 


Select ELEMENTARY search help.


Press Enter. 
Provide the short description, the selection method.
Provide the fields.

Save it, Check It & Activate it.
Then execute it.

We can see the screen like this, and then press F4 in this page.

Then press F4 View the output like this.

This is the output for elementary search help.




The Collective Search Help is like this. 


Goto T-Code Se11.
Provide name. Select collective search help button.
Press enter.

Provide the Values

Select include search help.
Then provide search help name, which is already define by the same fields.

Then save it, activate it & execute it. 

Press F4 we can see the output like this.


Diff Between Elementary search helps & Collective search helps 

1) Elementary search helps describe a search path. The elementary search help must define where the data of the hit list should be read from (selection method), how the exchange of values between the screen template and selection method is implemented (interface of the search help) and how the online input help should be defined (online behavior of the search help).

2) Collective search helps combine several elementary search helps. Collective search help thus can offer several alternative search paths.

3) An elementary search help defines the standard flow of an input help.

4) A collective search help combines several elementary search helps. The user can thus choose one of several alternative search paths with collective search help.

5) A collective search help comprises several elementary search helps. It combines all the search paths that are meaningful for a field.

6) Both elementary search helps and other search helps can be included in a collective search help. If other collective search helps are contained in collective search help, they are expanded to the level of the elementary search helps when the input help is called.

Fundamentals of SAP ABAP Tables


Transparent
Pool
Cluster
Contain a single table. Used to store master data
They are used to hold a large number of very small tables(stores customizing data or system data)
They are used to hold data from a few number of large tables.(stores system data)
It has a one-to-one relationship with a table in the database
It has a many-to-one relationship with a table in the database
It has a many-to-one relationship with table in the database
For each transparent table there is one associated table in the database
It is stored with other pooled tables in a single table called table pool in the database
Many cluster tables are stored in a single table in the database called a table cluster
The database table has the same name, same number of fields and the fields have the same names
The database table has different name, different number of fields and fields have different names
The database table has different name, different number of fields and fields have different names
There is only a single table
Table pools contain more tables than table clusters
Contains less tables than table pools
Single table can have one or more primary key
Primary key of each table does not begin with same fields or fields
Primary key of each table begins with same fields or fields
Secondary indexes can be created
Secondary indexes cannot be created
Secondary indexes cannot be created
They can be accessed using open and native SQL
They can be accessed using open SQL only
They can be accessed using open  SQL only
USE: They are used to hold master data e.g. Table vendors or table of customers. Example of transaction data is orders placed by customers
USE: They reduce the amount of database resources needed when many small tables have to be opened at the same time
USE: They would be used when the tables have primary key in common and data in these tables are all accesses simultaneously


EARN ONLINE BY VIEWING ADDS ( WORK FROM HOME )

 YOU CAN EARN ONLINE BY VIEWING ADDS EVERY DAY Every day you will get 20 adds,you have to view those adds. For viewing those adds the compan...