• ABAP Online Training @ $50

    Now you can learn ABAP by watching and listening video classes by experienced consultant.

  • ABAP Tutorials N Materials

    Read, Surf and Download useful ABAP tips, tutorials, code and download many eBooks and documents free

  • Latest ABAP Job in India

    Get all latest opening for SAP ABAP and related jobs, vaccancies across India and apply for the same.

    Monday, May 14, 2012

    The main important entity of abap code is internal tables. Whatever data we select form database tables, has to store in internal table first and then we process them as per clients requirement.

     

    Internal tables are of different types. Each internal serves a particular task to improve performance of code.

    1.       Standard table can be accessed by Index operation, means by primary key. We should sort them by the key and use BINARY SEARCH.

    2.       Sorted table serves the same purpose of Standard table after applying sort.

    3.       Hash Table is different type of table. It can only accessed by a unique key field.

     

    Generally while declaring an internal table we have to consider few points to optimise our code:

    1.       Declare a table without header line. Make the table declaration more in general. Declare work area separately to use that table.

    2.       While declaring a table, specify the table type as Standard/sorted/hashed.

    3.       Do not use INTO CORRESPONDING FIELDS, use APPEND work area to internal table.

     

    During coding, we have to follow the below points:

    1.       Don't  use nested loop. Try to use READ inside LOOP.

    2.       For specific record, you should use LOOP with WHERE clause.

    3.       Don't delete table entries inside a LOOP. Always flag that entry inside that LOOP or CLEAR the key field value of that table. After the LOOP delete that table where key field is SPACE.

    4.       Use field symbols instead of modifying any entry.

    5.       Check sy-subrc value after every command statement.

    6.       After appending always clear work area.

    7.       Follow the naming standards of projects.

    8.       Use syntax check and pretty printer.

    9.       If similar code need to use multiple times, It's better to create sub routine and use it multiple times.

     

     

    Extended Program Check and Code Inspector check is must for every code.

     

     

    Now execute. It will display all the errors. We have to creect them. Double click on each error will navigate us to that point.

     

    Similarly for Code Inspector .

     

     

    0 comments:

    Post a Comment

    Easy2learnabap.co.in @ 2012 All product names on this web site are trademarks of the companies that own them .

    Easy2learnabap.co.in is not affiliated with SAP AG in any way. SAP AG is the registered trademark holder of SAP, SAP R/3, mySAP, ABAP, xApps, NetWeaver, and other proprietary terms.

    The technical information on this site is verified to the greatest extent possible, however, any information found on this site is used at the site visitor's own risk. All the tutorials are collected from various sources, if anyone is having problem with the content, report this to us. We will take action accordingly.

    Easy2learnabap.co.in reserves the right to correct any errors or omissions in any portion of this site at any time without obligation.

    This website is created to teach people about ABAP technology. The Video contents provided in Premium service are completely owned by us and copyrighted.