Tuesday, January 24, 2012

10 Best Practices to Be a Successful SAP ABAP Developer

Successful & Resourceful SAP ABAP Developer
ABAP / ABAP OO development are very crucial in addressing any solution gaps, RICEFs or custom development on any SAP project. I think it is very important to know a lot of different programming aspects during an SAP implementation project and follow certain guidelines that can make an SAP ABAP professional very successful in your career.

Steps for being an Efficient SAP ABAP Programmer or SAP Technical Team Lead

1. Review Business Requirements & Write Functional Specification The first part of any ABAP development project begin with meeting the end users or business experts and understand the business requirements that need to be implemented in the SAP system during the realization phase. A best approach is to conduct workshops to gather all the business requirements. Make sure that if any SAP function consultants are involved than they are in the meetings as well. After all the business requirements are collected, either a SAP functional consultant or business expert will write a detailed functional specification. Review the functional specification until the document has all the details, different business scenarios and expected goals clearly defined. A well defined functional specification should contain UML diagrams and test case scenarios. It is important to have an official signoff on the functional specification before continuing with design and development.

2. Review ABAP Development Standards In ideal case, your SAP Project Lead or ABAP Development Manager should have created a programming standards and guidelines document. Review this document so that you follow the naming conventions for function modules, classes, dictionary objects, software components, name spaces and proxies (if using SAP XI / PI), program input/output parameters, etc just to name a few. Following the guideline for the project helps maintain a consistent coding approach and also helps other functional and technical analysts to read and debug your code. ABAP objects naming should begin with Z if it will be migrated to SAP production system and Y if it will not be migrated into the production system.

3. Write and Review Test Cases
The test case documents are written by the business experts or functional SAP consultants in most SAP implementation projects. But on some SAP implementation projects a programmer may be required to write test cases. Before writing a test case review the functional specification document thoroughly and review the written test case with the business users or functional consultants. Get a sign-off as mentioned in most steps in this article. As an ABAP Development Manager for a variety of SAP implementation projects, my goal has been to keep my team motivated and always cover the team against any change of scope on the development tasks. Having a sign-off at each phase of a SAP custom development or enhancement tasks always helps the SAP implementation team and project management team keep in sync which is a vital to complete the SAP implementation in time and budget.

4. Write and Review Technical Design Specifications Read the functional specification and list all the development objects that would be needed to implement the required functionality in the SAP system. First step is to draw a flowchart and review with technical and business experts. The technical design document should include a technical overview, list of new database objects, ABAP objects that can be reused, a data model and class diagram (if using ABAP OO classes). It is highly recommended to have a rough prototype in the sandbox system (Development system if no SAP sandbox system is available) if the development being done is complex or if the end deliverable is not well defined. You should then review your prototype with functional experts and business users. Make sure that the ABAP Development team lead or manager signs off on the prototype. If effort required to complete the ABAP programming task is not presented and approved by the senior project management then this would be a good time to get the development estimate and timeline approved.

5. Realization of the Specification - ABAP Development During this step you will be creating development objects and implementing the code in the SAP development system. Before you begin, if prototype was done in the sandbox system then analyze the prototype and design specification. Remember that quality and reusability of existing ABAP objects are more important than strictly following the design specification. Determine which existing dictionary objects can be reused for this topic. If new dictionary objects or classes needs to be created then ensure that these objects can be extended and reused for other development tasks. It may require extra effort to develop objects that are reusable and flexible. This one time effort for building reusable ABAP objects during the course of a development project can potentially save a lot of work for programming similar objects that could otherwise utilize already built objects. Review your approach with an SAP technical team lead or a development manager on your project before deviating from the technical design specification and implementing your own ideas. If you are involved in SAP XI (now Process Integration) related tasks or creating enterprise services then this is the best area where you could reuse existing objects. Review the message types that already exist within your SAP business unit and see if any existing messages can be extended with new fields. Review with the team lead whether the communication should be synchronous or asynchronous before you generate proxies.

