Showing posts with label ABAP DICTIONARY. Show all posts
Showing posts with label ABAP DICTIONARY. Show all posts

CRM in MySAP Complete Course

CRM management software's are many in the market and MYSAP solutions are great tools of crm for best results.Customer Relationship Management is a very important part of any business to make the profits better. Enterprise resource planning is a new way of thinking business terms and providing the best service to the customers to make them happy and come back to you. There are many erp software's and MySAP is a leading ERP software with wonderfully integrated crm management software module.

Here is the list of topics about CRM, its different software's and advantage of mysap erp and its crm module.

What is Customer Relationship Management Overview and Introduction

Customer Relationship Management and mysap an introduction
CRM Management and sales and service strategy of mysap crm
MySAP CRM and customer as business partner
How Customer Relationship management makes company Leader
CRM Uses and how to get best results with CRM
CRM software solutions and mysap advantage

MySAP CRM and customer relationship management
My SAP CRM , Business Scenarios and SAP Solutions
Business View and Mysap.com
Customer Relationship Management Software and Interaction with Customer
Marketing and erp mysap crm options
Organizational Challenges with crm and mysap crm solutions
My sap crm and marketing planning


MySAP CRM System architecture and design
MySAP CRM architecture and E procurement introduction
MySAP CRM E procurement
MySAP CRM business intelligence at work
CRM data administration in mysap and business intelligence

CRM Part One

SAP CRM Business Transactions
 SAP CRM marketing Management Campaign
SAP CRM Internet sales Features
SAP CRM interaction center overview
SAP CRM Mobile sales and serviceRoles in SAP CRM
 SAP CRM Organizational Model

CRM Part Two

SAP CRM Organizational management
SAP CRM Territory Management 
CRM Product manager
CRM Business Transactions
 CRM Activity Administration in SAP
SAP CRM Partner Processing
SAP CRM Pricing
SAP CRM Actions
CRM Billing Process overview
CRM Middle ware overview
 CRM Middle ware administration and technical overview
CRM Middle ware Data Load and Monitoring
SAP Solution Manager Overview
People Centric SAP CRM Introduction
CRM Technical Infrastructure

CRM Part Three

CRM Sales Cycle Management
CRM Sales opportunity management
Sales process in Quotation and order management in CRM
Sales quotation management in CRM
SAP CRM Sales Order Management
CRM Sales features in quotation and order management
CRM Sales Contract Administration for SAP
Incentives and commission management in sales using CRM
CRM Web interaction Center Overview
CRM Interaction Center Agent Perform
CRM Technical Architecture

CRM Part Four

CRM Interaction Center Agent Perform
 CRM Technical Architecture 
CRM IC Web Client Marketing and Sales
CRM Interaction Center Support and service 
Creating Web Client Profile for SAP CRM
CRM Communication Architecture
CRM agent inbox in Interaction Center
CRM Rule Modeler in Interaction Center 
CRM Category Modeler for Web Client
CRM Interaction Center Management
SAP CRM Software Architecture

Part Five

Mobile Scenarios in SAP CRM 
Connecting Mobile Clients to SAP CRM
Administering Sites for Mobile Users in CRM
CRM Middle ware for Mobile Replication
CRM Mobile Replication Architecture 
CRM Middle ware Monitors 
CRM Middle ware replication Modeling
CRM Middle ware Software Distribution

Part Six

CRM Middle ware System Architecture
CRM Middle ware Enhancement
CRM Middle ware Data Flow
 CRM Middle ware Modelling 
CRM Adapter Overview 
CRM Software Logistics and support

Part Seven

SAP CRM Technology Overview
CRM Data Exchange with SAP R/3
CRM Data Exchange via Adapter
CRM E commerce Introduction
CRM Interaction Center System  Architecture
CRM Field Sales
People Centric SAP CRM
Analytical SAP CRm Overview
SAP CRM Solution Monitoring
CRM Backup Restoring System

Part Eight

MySAP CRM Marketing Introduction
Marketing and Advertizing in CRM
MySAP CRM Marketing Calender
SAP CRM Marketing Analytics
SAP CRM Marketing Personalized E mail
SAP CRM Marketing Segmentation
CRM Marketing Proposals
CRM Marketing and lead management


Complete  SAP ABAP Course

SAP ABAP Dictionary Complete

SAP stores all data in the form of tables in abap dictionary.This is a vital ,individual and dedicated data base for SAP.

Here you can learn every thing regarding ABAP DICTIONARY.

All your comments are welcome.


ABAP DICTIONARY OVER VIEW

TABLE TYPES IN ABAP

CHANGES TO DATA BASE TABLES

VIEWS IN ABAP

TYPES OF VIEWS IN ABAP

DATA BASE DIALOG

ABAP DATA BASE UPDATE

ORGANIZING DATA BASE UPDATES

SAP LOCK CONCEPT

SEARCH HELP

DEPENDENCIES OF DICTIONARY OBJECTS

PERFORMANCE DURING TABLE ACCESS

ENHANCEMENTS TO DICTIONARY ELEMENTS

