Friday, October 28, 2011

Table Maintenance Generator....

With Table Maintenance Generator Functionality End User can enter Data in SAP Tables without using SE11.
Table Maintenance Generator have One Step & Two Step.
In Case of One Step user can Display Existing records and user can enter new records from same screen.
In case of Two Step user can Display existing Records from One Screen and User can Enter New Records from Different Screen.

Events in Table Maintenance Generator:
Navigation is
-> Select SE11.
-> Provide Table name Applied with Table Maintenance Generator
-> Select Change.
-> Select Utilities-> Table Maintenance Generator.
-> Select Environment -> Modification -> Events -> Press Enter.
-> Select New Entries -> Perform F4 on " Table Maintenance Dialog Event"
o5 is an Event to Enter new entry.

Tables Work Area is Absolute (Out Dated)
To avoid tables work area in Select Option declare one Data Object and refer that in Select Option Satement.
Ex: Data: V_VBELN TYPE VBRK-VBELN.
SELECT-OPTIONS: S_VBELN FOR V_VBELN.

CTS (Client Transportation System) Concept...

CTS also known as Client Transportaion System.
-> If ABAP object saves in Local Object those are not allowed to Transport from Development to Test Clients.

-> If ABAP object saves in Package then it Authorized to Transport from Development to Test Clients.

-> In SAP it is possible to copy ABAP objects from Local Object to Package.

-> Using Object Navigator (SE80) user can check ABAP object list Stored in Package.

-> If ABAP object saves it in Package then to that ABAP object Dynamically System generates Identity nothing but Request Number. Request Number can be Work Bench Request number or customizing Request number.

-> SE01, SE09 or SE10 using these T.Codes request number can be released. Release means Providing Authorization to Transport object from Development to Test Client.

-> Basis can do Transportation. For that ABAPer can give particular Information correctly.

-> Using T.Codes STMS or SE01 Basis can Transport ABAP objects across clients. For this Basis requires T.R(Transport Request) Number, Object Name, Source Client and Target Client.

->After Transportation Completed successfully then system can maintain copy of ABAP object in target client.

-> After Transportation Completed then in development client to ABAP object if user makes any changes with transportation those changes can be effected to ABAP object in Test Client.

STEPs in CTS Demo:

1. Creation of Package : T.Code is SE21.
2. Saving ABAP Object in Package : To this 2 Request numbers can be Generated
i) Development/ Correction Request Number ----> For Releasing
ii) Main Request Number ----> For Transportation
Main Request Number is T.R Number
3. Releasing Request Number(Development/Correction).
4. Transporting ABAP object based on T.R Number.


Monday, October 24, 2011

Debugging Concept in ABAP Language

In ABAP, SAP Provided classical debugging and new debugging.
New debugging available from ECC onwards where as classic debugging available in R/3 and even in ECC.

-> '/H' is to switch on debugging in ABAP.
-> Break-Point is SAP keyword to switch on debugging.
-> Break-Point keyword doesnt provides user specific debugging.
-> To Provide user specific debugging SAP Keyword is Break
-> Break is a keyword to switch on debugging.

Options in Debugging:
Step In - F5
Step Out - F7
Return - F6
Execute - F8

-> Step In debugs coding line by line.
-> Step Out avoids coding which is not required to debug.
-> Return moves control back for debugging source code which is skip earlier.
-> Execute can move control from debugging mode to normal mode.
-> With Dynamic break points user can debug required statements only.

Features of Classical Debugging:
Fields (Internal Table Fields): It is to check Transferring of data from Table Fields to Internal Table Fields.

Table (Internal Table): It is to check Transferring of data from Table to Internal Table.

Break Points ( Dynamic Break Points): It Provides number of Dynamic Break Points maintained in Program.

Call Stack : It Shows list of events customized in Program. If user doesn't maintains any events in program then Call Stack atleast can display default event start-of-selection.

Watch Points : It is to check Data Transfering from table Fields to internal Table Fields based on condition customized.

Overview : It displays Respective program source code briefly.

Settings : It Moves Control from normal mode to Debugging mode whenever warning occurs in that program.


Lock Objects Concept

Lock Objects is a Part of Enque Service to Lock and to Unlock applications.
Naming Conventions for Lock Objects are "EY or EZ".

For Lock Objects dynamically system can generate two functions
1. Enqueue_Lockobject is to Lock Application.
2. Dequeue_Lockobject is to Unlock Application.


Back Ground Job Scheduling in ABAP

Methods for Controlling Job Scheduling are
1. Full Control Method
2. Job Variant Method

Full Control Method:
For Full Control Method Predefined Functions are
JOB_OPEN
JOB_SUBMIT
JOB_CLOSE

