Monday, March 22, 2021

Thursday, December 10, 2020

Data Dictionary


SE11:
Data Dictionary
Database table
View
Data type

  • Data element
  • Structure
  • Table Type

Type Group
Domain
Search Help
Lock Objet

Domain: Manage the technical properties of Data element (Can’t be used directly in table or program). Settings format (Char, dats, dec, numc) and output characteristics


Data element: contains both semantic (short description) and technical properties about the data type.
Documentation (F1 Help), Search Help and SET/GET parameter, Default Component Name, Change Document (logs), Input History, Bi Directional.

Structure: Components of Data elements, integrated types, table types, definition of data base table or views, other structure types

Flat: Simple form of structure. List of fields, typed with data elements
Nested: Include another structure into a structure
Deep: A Structure containing one or more fields using a table type


Table Type:
A line type that defines structure and data type attribute of the line in the internal table.
Modes:

Standard Table
Sorted Table
Hashed table
Index table
Not specified

Specific table types
Generic Table type
Range table type

¬
Type Groups: Global complex data types, global constants and macros


Database tables:
Transparent Table
Pooled table (M_MTVMA, M_MTVMB)
Cluster table (CDPOS, KONV, BSEC, BSED, BSEG)

Transparent Table:
Technical settings:
1. Table Buffer
2. Size Category: How many possible records.
3. Data Class: Physical area on DB it stored
4. Logging: log Changes to the data record

Pooled and Cluster table
Several tables logically defined in ABAP dictionary are combined in physical database table (Type pool or cluster)

Cluster Table: Functionality dependent data, which is divided among different tables (VARDATA primary key)

Pooled Table: stores data records from database defined in data dictionary that are not dependent to one another. Database interface stores the non-keys fields of pooled table in an unstructured way

Advantages:
Fewer tables and data fields
Data compression
Encrypted data storage

Disadvantages
Limitations: No native SQL, no views or joins, no secondary index, no Group by Order by and so on
No table appends
For Cluster table, selection is limited to cluster key
For pooled table, longer keys are required than necessary


Index:
Primary Index Key fields of the table, is always unique
Secondary Index
Extension Index: extension of standard index


Table Buffering:
Full Buffering
Generic key buffering  all the records whose left justified part of the key are buffered
Single record buffering

Buffering synchronization: rdisp/buffertime  60 to 240


Input Checks
Fixed values: Only limited set of values are allowed. Defined at domain level, used as F4 help and input validation on screen

Foreign Key
Fields in the foreign key table are checked against the check table (Parent/Master), whose key fields.


Conversion Error:
tablespace overflow
Data loss if reduced in size
Invalid of the change type

Enhancing the table
Append structure: append fields to standard table, without modifying table definition. Can only assigned to only one table. There can be many structure to one table

Custom Include: all the contents in the structure are include to the table. Can be assigned to multiple tables. These are already provided with custom name space

Views
Data from single/multiple tables are joined/projected to display the required fields.

Projection View:
Maintenance view: Can be displayed and maintained using SE54

Cluster view: SE54
Combine multiple maintenance generated dialogs for views


Search Help F4 help POV
Using FM: F4IF_FIELD_VALUE_REQUEST or
F4IF_INT_TABLE_VALUE_REQUEST
Elementary Search Help
Collective Search Help: search help that combines several paths

Enhancement:
Append search helps
Search help exists



TMG:
STANDARD RECORDING ROUTINE radio button to be selected to make entries transportable
No, or use, recording routine

Single screen Vs Overview screen

Check Table is for Field level Validation whereas Value table is for Domain Level Validations.
Value Table proposes table for check table.
If you define foreign key then value table is proposed as check table

Value Table
This is maintained at Domain Level.
Whenever you create a domain, you can entered allowed values. For example you go to Domain SHKZG - Debit/credit indicator. Here only allowed values is H or S.
Whenever you use this Domain, the system will forces you to enter only these values.
This is a sort of master check. To be maintained as a customization object. This mean that if you want to enter values to this table you have to create a development request & transport the same.
Check table
For example you have Employee master table & Employee Transaction table.
Whenever an employee Transacts we need to check whether that employee exists, so we can refer to the employee master table.
This is nothing but a Parent & Child relationship. Here data can be maintained at client level, no development involved.
As per DBMS what we call foreign key table, is called as check table in SAP.
There is 1 more important Difference in Value Table and Check Table is that:
1. The contents of the check will be used as an input help (F4 Help) for a particular field on which a check table is assigned.
But the contents of Value Table are never used in Input Help.
The Hierarchy which decides from where to use the Input Help is:
1. Input help defined explicitly in ABAP Program or Dialog Module.
2. Input Help Attached to the referenced Database Table field.
3. Using the contents of Check Table as an input help if neither (1) or (2) help are there.
4. Input help from fixed value or Value range given in Domain.


Check Table
Check Table is the dependent table to which the relationship is defined using the foreign keys. The contents of the check table field are shown in the input help for the referenced field.
Value Table
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. The value table is the default check table.

Wednesday, December 17, 2014

ABAP RAW String not updating

If you have created a field of RAWSTRING type and while checking you will be seeing that when appending into the table and check in SE11 tcode, you may see that the field data is not visible.

Don't get panic, check once in SE16N and still its not visible then try by moving the field in the last in the SE11.

Monday, October 13, 2014

Add first line to field symbol

Issue : When Internal table is empty and no workarea is avalable, how to append workarea
Sol : APPEND INITIAL LINE TO it_tab ASSIGNING <fs>.

Thursday, December 19, 2013

Add Spaces at the end of the file


Issue : To add spaces at the end of the file
Sol : 
Adding spaces at the end of the file can be of two types
  1. By declaring any temporary field with "cl_abap_conv_in_ce=>uccp( '00a0' )"
  2. By adding Uni-code space in editor (Alt+255).

Wednesday, December 12, 2012