If you are interested in SAP ABAP syntax for format check here.

ABAP TOPIC WISE COMPLETE COURSE

BDC
OOPS ABAPALE
IDOC'S
BADI
BAPI
Syntax Check
Interview Questions
ALV Reports with sample code
ABAP complete course
ABAP Dictionary
SAP Scripts
Script Controls
Smart Forms
Work Flow
Work Flow MM
Work Flow SD
Communication Interface

SAP ABAP Complete Course Daywise

SAP ABAP complete course welcomes you and it is the place where you can every thing regarding sap programming right from what is a report is to what are the user exits and what are the BAPI's are.

This FIFTY SEVEN DAY COURSE will teach every thing regarding SAP ABAP ,right from basics to most advanced topics.

Let us start browsing day wise

What is SAP R/3 Introduction to best ERP MySAP

SAP NAVIGATION DAY 1

SAP ARCHETECHERE DAY 2

ABAP WORK BENCH TOOLS DAY 3

ABAP DATA OBJECTS DAY 4

SAP DATA BASE DIALOG DAY 5

INTERNAL PROGRAM MODULSRIZATION DAY 6

USER DIALOGS AND LISTS DAY 7

USER DIALOG AND SELECTION DAY 8

USER DIALOGS AND SCREEN DAY 9

REUSE COMPONENTS IN ABAP DAY 10

MANAGING ABAP PROJECT OBJECTS DAY 11

ABAP DICTIONARY INTRODUCTION DAY 12

PERFORMANCE DURING TABLE ACCESS IN ABAP DAY 13

DATA CONSISTENCY IN ABAP DAY 14

DEPENDENCIES IN ABAP DICTIONARY DAY 15

CHANGING DATA BASE TABLES IN SAP DAY 16

DATA BASE VIEWS IN ABAP DAY 17

SEARCH HELP USING ABAP DAY 18

ABAP RUN TIME ENVIRONMENT DAY 19

DATA TYPES AND DATA OBJECTS DAY 20

ABAP STATEMENTS DAY 21

ROLE OF INTERNAL TABLE IN ABAP DAY 22

ABAP SUB ROUTINES DAY 23

FUNCTION GROUPS AND FUNCTION MODULES IN ABAP DAY 24

CALLING PROGRAMS AND PASSING DATA IN SAP DAY 25

TECHNIQUES FOR LIST CREATION DAY 26

LOGICAL DATA BASES LDB DAY 28

SELECTOIN SCREEN FOR ABAP PROGRAM DAY 29

PROGRAMMING DATA RETRIVAL IN ABAP DAY 30

SAP QUARY ADMISTRATION DAY 31

DATA FORMATION FOR OUTPUT DAY 32

SAVING LISTS IN BACK GROUND DAY 33

ALV GRID CONTROL IN REPORTS DAY 34

INTERACTIVE REPORTS BASICS DAY 35

PROGRAM INTERFACE AN INTRODUCTION DAY 36

INTERACTIVE REPORT LIST TECHNIQUES DAY 37

SCREEN PROGRAMMING AN INTRODUCTION DAY 38

SCREEN ELEMENTS FOR OUTPUT ABAP REPORT DAY 39

SCREEN ELEMENTS FOR INPUT DAY 40

SCREEN ELEMENTS AND SUB SCREENS DAY 41

SCREEN ELEMENTS IN TABLE DAY 42

CONTEXT MENU IN THE SCREEN DAY 43

LISTS IN SCREEN PROGRAMMING DAY 44

DATA BASE UPDATAS AN OVERVIEW DAY 45

LWS AND CLINET SERVER DAY 46

SAP LOCK CONCEPT DAY 47

ORGANIZING DATA BASE UPDATS DAY 48

COMPLEX LUW PROCESSING DAY 49

AUTHORIZATION CHECKS IN ABAP DAY 50

CHANGING THE SAP STANDARD DAY 51

ENHANCEMENTS TO ABAP DICTIONARY DAY 52

BUSINESS TRANSACTION EVENTS IN SAP DAY 53

ENHANCEMENTS USING CUSTOMER EXITS DAY 54

BUSINESS ADD-IN'S IN SAP DAY 55

MODIFICAITONS TO SAP DAY 56

MODIFICATIONS TO SAP EXTENDED DAY 57

Master data for sap

Data Types and Data Object of SAP ABAP Lesson Twenty


To work with data at run time, you need to store it in the program at run time and address it from your program. The system needs to know the type of the data (for example, character string, whole number, table consisting of name, currency amount, and date, and so on). A data object is a named memory area that is structured according to a particular data type . The type normally specifies all of the attributes of the data object. Using the name, you can access the contents, that is the data, directly. The name may be a compound name consisting of more than one single name.

You could regard a data type as being similar to the construction plans for a building. The plans could be used for more than one building, which would all have the same type, but you would still be able to tell them apart. Suppose the buildings were used for storage. You would find a particular item using the address of the building, and knowing on which floor, in which room, and in which shelf or bin it was stored. You would have to consider carefully when drawing up your plans the kinds of things you would want to store in your buildings.

