SAP ABAP Programming
Tips & Tricks
1.
Use the CHECK command instead of an IF statement whenever possible.
2.
Use the ON CHANGE OF command
3.
Use the EXIT command to leave a loop structure as soon as a specified condition
is met.
4.
Use APPEND instead of COLLECT to add entries to an internal table.
5.
Make use of CASE structures in place of extensive nested IF’
6.
Use the FREE <table> command once the program has completed using the
table.
7.
When using the SORT statement, always specify the sort key.
8.
Use the BINARY SEARCH, when performing a direct read on an internal table
9.
Run Program RSVARENT, this will allow you to cancel the protected variant.
10.
Incase if you made some changes like the field length, or changed the type, run
the program RSVARFIT, it will allow you to adjust variants to modified
selection criteria.
11.
Have any obsolete variants? Run the program RSVARDOC
12.
What to find out were a particular variant is used in SAP? Run the program
RSVARVAR. It will list the programs where ever the variant name is used.
13.
Use Parameter ID, is a three character ID that represents specific SAP field
14.
Use WHERE clause in your SELECT statement.
15.
Use inner join for matching record.
16.
Use HASHED tables where-ever possible. Otherwise SORTED tables. STANDARD tables
should be the last choice.
17.
To hide zero value in smartforms use &wa-variable(CZ)&
PERFORMANCE ANALYSIS.
1.
ST05
2.
SAT
3.
ST12 = ST05 + SAT
4.
Code Inspector ( Program - > check - > Code Inspector)
No comments:
Post a Comment