Best-Practices & Learning s SAP ABAP. By Prammendran

Similar documents
A SAP User Exit is a user defined FORM routine that is used to calculate and/or replace values within a validation, substitution, or rule.

SAP' ABAP. Handbook. Kogent Learning Solutions, Inc. Sudbury, Massachusetts JONES AND BARTLETT PUBLISHERS BOSTON TORONTO LONDON SINUAPORI:

Page 2 SAP ing Vendor payment advice

Cross-Application Mass Maintenance (CA-GTF-MS)

1 2 3 DETERMINING THE SAP BUSINESS OBJECT AND ITS KEY FIELDS... 12

This article explains the steps to create a Move-in letter using Print Workbench and SAPScripts.

LSMW (Legacy System Migration Workbench) Published by Team of SAP Consultants at SAPTOPJOBS Visit us at.

SAP ABAP Training Course Content :

FUNCTION MODULE. BAPI are RFC enabled function modules. Might Be Remote Enabled or May not be Remote Enabled

INTERVIEW QUESTIONS SAP ABAP (SAMPLE) May 23,

Book Size Minimum Page Count Maximum Page Count 5x8 B&W x9 B&W x11 B&W x8.5 Color x11.

SAP Technical Upgrade Tips and Tricks

SAP ABAP. Hands-On Test Projects with Business Scenarios. Sushil Markandeya. Kaushik Roy

Learning to Program with Haiku

Chapter 10: Virtual Memory. Lesson 05: Translation Lookaside Buffers

SAP - ABAP. Presented by :- RACHIT GOYAL

Easy Match QC Lesson 9. Setting Up a Print Job

Setting Attributes Dynamically

Internationalization in WebDynpro ABAP Applications

RFC is used to communicate between SAP systems and SAP to Non-SAP systems using TCP/IP protocol.

In this Chapter you will learn...

Paragon CampTune X Beta

CPSM MEDITECH Inventory Requisition Options. Page 1 of 49. Created: April 30, 2015 Revised: April 10, 2018

CUST #: Revision: 2.01 CUST Name: Original Date: 20-Jan-2010 CUST Contact: SID: 20425

A Step-by-Step Guide on IDoc-ALE between Two SAP Servers

Homework 1. Hadachi&Lind October 25, Deadline for doing homework is 3 weeks starting from now due date is:

ABAP Add-On: Usage & Packaging

e-design CAT Release Notes

Smart Connection 9 Enterprise Text Variables

Operation Manual Aqua M300. Version and higher

Setting up Connection between BW and R/3 for Data Load

VISUAL GUIDE to. RX Scripting. for Roulette Xtreme - System Designer 2.0. L J Howell UX Software Ver. 1.0

SAP Printing Application Notes. Printronix Device Types YPTT4203 / YPTT4305 and YPTT2203 / YPTT2300

SAPtips. Journal. Creating a Well-Developed Master Data Management Solution in BW. August/September 2005 Volume III Issue 4. SAPtips.

Analysis and Report Utility

Introduction 7. 2 Navigation SAP screen Other navigation tips Review and quick reference 58

BC470. Form Printing with SAP Smart Forms COURSE OUTLINE. Course Version: 18 Course Duration:

Pack Manager Program System Design Document

DOCUMENTATION CHANGE NOTICE

How to Show Tax Breakdown When Printing Sales and Purchasing Documents

User Interface Design

Adding Custom Fields to Contract Account Screen

How to Extend an Outbound IDoc

Debugging for Fuco s. Explanation, tips & trics for debugging in SAP CRM

1. Select/view stores based on product type/category- 2. Select/view stores based on store name-

TDDE18 & 726G77. Functions

User Reference Document RR/CR & Fee Challan Generation in SAP

INT 21H and INT 10H Programming and Macros

LEGACY SYSTEM MIGRATION WORKBENCH

The Design Process. General Development Issues. C/C++ and OO Rules of Thumb. Home

BC403 Advanced ABAP Debugging

Examining the Code. [Reading assignment: Chapter 6, pp ]

TABLES AND HASHING. Chapter 13

SAP NetWeaver How-To Guide How To... Configure SAP HANA for CTS

Overview of ALE / IDOCs

Flowchart & Algorithm

D9.2 IMPLEMENTATION OF PROJECT WEBSITE

Day in the Life of an SAP Consultant using IntelliCorp s LiveCompare Software

Code Driven Line Work with TopSURV

-SQA-SCOTTISH QUALIFICATIONS AUTHORITY NATIONAL CERTIFICATE MODULE: UNIT SPECIFICATION GENERAL INFORMATION. -Module Number Session

Getting Started with Multilizer Day Evaluation

ASSIST Assembler Replacement User s Guide

This assignment requires that you complete the following tasks (in no particular order).

BC405 Programming ABAP Reports

Index. Multiple languages / countries Platform DST

How to Create Business Graphics in Web Dynpro for ABAP

USER MANUAL MKB NETBANKÁR BUSINESS

PARROT - PROGRAMMING EXAMPLES

bizhub Evolution TRANSLATE bizhub Evolution User's Guide Version: 1.1

Implementing a BAdI in an Enhancement Project (CMOD)

How to obtain the correct Alert Manager defaults SMS tab field s values

IDoc Connector for XML Component (BC-FES-AIT)

COURSE LISTING. Courses Listed. with ABAP Dialog Programming. 25 December 2017 (08:57 GMT) NW001 - SAP NetWeaver - Overview

Page 1

Applies To:...1. Summary...1. Table of Contents...1. Procedure..2. Code... Error! Bookmark not defined.0

How to Create Top of List and End of List of the ALV Output in Web Dynpro for ABAP

