Tuesday, October 6, 2020

Technical Settings While Creating A Table In ABAP Dictionary.

What Is The Importance Of Technical Settings While Creating A Table In ABAP Dictionary?

Technical settings allow you to optimize the storage requirements and table access behaviorof database tables. Technical Setting comprises of the following components:

Data Class: Designates the table to an area in the physical database where similar tables are grouped.

Size Category: Identifies the amount of disk space that will be required to hold the data records for a table in the database.

Buffering: Determines whether table records will be accessed directly from the database server or from global memory.

Logging: Creates before and after images of changes to the table of contents. Logging must be activated by the profile when the system is started.

 

Delivery Class In SAP ABAP.

What Is A Delivery Class?


Delivery Class In SAP ABAP.

Delivery Class manages the transport of table data when installing or upgrading in a client copy when transporting between customer systems. Different delivery classes available are:

  C - Customizing table, maintenance only by customer not SAP import.

 Example: Common Address Data (Country: T005)

E - Control table, SAP and customer have separate key areas, defined in TRESC

 Example: Messages (T100)

G - Customizing table, protected against SAP Upgrade

 Example: Communication: country dialing code (T005K)

L - Table for storing temporary data, delivered empty

 Example: Lock Arguments (E070USE)

S - System table maintenance only by SAP.

 Example: Language Key (T002)

A - Application table (master and transaction data)

 Example: Personal Address Data, Username (USR01)

W - System table, contents transportable via separate TR objects.

 Example: Transport (E070), Tables (DD02L) 

Differences Between Database View & Projection View in SAP ABAP.

 Database View & Projection View in SAP ABAP.



· Database view can built over many tables whereas projection view can be built over a single table only.

 Database view can be updated if the view is built over a single table whereas in projection view data can be updated.

 In case of database view, data updates can use open SQL or native SQL whereas in case of projection view, data updates must use open SQL.

 Database view can be buffered whereas Projection view cannot be buffered. 

Views In SAP ABAP.

What Are The Different Types Of Views In SAP?

Views In SAP

In SAP, you have total four types of views. Based on the way in which the view is implemented and the methods that are permitted for accessing the view data they are divided into Database View, Projection View, Maintenance View and Help View. Database views implement an Inner Join whereas Projection View, Maintenance View and Help View implement an Outer Join. There are 4 Different types of

 Views in SAP. They are:

 Maintenance View

 Database View

 Projection View

 Help View

Differences Between Transparent Tables, Pooled Tables & Cluster Tables.

What Are The Differences Between Transparent Tables, Pooled Tables & Cluster Tables?



Differences between transparent, pooled and cluster tables are:

 Transparent tables have a one to one relationship with a physical table in an underlying database where as pooled tables and cluster tables have many to one relationship with a physical table in the underlying database (Relationship between tables in ABAP Dictionary & Underlying database).

 For each transparent table there will be exactly only one table in the underlying database whereas many pooled tables are stored in a single table in an underlying database called table pool. Similarly many cluster tables are stored in a single table in the database called a table cluster

 In case of transparent tables, the underlying database table will have the same name, same number of fields and the fields will also have the same names as defined in ABAP Dictionary whereas for pooled tables and cluster tables the underlying database table will have different name, different number of fields and fields will have different names from what has been defined in ABAP Dictionary.

 Transparent tables can have one or more primary key Whereas Primary key of each pooled table of a table pool need not be same whereas Primary key of each cluster table of a table cluster should have at least one key in common.

 Secondary indexes can be created for transparent tables, but for pooled and cluster tables we cannot create any secondary index.

 Transparent tables can be accessed via both Native and Open SQL whereas pooled and cluster table can be accessed by Open SQL only.

 Transparent tables are used to hold application data which includes both master data as well as transaction data. Pooled tables reduce the amount of database resources needed when many small tables have to be opened at the same time. Cluster tables are used when the tables have primary key in common and data in these tables are all accessed simultaneously.

Cluster Tables In SAP ABAP.

What Do You Mean By Cluster Tables In SAP ABAP? Also Explain What Do You Mean By Table Cluster?



Cluster Tables In SAP ABAP.

 A cluster table is similar to a Pooled table. It has a many to one relationship with a table in an underlying database. Many cluster tables are stored in a single table in an underlying database called a table cluster.

So table cluster is similar to pooled table pool. A table cluster holds only cluster table within it.

Table clusters store data from several cluster tables based on the primary key fields that they have in common.

Rows from the cluster tables are combined into a single row in the table cluster. The rows are combined based on the part of the primary key they have in common.

The biggest advantage of cluster table and pooled table is they reduce the number of database reads and thereby improve performance.

 Tables CDPOS and CDHDR are Cluster tables in SAP ABAP Dictionary and CDCLS is the table cluster that exist in the underlying database. CDCLS table contains or hold data of both tables CDPOS and CDHDR in the underlying database.


Thursday, October 1, 2020

Remote Function Call (RFC) & types of RFC’s in SAP ABAP.

 What is Remote Function Call (RFC) & types of RFC’s?



Ans:

