Sunday, September 4, 2011

BC427 : Enhancement Framework , Unit 3(Cont) : Enhancements in SAP Classes

What Can We implicitly enhance in SAP Classes ?



How to Enhance SAP Classes ?


Enhancing interfaces for global SAP methods and defining additional attributes/methods for global SAP classes :
1.Display the class in class builder SE24
2.choose menu options Class-->Enhance and specify an enhancement implementation to add new attributes , methods and interface parameters to existing methods.
3. in GUI status , choose 'Activate Enhancements'.
 


Defining a pre/post/overwrite method for the method of a global SAP class :
1.Display the class in the class builder SE24
2.Choose the menu class-->enhance to specify/create an enhancement implementation
3.Use the cursor to mark the required SAP method
4.Choose the menu ooptions Edit-->Enhancement Operations then choose one of the menu entries : Inset Pre-Method,Insert Post-Method or Add overwrite method.
5.Choose the new button in the coloumn "Pre/Post/Overwrite-Exit" to implement the corresponding method.
6.Save the method.
7.in GUI status , choose 'Activate Enhancements'
 

These methods are automatically called before,after or instead of the SAP method.They are instance methods of an automatically generated ,local class and are avaliable via an instance attribute named CORE_OBJECT. This attribute is a reference to the corresponding current instance in the application program that this SAP is being used.


Enhance source code in methods of global SAP classes :

1.Display the source code of the method.
2.in GUI status , choose the enhancement button
3.Choose the menu options Edit-->Enhancement Operations-->Show implicit enhancement options to show the implicit enhancement options.
4.in the editor, use the context menu of one of the implicit enhancement points displayed to create an enhancement implementation.
5.insert the source code.
6.in GUI status , choose 'Activate Enhancements'.

Saturday, September 3, 2011

WebMethods : Flow Service

What is a flow Service?
 
basic unit of work that instructs WebMethods Integration Server about what to do with data at each stage of flow service.
Using Flow Service , you can :
 

.Invoke a service such as flow service , Jave , C service or Web service connector (INVOKE).


.Conditionally escute one step from a set of specified alternative (BRANCH)


.Repeat a set of flow steps up to a specified number of times or until a step in the set fails or succeeds as specified (REPEAT)


.Repeat a set of flow stepsover the elements of the specified array (LOOP)


.Group a set of flow steps and control the way in which the failure of a member of set is processed (SEQUENCE).


.Exit the entire flow or exit a single flow step (EXIT)


.Link,add,edit,delete pipline variables or invoke several services that operate on the same st of pipline variables (MAP)

BC427 Enhancements Framwork , Unit3(Cont):Enhancements Points , options , sections

Implicit Enhancemtn Points:
options to insert source code in SAP programs, FMs and methods without making modefications (without explicit preperation by SAP). 

To implement additional functions , customers can use the Enhancement Framwork (as of NW 7.0) to insert additional source code in certain , generally specefied points without making modefications.The corresponding SAP object may be derived from earlier releases and it may not require any preperation by SAP application programmers (implicit enhancement point).

To use implicit enhancement points and options , implement an enhancement implementation.



 
What Can you implicitly enhance in FM ?
How to Enhance interfaces in FM ? 

1.Display FM in FM Builder SE37
2.Choose Menu options 'Function Module'-->Enhance Interface and specify an enhancement implementation to add a new interface parameter with type assignment.
3.in GUI status , choose 'Activate Enhancements'.



 How to Enhance Source Code in SAP FM ?

1.Display source Code for FM
2.in GUI Status , choose the enhancement button
3.Choose the menu Option Edit-->Enhancement Operation-->Show Implicit Enhancement Options to show the implicit enhancement options.
4.in the editor , put the cursor on one of the implicit enhancement points , from the contect menu create enhancement implementation.
5.Insert the source code.
6.in GUI Status , Choose 'Activate Enhancement'.





 

Friday, September 2, 2011

BC427:Enhancements Framwork , Unit 3: Enhancements Points, options and Sections


* In the graph above , the enhancements points and sections and BAdIs that have been created using the new technology are grouped together and managed using enhancements spots.

*Collected enhancements spots comprise both simple enhancements spots and/or other collected enhancements spots.They serve to semantically bundle enhancements spots.

-------------------------------------------------------------------------

Explicit enhancement point :
 option provided by SAP to allow you to enhance SAP source code without making modefications.It is implemented using the syntax 'ENHANCEMENT-POINT ...'

Explicit enhancement section :
option provided by SAP to allow you to replace SAP source code section without making modefications.The replaced SAP source code is enclosed by the statements 'ENHANCEMENT-SECTION ...' and 'END-ENHANCEMENT-SECTION'

*Explicit enhancements points/sections are always embeded in enhancements spots.