For Back Ground Job Scheduling predefined Table is "BTCEVTJOB"
Fields are JOBNAME
JOBCOUNT

JOBNAME : Job Name can hold identity to monitor background process.
JOBCOUNT : Job Count Provides number of ABAP objects involved in Background with one Identity.

JOB_OPEN : Job_Open Creates Identity to Monitor Back Ground Process.
JOB_SUBMIT : It Submits ABAP PRogram to the System to Execute in Back Ground as per Schedule Date.
JOB_CLOSE : It can close Identity once back ground process completed successfully.

VARIANTS : With Variants Functionality System can enter Input values to program for back ground execution. Variants are mandatory for back ground and optional for fore ground.

Reusability Concepts in ABAP

Reusability Concepts means Modularization Techniques

List of Reusability Concepts are
  1. Includes
  2. Functions or Function Modules
  3. Routines or Form Routines or Sub Routines
  4. Macros
  5. Field Symbols
To Includes Programming type Include.
To Functions Programming type Function Group.
To Routines Programming type Sub Routine Pool.
Include, Function Group, Sub Routine Pool are not possible to execute directly. These Programming types can be executed base on executable Program.

INCLUDES:
Include is a Keyword to call an Include Program within an Include Program and Even to call include program in executable program.

FUNCTIONS:
Function can be defined in programming type Function Group.
Function Group is collection of Function Modules.
In One Function Group upto 99 Functions can be defined.
Functions are 2 types
1. Normal Function : can be called within SAP Systems only.
2. Remote Enable (RFC) : can be called within SAP Systems and even across SAP Systems.
Naming Conventions for Function modules are
Z_VXYZ, Z_MXYZ, Z_BXYZ, Z_PXYZ
here Z means user defined
XYZ means optional means any letters
V - Stands for Sales and Distribution.
M - Stands for Materials Management
B - Stands for Finance and Controlling
P - Stands for HR

ROUTINES:
Sub Routines defined in executable that called in that executable and even called in different executable.
Syntax:
Defining Sub Routines
Form SUB
-
-
-
EndForm
Calling Sub Routines
Perform SUB

Sub Routines are of two types
1. Internal Sub Routines
2. External Sub Routines

Internal Sub Routines means Form and Perform can exist with in a Program.
External Sub Routines means Form and Perform can exist in two different Programs.

Passing Parameters in Sub Routines:
Sap Key Words are
-> Using & Changing
If Parameters Passed while Defining Those are Formal Parameters.
If Parameters Passed while Calling Those ate Actual Parameters.

MACRO:
Macro designed based on Place Holders Concept.
In One Macro upto 9 Place Holders can be Customized.
Macro's Can be used Frequently in HR ABAP.
For HR ABAP SAP Provided 65 Predefined Macro's Those are available in Table TRMAC.
Syntax:
Define Macro
-
-
End-of-definition.

FIELD SYMBOLS:
Field Symbols are like Pointers Concept in C-Language means Field Symbols can Follows Call-by-Reference. These Concepts can be used frequently in HR ABAP.


Control Breaks in SAP-ABAP

Control Breaks can be called even as Internal Table-Events.
SAP Provided 5 Control Breaks those are....
  1. AT FIRST
  2. AT NEW
  3. ON CHANGE
  4. AT END OF
  5. AT LAST
AT FIRST : This is used for system field heading in ABAP Program.

AT NEW : This is used to Display Fields Output.

ON CHANGE : This is used to Display Output.

AT END OF : This is used to do Row-Wise Calculations i.e, Sub-Total.

AT LAST : This is used for Calculations of Grand Total.


ABAP WorkBench

ABAP WorkBench Contains different tools for Editing Programs.
  • ABAP Dictionary (SE11) : It is to Create Tables in SAP.
  • ABAP Editor (SE38) : It is to Create Programs in SAP.
  • Class Builder (SE24) : It is to handle Object Oriented Concepts.
  • Function Builder (SE37) : It is to Create Functions in ABAP.
  • Menu Painter (SE41) : It is used for Designing the User Interface (Menu Bar, Standard Tool Bar, Application Tool Bar, Function key Assignment).
  • Screen Painter (SE51) : It is for Designing Screens and Flow Logic.
  • Object Navigator (SE80) : It is to save ABAP objects in SAP.
The above 7 Tools are collectively know as ABAP Work Bench Tools.
ABAP Work Bench Tools ate part of ABAP-BOR (Business Object Repository).


Application with Internal Table

Having screen painter with layout fields are vender, name, city operations. Select "SE80" -> Edit object Select program ->...