Ø  It is a SAP specific protocol to provide communication between different systems.

Ø  It is the process of calling Function modules from another system.

Ø  SAP Uses CPIC (Common Programming Interface for Communication) Protocol to transfer data between Systems.

                Types:

                1. Synchronous RFC: In case of this RFC both the Sender/Source and Receiver/Target                      systems should be available while distributing the data. The next part of calling program     isn’t continued until call function is completed.

            2. Asynchronous RFC: In case of this RFC both the Sender/Source and Receiver/Target                    systems should not be available while distributing the data. The next part of calling                            program is continued without completing call function.

            3. Transactional RFC (TRFC): It is almost similar to Asynchronous RFC. The Transactional              RFC is executed only once in an RFC server & save the corresponding data under unique                transaction ID in the Database.

            4. Queued RFC: In case of this RFC the multiple transactional RFC’s are serialized in the                                sequence using the Function module ‘TRFC_SET_QUEUE_NAME’.

Ø  An additional statement ‘Destination’ is used while calling Remote Enabled Functions.

What are the Enhancement Spots in SAP ABAP.

What are the Enhancement Spots?

Ans :-

Ø  The enhancement spots are used to manage explicit enhancement options that means you can add your code in standard ABAP code without need of access key, which implies that the standard code is not disturbed.

Ø  Enhancement spots specify the places where we can add our code in standard SAP.

Ø  Each enhancement spot element definition must be assigned to at least one enhancement spot.

Ø  Enhancement spots carry information about the positions at which enhancement options were created. One enhancement spot can manage several enhancement options of a Repository object. Conversely, several enhancement spots can be assigned to one enhancement option.

What are the differences between Classic (Old) BADI and New (Kernel) BADI?

 

What are the differences between Classic (Old) BADI and New (Kernel) BADI?



Ans :-

Classic or Old BADI

New or Kernel BADI

1. The standard method GET_INSTANCE of the standard class CL_EXIT_HANDLER is used to call

1. The ABAP statements GET BADI & CALL BADI are used to work with New BADI’s.

2. An interface of a BADI referred to create the Reference object

2. The definition of a BADI is referred to create the Reference object

3. It is not faster as like the Kernel BADI

3. It is faster than the Classic BADI 

4. It can be a multiple use BADI

4. It must be a single use BADI

5. The Fall back class can’t be defined

5. The Fall back class can be defined

6. It can be a Filter Dependent BADI

6. It is not possible to maintain the Filter values

What are the ways to find BADIs

 What are the ways to find BADIs.



How to find BADIs in SAP ABAP.

Ans :-

ü  Most of the Standard BADI’s are classic BADI’s.

ü  They are used to add the additional customer specific functionality/business logic to the standard programs/T-codes.

ü  There are 4 ways to find the BADI’s

                      I.        Using the standard class CL_EXITHANDLER

Ø  Execute the T-code: SE24 to maintain the global class.

Ø  Enter the standard class name CL_EXITHANDLER

Ø  Click on display button.

Ø  Double click on the method GET_INSTANCE

Ø  Set a session break point on the method GET_CLASS_NAME_BY_INTERFACE

Ø  Execute the required functional T-code Ex: MM02

Ø  Perform the required action Ex: save material

Ø  Double click on a passing parameter (EXT_NAME) to list out the corresponding BADI. Ex: BADI_MATERAIL_CHECK

                    II.        Using the T-code SE84

                   III.        Using the T-code ST05 (SQL Tracer)

                  IV.        Using the T-code SPRO

Details About BADI's in SAP ABAP.

Details About BADI's in SAP ABAP.

What are the Transaction Codes associated with BADIs?

Ans :-

           T-code SE18 & SE19: are used to work with the BADI’s

           T-code SE18: used to define the BADI’s

           T-code SE19: used to implement the BADI’


What are the types & sub types of BADIs and explain about them?

Ans :- It is used to add the additional customer specific business logic to the standard programs.

1.    Classic/Old BADI: These are mostly used in the functional areas like SD, MM, FI/CO. The standard method “GET_INSTANCE” of the standard class “CL_EXIT_HANDLER” is used to work with the classic BADI’s.

2.    Kernel/New BADI: The ABAP statements “GET BADI & CALL BADI” are used to work with New BADI’s. It is faster than Classical BADI’s.

GET BADI: This statement is used to generate a New BADI object & sets the BADI reference to the objects in the BADI reference variables.

CALL BADI: This statement is used to call the Methods of the New BADI’s.

         Subtypes:

a.    Single use BADI: The single use BADI can’t be implemented for multiple times. This BADI can have only one implementation.

b.    Multiple use BADI: The multiple use BADI’s can’t be implemented for the multiple times.

c.    Filter Dependent BADI: It is used to control the BADI implementation based on the specified filter value. The system generates an Import parameter ‘FLT_VAL’ to pass the filter values for controlling the business logic of the BADI implementation.

What are the ways to find the Exits in SAP.

 What are the ways to find the Exits?


How to find the Exits in SAP.

                      I.        Using the Package name of the applications

                    II.        Using the T-code SE84