6. SAP Development Best Practices SAP ABAP (or JAVA if working on SAP Netweaver) development best practices should be followed throughout the development lifecycle of the project. Although this aspect depends on your project technical manager, I personally have maintained a checklist for developers in my team on all projects and it has been a tremendous success in delivering high quality output on all development tasks. Here are a few best practices worth adapting in your project. Check whether you adhere to all naming conventions as described in the programming standards set for your implementation project. Include comments in your code to allow someone else to easily understand your programs. This is particularly helpful when you work in large teams and multiple people work with same objects. Ensure that you have check for user authorization if you are building transactions or web user-interfaces that will require human interaction. Check that you do not have ABAP code segments that could take a hit on performance like nested loops, nested select statements (use views if desired), excess database commits (persistent objects or buffering alternatives may be a good option), etc. Field symbols are a great asset when it comes to processing internal tables and also variables with unknown data types that are resolved at runtime. Field symbols are very similar to concept of using pointers in OO programming landscape. Check if all exceptions are handled and error messages are communicated accurately to the end users. As an ABAP programmer it should be well accepted by now that short dumps should not be OK to occur. All these do occur in unknown special case scenarios the short dumps should be fixed.

7. ABAP Code Reviews and Performance As a ABAP programmer you should test your code upon completion for all possible scenarios. Verify that end results are same as that expected in the documented test cases. Perform ABAP runtime analysis to check for performance of your code. Seek suggestions from your technical team lead or manager on how to improve code performance if you notice any red flags during the runtime analysis. Schedule a formal code review with your mentor or a senior ABAP developer once the development is completed and tested by all responsible developers. Make any revisions and retest your code against the desired output as documented in the test scripts. Remember that code reviews is not to find flaws in your programming but it will only make you a better ABAP developer and maintain consistency.

8. Documentation Make sure you write an end user documents with overview of the functionality or enhancement upon completion. Include screenshots where possible. Prepare documentation keeping in mind that an end user unfamiliar with your deliverable can read the document and test the functionality. Include contact information in this document for users to easily reach the SAP technical team for any questions.

9. User Acceptance Testing Now that your ABAP coding is completed and reviewed by technical experts, it is time for the business users to perform a formal user acceptance testing. UAT testers will check whether the output meets business process requirements and suggest any improvements or modifications to the delivered functionality. After completion of these fixes or modifications you should request a formal sign-off on the functionality.

10. Migration to SAP Test System and Production System
Quality assurance engineers will test your functionality in the SAP QA environment to verify that everything is working in your delivered functionality as tested during user acceptance testing. Also any problems in transporting your ABAP objects across SAP systems will be identified and addressed during this step. If no problems are found then your transports will be approved to be migrated to SAP production system in the next transport cycle.

You have just learned how to be an efficient SAP ABAP Developer or per say a high quality Senior ABAP expert right from writing specifications until realizing your implementation in production system. Use this article as a guideline as there are many more aspects to improve yourself to be a good ABAP programmer which is not possible to cover in a brief article like this one. You can always contact me with any suggestions or ideas you may seek for your SAP implementation.

Ref.- http://ezinearticles.com/?10-Best-Practices-to-Be-a-Successful-SAP-ABAP-Developer&id=1556194

Friday, January 20, 2012

Transport Organiser Search for Requests

You may want to search for a specific Transport you can do the following:

Transaction SE10
Select Goto–>Transport Organizer Tools
Select “Search for Objects in Requests Tasks

Here you can search for a specific , Program, Function Group, Class, Table/Structure, View, Table Type, Data Element.

If you wish you can search for other objects too by doing the following:

Enter TABU in the object field press enter, this will create a line which says R3TR-TABU where you can then enter the table name which you would like to search on. (R3TR-TABU will give you transports with the content of the table has been transported, should you wish to see the actual movement of a table you can use R3TR-TABL.)

There are over 800 valuees you can use on R3TR, which can be seen from using F4 on the object key and once you get the result limited to 500 values, select Shift+F5 to increase the number of values to 900 and select Program ID R3TR.

Other good values to use for example are R3TR-VDAT and R3TR-VIEW.

Generate Routines Automatically in each target client

