Standards following while developing a code
when we developing a repore what are the standards we have to follow.
Check following links for some coding guidelines.......
http://****************/Tutorials/ABAP/PerformanceSTDs.htm
http://www.ams.utoronto.ca/Assets/output/assets/Developmentstandards_guidelines_335678.pdf.pdf
http://www.sap-basis-abap.com/abap/abap-4-development-code-efficiency-guidelines.htm
Similar Messages
-
Reg: Standards to be followed while developing a smartform
Hi,
I am preparing a document on " Standards to be followed while developing a smartform" for my company. Could anyone send documents related to my subject or guide me where can I find one, it will be very helpful for me.Hi Prabu,
You can try something like this.
Layout Sets:
Layout sets may have names up to 30 characters in length, using the format
Zx(2-30)
Example: ZNEWLAYOUT New layout is the layout set name.
If you copy a standard layout set, insert a Z as the first character .If the standard layout set already has 30 characters replace the first character with Z.
Styles:
Style may have names up to 30 characters in length, using the format
Zx(2-30).
Example: ZSTYLE.
If you copy a standard layout set, insert a Z as the first character .If the standard layout set already has 30 characters replace the first character with Z.
Standard Text IDs:
Standard text IDs may have name up to 4 characters in length using the format
Znnn.
Example: ZTXH.
If you copy a standard layout set, insert a Z as the first character .If the standard layout set already has 4 characters replace the first character with Z.
Standard Text Names:
Standard text names may have names up to 32 characters in length using the format Zx(2-32).
Example: ZSTANDARDTEXT.
If you copy a SAP standard text name, insert a Z as the first character .If the SAP standard text name set already has 32 characters replace the first character with Z.
Regards,
Ferry Lianto -
Determining performance while development
Dear all,
We are creating a new report that selects data from the BSEG and two other tables. There is very little data available on the development server. In such a situation, will the results of SQL trace run on development server be indicative of how the report will perform in production.
We intend to run several tests using joins/views. Can we say that the best performance case here will result in best performance case when the tables have a huge data?
Thanks,
MichaelYes, And that is the reason we should follow proper performance condition while writing the code itself.
As a developer you should know which select query, which kind of data declartion, condition checks, caluclations in the report can increase the performance of the program.
Some time even if you write every thing good wrt performance conditions, that may creates problem at higher level system. Yes, it may happen, because memory utility is also part of program, this is independent of the runtime and performance environment of our program. Hope you know, for this we should clear our local variable where ever unneccessary and refreshing the internal table, Also make use of the FREE syntax to avoid such a kind of syntax.
One more case, here our program will run properly both performance wise and Memory allocation wise, but it may creates problem to another programs and transaction like locking and unlocking of data base tables , making utility of text symbols and all can few examples of this kind of issues.
So always do best code,
All the best
Naveen Inuganti. -
Signed Applet - Using same alias while development
Hi,
I am working on Embedded Java Signed Applet. My applet using the TCP/IP thus required to load each time to my Lantronix XPort.
The problem is, every time I change something in the applet, I need to run the following commands again and finally load to Lantronix XPort.
And every time, I required to change the alias name i.e. signapplet17 in the following commands.
Is there any easy way while developing the signed applet
e.g. we can use the same alias name each time i.e. signapplet1 ( I reached to signapplet17)
Or we can avoid the following commands while developing.
jar cmf mainClass.txt DataMain.jar *.class
: Generate key pairs
keytool -genkey -alias signapplet17 -keystore mykeystore -keypass mykeypass -storepass mystorepass
: Sign the JAR file
jarsigner -keystore mykeystore -storepass mystorepass -keypass mykeypass -signedjar SDataMain.jar DataMain.jar signapplet17
: Export the public key certificate
keytool -export -keystore mykeystore -storepass mystorepass -alias signapplet17 -file mycertificate.cer
Thanks.This is my code that i use to read the graph:
private Graph<Integer, Integer> loadGraph(int year, String type) {
String graph_dir = ProjectDir.data_dir + "input/Network/vt_kn." + year + "-" + year + "/";
String graph_name = "vt_kn." + year + "-" + year +".intern." + type;
Graph<Integer, Integer>graph = new UndirectedSparseMultigraph<Integer, Integer>();
try{
GraphMLReader<Graph<Integer, Integer>, Integer, Integer> gmlReader
= new GraphMLReader<Graph<Integer, Integer>, Integer, Integer>();
gmlReader.load(graph_dir + graph_name +".graphml", graph);
} catch (Exception e) {
e.printStackTrace();
System.out.println("loaded: " + graph_name);
return graph;
public class ProjectDir {
public static final String data_dir = "F:/Apache/Tomcat 6.0/webapps/ROOT/app/Data/";
public static final String script_dir = "../Script/";
//F:/Apache/Tomcat 6.0/webapps/ROOT/VT/data/
Could you tell me how i could change this code so that i can load from a url instead of a file? -
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. -
Error while deploying WDJ code
Hi All,
I am getting the following error while deploying WDJ code in NWDS .
1 . The project was not built due to classpath errors (incomplete or involved in cycle).
2 . Missing required library: 'com.sap.security.api.jar'.
I have put the jar file into the project path but still then i am getting these errors . Please help .
Thanks in advance,Hi,
If u are using simple project then then adding jar into application property would do but if using DC then u must follow below procedure.
You cant just add any external jar file into a DC project.
There is only one way to add a external jar file is by using external library project.
1.create an external library project type DC.
2. put your external jar file into its lib folder.
3. create its public part of type SDA( Assembly if using CE)...and API( Compilation if using CE).
4. just use SDA public part into your webdynpro project as used DC.
5. and when you deploy your webdynpro project on server, this file will also get deployed... remember to use SDA public part..
Regards
Surender Dahiya -
Error while deploying BPEL code to the server in 11g
Hi all,
I am trying to deploy bpel process in 11g. I have followed the doc for migration from 10g to 11g http://download.oracle.com/docs/cd/E12839_01/upgrade.1111/e10127/upgrade_soa_apps.htm#CHDCHCEB .
But still could not deploy successfully. It is compiling successfully but while deploying the code facing the below issue
[07:06:28 AM] Error deploying archive sca_Invoice_B2B_rev1.0.jar to partition "default" on server soa_server1 [148.87.197.163:45713]
[07:06:28 AM] HTTP error code returned [500]
[07:06:28 AM] Error message from server:
Error during deployment: Deployment Failed: Unable to find a WSDL that has a definition for service {http://xmlns.oracle.com/Invoice_B2B}Invoice_B2B and port Invoice_B2B. Please make sure that the port attribute for the binding defined in the composite file is correct by checking the namespace, service name, and port name. In addition, check that the WSDL associated with the binding namespace is imported and currently reachable (check the import nodes at the top of the composite file). Finally, validate the HTTP proxy settings for the server..
[07:06:28 AM] Check server log for more details.
[07:06:28 AM] Error deploying archive sca_Invoice_B2B_rev1.0.jar to partition "default" on server soa_server1 [148.87.197.163:45713]
[07:06:28 AM] #### Deployment incomplete. ####
[07:06:28 AM] Error deploying archive file:/E:/Shared/jDev11113/v11113.24D/Invoice_B2B/deploy/sca_Invoice_B2B_rev1.0.jar
(oracle.tip.tools.ide.fabric.deploy.common.SOARemoteDeployer)
Can anyone let me know whether i am missing anything? also can anyone let me know some of the steps that need to be looked upon while migration.
Thanks in advanceHi all,
This is the underlying error that i found in the logs
"Cause=null schema location for ns=http://xmlns.oracle.com/pcbpel/adapter/db/top/DB_ERROR]
Check the XML schema and make sure your query string is valid"
2011-02-02T03:22:29.066-07:00] [soa_server1] [ERROR] [] [oracle.soa.bpel.engine.compiler] [tid: [ACTIVE].ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: ohsadmin] [ecid: 0000Ir_tGToCom55zR0FyW1DIIY6000008,0:1] [APP: soa-infra] [dcid: 49c8ed318246db94:-5a93ef1d:12d7abb4670:-7ffd-00000000000252fb] <BPEL1Processor::generateProcessClass> Response_B2B.bpel(line 29): unresolved element[[
XML element "{http://xmlns.oracle.com/pcbpel/adapter/aq/Invoice_RosettaNet-V02.00/}Header" of variable "Header_Var" is not defined
Make sure the XML element "{http://xmlns.oracle.com/pcbpel/adapter/aq/Invoice_RosettaNet-V02.00/}Header" is defined in one of WSDLs that are referenced by the deployment descriptor
[2011-02-02T03:22:29.067-07:00] [soa_server1] [ERROR] [] [oracle.soa.bpel.engine.compiler] [tid: [ACTIVE].ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: ohsadmin] [ecid: 0000Ir_tGToCom55zR0FyW1DIIY6000008,0:1] [APP: soa-infra] [dcid: 49c8ed318246db94:-5a93ef1d:12d7abb4670:-7ffd-00000000000252fb] <BPEL1Processor::generateProcessClass> Response_B2B.bpel(line 234): unresolved part element[[
part "Invoice" of variable "Receive_Response_InputVariable" is defined as XML element "{http://www.api.org/pidXML/v1.0}Invoice" whose definition cannot be resolved because "java.lang.IllegalArgumentException: null schema location for ns=http://www.api.org/pidXML/v1.0 [Cause=null schema location for ns=http://www.api.org/pidXML/v1.0]".
Make sure the XML element "{http://www.api.org/pidXML/v1.0}Invoice" is defined in one of the XML schemas
[2011-02-02T03:22:29.067-07:00] [soa_server1] [ERROR] [] [oracle.soa.bpel.engine.compiler] [tid: [ACTIVE].ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: ohsadmin] [ecid: 0000Ir_tGToCom55zR0FyW1DIIY6000008,0:1] [APP: soa-infra] [dcid: 49c8ed318246db94:-5a93ef1d:12d7abb4670:-7ffd-00000000000252fb] <BPEL1Processor::generateProcessClass> Response_B2B.bpel(line 340): invalid query[[
query "/ns10:XxexhBpelErrorLogCollection/ns10:XxexhBpelErrorLog/ns10:invoiceNumber" is invalid, because java.lang.IllegalArgumentException: null schema location for ns=http://xmlns.oracle.com/pcbpel/adapter/db/top/DB_ERROR [Cause=null schema location for ns=http://xmlns.oracle.com/pcbpel/adapter/db/top/DB_ERROR]
Check the XML schema and make sure your query string is valid
Can anyone let me know what could be the reason?
Thanks in advance -
Error while copying company code
Hi
While copying company code from 0001, following error is giving. Can you please tell me how to go ahead with that:
Message no. TK455
Diagnosis
The value "12 " was entered in the field "REICHWEITE".
This is not possible because it is a numeric field where only numbers may be entered.
The length of the field is 000003.
System Response
The entry was not accepted.
Procedure
Enter only numeric values in this field
Regards,
PriyaHi,
Did you check the note?
it indicates:
>Use Transaction SE16 to delete all entries in the TNIW5 table that have the two-digit contents '12' in the 'Range of coverage' field.
>If you want to use the lowest value determination by range of coverage (Transaction MRN1) with valuation level = company code, you can maintain your own customer-specific Customizing entries in Transaction OMW5.
Regards,
Jigar -
Error while creating company code
hi,all,
While copying company code from standard one I am facing this problem
ENTER NUMERIC VALUE ONLY CANCELLED COPYING
Diagnosis message:
the value "12" was entered in the field "REICHWEITE" this is not possible because it is a numeric field
where only numbers may be entered.The lenth of the field is 000003.
Whait does it mean. How to rectify this problem.
pls. help meHello Svinir,
The problem is caused by old entries from previous SAP releases which contain invalid data.
The TNIW5 Customizing table is a table with delivery class = C (= Maintenance only by customers - No SAP import). SAP has delivered entries in the TNIW5 table from earlier releases in the incorrect format (entries with the field contents '12') for the TNIW5-REICHWEITE field.
The solution to this
Use Transaction SE16 to delete all entries in the TNIW5 table that have the two-digit contents '12' in the 'Range of coverage' field. If you want to use the lowest value determination by range of coverage (Transaction MRN1) with valuation level = company code, you can maintain your own customer-specific Customizing entries in Transaction OMW5.
For more information use SAP Note 547875
https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=547875
I hope this will solve your your problem
Br,
Tushar -
Am facing this error sqlcode :-6502 while running sql code in plsql block
Am facing this error sqlcode :-6502 while running sql code in plsql block.
am using query :
SELECT SUBSTR('123456DE789KL|987654321|B',1,INSTR('123456DE789KL|987654321|B','|')-1) FROM DUAL;
CAN any body tell me why.BD_Fayez wrote:
I've tried the following, but don't get any error.As I mentioned, most likely variable is too short:
SQL> declare
2 strSub varchar2(2);
3 begin
4 SELECT SUBSTR('123456DE789KL|987654321|B',1,INSTR('123456DE789KL|987654321|B','|')-1) into strSub FROM DUAL;
5 dbms_output.put_line(strSub);
6 end;
7 /
declare
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at line 4
SQL> SY. -
What are the naming conventions we should follow while creating an object
hi
what are the naming conventions we should follow while creating an object in ABAP dictionary, i.e while creating zee table.Hi,
Namespaces and Naming Conventions
SAP has reserved name ranges for customer objects and SAP objects. Use these customer name ranges to make sure that your objects are not overwritten by SAP objects during the import of corrections or an upgrade.
This documentation lists the customer name ranges for the different system objects.
Only use the customer name ranges. If you do not keep to the name ranges for customer objects you may lose your development objects.
SAP delivers a few system objects with names that fall within the customer name range. These objects already existed when the customer name range was extended from YY/ZZ to Y/Z. These objects are listed in table TDKZ.
Regards -
Can send characters to the standard input while DOS Command is under execution
Can Labview send characters to the standard input while DOS Command is under running with System Exec.vi?
iftu wrote:
Found following VI's in ogpipe.llb under the ZIP file. Didn't find PING Example.vi
OGPIPE Write To Pipe__ogtk.vi
OGPIPE RefNum__ogtk.ctl
OGPIPE Read From Pipe__ogtk.vi
OGPIPE Open System Command__ogtk.vi
OGPIPE Open Pipe__ogtk.vi
OGPIPE Close Pipe__ogtk.vi
OGPIPE - VI TREE__ogtk.vi
PING Example is not in that archive. This is only the actual PIPE function library. What you want to do is using "OGPIPE Open System Command" to create the pipe handles for stdin and stdout and optinally stderr. Then use "OGPIPE Write To Pipe" to write to stdin and "OGPIPE Read From Pipe" to read from stdout and optionally stderr. When finished close each opened pipe handle with "OGPIPE Close Pipe".
Rolf Kalbermatter
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions -
What are the steps we have to follow to develop RFC function module
hi
what are the steps we have to follow to develop RFC function moduleI will tell you simple example within r/3 systems..
source system - A (SAP R/3 )
Destination System B (SAP R/3).
First create RFC Destination in SM59 - in A System.
Createing RFC Destination - GOTO SM59 Transaction and click R/3 System .
it will go second screen and give ur RFC Name ,IP Address and log on details.
click on test concetion and remote logon.
now create RFC Function module in B System.
goto se37 - create fm with starting with Z* or Y*.
maintain all data like
attribute should be remote enabled
importing is v_matnr
exporting is v_maktx.
write the simple code - select single maktx from makt into v_maktx
where matnr = v_matnr.
Call this fm in report program in se38 in B sytem and copy the FM.
paste this code A System
use ur logic and destination 'RFC Name'.
Reward Points if it is helpful
Thanks
Seshu
Message was edited by:
Seshu Maramreddy -
Error while unpacking program, code 2 Win Server 2008
When trying to run an application (specifically "Image for Windows" by Terabyte Unlimited), I receive the following error message:
"Error while unpacking program, code 2. Please report to author."
I have seen numerous hits for this error while searching Google and nearly all of them point to an issue with a Windows Update. However, it's nearly always for Windows Vista.
I'm getting this error Windows Server 2008.
I have another machine running Windows Server 2008 that does not have this issue.
Is this an issue with a particular Windows Update or could something else be the cause?C:\Users\administrator>net helpmsg 2
returns with
The system cannot find the file specified.
The package may be corrupt.
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows]
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights. -
Steps to follow while creating Database table in notes or paperwork
what are the steps to follow while creating Database table in notes or paperwork
Thank you,
Regards,
Jagrut Bharatkumar Shuklahi,
1. Goto Transaction SE11.
2. Enter the table name to be created. It should start with a Y or Z.
3. Press Create
4. Enter the Short description for the table
5. Enter the Delivery class for the table. It can be 'A', 'C' or other.
6. In the Fields tab, specify the table fields and the corresponding data elements or the built-in data types.
7. If the table needs to be made a client-depenedent table, the first field should be MANDT.
8. Goto Technical settings of the table and sepcify the Data Class and Size for the table. Also, there u can specify if buffering for the table should be allowed or not.
9. Now, activate the table.
if helpful reward some points.
with regards,
Suresh Aluri.
Maybe you are looking for
-
My lumia I got back in December before Christmas it worked great till the new update 8.1 came in I downloaded it three weeks ago an it worked fine till the next day. I usually watch a video or u tube on the phone when a go to bed so I did an woke up
-
Hello, If you switch witholding tax on in Administration -> Setup -> Financials -> Purchasing tab -> Tax tab and then go to create a new supplier, the 'Subject to Witholding Tax' box is ticked by default. In another database, i have noticed itn does
-
Starting with Oracle BPM - Tutorial
I'm starting with BPM Tutorial that I received from a friend. it is a good Oracle tutorial, but in chapter 3 I need include a zip file called OrderInformation.order.zip and this is not in my bpm instalations. It says to looking for it in \Student\Ord
-
External planned operation in routing
Hello, I have a scenario in my company. In the routing, an operation (heat treatment/machining) needs to be carried out by the vendor. We issue the goods (Material X) from WIP & receive goods (material X) after electroplating. Then we continue with o
-
Iam going in sane i have repaetly authroise d my computer and i cant sync my phone
hello getting rather ****** of that i cant sync my iphone with my computer yes i have done all the things in the support and the messages still come up with no authroised going crazy