How to establish code standards to make the abap code more readability
Every programmer have their habit to code, but this lead a problem , it is difficult to read other people's code, especially the complex logic.
So how to establish code standards to make the abap code more readability?
I came up with this:
1.Unify the naming rule.
2.Reduce the nest of 'if' statement. (better in less than 4 if statement in one block )
3.Use more Perform to replace the big code block.
Is there any other standards to make our abap code more readability ? (if we establish the standards, in sap is there any tool to help us to follow the rule we set ?)
There are a number of things you could do. Some of which are:
I would recommend creating your own in-house document on Coding standards, some of which you can control with the code inspector.
It is also possible to set up the transport request in such a way that objects that do not pass the SCI test are not allowed to be released.
I would also assign a senior developer to act as quality control for all developments. You can have a rotation scenario where this work can be divided by the number of senior developers you have.
Similar Messages
-
How to make the same code that works only?
how to make the same code that works only?
code:
Form2.Close = Me.Enabled = true
effect such as this codeI have this code:
Public Class Form1
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Form2.Show()
Me.Enabled = False
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
Form3.Show()
Me.Enabled = False
End Sub
End Class
he wants to after closing Form2 and Form3 unblocked the whole form1
it means that:
when I click the button, displays the himself form2 and blocks himself form1" and after closing Form2 , unlocks himself Form1"
the same with Form3 -
How will I be able to make the TestStand UI objects into XP theme?
Hi, I am using TestStand UI in .net, How will I be able to make the UI objecys of TestStand to adapt the XP theme?
Is there any example code that you can give me? Thanks!
Solved!
Go to Solution.The shipped TestStand .NET Operator Interface has a manifest file included in the project. This manifest file includes the Micrsoft.Windows.Common-Controls which is needed to identify the XP theme that has been configured on the operating system. In the shipped .NET Operator interface, this .manifest file is being embedded into the executable and formats the TestStand Operator Interface to display the XP theme that has been configured on the operating system. in the shipped TestStand 4.1.1 Operator Interface, the manifest file is embedded into the executable in a Project post-build event.
There are three things that the manifest file is required to have in order to allow the TestStand Operator Interface executable to adapt to the XP theme. They are as follows:
The manifest file must have the same name as the executable. For example, if your executable is named MyExecutable.exe, your manifest file is required to have the name MyExecutable.exe.manifest.
The manifest file must include the Micrsoft.Windows.Common-Controls in order to identify the XP theme that has been configured on the operating system.
The manifest file must reside in the same directory as the executable.
If you are building on an existing Operator interface that ships with TestStand 4.1.1, make sure that the manifest file meets these two requirements. If it does you can test that the theme is properly adapting by selecting Debug»Start Without Debugging.
If this works properly, you can rest assured that when building a release version of the TestStand Operator Interface, it will adapt to the XP theme that has been configured on the operating system.
NOTE: that you can only test this feature if you launch the executable without debugging because this allows the executable to run its own process. If you run the executable with debugging, the Visual Studio environment will host the process and will not allow the manifest file to be embedded into the executable.
-Adri
Message Edited by Adri K. on 03-04-2009 04:15 PM
Adri Kruger
National Instruments
LabVIEW Product Marketing
Attachments:
matching names.jpg 27 KB
debug.jpg 20 KB
manifest.jpg 65 KB -
How to write the ABAP code for Datasource Enhancment
Hi Team,
Can you please help me how to write the code for the enhancement i have made to the standard datasource
i have added the fields ZZPayer and ZZPayer_access.
I just wanted to know how to write the ABAP code to populate the data for these fields.
Regards,
Pradeep P.Hi
From a performance point of view would like to suggest a few changes :
WHEN '<DS name>'.
select zzfields from <table> into itab
for all entries in c_t_data where <condition>.
If sy_subrc = 0.
loop at c_t_data assiging f_c_t_data.
read itab into wa_itab where key = f_c_t_data-key.
f_c_t_data-zzfield = wa-itab-zzfield.
endloop.
refresh itab.
regards,
aparna
endif. -
i want to instal windows 7 using bootcamp on my mac book pro and how large do i have to make the partition if i want to use it for gaming?
"At least 16 GB of free space on the disk onto which you’re installing for 32-bit, or 20 GB for 64-bit (for Microsoft Windows and Windows-based applications)."
That's what Apple proposes in here Boot Camp: System requirements for Microsoft Windows
Personally I would double these amounts and add to that the diskspace needed for your Windows games.
Stefan -
New Toshiba PC with Acrobat Reader pre-installed. I installed Acrobat XI Standard. When opening a PDF, it opens in Reader. How do I get Standard to be the default?
right click a pdf>click open with>tick use as default and navigate to adobe acrobat xi, if it's not listed in the 'open with' panel.
-
How can I link .svg files in the .html code?
How can I link .svg files in the .html code?
I use the FileBrowser app by Stratospherix to do this. I can watch / stream my movies on my iPhone / iPad from my hard drive connected to my Airport Extreme. I can access all the files on that hard drive as well.
-
When I want to make a phonecall with my iphone5, I hear absolutely nothing....no ringing and no talking when connection established. When I make the same call but now on speaker, no problem or what so ever, can anyone help me ?
Hello there, RobenCaatje.
The following Knowledge Base article is specific for the issue you're describing:
iPhone: Can't hear through the receiver or speakers
http://support.apple.com/kb/TS1630
Specifically:
Resolution
Verify that there is nothing plugged in to the headset jack, including headsets, headphones, or adapters.
Make sure the Ring/Silent switch is not switched to silent.
While on the Home screen, adjust the volume buttons. If you see the icon below, indicating that headphones are attached, there may be debris or an object lodged in the headset jack:
Check the headset jack. If there is an object lodged in the headset jack that is not easily removed, have the iPhone serviced to remove object.
For Original iPhone: If there is light debris, such as lint, in the headset jack, try connecting a pair of headphones to the headset jack and then remove the headphones. Repeat this several times to remove the debris.
If you have installed a protective film on the display, either ensure that the receiver is not covered or remove the film completely.
Check the receiver mesh (which is on the top front of the device, above the display). If it appears blocked, use a clean, small, dry, soft-bristled brush to carefully and gently brush away any debris.
If you have paired with a Bluetooth headset that is nearby, either use the headset or turn Bluetooth off (chooseSettings > General > Bluetooth).
Restart the iPhone.
If restarting the iPhone doesn't resolve the issue, try restoring the device.
If the issue persists, go to the Service Answer Center - iPhone for information on service.
Thanks for reaching out to Apple Support Communities.
Cheers,
Pedro D. -
How to see the abap code in sql language.
hello gurus,
very simply put,i dont know sql,but have to write some basic select queries to talk to oracle db...
i would like to see the SQL transaltion of the ABAP code which i cant write.
for eg: SELECT SINGLE * FROM MARA WHERE MATNR = 'XXXX'.
How wud u write this on ORACLE.
i would also like to see for all entries etc...
NOW,i have tries st05..it doesnt give meaningful sql..
pls helphai
i wrote this in se38
report zdsd.
data wmatnr type mara.
select single * from mara into wmatnr where matnr = '0001'.
write wmatnr.
_from st05_
41 PROGDIR REOPEN 0 0 SELECT WHERE "NAME" = 'ZTEST123' AND "STATE" = 'A'
1,182 PROGDIR FETCH 1 0
4 DWINACTIV REOPEN 0 0 SELECT WHERE "OBJECT" = 'REPS' AND "OBJ_NAME" = 'ZTEST123'
592 DWINACTIV FETCH 0 1403
8 MARA REOPEN 0 0 SELECT WHERE "MANDT" = '001' AND "MATNR" = '0001'
9,388 MARA FETCH 1 0
i would like
select matnr
into :vi_matnr
from PPS_SUB_BDZ.lm1_lagerpl
where matnr = '0001'
basicaly i need to work on new database (NON SAP) by making connections..
i write the code in FM's in ABAP.
I write Select queries between EXEC SQL. and
ENDEXEC.
I have to use SELECT SINGLE...FOR ALL ENTRIES ...counterparts now... -
How find the ABAP code with Error message
Hi
How to find the ABAP Code for Error Message?
Example:
Error Message: ZF026.
Regards
Odaiah Pelley
Edited by: Odaiah Pelley on Aug 22, 2008 4:21 AMHi
Excellent Answer, I appreciate it.
My question is with Error Message ZF026.
How to find ABAP Code ?
If I go for SE91 I will get same message as if I am getting error message.It is no use.
Regards
Odaiah Pelleyu -
How to add a standard field to the Product search criteria ?
Hello all,
despite my searches on google and sdn, i'm still confused on how to add a standard field in the search criteria of the Product seach screens (component/view PRD01QR/Search for example) , I mean a standard Product field that is not included in the available fields list in the UI configuration tool.
I found some explanations for adding a specific Z-Field, this is ok , but I'd like to add a standard field as a search criterion, namely the item category group.
Could someone give me the needed detailed steps for this?
thanks
LudovicHi
Chk ths link out :
http://wiki.sdn.sap.com/wiki/display/CRM/Howtoaddanexistingfieldtoasearchpageofadifferent+component
Rgds,
Swati -
How to see the ABAP Code behind SAP Exit Variables.
Hi Everyone.
I was wondering if anyone could help me with the steps to see the ABAP Code behind a SAP Exit Variable.
Sometime back I remember of going to Transaction SE37 - Function Module and give the Variable name,
Eg: 0F_ADAY, Hit F4 or something like that and was able to see the ABAP Code/Function Module/Exit written for that Variable.same
But today I tried to do the same thing to see the code for Variable 0P_FVAEX but I was NOT able to see it.
I think I am missing something.
Can someone help me recollect what I am missing.
Thank You for your time
NOVICEHi bi novice,
big sorry for the late reply!
The following variables are defined in function module RREX_VARIABLE_EXIT as case statement:
'0CMONTH', '0CWEEK', '0CYEAR', '0CQUART', '0DAT', '0CWD', '0FYEAR', '0FPER', '0FYTCFP',
'0FYTLFP', '0FYTCD', '0CYTCM', '0CYTLM', '0CYTCD', '0LYTCLD', '0CMONTHT', '0CWEEKT', '0CYEART', '0CQUARTT', '0DATT', '0FYEART', '0FPERT'
Best regards,
Andreas -
Not able to remove the ABAP code from Transformation
Hello Experts,
We have transformation for DSO in that for one infoobject, field routine is written, Break Point is hard coded there and it's move to production. Now we are trying to remove that break point from development and then move it production.
we are doing following activity to remove the break point.
1. Open the transformation.
2. Open the field routine.
3. Going to ABAP code in field routine.
4. Remove the hard coded Break Point from ABAP code.
5. Saving the code.
6. It's taking to again filed routine window.
7. We close the window and activate the transformation.
8. When again check the ABAP code in field routine then it shows hard coded Break Point again.
9. Not able to remove the hard coded break point.
Can anyone know how to do this.
Help will be appreciated.
ThanksHi,
As pointed above, after point 6 don't simply close the window but click on Transfer Value and then activate your transformation. Refresh the system and check again.
Regards,
Arminder -
How to crate a spool number for the abap program
hi
how to create a spool number for the abap programHi,
Check this thread
how to create a spool requset for 'z program'.
Regards,
Satish -
I bought the APP Sasol Birds. 146MB of the 147,5MB downloaded without any problem. The download stopped and first the error code 3259 and later the error code 8012 appeared. Can someone help? I want the download to be completed. Thank you. Pieter Strobos
Maybe your firewall or security software are preventing the download from finishing. You could try disabling them until you finish the download
Maybe you are looking for
-
Is a sudden blue screen log out connected to audio volume control?
I use three computers all with the appropriately updated Mac OS (10.4.5). In all three, I am experiencing the same curious problem. Now and again, the screen goes blue and then we are into the log in routine. All applications have to be restarted. I
-
Can't download new podcasts or recent book purchases in iTunes
I can't download new podcasts or recent book purchases in iTunes. I'm using iTunes 10.6.1 on a MacBook Pro running OS 10.7.4. This started a week ago. I unsubscribed and resubscribed to my podcasts (no luck). I whitelisted the possible sending domain
-
Solution to restart your iPhone even if your power button is broken
"Enable Assistive Touch: Tap SETTINGS, General, Accessibility, AssistiveTouch (near the bottom) and tap AssistiveTouch to ON. You will now notice a small dark square with a circle in the middle (you can move this square anywhere). Tap the dark cir
-
Nokia N91 8GB A2DP support 3rd Party Stereo Bluet...
Hi... Can Anyone confirm that does Nokia N91 8GB's A2DP(stereo Bluetooth) support 3rd Party software Stereo Bluetooth Sound? like LCG Jukebox, Smartmovie , Power Movie etc... N73/N73ME A2DP does not support 3rd party apllication (LCG Jukebox,Powermoi
-
Iphone 3 will not find apple tv
i cant get the apple tv icon on my iphone 3 and have done the latest installs