If you want to Generate a Routine/Requirement/Formula/Include automatically in each client it is transported to, you have the following 2 options:
1. In the Transport Organizer you can manually add the following entry to the parent Workbench Request for the Routine.
R3TR    XPRA     RV80HGEN.
This automatically executes report [RV80HGEN] after the Transport Request has been imported into the target system.
Please see SAP Note 22808 for more detail.
2. Alternatively, you can apply SAP Note 598475 to your development system. This effects a change in VOFM, automatically by adding the entry above to each Workbench Request created from VOFM.

Table contents transport

Q – How do I delete table values from a client. For example I have 969 values in client 2 and 966 values in client 1. I want to move all 966 values to client 2, and therefore delete the surplus values in client 2.

Answer – This is easily done by using a asterix in the key in the transport. Create a transport for the table, eg: R3TR TABU and the key of the from client with a * in the next field of the key. The result will be the target client will have the values of the table deleted and all the values of the source client copied into the target client.

Dont forget to test you can use SCC1, between your development client and a sandbox/test client.

Can I compare the values inside a table across clients?

Hi There, I have a table with many entries in it. Is there a way to compare the data values across clients without having to export both tables and do a Vlookup / Hlookup in excel?

Yes, there is You can compare the values of records in tables across clients by using transaction SCMP.

Which Hot Package(support pack) is installed?

How do I know what support pack is installed?

Within the system go;

System–>Status–>click on the display ICON under component information –>Select the SupPack tab–>All the support packagaes may be seen.

How do you add activities and nodes to IMG Structure

Question – How to add nodes and activities to the IMG structure (SPRO)?

Answer – You can edit the IMG structures using transaction SIMGH. For complete step by step procedures follow this simple instruction


Cross-Phase Documentation

SAPterm is SAP’s terminology database. It contains SAP-specific vocabulary in over 30 languages, as well as many glossary entries in English and German.
·        Target group:
Relevant for all target groups
·        Current version:
¡        On SAP Help Portal at help.sap.com ® Additional Information ® Glossary (direct access) or Terminology (as terminology CD)
¡        In the SAP system in transaction STERM

Set IDoc Status

This allows you to change the status of IDOCs, which is particularly useful in test environments.

Upload/Download files to/from application server

You can upload a file from your PC to the SAP application server with transaction CG3Z
You can download a file from the SAP application server to your PC with transaction CG3Y

SAP Tricks

This website has a good collection of tips n tricks in SAP http://saptricks.com/

ASAP Roadmap Methodology

The Accelerated SAP (ASAP) Roadmap, which originated in 1996, is still the backbone of more advanced and similar project methodologies.

Phase 1: Project Preparation
Phase 2: Business Blueprint
Phase 3: Realization
Phase 4: Final Preparation
Phase 5: Go Live & Support

Phase 1: Project Preparation

In this phase of the ASAP Roadmap, decision-makers define clear project objectives and an efficient decision-making process. Here Project Organization and roles are defined and implementation scope is finalized.
System landscape and Technical Requirement
  • Infrastructure need (Hardware/interfaces)
  • System Landscape
  • High level strategies for client
  • Archiving strategy
Issues Database:
Issues must be resolved before phase completion ot before beginning of the next phase. The issues can be
  • Unanticipated tasks
  • Normal tasks that can not be completed
  • External factors that need to be dealt with.
Issues database allows the project team to enter, track and report on project issues.

Phase 2: Business Blueprint

In this phase scope of the R/3 implementation is defined & Business Blueprint is created. Business Blueprint is a detailed documentation of company’s requirements.
Various tools are used in this phase.
  • AcceleratedSAP Implementation Assistant
  • Question & Answer Database (Q&Adb)
  • Business Process Master List (BPML)
  • R/3 Structure Modeler
  • Business Navigator and external modeling tools
Project Management:
Activities in this work package are:
  • Conducting Status meeting for project team
  • Conducting steering committee meetings
  • General project management
  • Addressing organizational issues relating to organizational change management.
Other activities include:
  • Project Team Training
  • Developing the System Environment
  • Defining Organizational Structure
  • Defining the Business processes
R/3 reference model can be used for
  • Comparing the standard functionality with your companies own organizational requirements
  • Creating documentation for the conceptual design
  • Optimizing business processes
  • Training the project team and users
  • Writing user documentation