Preface Introduction... 23

Principle of Complier Design Prof. Y. N. Srikant Department of Computer Science and Automation Indian Institute of Science, Bangalore

MINIPPS Community Marketplace App4SAP User Guide

CS61C : Machine Structures

SAP ABAP ONLINE TRAINING COURSE

BC414. Programming Database Updates COURSE OUTLINE. Course Version: 15 Course Duration: 2 Day(s)

Documentation of DaTrAMo (Data Transfer- and Aggregation Module)

Project management - integrated into Outlook

IRMIPM 40B: Patch 007 Notes

Task 1. Set up Coursework/Examination Weights

Classroom Setup Guide Crystal Reports Beyond the Basics - Version 12.0

An Overview of ABAP Debugger Settings and System Areas

GCSS-Army Transaction Guide

IDEVWORKS TECHNOLOGIES. SurfStation 9.0 Cyber Café Timer Software. SurfStation 9.0 User Guide

SAP Printing Application Note-YPTP7PG1. Printronix Device Type YPTP7PG1

Programming Languages

MAPP DIGITAL TECHNICAL SUPPORT MANUAL AND OPERATIONAL PROCEDURES

Attachment of note CR 642 Additional fields in customer and vendor master data

Student- User manual

Splash Team Manager is a desktop software specialised on the management of members, entries and results of a swimming club.

Benefit from Avira being an Affiliate Partner!

ChipRider AQA GCSE Computer Science Mobile Assignment

Anatomy of a Marketing

CASE (Computer-Aided Software Engineering)

Transcription:

Best-Practices & Learning s ON SAP ABAP By Prammendran Prammenthiran.rajendran@wipro.com Jan 5, 2010 Version- 1.0-5 th Jan 2010 - Initial Document

Introduction: This document has been prepared based on the lessons learnt from the Bacardi implementation project (V1). This can also be used as Best Practice in SAP ABAP programming. It covers the common mistakes while developing an ABAP object (From Junior to senior level). Scope This document is intended for ABAP developers from Junior to senior level. Best-Practices/Learning Danger of using CHECK statement in the user exits which has multiple enhancements:- CHECK statement will terminate the control from the current subroutine. So, the control will not go to the next enhancement of the same user exit. For example, We have multiple enhancements in the user exit subroutine USEREXIT_MOVE_FIELD_TO_VBAK Of the program MV45AFZZ as below, CHECK statement has been replaced with IF statement to proceed further.

Earlier, the CHECK statement of the above screen shot has stopped the program control and it came out from the sub-routine without processing the next enhancement of the same user exit. So, it has been replaced with IF ENDIF.

Putting much logic in Smart forms can be avoided:- Smart form has the very good feature of writing the logic / ABAP code directly rather than in Driver program. But, this feature will become a disadvantage when it comes for rework / support team. Because it is bit difficult to understand the process flow logic of the whole smart form and change the logic (even if it is a very small correction). So, it is always good to write the whole logic or as much as possible logic in driver program itself and pass the final result to Smart form. This can be avoided. Write the logic in Driver program itself for better readability and flexibility to change / rework whenever required.

Avoid hard coding the text in smart forms / ABAP programs :- Hard coding the specified text directly in the program or Smart forms will lead to language specific issue. For example, the header / footer text may change if the logon language is Germany or French. See the below screen shot for better understanding. Can be avoided. Not suitable for language specific texts. Use Text Module rather than hard coding it directly in the Smart form layout. Text module can be uniquely assigned to a language using the logon language. When including a text module, we can also access translations of the text module, for example, to include an English text module in a German form.

Danger of using "USER_SETTING = 'X'" while calling the Smart forms function module from the driver program :- Using this command is fine in foreground processing. But this will put a DUMP in Background processing. We can not expect a default local printer for all the user ids. This can be avoided by writing an extra logic as below, Extra logic for background processing. In this case, program will take the network printer which has been configured through condition table. For Foreground processing. Program will take the default printer as per the user setting (SU01 ).

Avoid Hard coding the Language key in the WHERE conditions :- Generally, developers (especially junior developers) used to hard code the language key with E (English). This will give a wrong text if the user has logged in with a different language like Germen or French. Good practice: Log on language key has been taken. Bad practice: Language has been hard coded through constant (English).

Be aware of Domain Conversion Rule :- The domain Conversion rule of a particular field will affect the hardcoded / passed value in WHERE condition. This will not give you any record. For example, PALEDGER = '10' will be converted to '02'. Be aware of that. Better to declare a variable / constant with the same table/field type and pass the value, rather than direct hard coding (check) Check the domain for a particular field as below. Conversion routine for the field PALEDGER Search help shows as 10. But we need to pass it as 02 in our custom program. Then only it can fetch the required data.

SAP Standard Internal Tables has to be handled carefully in user exits We have to update the SAP standard internal tables very carefully in user exits, if there is a requirement to change / add data. For example, we had a requirement to update the Partner Functions of the Sales order through SD module User exit (USEREXIT_MOVE_FIELD_TO_VBAK). We faced several Update Termination Errors while saving the Sales order because of this user exit. We analyzed the user exit code with standard functionality and updated the (SAP standard) internal tables XVBPA and YVBPA with Update flag (UPDKZ) as below. This has resolved the issue of getting several dumps in SM13 / ST22. Update Flag UPDKZ has to be updated properly for both XVBPA & YVBPA. Conclusions It is always recommended to include all the Lessons Learnt / Best Practices in the Code Review Check list to avoid such mistakes in future deliverables. These points are applicable to both Implementation and Support Projects. Thank You, Prammendran.