The ABAP language is very flexible. Some of the attributes of a data type do not have to be specified until you use it to declare a data object, or, in some cases, not until run time. It also allows you to use data objects that you have already declared or ABAP Dictionary objects as the basis for new types or data objects.

There are various places in the ABAP Workbench in which you can store and define data types:

ABAP Dictionary

The ABAP Dictionary contains 23 predefined data types, which serve as a basis for all other ABAP Dictionary objects (such as domains, data elements, data types, and so on). These ABAP Dictionary types are available for use globally throughout the system.As well as the Dictionary objects used to access tables (tables, views, search helps, and so on), you can also (from Release 4.5) create global data types in the ABAP Dictionary.

Previously, the only way to define global data types was to use a type group. Type groups are still supported, but the concept is actually obsolete now that it is possible to define global data types in the ABAP Dictionary.

ABAP programs

Data types that you define in an ABAP program are local, that is, only valid within that program. You use the ten predefined ABAP data types as a basis for your own types.Both global and local data types fit into the schematic diagram above. The names used above should make it easier for you to understand the following slides and the online documentation.The technical attributes of an elementary field are defined by an elementary type .

A structure type consists of components.A table type consists of a line type , access type , key definition, and key type .In certain exceptional cases, types only desscribe part of the attributes of a data object. For example, a table type does not specify how many lines the table will have. This attribute is not set until run time, and only affects that one data object.You can nest types "deeply" to any level.

A structured type can have components that are themselves structured or table types. This enables you to construct very complex data types. However, the smallest indivisible unit is always an elementary type.The ABAP Dictionary contains a series of predefined data types to represent the external data types of the various database systems.

When you define a field with type CURR in the ABAP Dictionary, you must always link to a currency. You do this by specifying a field with the type CUKY. (When you create a list, you use the CURRENCY addition in the WRITE statement). The same applies to type QUAN, which must always link to a field with type UNIT.Type FLTP is useful for calculations involving very large or very small numbers. This usually only occurs in scientific applications or when making estimates.

For business calculations, you should always use type DEC or QUAN. The arithmetic is the same as that to which you are used "on paper" - the system calculates precisely to the last decimal place.A typical use for type NUMC is for postal code fields - fields in which only digits should be allowed, but with which you do not want to perform calculations. (It is, however, possible to use conversions and calculate with alpha-numeric data.) For further details about arithmetic and conversions, refer to the Statements unit.

Based on their underlying data type, some data objects are displayed according to formatting options (for example, country-specific date formats). Each user defines these formats in their user defaults.
All of these data types apart from string and rawstring are elementary types. For technical reasons, these are classified as nested types. This has consequences for certain uses, such as the INTO clause of a SELECT statement.

Data element

Data elements have a business meaning (field label, help text, and so on). Up to and including Release 4.0, it was only possible to specify the technical attributes of a data element by specifying a domain. Each domain had to have a predefined Dictionary type assigned to it. This is still possible. However, it is now possible to enter a predefined Dictionary type directly. If you want to ensure that the technical attributes of a group of data elements can only be changed centrally, you should continue to use domains.

As part of ABAP Objects, you can now designate a data element a reference type and declare global types for references to global classes or interfaces. Note that, in this case, the type of the data element is no longer elementary, but nested. The same applies when you use the predefined types string and raw string.

Structure

Each component of a structure must have a name so that it can be addressed directly. For the type of a component you may specify a predefined Dictionary type, a data element, a structured type, or a table type. This allows you to construct nested data types. Note the consequences we have already mentioned with particular kinds of access. For example, if a structure contains a component with the type reference or string, you cannot use INTO CORRESPONDING FIELDS OF in a SELECT statement. Instead, you must list the components in the INTO clause.

The data type of an internal table is fully specified by its:

Line type : The line type defines the attributes of the individual fields. You can specify any ABAP data type.

Key definition : The key fields and their sequence determine the criteria by which the system identifies table lines.

Key type : You can define the key as either unique or non-unique . The uniqueness of the key must be compatible with the access type you have chosen for the table. If the key is unique, there can be no duplicate entires in the table.


Access type :Unlike database tables, the system assigns line numbers to certain kinds of internal tables. This means that you can use the index to access lines as well as the key. We sometimes use the term "table type " to refer to this.

We can also divide up internal table types into three kinds by their access type:

Standard tables

In a standard table, you can access data using either the table index or the key. Since the key of a standard table always has to be non-unique for compatibility reasons, the system searches the whole table each time you access it using the key. Consequently, you should always use the index to access a standard table whenever possible.

Sorted tables

In a sorted table, the system automatically stores the entries and inserts new entries sorted by the table key. The system uses a binary search on the table when you access it using the key. You can specify the key of a sorted table as unique. You will often use the key to access a sorted table, but it is also possible to use the index. Standard tables and sorted tables are generically known as index tables.

Hashed tables

You can only access a hashed table using the key. There are certain conditions under which you can considerably reduce the access times to large tables by using a hashed table.The key of a hashed table must always be unique.