Question and Answer Database can be used to determine
  • The Baseline Scope
  • Cycle Plan
  • Integration test Plan

Phase 3: Realization

The purpose of Phase 3 is to configure the R/3 system. The configuration is carries out in two steps; baseline configuration & Final configuration.
Business Process Master List (BPML) is created in phase 2 as a report from Q&A database. It is used to identify, plan, schedule and monitor the configuration and testing of all R/3 scenarios and processes within the scope of an implementation. BPML is a representation of the R/3 business and transactions that are contained within the scope of the project. BPML is feeds all business information to all subsequent worksheets.
Implementation Guide (IMG): It is the main tool for setting the parameters to configure or ‘Customize’ R/3 during the realization phase. IMG reflect the chronological order in which the customizing activities are carried out.
The following aspects of configuration are also to be considered:
  • Defining authorizations in the R/3 system
  • Defining workflows
  • Creating user documentation
System Manager Procedures
  • Developing system test plans
  • Defining service level commitment
  • Establishing system administration functions
  • Setting up Quality Assurance environment
  • Defining the design of the productive system
  • Defining system management procedures for the productive system
  • Setting up the productive environment
At the end of this phase, Project Manager must check the status of deliverables for completeness and accuracy. This internal quality check should be carried out in addition to an external, independent third party Quality Audit.
Preparation for end-user training needs to be gone through and approved at and of this phase.

Phase 4: Final Preparation

The purpose of this phase is to complete the final preparation of the R/3 system for going live. This includes testing, user training, system management and cutover activities, to finalize your readiness to go live.
In this phase the R/3 system is handed over to individual departments for productive operation. This includes preparation of end-user documentation and training the end-users. The technical environment is installed on production system & is tested. Project managers prepare plans for going live, transfer of legacy data and support at early stages.
End-user training is a critical activity for success of the project. InfoDB may be used to plan for the User Training activities. Computer Center Management System (CCMS) must be set at this time. Simulation of productive operation system & testing the same is of great important.
The test plan contains the following activities
  • Testing conversion procedures and programs.
  • Testing interface programs
  • Conducting volume & stress testing
  • Conducting final user acceptance testing
  • Developing a final go-live strategy.
The Computer Aided Test Tool (CATT) can be used to automate test sequences for key business processes.
Phase 4 also provides for the testing of the disaster recovery plan for the productive environment. Disaster downtimes are verified and details on de-escalation.

Phase 5: Go Live & Support

This phase is concerned with supporting and optimizing the operative R/3 system.
Following activities are carried out
  • Production support facilities are defined.
  • Validation of business processes and their configuration.
  • Follow-up training for users
  • Signoffs etc.
During phase 5, the first EarlyWatch session should be held, where experts from SAP analyze the system’s technical infrastructure. The aim is to ensure the system functions as smooth as possible.
Version upgrades should be planned whenever found necessary. AcceleratedSAP contains a continuous roadmap, with standard activities necessary after implementation. The tasks in that structure provide solutions for all known types of continuous change: Business changes, technology changes or changes in user community.


There are two ways through which you can convert SAPSCRIPT into SMARTFORMS as follows:

1. Function module, FB_MIGRATE_FORM.
You can start this function module via SE37, or create a small ABAP which migrates all SAPscript forms automatically.

2. You can also do this one-by-one in transaction SMARTFORMS, under
Utilities -> Migrate SAPscript form.
When converting SAPSCRIPT into SMARTFORMS, only the layout is passed. The logic is still required to be done in the SMARTFORMS.

IDoc Messages

Did you know that you can control system responses to specific messages in specific scenarios, this is useful for IDoc processing, you may wish the system to ignore specific messages or error on specific messages. You can control this via transaction SMME.

Pricing analysis

This is one good standard SAP tool for pricing analysis.
Transaction : PRCAT
The more you dig the more it is helpful

Buffer & Out-of-date commands

Buffer commands:
WARNING: Resetting buffers can significantly impact on the performance of the entire system for a long time. It should therefore be executed only in well-founded cases. As of Release 3.0B, system administator authorization is required (authorization object S_ADMI_FCD). The action is noted in the system log.
  • This resets all buffers of the application server.
  • This resets the CUA buffers of the application server.
  • This resets the table buffers of the application server.
  • This resets the nametab buffers of the application server.
  • This resets the screen buffers of the application server.