*Explicit enhancement points/sections that alow you to enhance/replace source codes are called dynamic.

*Explicit enhancement points/sections that alow you to enhance/replace declerations are called static.

 

How to use the explicit enhancements points/sections?
To use explicit enhancement points and sections , implement an 'enhancement implementation' (an implementation of the heiger-level enhancement spot).
The following steps describe how to use explicit enhancement points and enhancement sections:

1.Display SAP object (FM,program , method)
2.search for the required enhancement point/section
3.In GUI status,choose the enhancement button
4.Create the enhancement implementation using the context menu of the enhancement point/section
5.specify the name of the enhancement implementation (starts with Y or Z)
6.Enter the source code
7.In GUI status , choose 'Activate Status'

Webmethods : Service Auditing

Service Auditing:*Service auditing is a feature in the Integration Server that you can use to track which services executed, when services started and completed, and whether services succeeded
or failed.

*You perform service auditing by analyzing the data stored in the audit log

*The audit log can contain entries for service start, service end, and service failure.

*The audit log can also contain a copy of the input pipeline used to invoke the service

*At run time,services generate audit data at predefined points. The Integration Server captures the generated audit data and stores it in the audit log. If the audit log is a database, you can reinvoke services using the webMethods Monitor.

Service Auditing Use Casses

Error Auditing
In error auditing, you use the audit log to track and reinvoke failed services. To use the audit log for error auditing:
- services must generate audit data when errors occur,
-and the Integration Server must save a copy of the service’s input pipeline in the audit log.


Service Auditing
When you perform service auditing, you use the audit log to track which services execute successfully and which services fail. You can perform service auditing to analyze the audit log and determine how often a service executes, how many times it succeeds, and
how many times it fails. To use the audit log for service auditing, services need to generate audit data after execution ends.
For this property... Select this option...

Enable auditing When top-level service only
Include pipeline Never
Note: Configure a service to save a copy of the input
pipeline only if you intend to reinvoke the service
using the resubmission capabilities of the
webMethods Monitor.
Log on Error and success


Auditing for Recovery
Auditing for recovery involves using the audit log to track executed services and service input data so that you can reinvoke the services. You might want to audit for recovery in the event that a resource experiences a fatal failure, and you want to restore the resource
to its pre-failure state by resubmitting service invocations.
When auditing for recovery, you want to be able to resubmit failed and successful services. The audit log needs to:
- contain an entry for each service invoked by a client request or a trigger.
-The audit log also needs to contain a copy of each service’s input
pipeline.

Auditing Long-Running Services
If a service takes a long time to process, you might want to use the audit log to verify that service execution started. If the audit log contains a start entry for the service but no end or error entry, then you know that service execution began but did not complete. To enable auditing of long-running services:
- select the Error, success, and start option for the Log on property.

Thursday, September 1, 2011

BC427:Enhancements Framwork , Unit 2: Enhancements in ABAP Dictionary

*Extension Index
*Fixed Value Append

----------
*Extension Index for SAP Tables:creating a secondary index is a modefication even though the customer name space is retained.In SAP NW7.0 , you have the option of creating secondary indexes without making modefications.

---------
*Fixed Value Append for SAP Domains:previously, you had to use modefications to add additional fixed values to SAP domains. In SAP NW7.0, you can use fixed value appends to add additional fixed values and you dont have to use modefications


 

BC427 : Enhancements Framework

- enhancement framework : new enhancements
- before nw7.0 , how was the enhancements done
- enhancements points , options , sections

*Classic enhancements :
-program exit: jump from sap code to a customer code , many techniques to do this :
 a.subroutine  (user exit )
 b.function module ( customer exit )
 c.function module (BTE)
 d.Method (BADI)
-menu exit : option to include additional menu entry with customer function in an SAP screen without doing modefication , can use BADI or customer exit only
-screen exit : option to include additional fields in an SAP screen without modefication, sap fields and customer append fields can be used for this.can use BADI or customer exit only
-----------------
why different technologies?
* user exit --> customer exit : modularization and supporting menu exit , screen exit
*BTE(business transaction events) : multiple use of a program exit
*BADI : modularization and multiple use of program exits
==============================
Enhancements Framwork :
- introduces new enhancements options (enhancements points , enhancements options , enhancements sections)
-BADI is managed under the enhancement framwork
----
*enhancement point : option to insert source code in SAP programs , Function modules and methods without making modefications.(implicit and explicit points)
----
*enhancement options:option to define the following without making modefications:
a.additional (optional)interface parameters in SAP function modules and SAP methods
b.additional attributes and methods in SAP classes
c.preparation/postprocessing functions for global SAP methods
d.replacements for global SAP methods.
enhancement options always implicitly avaliable
----
*enhancement section: option to replace source code in SAP programs , function modules and methods without making modefications.always explicitly avaliable