You do not have to specify the access type fully. You can either omit it altogether, or specify it partially (index table). The table type is then generic, and, by omitting certain attributes, we can use it to specify the types of interface parameters.To find out the access type of an internal table at run time, use the statement DESCRIBE TABLE KIND .

The line type specifies the semantic and technical attributes of the individual fields in a line. As already mentioned, you can specify either another table type, a structured type, or an elementary type. If you only use an elementary type, the internal table will have a single column with no component name (unstructured table

Key definition

The default key consists of all character (alphanumeric) components of the line type that are not themselves table types. In this case, it would be empty (only possible with standard tables).It is particularly useful to name the line type , that is, the whole line, as the key if the table type is unstructured.You can also name key components and their sequence explicitly.

A final possibility is not to specify the key, leaving it generic instead.Key type As well as defining the key as unique and non-unique , you can specify a generic key type by omitting the specification.Type F is useful for calculations involving very large or very small numbers. This usually only occurs in scientific applications or when making estimates.For business calculations, you should always use type P. The arithmetic is the same as that to which you are used "on paper" - the system calcualtes precisely to the la st decimal place.

A typical use for type N is for postal code fields - fields in which only digits should be allowed, but with which you do not want to perform calculations. (It is, however, possible to use conversions and calculate with alpha-numeric data.) For further details about arithmetic and conversions, refer to the Statements unit.

Unlike type C, N, or X fields, the length of a string or hexadecimal string is not statically defined. Instead, it is variable, and, at runtime, will always take the length of its current contents. The memory is managed dynamically by the system. Strings and hexadecimal strings can have any length.You cannot currently use STRING or XSTRING to specify the type of a screen field.

You can only define a new data type based on an existing type. Use the TYPE addition to refer to data types, that is, predefined ABAP types, user-defined local types, predefined ABAP Dictionary types, user-defined ABAP Dictionary types, or fields or entire lines from database tables. If you refer to an ABAP Dictionary type, changes to the global type are automatically passed on to your type. This ensures that your type is always compatible with the corresponding ABAP Dictionary object. Types that refer to the ABAP Dictionary also have the advantages of formatting options, field help, and possible entries help.

The underlying ABAP Dictionary data type is converted into the corresponding ABAP data type when the program is generated. For further information, refer to the ABAP syntax documentation for the TABLES statement.If a global and a local data type both have the same name, the system uses the local type .

Use the LIKE addition to refer to the type of a data object that you have already declared. This also applies to the next slides.

Elementary types

The length specification after the type name for ABAP data types C, N, and X specifies the number of characters in the type. For type P fields, you can also set the number of decimal places. If you omit these specifications, the system uses the default values (refer to the chart under Predefined ABAP Types).

Structured type s Use the statements

TYPES BEGIN OF .
And TYPES END OF .
to enclose the list of components in your structure. Any type definitions may appear between the two statements. You can also construct nested data types.To refer to the line type of a table type or an internal table, use the additions TYPE LINE OF or LIKE LINE OF respectively.Table types Similarly to when you create table types in the ABAP Dictionary, you must specify various attributes here:

The line type after ... TABLE OF (as always, if you refer to a data type, use TYPE, if you refer to a data object that has already been declared, used LIKE);

The access type before TABLE OF ... (If you omit this, the system uses the default access type, which is standard. You can also specify a generic table type using INDEX or ANY.);

The key definition after the key type (to specify the default key, use the DEFAULT KEY addition); You can also specify fields from the (flat) line type and specify the sequence explicitly. If the table is unstructured, you can use the TABLE LINE addition);

The key type after ...WITH (UNIQUE or NON-UNIQUE).
If you omit the key specification entirely, the system uses the non-unique default key.



We have not yet introduced reference types. These will be discussed in conjunction with field symbols and references.Similarly to when you define data types, you must specify a type when you declare data objects. You can do this in one of two ways:

Either by referring to a data type (using the TYPE addition), or a data object in the program that has already been declared (using the LIKE addition). You can use exactly the same syntax variants in the DATA statement as when you declare local data types using the TYPES statement.

You can also construct a field, structure, or internal table directly in a DATA statement, without having to define your own data type first.In most cases, you will want to change the value of data objects at runtime. They are therefore also known as variables. You can assign a starting value to a data object using the VALUE addition. If you do not, the system assigns it the initial value appropriate to its type (see the table under Predefined ABAP Types).

There are two further statements that you can use to declare special data objects:

STATICS declares local variables in a subroutine whose values are retained in subsequent subroutine calls instead of being initialized again. For further information, refer to the Subroutines unit.CLASS-DATA, an ABAP Objects statement, allows you to declare static class attributes.With the exception of the WITH HEADER LINE addition, the syntax for declaring internal table objects is exactly the same as that used to define table types or other kinds of data objects. The addition allows you to create an internal table with a header line . However, this is an obsolete programming technique, and you should consequently no longer use it. For more information about header lines, along with general information about internal tables, refer to the Internal Table Operations unit.

Dynamic table extension