From the menu system:
Calls transaction Pxxx.
If an ABAP list is displayed:
Send command Pxxx to the list processor (for example, P+, P–, PRI, and so on)
From a transaction screen:
Send command Pxxx to this transaction
xyyy (where x is not ‘P’, ‘/’, ‘=’ or ‘.’) )
From the menu system:
Calls transaction xyyy
Within a transaction:
Send command xyyy to this transaction
  • Calls transaction xxxx and branches to the next screen. So, it has the same effect as /nxxxx followed by ENTER.
  • This entry is still possible for compatibility reasons, but is no longer supported.
  • Searches for a string in lists (like “System -> List -> Find String”)
  • Downloads lists
  • Prints lists
  • Displays the status dialog (such as “System -> Status…) )

How to re-set the Sales Document Status

Quick SAP Tip – How to re-set the Sales Document Status.

Why: Sometimes a sales Document may be updated incorrectly and the status may be out of sync with the attributes in the document. For example the item may be rejected but this may not be showing correctly in VBUP.

How: Run SA38 with report SDVBUK00

Other Related Tips: A great table/view which shows a combination of header details and status information is VBAKUK.

Transaction – CUUPDMV – Material Variant update

One can use transaction CUUPDMV or report RCUUPDMATVAR via SA38 to update the material variants after a model change.

Usage of the Report
A configuration model was changed. For example, a new characteristic was included in a class and this characteristic is analyzed via object dependencies. Alternatively, object dependencies are changed and calculated characteristic values change as a result. At the same time, many material variants, which would now have to be changed, exist in order to adjust the stored configurations to the new model.  The system sees a material variant as a product variant of a configurable material whose characteristic values are already defined in the material master record. It is therefore treated as a stock material. In principle, the configurations of the material variants may be updated manually by executing transaction MM02 and calling the configuration in this case. An alternative is to execute CUUPDMV to update the material variants.

Support Packages

To check the support packages in the System we can go to the menu and select System –> Status then select the component information (magnifying glass) under Sap System Data.
One will then see the following:
  • Software Component
  • Release
  • Level
  • Highest Support
  • Short description
But did you know that the information is depicted in a transaction code SPAM – the Support Package Manager.
Select “All Support Packages” then button “Display”.
If you open the Package header for example: SAP_APPL      -   Logistics and Accounting
You will see the Support packages and their Numbers.

Great ABAP Transaction Code (Sample Programs and Demos)


How to Run SAP LSMW in the Background?

Did you know that you can run an LSMW object in the background?

(Basic Premise: There are 3 main executable tasks, as long as you can run these in the background and their results can be placed on the application server then the process can be run in the background.)

In order to do this proceed as follows:
After creating your LSMW in the system/client:
1) Go to the step called “Specify Files” and check the file name for:
a. Imported Data File for Imported Data (Application Server)
2) Go to the step called “Specify Files” and check the file name for:
a. Converted Data File for Converted Data (Application Server)
3) Proceed through all steps manually in the foreground including the Read data step if you are loading a file from the front-end.
6) Then go to the “Convert Data” step and check the program name of this step by using the menu path: System–>Status.
7) TIP – The program name will change in each client and for each modification to the program. On the same screen (selection parameter screen for “Convert Data”) save the selection parameters as a variant.
9) Now go to SM36 and define a background job using the Wizard and make the job have 2 program steps, using the;
a. The Convert Data program name and variant in step 6.
10) Finally depending on how your LSMW is created there may be a 2nd and 3rd program which is required but as this is dynamic depending on how your LSMW is created you should be able to figure this out yourself.

LIS SIS Update Analysis

Tip – You may be using LIS (Logistics Information Services) or SIS (Sales Information Services) and would like to analyse what structures are updated with what Key Figures and Characteristics, you can do that with these awesome transaction codes:

MC30 Update Log
MCE2 PURCHIS: Update Diagnosis Purch.Doc.
MCVCHECK01 SIS: Update Group Check
MCVR SIS: update diagnosis – order
MCVS TIS: Update Diagnosis: Transportation
MCVT SIS: update diagnosis – delivery
MCVV SIS: update diagnosis – billing doc.