Ø  Find the package name of the required T-code.

Ø  Execute the T-code SE84.

Ø  Expand Enhancement folder

Ø  Double click on enhancements

Ø  Enter the required package name/Exit name

Ø  Click on execute icon

                   III.        Using the Find function in standard programs.

                  IV.        Using the standard Tables  MODSAP & MODACT.


Steps for LSMW in SAP.

 What are the steps for LSMW?

Steps for LSMW in SAP.

Ans: There are totally 14 steps in LSMW.

1.    Maintain object attributes

2.    Maintain source structures

3.    Maintain source fields

4.    Maintain structure relations

5.    Maintain field mapping conversion rules

6.    Maintain fixed values, translations & user-defined routines

7.    Specify files

8.    Assign files

9.    Read data

10.  Display read data

11.  Convert data

12.  Display converted data

13.  Create batch input session

14.  Run batch input session

What are the ways to debug the Smart Form in SAP ABAP.

 What are the ways to debug the Smart Form?


 Debug the Smart Form in SAP ABAP.

1St Way: - By setting the Session Break point in the Generated Function module.

Ø  The SMARTFORMS can be debug by setting the Session Break points at the required statement line in the system Generated Function module.

Ø  The system generated internal table %TEXT contains the following fields which are filled with the text node contents at Run time to debug text elements.

Field name

Description

TDFORMAT

Tag column of the text elements

TDLINE

Contents of the text element/text node

       2nd Way:-  By setting the Static Break points in the SMARTFORMS.

Ø  The SMARTFORMS can be debug by setting the Static Break points in the required program lines /initialization node under global definitions of the SMARTFORM. The statement BREAK followed by user name can be used.

Main components in Smart Form in SAP ABAP.

 What are the main components in Smart Form?

Main components in Smart Form in SAP ABAP.

Ans: The main components are, 1. Global Settings       2. Pages & Windows

           1. Global Settings: It is used to maintain the global settings, definitions which can be applied          across the mart forms. It is collection of Form Attributes, Form Interface & Global Definition

                      I.        Form Attributes: These are used to maintain the smart form attributes & output such are page format, style name etc. The default style for smart form is ‘SYSTEM’.                                                

                    II.        Form Interface: These are used to declare the variables, work areas & internal tables 

        which are needed to transfer the data from print program to layout. It is the system                       generated function module with all the parameters except changing parameters.

III. Global Definitions: It is used to maintain the global definitions which can be used across        the different Global definitions.

                    a) Global Data: It is used to maintain the global data definitions such are variables, work                                           areas, Internal Tables etc.

     b) Types: It is used to define the types which can be referred to declare internal tables &                    work areas.

     c) Field Symbols: It is used to define the field symbols.

     d) Initialization: It is processed before the smart form pages & windows are processed. It                           is used to extract all the required data from the database table &                                             process the extracted data. Import & Export parameters must be                                        specified before they are used.

     e) Form routines: It is used to define the subroutines which can be called across the                                                           smart form. It is used to define the currency/quantity fields as like the                                             DDIC tables/structures. 

       f) Currency/Quantity Field: It is used to define the Currency/Quantity Fields as like the                                                                 DDIC tables/structures.

            2. Pages & Windows: It is used to design the different page formats & windows. Following                                               are the different nodes in smart forms.

a)    Windows: They are positioned on the pages. Following are different type of windows.

Ø  Main Window: It is used to display the continuous text on the pages. This window is the  default widow. Without main window also we can design Smart forms.

Ø  Secondary window: It is used to print the different contents on each page (similar to variable window in SAP Scripts).

Ø  Copies window: It is used to the print the same document with multiple

                           copies with different headings.

Ø  Final window: This is used to print the total amount after all the lines or line items are printed.

b)    Graphics: It is used to create a graphic node (window) to display the graphics/logos.

c)    Address: It is used to define the address node/window to display/print the organization address/personal address/work place add/ress.

Ø  The address can be determined dynamically also using an option Determine Dynamically.

d)    Text: It is used to display/print the contents of the different symbols/fields.

e)    Table: A table is used to print the multiple entries/dynamic data of an internal table. The Table node can be used as template to display static record by un-checking the checkbox internal table. Line types can be created under Table node.

f)     Template: A Template is used to display the static data (single record). This node does not have the separate header, main area & footer whereas, the table node contains the different sessions such are header, main area & footer. The template node can be used as table by defining it under loop node to display the dynamic data as like the table node.

g)    Flow logic: The flow logic nodes are used to control the nodes & define the program lines in smart forms. Following are the different flow logic nodes.

                                        I.        Loop:  It is used to process the corresponding nodes based on the number of entries of an internal table.

                                      II.        Program lines: It is used to write ABAP source code. Input & Output parameters must be filled with the data variables before they are used.

                                     III.        Alternative: It is used to control the corresponding nodes based on the specified condition. It is used to process the alternative either True/False process blocks based on the SET conditions.

                                    IV.        Command: This node is used to go to a new page based on the specified conditions. This is used to break the page based on the condition.