Unlike arrays in other programming languages, the number of lines in an internal table is increased automatically by the ABAP run time environment as required. You therefore do not have to worry about managing the size of the table, but only about inserting, reading, or deleting lines. This makes chained lists redundant in ABAP.

INITIAL SIZE addition

When you create an internal table, the system allocates 256 bytes to it. The system then allocates a block of 8 KB to the table when you first add data, followed by further 8KB blocks as required. If you are only expecting to place a few lines in your table, or are using nested internal tables, it may be worth restricting the first automatic extension using the addition INITIAL SIZE . You may do this either in the data object definition or in the type definition. is the maximum number of lines that you are expecting to put in the table. When the system first allocates memory, it allocates the product of and the length of the line. In the second step, it allocates twice that amount, and then in subsequent steps, it allocates between 12 and 16 KB.


Selection screens are a special kind of screen whose layout you program directly in the processing logic using ABAP statements . In an executable (type 1) program, there is a standard selection screen (screen number 1000). The definition of the standard selection screen does not require the statements that normally mark the beginning and end of a selection screen definition, neither does it require an explicit call. The following statements allow you to easily create screens on which the user can enter data.


PARAMETERS creates an input field on the selection screen with the type you specify and a variable in the program with the same name. You cannot use f, string, xstring, or references to specify the type.

SELECT-OPTIONS creates a pair of "from - to" fields on the screen, in which it is possible to enter sets of complex selections for a specified variable. The values that the user enters are stored in an internal table that the system creates automatically. The internal table has four fields sign, option, low, and high.You can also create this kind of table using …{TYPE|LIKE} RANGE OF … . However, tables declared in this way are not linked to the selection screen.



Recommendation:

Avoid using literals wherever possible. Use constants instead. Your programs will then be easier to maintain.Literals allow you to specify a value directly in an ABAP statement. There are two kinds of literals - numeric literals and text literals. Text literals must always be enclosed in single quotes. Integers (including a minus sign if appropriate) can be represented as numeric literals. They are mapped to the data types i and p (based on the interval that each data type can represent).

Example :

DATA: result1 TYPE i, result2 LIKE result1.
result1 = -1000000000 / 300 * 3. "result1: 999.999-
result2 = -10000000000 / 300 * 3. "result2: 10.000.000-
A numeric literal can contain up to 31 digits.
All other values (decimal and floating point numbers, strings, and so on) must be given as text literals. The system converts the data type if necessary.


A text literal can contain up to 255 characters.
If you want a single quote to appear in a text literal, you must use two single quotes in order for it to be interpreted as part of the literal and not the closing single quote.

Text symbols are a special form of text literals. You can create a set of text symbols for any program. These can be used for output in various ways. The advantage of text symbols over normal text literals is that they can be translated. Furthermore, text elements are stored separately from the program source code, making your program easier to understand.Text symbols are often used to create lists that are not language-specific. You can also use them to assign texts dynamically to screen objects. (Static text elements for screen objects are a special case, and can be translated).

You can display text symbols in two different ways using the WRITE statement:

WRITE text-. (where can be any three-character ID).
WRITE ''(). (where can be any three-character ID). In this
case, is displayed if there is a text for it in the current logon language. If there is not, the default text is displayed.


When you use screens, the system automatically transports field contents from the processing logic to the screen and back, but only where screen fields and ABAP fields have the same names.

Restriction:

If you use screen fields with a reference to the ABAP Dictionary (Get from Dictionary function in the Screen Painter), you must use the TABLES statement to declare a data object with the same name as the ABAP Dictionary object in order for the field transport to work. Structures you declare like this are often referred to as work areas.

There are numerous advantages to using an ABAP Dictionary reference: Dictionary objects normally include foreign key checks, field help, possible entries, and the necessary error dialogs. Consequently you can catch inconsistent data as soon as the user enters it and before you even leave the screen.

If you program your own field checks, the field contents must already have been transported to the program. If you forget to reset the field when a check fails, an unwanted value may remain in the work area. You also face the same danger if you are not sure whether work areas are shared by more than one program.

To avoid these dangers, you should regard TABLES work areas as an interface between the screen and program, and only use them in this context. They provide data for the screen at the end of the PBO event, and receive it again when the values are transported from the screen.

Logical databases are special ABAP programs that you can attach to an executable (type 1) program. They read data from the database and pass it to the executable program. Because the task of reading the data has been passed to the logical database, your own ABAP program becomes considerably simpler.

The logical database passes the data to your program using interface work areas that you declare using the NODES statement. The statement creates a variable that refers to the data type in the ABAP Dictionary with the same name.

The data is passed to your program record by record. Each time the logical database makes a record available to your program, the corresponding GET or GET LATE event is triggered. In your program, you can code the relevant event blocks.You can determine the type of the data record returned by the logical database using the TYPE addition However, you are restricted to types that are supported by the logical database.The data object SPACE is a constant with type C and length 1. It contains a single space.

The system automatically creates a structure called sy for each program, based on the ABAP Dictionary structure syst. The individual components of the structure are known as system fields .They contain values that inform you about the current state of the system. The values are updated automatically by the ABAP runtime environment.