How to change Servers on a System

So you login to server X on a system and you would like to move to server Y on the same system without logging off and back on again – How do you do it?
You can do this a number of ways – the method I follow is:
  1. Go to transaction SM51. (see server overview)
  2. Double click on a server to see the processes.
  3. Then open a new session, you will now be on the new server you double clicked.
Be careful NOT to use the back arrow from the work process overview or else you will move back to the old server.


Select the Server -> Goto -> Remote Logon

Compare ABAP objects across systems

So you know how to use OY19 to see and compare cross system customising objects and you know how to use SE39 to see and compare an ABAP program across systems. But do you know how to search and compare all ABAP objects across a system?

For example you have made a system copy and want to compare all Z* and Y* programs?

You can do this with Transaction Code – SREPO - Repository Comparison.
1) Select the RFC destination (you can use SM59 to do this).
2) Select “Customer Objects and Modified SAP objects”

Then follow the wizard.

Great SAP Authority Check Search

Talking about authority checks, I love using the transaction SUIM to analyse authorization objects and values for users.

But one could also use a program such as RSABAPSC which can be used to trace the authority-check commands used in a program and its sub programs.

Also as a general rule of thumb you could check for the AUTHORITY_CHECK statement to identify the authority objects in programs.

However both of  these methods RSABAPSC  and the AUTHORITY_CHECK statement will not catch all authority checks.

Remember to use SU53 to see the details of a failed authority check object.

Wild cards in searches

Did you know that a wild card search in a selection such as * is not the only wild card option. A * is used as a wild card for 1 or more characters, while a + may also be used as a wild card for a single character.

Variants: Transaction Screen Standard Dynamic

What is the difference between a screen variant,transaction variant, variant transaction, standard variant and a dynamic transaction variant?

A screen variant – Can be used to hide fields on a screen, assign values to fields, or set the fields to not ready for input.

A transaction variant – Is simply a collection of screen variants. Transaction variants are created or changed using transaction SHD0.

Great Tip- did you know that you can assign a transaction variant to a sales document (as long as it is a cross client transaction variant) in field - V_TVAK-VARIANT as seen in VOV8.

A variant transaction - In Se93 when you create a new transaction, you can add a transaction variant to this transaction. When you execute the new transaction, the system uses this variant. This basic function can be used in any transaction and it can change any screen. Each transaction code can have one variant transaction only.

A standard variant - Like a variant transaction except that it is simply a variant assigned to a standard transaction. You are then no longer able to call this transaction ‘without’ a variant.

A dynamic transaction variant – This permits you to assign more than 1 transaction variant to a transaction code. In the case of a dynamic transaction variant, the screen variant is only determined at runtime.  (This function is only implemented for screens in the SAPMV45A program, for example, not on the condition screen, pricing screen, text screen and billing plan screen.)

If you need to make more modifications in sales documents you can also make changes in MV45AFZZ FORM USEREXIT_FIELD_MODIFICATION to change screen attributes.

2 Click Hard Copy Screen print

Did you know that you can generate an instant Hard Copy printout of any SAP screen by simply selecting:
Customizing of Local Layout (Rainbow Icon top right  of navigation bar) (Alt+F12)

Followed by “Hard Copy”.

This is a simple method of capturing information on your screen, without needing to open applications and configure special settings.

SAP Change Logs

To view the changes made to a table or a configuration node in the IMG, you can use transaction SCU3.
To view the changes, you must first have activated the change log for the required tables.
The system will read each change to an existing data record for example (Update/delete) and record it is table log.

In order to use table logging you need to do 2 steps:

Step 1:
Activate the system/client parameter. Check your systems value with RZ11 with the value: rec/client
Some options:
  • rec/client = ALL - Log all clients.
  • rec/client = 001,002,003 - Log the specified clients. (Note you can specify up to 10 clients.)
  • rec/client = OFF - Do not log.
  • TIP – make sure this parameter is the same for all servers of a system.
Step 2:
The Table then needs to be active for logging – you can do this in transaction SE13.

