Showing posts with label Misc. Show all posts
Showing posts with label Misc. Show all posts

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

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.
/$SYNC
  • This resets all buffers of the application server.
/$CUA
  • This resets the CUA buffers of the application server.
/$TAB
  • This resets the table buffers of the application server.
/$NAM
  • This resets the nametab buffers of the application server.
/$DYN
  • This resets the screen buffers of the application server.
Pxxx
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
/*xxxx
  • Calls transaction xxxx and branches to the next screen. So, it has the same effect as /nxxxx followed by ENTER.
=xxxx
  • This entry is still possible for compatibility reasons, but is no longer supported.
%sc
  • Searches for a string in lists (like “System -> List -> Find String”)
%pc
  • Downloads lists
%pri
  • Prints lists
?STAT
  • Displays the status dialog (such as “System -> Status…) )

Great ABAP Transaction Code (Sample Programs and Demos)

ABAPDOCU & DWDM

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.

OR

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.

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.

Tuesday, August 9, 2011

What “Custom SAP Application development” means to me?

I had read this interesting article somewhere.

Here is my list of what makes someone qualified to claim “SAP Custom application development experience”.
  1. I can play 20 questions with non-technical users to learn their current process, the exceptions, the variations, and the vision for future business needs.
  2. I can design data dictionary objects from the ground up to support those needs including domains with value tables, text tables, table maintenance views, database views, and structures for screens and reports.
  3. I can write functional and technical specifications that speak to both business persons and ABAP developers. My documents incorporate flowcharts using Visio or Powerpoint diagrams.
  4. I can generate function modules and includes for change documents to provide standard change history analysis for my applications.
  5. I can create a custom IMG structure to organize all configuration tables, setup programs, and link documentation together.
  6. I can use the SAP documentation transaction SE61 and know how to use hyperlinks and includes so that any user will have access to online help from any screen or report I’ve developed.
  7. I can build applications that utilize parallel processing when performance is critical.
  8. I know the reason for the Update Task and table locking. Nobody will ever lose their changes in one of my applications.
  9. I can capture background messages in the Application log if it is not feasible to transmit them back to the user.
  10. I can incorporate email functionality into my screens and background jobs to eliminate hard copy printouts or the need for users to remember to “go online and check”.
  11. I know the difference between a perform, a function module, and a class method and when to use each in my design.
  12. I know how to incorporate hooks and user exits into my application so that future developers can easily make changes without touching the core modules.
  13. All screens have search helps, F1 documentation, memory IDs, and double-clicking on stuff naturally takes you to the most meaningful screen for that particular element. I even include documentation for future programmers to give them some hints on how to extend or enhance the application.
  14. I know what makes a BAPI different than just any old RFC. I also know when I should use a real-time ALE interface instead of a BAPI and vice-versa.
  15. I know how to work with Grid controls, Tree controls, Text editor controls, and splitter controls to provide the most robust user tools possible.
  16. I know how to code in order to handle Unicode files and text. My applications are fully multi-lingual, requiring only someone bilingual to help with the translations.

    And lastly, most encompassing:
  17. When people use my applications, they would swear it was just another SAP transaction.
I hope this highlights some of the value that a skilled ABAP developer can bring to a project. Custom SAP application development can cost companies hundreds of thousands of dollars per year. A well designed application with attention paid to the details will surely save as much over the course of its lifetime.
 

Thursday, July 28, 2011

Why Too Much ABAP???

 Has ABAP been too much??  No not really... Its just a name... After so many years of me learning ABAP which I still continue to learn, this is just a place to consolidate my learnings.

This place is dedicated for SAP ABAP Tips and Tricks which I come across during my data to day work or while browsing different websites or forums.

I always wanted to collect the tips and tricks and document it so that I can refer it whenever and wherever I want. Hence thot to put it into a blog so that people who are interested can also go through it.

I am sure these tips and tricks may be found somewhere else but this place is something for me and my readers. Well this is not a one stop solution but its an effort to share knowledge across the SAP community.

Hope people enjoy these.