You can access individual system fields using the notation sy-.System fields are variables, so you can change them in your programs. However, you should only do this in cases where it is explicitly recommended in the documentation (for example, navigating between list levels by manipulating sy-lsind). In all other cases, you should only read the contents of system fields, since by changing them you might overwrite information that is important for subsequent steps in the program.The online documentation contains a list of all system fields with notes on their use. You can also display the structure syst in the ABAP Dictionary.You declare field symbols using the FIELD-SYMBOLS <> statement. The brackets (<>) are part of the syntax.

Field symbols allow you symbolic access to an existing data object. All of the changes that you make to the field symbol are applied to the data object assigned to it. If the field symbol is not typed (TYPE ANY), it adopts the type of the data object. By specifying a type for the field symbol, you can ensure that only compatible objects are assigned to it.

Field symbols are similar to dereferenced pointers .You use the ASSIGN statement to assign a data object to the field symbol <>. To lift a type restriction, use the CASTING addition. The data object is then interpreted as though it had the data type of the field symbol. You can also do this with untyped field symbols using the CASTING TYPE addition.Use the expression <> IS ASSIGNED to find out whether the fie ld symbol <> is assigned to a field.

The statement UNASSIGN <>. sets the field symbol <> so that it points to nothing.The logical expression <> IS ASSIGNED is then false.An untyped field symbol that does not have a data object assigned to it behaves (for compatibility reasons) like a constant with type C and length 1.

The statement TYPES TYPE REF TO data. *) defines a reference type to a data object. DATA... defines the corresponding reference itself. Such a reference is a field in which an address can be stored.The GET REFERENCE OF INTO statement writes the address of the data object (already declared) into the reference variable. In other words, the reference points to the data object in memory.sap internet transaction architecture
Mysap market place introduction
ABAP STATEMENTS DAY 21

SEARCH HELP Lesson Eigteen

The input help (F4 help) is a standard function of the R/3 System. It permits the user to display a list of possible values for a screen field. A value can be directly copied to an input field by list selection.The fields having an input help are shown in the R/3 System by the input help key to the right of the field. This key appears as soon as the cursor is positioned on the corresponding screen field. The help can be started either by clicking on this screen element or with function key F4.If the number of possible entries for a field is very large, you can limit the set of displayed values by entering further restrictions.

The display of the possible entries is enhanced with further useful information about the displayed values. This feature is especially useful if the field requires the entry of a formal key.Since the input help is a standard function, it should look and behave the same throughout the entire R/3 System. The development environment therefore provides tools for assigning a standardized input help to a screen field.

The precise description of the input help for a field is usually defined by its semantics. For this reason, the input help for a field is normally defined in the ABAP Dictionary.A number of requirements must be met for the input help of a screen field (search field):

Information (about the context) known to the system must be taken into consideration in the input help. This includes entries the user already made in the current input template as well as information obtained in previous dialog steps. Normally the input help uses the context to limit the set of possible values.

The input help must determine the values that can be offered to the user for selection. The data to be displayed as supplementary information in the list of possible values must also be determined. When the possible values are determined, the restrictions resulting from the context and from further search conditions specified by the user must also be taken into consideration.The input help must hold a dialog with the user. This dialog always contains the presentation of the possible values (with supplementary information) in list form and the possibility to select a value from this list. A search template in which the user can define conditions for the values to be displayed is also sometimes required .

If the user selects a value, the input help must return it to the search field. The input template often contains more fields (often only display fields) containing further explanatory information about the search field. The input help should also update the contents of these fields in this case.The ABAP Dictionary object search help is used to describe an input help. The definition of a search help contains the information the system needs to satisfy the described requirements.

The interface of the search help controls the data transfer from the input template to the F4 help and back. The interface defines the context data to be used and the data to be returned to the input template when a value is selected.The internal behavior of the search help describes the F4 process itself. This includes the selection method with which the values to be displayed should be determined as well as the dialog behavior describing the interaction with the user.

As with a function module, search helps distinguish between the interface with which it exchanges data with other software components and the internal behavior (for function modules, the latter is defined by the source text).It only makes sense to define a search help if there is a mechanism available with which the search help can be accessed from a screen. This mechanism is called the search help attachment and will be described later.

Like the editor for function modules, the editor for search helps also enables you to test an object. You can thus test the behavior of a search help without assigning it to a screen field.The possible values displayed for a field by the input help are determined at runtime by a selection from the database. When a search help is defined, you must define the database object from which the data should be selected by specifying a table or a view as the selection method.

It makes sense to use a view as selection method if the data about the possible values that is relevant for the input help is distributed on several tables. If this data is all in one table or in the corresponding text table, you can use the table as a selection method. The system automatically ensures that the text of the text table is used in the user's logon language.If there is not yet a view that combines the data that is relevant for an input help, you must first create it in the ABAP Dictionary.

Maintenance views may not be used as the selection method for search helps. Normally a database view is used. However, you should note that database views (in the R/3 System) are always created with an inner join. As a result, only those values having an entry in each of the tables involved are offered in the input help. Sometimes the values should be determined with an outer join. In this case you should choose a help view as the selection method.If the selection method of a search help is client-dependent, the possible values are only selected in the user's logon client.