Additional Info
The data is stored in tables DBTABPRT and DBTABLOG.
If you have too much data in these tables:
  • As of Release 4.5A you can use Transaction SCU3 to start a deletion program (Menu “Edit –>Change Docs –>Delete”).
  • Or you can drop the table on database level and recreate it with transaction SE14.
History of table logging
  • Report RSTBSERV was used prior to 3.0
  • Report RSTBHIST was used between 3.0 and 4.5
  • Report RSVTPROT is used after 4.5

SM12 – Lock Entries Tips

If you check SM12 you may find some lock entries – this is not a problem. Locked entries are required in standard SAP processing. In most instances the entry will remain in SM12 for a few seconds milliseconds, however they could remain in SM12 for a lot longer depending on the logical unit of work.
Factors which can impact the entry in SM12:
  • Sizing and performance of the enqueue server.
  • Sizing and performance of the application server/number of available processing sessions. (indirectly related)
  • Program logic being executed on the application server.
What you may not know is that there is a hidden menu path for SM12 analysis. To activate this menu path you can do the following:
Run SM12, then enter OK code “test”. You will now see the top menu path has included a new Menu Option labelled “Error Handling”.
This menu option has many parameters and test functions which you can use to analyse the enqueue and dequeue processes.
If you require advice on how to use this new functionality you can refer to OSS note 5424 which is the SM12 FAQ! Success!

System Performance Analysis Transaction Codes

Here are some transaction codes I find useful when checking for performance related issues in a system:
Depending on the issue, I start with ST05 with all trace options (SQL, Enqueue, RFC, Buffer) active with a very small time frame where data is captured so as not to have more than +-2000 records.
I then compare the results with an identical capture of the same process and time frame using standard SAP.
With both recordings I activate the extended results, which gives times for each execution. Permitting one to easily see the time differences between the executions. These results should point you in the right direction.
Here are the transaction codes I find useful in this analysis:
  • SM21 – System Log
  • ST03N - R3 Workload statistics
  • ST03G - Global System Workload Analysis
  • STAD - Statistical Records
  • STATTRACE - Functional Trace
  • ST05 - Performance Trace (SQL, Enqueue, RFC, Buffer)
  • SLIN - ABAP Program Syntax Check
  • SE30 - ABAP Runtime Analysis

Batch Input Reports

Here are some reports related to batch input:

-   RSBDCSUB -  Process sessions outside transaction SM35
-   RSBDCDRU -  Print session contents (transactions and data)
-   RSBDCLOG -  Process logs
-   RSBDCREO -  Reorganize processed sessions that are still in the system Reorganize logs (delete logs and shrink log file to actual size)
- RSBDC_REORG -  Same as old report RSBDCREO but with selection screen for reorganizing processed sessions.
RSBDCTL3 - Analyze Batch Input logs

Parameter Transactions (TCode for a Table)

Where are Parameter Transactions Stored?

Ans: In Table TSTCP.

Sample ABAP Program for Search Layout sets for given String

* Program : ysearchl
* Purpose : Searches all Y and Z layout sets for a given string

REPORT  ysearchl.



        INCLUDE STRUCTURE tline.
DATAEND OF tlinetab,
      subrc LIKE sy-subrc.

SELECT tdname 

  FROM stxl 
  INTO (stxl-tdname)
 WHERE tdobject 'FORM' 

   AND tdname LIKE 'Y%' OR tdname LIKE 'Z%' )
   AND tdid 'TXT'.

  PERFORM display_status_text USING stxl-tdname.

  REFRESH tlinetab.
  PERFORM get_text_table  TABLES tlinetab
                           USING 'FORM' 

                        CHANGING subrc.
  LOOP AT tlinetab.
    IF tlinetab-tdline CS string.
      WRITE / stxl-tdnametlinetab-tdline.


