ERP Database - The Unofficial ERP Knowledge Base

Facebook Twitter del.icio.us Digg it
ERP Database contains a huge collection of articles related to ERP System and Software. Many of the articles are specifically related to SAP. All these ERP/SAP articles are freely available to everyone.

If you would like to submit an article or share any document related to ERP or any specific ERP software. Please mail it to support@erpdb.info. Please make sure that the documents are not copyrighted.
Social Bookmarks:

ABAP Tips and Tricks #3: Programming Tips

Print This Post Email This Post Written by jimstex on Apr 27th, 2011 | Filed under: Uncategorized
  1. When one uses the MOVE statement, try keep the destination operands as the same data type as the ‘from’ operands.
  2. Use the FREE <table> command once the program has completed using the table. If the program ends on completion of the table processing, this is obviously not required eventhough SAP has a robust garbage collection in place.
  3. When defining DATA statements only define variable required throughout the program as global (i.e. at the top of the program). If variables are only required for processing within a FORM/ METHODS, then define the variable within the FORM/METHODS itself.
  4. When using the SORT statement, always specify the sort key. Try keep the key as short as possible.
  5. When processing an internal table use the LOOP instead of an SQL select  statement. When using the LOOP statement use the LOOP…AT…WHERE instead of a LOOP…AT…CHECK and if possible use parallel cursors inside loops.
  6. When the LOOP…AT…WHERE is used ensure the condition variables have been defined with the same data type.
  7. Use the BINARY SEARCH, when performing an direct read on an internal table.
  8. Use a BINARY SEARCH read and MODIFY instead of COLLECT if the internal table is large.
  9. Use the CASE statement instead of a nested IF.
  10. Beautify the program, use pretty printer.
Share

If you like this post, you may as well like these too:

  1. ABAP Tips and Tricks : More Answers to your common ABAP questions ABAP itself is not too difficult to learn. The real challenge is learning how to integrate your programs with the rest of SAP. As...
  2. ALL ABAP Tips & Tricks http://rapidshare.com/files/59540170/ABAP.hlp...
  3. ABAP Tips and Tricks #1: Generic Hints Use the CHECK command instead of an IF statement whenever possible.  This reduces processing time and improves readability. Use the ON CHANGE OF command instead of developing code to compare...
  4. ABAP Tips and Tricks #2: Generic Hints Initialization Event: This event is executed before the output of the selection screen.  The INITIALIZATION section is only performed when the ABAP is started directly, and is not executed if...
  5. ABAP Tips & Tricks : Data Dictionary Maintenance Views Lock objects Change database table entry even if it is not allowed ~~~~~End of Post~~~~~ ——————— ABAPer, mail: abap.community@gmail.com http://www.erpdb.info...
  6. ABAP Tips : Programming ABAP Language Language Dependent Formatting of Amount and Currency Dynamic Programming Assign Variable Type at Runtime Dynamic SQL Dynamic program generation Dynamic Tokens Field symbols Dynamically read fields, fieldnames and...
  7. ABAP Programming Tips This is a very vast collection of ABAP Programming Tips for download. Download ABAP Programming Tips from Rapidshare...
  8. SAP HR Tips and Tricks Here is a huge collection of Tips and Tricks on SAP HR. Understand more about Payroll, Organisation structure, HR Objects, Staffing and more in this Manual....
  9. Production Planning Tips and Tricks Contains: Convert Planned Orders to Purchase requisitions and Purchase Orders Difference between Co-Product and Bi-Product with an example Implementing Screen Exit for the transaction CO01 Production Order Splitting Repetitive Manufacturing...
  10. Sales and Distribution Tips and Tricks Here are few documents on SAP SD Tips and Tricks. This contains : Assigning number ranges for different customer account groups Changing the text Sales Order to Billing Request in...
  11. SAP Production Planning Tips and Tricks SAP Production Planning Tips and Tricks contains a huge collections of smart answers to get the work done faster. Here is the list of tips this manual provides. Download the...
  12. Collection of Material Master Tips and Tricks So, what does this bundle contain? How to calculating total quantity supplied by a vendor in a particular period? How to check duplicates for the incoming invoices? Configuring stock transfer...
  13. ABAP Optimisation tips Download Here Contributed by Rajagopalan M. ——————— ABAPer, mail: abap.community@gmail.com http://www.erpdb.info...
  14. ABAP Tips: Reporting and Selection-screen ABAP Reporting Report Template Calling another report from your own report Calling a dialog screen from a report and passing data Call dialog screen from report – Example 2 Control...
  15. ABAP Tips on Data Dictionary and Internal tables Data Dictionary Maintenance Views Lock Objects Internal Tables Free text search in a field in a internal table Types of Internal Tables Working with Internal Tables...



Leave a Reply