The possible values are presented in the dialog box for displaying the hit list and the user can select values from here. If the possible values are formal keys, further information should also be displayed.
If the hit list is very large, the user should be able to define further restrictions for the attributes of the entry. Restricting the set of data in this way both increases the clarity of the list and reduces the system load. Additional conditions can be entered in a further dialog window, the dialog box for restricting values.The dialog type of a search help defines whether the dialog box for restricting values should be displayed before determining the hit list.

You must define the characteristics to appear on either (or both) of the dialog boxes as parameters in the search help. You can use all the fields of the selection method (with the exception of the client field) and the non-key fields of your text table as parameters.You define which parameter should appear in which dialog box (in what order) by assigning the parameters positions in the two dialog boxes. You can thus use different parameters (or different orders) in the two dialog boxes.

Types must be defined for search help parameters with data elements. These define the display in the two dialog boxes. If nothing else is defined, a parameter uses the data element of the corresponding field of the selection method.When you define a parameter of a search help, you must also define whether it should be used to copy data to the input help (IMPORT parameter) or whether to return data from the input help (EXPORT parameter).

The IMPORT and EXPORT parameters of a search help together make up your interface. (This is also analogous to function modules.)

You can also define interface parameters that do not appear in either the dialog box for displaying the hit list or the dialog box for restricting values. This is useful for example when screen fields that do not appear on either of the two dialog boxes are to be updated when you select a value.The location from which the IMPORT parameters of a search help get their values and the screen fields in which the contents of the EXPORT parameters of the search help are returned are defined in the search help attachment.

The search field is a special case. Its contents are only used in the input help if it is a search string (that is, if it contains a ´*´ or a ´+´) and the parameter linked with the search field is an IMPORT parameter.Parameters that only contain additional information about the search field should not be defined as IMPORT parameters since the user must otherwise empty the corresponding screen fields each time before he can define a new value with the input help.

A search help describes the flow of an input help. The search help can only take effect using a mechanism that assigns the search help to this field. This mechanism is called the search help attachment to the field.Attaching a search help to a field has an effect on the field's behavior. It is therefore considered to be part of the field definition.

The semantic and technical attributes of a screen field (type, length, F1 help, ...) are not normally defined directly when the input template is defined. On the contrary, only a reference to an ABAP Dictionary field (usually with the same name) is specified in the Screen Painter. The screen field takes on the attributes of this field from the ABAP Dictionary.The same principle is also used to define the input help of a screen field. The search help is thus attached to the ABAP Dictionary search field and not to the screen field.

In the search help attachment, the interface parameters of the search help and the screen fields providing data for the input help or getting data from the input help are assigned to one another. The search field must be assigned to an EXPORT parameter of the search help at this time. This parameter should also be an IMPORT parameter so that the user can take advantage of search patterns that are already entered.

Fields that do not have a search help attachment can also have an input help since further mechanisms (e.g. domain fixed values) are also used for the F4 help.There are three mechanisms for attaching a search help to a field of the ABAP Dictionary.

A search help can be attached directly to a field of a structure or table. The definition of this attachment is analogous to that of a foreign key. You have to define an assignment (between the interface parameters of the search help and the fields of the structure) for which the system makes a proposal.If a field has a check table, its contents are automatically offered as possible values in the input help. The key fields of the check table are displayed. If a check table has a text table, its first character-like non-key field is displayed.

If you are not satisfied with the described standard display of the data of the check table, you can attach a search help to the check table. This search help is used for all the fields that have this table as check table. You have to define an assignment between the interface of the search help and the key of the check table when you define the attachment.

The semantics of a field and its possible values are defined by its data element. You can therefore attach a search help to a data element. The search help is then available for all the fields that refer to this data element. In the attachment you must define an EXPORT parameter of the search help for the data transfer.Attaching a search help to a check table (or a data element) can result in a high degree of reusability. However, there are restrictions on passing further values via the interface of the search help.

In order to be able to offer a meaningful input help for as many screen fields as possible, the R/3 System uses a number of mechanisms. If there is more than one such mechanism available for a field, the one that is furthest left or at the top of the above hierarchy is used.In addition to the options described above for defining the input help of a field in the ABAP Dictionary, you can also define it in the screen field. The disadvantage, however, is that there is no automatic reuse.

With the screen event POV you can program the input help of a field by yourself. You can adjust the design of the help to the standard help using the function modules
F4IF_FIELD_VALUE_REQUEST or F4IF_INT_TABLE_VALUE_REQUEST.

However, you should check to see if the part of the input help that you programmed yourself should be implemented as a search help exit instead.You can also attach a search help to a screen field in the Screen Painter. There are some functional restrictions on this kind of attachment as compared with attachment in the Dictionary.You should no longer use the input checks defined directly in the flow logic of the screen, from which it is also possible to derive input helps.The function Technical info is offered in the hit list in the menu of the right mouse key. It can be used to find out which of the specified mechanisms is being used.