* Display a message on the status bar
FORM display_status_text USING value(textTYPE c.
      text text.
ENDFORM.                    "DISPLAY_STATUS_TEXT
* Get the long texts for the object
FORM get_text_table TABLES tlinetab
USING value(tdobjectLIKE thead-tdobject
value(idLIKE thead-tdid
value(tdnameLIKE thead-tdname
CHANGING subrc LIKE sy-subrc.

          INCLUDE STRUCTURE thead.
  DATAEND OF xthead.

  DATAeintraege LIKE sy-tfill.

  DATA xtdname LIKE thead-tdname.
  REFRESH xthead.
  CLEAR xtdname.
  xtdname tdname.

      id         id
      language   sy-langu
      name       tdname
      object     tdobject
      entries    eintraege
      selections xthead.

  REFRESH tlinetab.

      id              id
      language        sy-langu
      name            tdname
      object          tdobject
      header          xthead
      lines           tlinetab
      id              01
      language        02
      name            03
      not_found       04
      object          05
      reference_check 06.
  subrc sy-subrc.

How to Scan ABAP Sources for Specific Strings

It is simple to locate a string within a program but have you ever wondered how to find all programs where a specific ”string”, or line of text, or object name, is used.
There is a wonderful report which is I use to find ABAP programs related to specific search terms.
  • The Report name is – RPR_ABAP_SOURCE_SCAN 
  • You can execute it from transaction SA38 or SE38.
Some useful benefits of this report are:
You can limit the search range of the programs for example to your custom built developments only for example all programs starting with Y* or Z*.

Tip - Another similar program is RKCTSEAR.

Transport of Copies

Issue: Imagine you create and release a few transports before setting up the target system and Landscape. Because of this, the transports can be released without target clients. How do you fix this problem?

Fix: Fix is done using Transport of Copies Method:
  1. Execute transaction SE10
  2. Select the create icon.
  3. Select “Transport of Copies”
  4. Enter short description and save, this will create your transport number.
  5. Now follow the menu path to place your objects into this transport copy:
    1. Request Type–>Object List–>Include Objects
  6. Select “Object List from Request” and enter your old transport number.
Thats it! Your new transport is a copy of your old transport with all associated objects

Measure specific portions of ABAP Runtime

Most people know about SE30 which can be used to do an ABAP runtime analysis. However did you know that you are able to dynamically call the runtime analysis for a portion of source code for example a section of a user exit, or for a specific function module?
This is easily done by changing the user variant as follows:
  1. Open SE30
  2. On Measurement restrictions (1/2 way down the page) create/change your user defined variant.
    1. Within the variant under program parts, select the “particular Units” check box and save.
Now from within SE38 for the code you wish to measure – set your breakpoint for the position from which you  wish to measure and another for the position to which you wish to measure.
Go back to SE30 and execute your code when you reach the breakpoint activate the runtime analysis from System–>Utilities–>Runtime Analysis –> Switch On.

Run through the code by selecting F8.

When you reach your end point de-activate the analysis by selecting System–>Utilities–>Runtime Analysis –> Switch Off.

TIP: You can activate the runtime performance analysis start by entering the command prompt code /RON in the transaction box. You can de-activate the analysis by using the command prompt code /ROFF.

NOTE: If you get the message “The Particular “units” option is not selected – S7100.  It means you are not using your new changed default user variant for the execution.

Creating Database Table

Questionaire for Creating Database Tables

Check IDoc number

Is there any way to check the IDOC number from a sending system, within a receiving system?

Ans: Yes there is a way to do this. In the receiving system, execute transaction BD87. Select the node for analysis and select “Trace IDOCS”. You will then see all IDOCS as well as the field, IDOC No. partner. (The external IDOC number).

What to use to measure performance improvement?

You know of ST05, ST01 and SE30. But do you know why you would use one transaction code and not the other? What are the main purposes of each one when it comes to performance improvement and measurement?

To measure and improve performance of ABAP programs – Use SE30 to measure:
  • Excessive or unnecessary use of modularization units
  • CPU-intensive program functions
  • User-specific functions that could be replaced with ABAP statements
  • Inefficient or redundant database access.
In addition you may want to analyze or fine-tune a program’s database accesses – Use ST05 to measure:
  • Database accesses (SQL trace)
  • Table buffers
  • RFC calls
  • Lock operations (client side)
If you wishto fine tune the system – use ST01 to measure:
  • Authorization checks
  • Kernel functions
  • Kernel module
In addition ST01 encompasses the majority of the functionality of ST05.