You sometimes have to search a large amount of data with an input help. This means that you might have to wait a long time for the possible entries to be displayed, and can also result in a significant increase in the load on the system.When you define a search help, you should therefore check whether you should take measures to optimize the accessing behavior for the selection method. This is especially true if the selection uses a view and thus more than one physical table.

If the number of entries in the selection method is very large, you should restrict the hit list with further conditions. This also increases the clarity of the hit list. The additional conditions can directly result from the context, or can be entered in the dialog box for restricting values by the user. The performance of the input help can frequently be significantly improved by creating an index on the fields used to formulate the restrictions.If the number of entries in the selection method is relatively small, you should always check whether the selection method can be buffered.

In the relational data model, entities are usually represented by formal keys. In real life, however, these entities are often identified by one or more of their attributes. For example, the key for a person is the personnel number. A person will generally describe another with his name and possibly his address.The attributes used to identify an entity can differ from one user to the next and from situation to situation. A user wants to use these attributes in an input help to define a value for a field that requires that a formal key be entered.We therefore need search paths permitting access to the data using non-key fields. Several different search paths should be possible for one field.

A search path for a field can be implemented with a search help having the form described above. To describe an input help with more than one alternative search path, a set of search helps can be combined into a new object in the R/3 System. Since this object is the description of the input help for a field, it is also calle d a search help.In contrast to the elementary search helps described above, the search helps that combine several search paths are called collective search helps .Collective search helps are sometimes used to map the distribution of the possible entries for a field into several (disjunct) datasets.

Like an elementary search help, a collective search help has an interface of IMPORT and EXPORT parameters with which it exchanges data. Using this interface, the collective search help can be attached to fields, tables and data elements exactly like an elementary search help. Only one search help can be attached to a field, table or data element. Several search paths are therefore attached with a collective search help.You can omit the components for describing the dialog behavior and data selection when you define a collective search help. The included search helps are listed here. You must assign the parameters of the collective search help to the interface parameters of the included search help for each inclusion.

A search help can also be included in several collective search helps and at the same time itself be attached to fields, tables and data elements. A collective search help can also be included in another collective search help.When you use a collective search help, you are offered the elementary search helps contained in the collective search help as parallel tab pages. If you repeatedly use a collective search help, the tab page that was last used is automatically active. This is because most users always use the same search path.

The set of search paths that are meaningful for an object greatly depends on the particular circumstances of the SAP customer. The customer often would like to enhance the standard SAP collective search helps with his own elementary search helps. Release 4.6 provides an append technique that permits the enhancement of collective search helps without modifications.

An append search help is a collective search help that is assigned to another collective search help (its appending object) and that enhances it with the search helps it includes. The append search help uses the interface of its appending objects.The append search help lies in the customer namespace. Normally the search helps included in the append search help are also created by the customer and lie in the customer's namespace. However, the required elementary search help might already be provided by SAP, in which case the customer only has to add it to his own append search help.

Append search helps are used with SAP to improve component separation. Some SAP collective search helps therefore already have one or more append search helps in the standard search help. Customer enhancements should always be made by creating a separate append search help.SAP collective search helps often contain elementary search helps that are not required by all customers. The search helps you do not need can be hidden using an append search help. To do this, the corresponding search help must be included in the append search help and the hidden flag must be set.


RELATED POSTS

ABAP RUN TIME ENVIRONMENT
Authorization and implementation of SAP
Mysap marketplace an introduction
ABAP RUN TIME ENVIRONMENT DAY 19

Views in ABAP Lesson Seventeen

The set of data that can be selected with a view greatly depends on whether the view implements an inner join or an outer join.With an inner join, you only get those records which have an entry in all the tables included in the view. With an outer join, on the other hand, those records that do not have a corresponding entry in some of the tables included in the view are also selected.

The hit list found with an inner join can therefore be a subset of the hit list found with an outer join.Database views implement an inner join. You only get those records which have an entry in all the tables included in the view.

Maintenance views implement an outer join.


RELATED POSTS

SEARCH HELP   
CHANGING DATA BASE TABLES IN SAP DAY 16
SEARCH HELP USING ABAP DAY 18



Canges to Data Base Tables Lesson Sixteen

The new version of the SAP standard table is activated and the new field is appended to the database table.Please note the following points about append structures:

No append structures may be created for pooled and cluster tables.If a long field (data type LCHR or LRAW) occurs in a table, it cannot be extended with append structures. This is because such long fields must always be in the last position of the field list, i.e. they must be the last field of the table.

If you as a customer add an append structure to an SAP table, the fields in this append structure should be in the customer namespace for fields, that is they should begin with YY or ZZ. This prevents name collisions with new fields inserted in the standard table by SAP.

If you as a partner have your own reserved namespace for your developments, the fields you select in append structures should always lie in this namespace.

RELATED POSTS

VIEWS IN ABAP
MySAP new generation technologies overview
Enjoy SAP introduction and Business Process of SAP XML with ALE,IDOC an BAPI 
DEPENDENCIES IN ABAP DICTIONARY DAY 15