How to programatically syntax check development objects
Hello,
We are going through a test upgrade project (4.6C to 4.7) and need to identify all custom objects that have syntax errors. I was able to find some FMs that do syntax check for executable programs (EDITOR_SYNTAX_CHECK, CHECK_SOURCE, etc) but was not able to find any FM/Program that can syntax check different kind of development objects like tables, FMs, Includes, programs, etc. It seems that different objects use different syntax check programs. I am basically getting a list of custom objects from tadir and then want to submit this object to a FM that can tell me if the object is syntactically OK.
Any help is much appreciated.
Hello All,
With the tips I got from you I was able to identify a transaction called SCI - Code Inspector that does everything that I was wanting to do.
You need to specify an object set that you want to inspect (e.g.: Z programs, Z function groups, etc) along with the type of inspection (syntax check, object generation, etc) you want to perform via a variant and then create an inspection referring to the object set and variant and that's it. The result gives a complete list of objects based on the type of inspection you wanted performed. Another useful thing that I found was an ABAP statement called syntax-check that you can use to check executable programs and function groups without calling any FMs. It is limited in the type of objects it can check but works great for executable programs.
Keep up the great work and thanks again to all of you that responded.
A special thanks to Sailatha for the code inspection program tip.
Best regards,
Shamim
Similar Messages
-
How to Disable Syntax Checker for DDL Generation
Would like to include shell script commands before a create table statement. Modified the .xdb but PowerDesigner does not recognize this code as it is not native to the database. Is there a way to disable the syntax check so that the create table script can include these statements rather than a number of errors? Running v15.2 of PowerDesigner. Any feedback would be appreciated!
Hello. Yes. To be more specific, want to be able to run the create table DDL for Teradata from BTEQ. I added the following statements to a customized version of the Terada .xdb for the table BeforeCreate:
.logon ${TD_SERVER}/${TD_USERNAME},${TD_PASSWORD}
select 1
from dbc.tables
where DatabaseName = [%QUALIFIER%]
and TableName = '%TABLE%'
.if errorcode > 0 then .goto error
.if activitycount <> 1 then .goto create_tbl
drop table %TABLE%;
.if errorcode > 0 then .goto error
.label create_tbl
The DDL shows up with syntax errors as follows. So clearly, there is something that is attempting to validate the code:
3 error(s), 0 warning(s)
(1) (Table "DATE_DIM"):
[syntax error] unknown macro: logon ${TD_SERVER}/${TD_USERNAME},${TD_PASSWORD}
(8) (Table "DATE_DIM"):
[syntax error] condition parsing error
(16) (Table "DATE_DIM"):
[syntax error] expecting .endif -
How to do syntax check programmatically
Hi,
Please help me if there is any FM or any other way to check the syntax of program programmatically
I tried this FM EDITOR_SYNTAX_CHECK, but whatever input i give,it is giving me error
'REPORT/PROGRAM statement missing, or program type is I (INCLUDE).'
Regards,
SowjanyaHi Sowjanya,
I think you are doing syntax check for an include...
if it is giving the that type of error.. "'REPORT/PROGRAM statement missing, or program type is I (INCLUDE"
do below
with out checking the sytax just activate....even it comes activate forcefully.... (ie. Activate Anyway..
solves your problme..
Thanks! -
How to disable syntax checker that generates red underlines
I've searched and couldn't find anything. Is there any way to turn off or delay the red underlines that come up while typing in the sql worksheet in SQL developer? Just something that's been bothering me.
Try checking under Tools -> Prefs -> Code Editor -> PL/SQL Syntax Colors -> Available Styles: PLSQL Errors
I don't know if unchecking "Enable Highlight" will turn off the line or not...but changing the line color to Transparent or whatever you background color is should make it go away.
EDIT
Not PLSQL Errors...SQL&PLSQL Syntax Errors
Edited by: DylanB123 on Sep 21, 2010 12:20 PM -
Syntax check for tables and function modules
Hi,
I am writing a program that perform syntax check on object such as executable programs , function modules and tables.
Syntax check works fine for programs, but not for tables.
How can I perform syntax check on my tables or structures?
I get my data from the table TADIR. But I don't get my function modules from there. What is the table for this.
Thanks 4 ur replies.
Parvezhi
good
generally in sap while creating a table or structure we get the error and we solved them,but like reports during runtime it is not possible to check the syntax of a table or structure.
thanks
mrutyun^ -
Hi Experts,
How to use SYNTAX-CHECK statement with in the function module?
Thanks,
Vickee.I have no idea about this.I just want to use SYNTAX-CHECK statement to validate a dynamically generated select query.
Code:
APPEND 'DATA dir TYPE trdir.' TO itab.
APPEND 'SELECT SINGLE *' TO itab.
APPEND 'FROM trdir' TO itab.
APPEND 'INTO dir' TO itab.
APPEND 'WHERE name = sy-repid.' TO itab.
SYNTAX-CHECK FOR itab MESSAGE mess LINE lin WORD wrd.
When I run this ,it through the following error " REPORT/PROGRAM statement missing, or program type is INCLUDE." -
Function for syntax check on the repository objects
Hi Experts,
Can anyone help me in finding out the function module used to do syntax check on Repository objects(PRograms/Smartforms/FUnction Modules...etc.,)
Regards
Arif Shaik>
a.shaik wrote:
> I hope I have sent the query on the ABAP forum itself
You have posted the query on SAP PI/ XI forum....ABAP forum is different: ABAP Development
Regards,
Abhishek. -
Check Name length of Development Objects
Hallo I`d would like to develop a programm that checks if the name of a Development Object does fit to the Length restriction of ABAP. Are there any useful Functions / Methods ??
e.g.
the function: DD_CHECK_NAME does this implicit .... (using function: DD_TABL_CHK_SAANORM)
but this works only for DDIC-Objects not for Classes / Reports etc ...
furthermore these Functions are not enabled for external usage ...
any hint ??
Edited by: Peter Burgard on Sep 12, 2011 11:04 AMHi ,
I`d would like to develop a programm that checks if the name of a Development Object does fit to the Length restriction of ABAP
SAP will not allow only to give name more than its restricted Limit for each Development Object .
so there no question of check from urside " SAP does that in Standard .
ONly in Case there is less than the limit and You want to know the length then you can do it using
simple logic of DESCRIBE SYNTAX .
regards
Deepak -
How to create Authority check object
Hello Gurus,
How to create Authority-check object 'ZABC'
ID 'TABLE' FIELD 'ZTABLE'.
Please tell me detailed procedure.
Thanks in advance.
Best Regards,
zuberaDear Zubera,
Creating Authorization Fields
In authorization objects, authorization fields represent the values to be tested during authorization checks.
To create authorization fields, choose Tools --> ABAP Workbench --> Development --> Other tools --> Authorization objects ® Fields.
To create a authorization field:
1. Choose Create authorization field.
2. On the next screen, enter the name of the field. Field names must be unique and must begin with the letter Y or Z.
3. Assign a data element from the ABAP Dictionary to the field.
4. If desired, enter a check table for the possible entries. For more information about check tables.
For more information about AUTHORITY-CHECK, see the keyword documentation of the ABAP Editor.
You can often use the fields defined by SAP in your own authorization objects. If you create a new authorization object, you do not need to define your own fields. For example, you can use the SAP field ACTVT in your own authorization objects to represent a wide variety of actions in the system.
Assigning an Authorization Object to an Object Class
Each authorization object must be assigned to an object class when it is created.
Choose Tools --> ABAP Workbench --> Development --> Other tools --> Authorization objects --> Objects.
You can also create authorization objects in the Object Navigator (SE80).
Creating / Choosing Object Classes
The system displays a list of existing object classes.
Object classes are organized according to the components of the system.
Before you can create a new object, you must define the object class for the component in which you are working. The objects are not overwritten when you install new releases.
You can also define your own object classes. If you do so, select class names that begin with Y or Z to avoid conflicts with SAP names.
Creating an Object
Enter a unique object name and the fields that belong to the object. Object names must begin with the letter Y or Z in accordance with the naming convention for customer-specific objects.
You can enter up to ten authorization fields in an object definition. You must also enter a description of the object and create documentation for it.
Ensure that the object definition matches the AUTHORITY-CHECK calls that refer to the object.
Do not change or delete authorization objects defined by SAP. This disables SAP programs that use the objects.
You can regenerate the profile SAP_ALL after creating an authorization object.
Best Regards,
Rajesh
Please reward points if found helpful. -
How to create authority check object and assign to ztcode which is of modu
Dear ,
how to create authority check object and assign to ztcode which is of custom module pool program.its urgent kindly help points rewarded.Manoj,
You can check with your Basis team to create authorisation object and assigining tcodes to the user profiles.
K.Kiran. -
How to Transport development object in SAP BI
Hi to all,
Please can any body tell me , How to transport development object from one server to another server.
i am fresher in SAP Bi , so i need to know in depth , please also send me website link so i can get more depth knowledge.
Please also send step by step process for that.
i shall be thankfull to you for this.
Regards
Pavneet Rana<Removed by Moderator>
You can surf through https://help.sap.com for referring the material or surf in SDN forums..where you can lots of info for getting in depth knowledge on this.
hope this is clear for you.
Regards
Ramsunder
Edited by: Pravender on Jun 8, 2010 6:41 PM -
Plz tell me how to create authority check objects and how to usein prg
dear sir,
plz tell me how to create authority check objects and how to usein prghttp://help.sap.com/saphelp_46c/helpdata/en/5c/deaa74d3d411d3970a0000e82de14a/content.htm
http://help.sap.com/saphelp_nw70/helpdata/en/52/6716a6439b11d1896f0000e8322d00/content.ht
Create custom authorization Customer specific object
If you have requirements that cannot be met using the P_ORGIN and P_ORGXX authorization objects (for example, because you want to build your authorization checks on additional fields of the Organizational Assignment infotype (0001) that are customer-specific), you can include an authorization object in the authorization checks yourself.
Create the authorization object using transaction SU21. Make sure you keep to the customer name range (Z/Y). To be able to use the new authorization object you have created in the master data authorization check, the object must contain the INFTY, SUBTY, and AUTHC fields. You can use any of the fields of the Organizational Assignment infotype (0001) for the other fields. You can also use customer-specific additional fields provided they are CHAR or NUMC type fields.
After you have created the object, you must start the RPUACG00 report. This report overwrites the MPPAUTZZ standard include with the code that is needed to evaluate the authorization object you created. Note: Technically speaking, this involves a modification. However, SAP fully supports this procedure. And you should not have more maintenance work as a result of this modification.
Note: that if you use customer-specific authorization objects, you must maintain these objects in transaction SU24 (Maintain Assignment of Authorization Objects to Transactions) in the same way as you maintain the authorization objects P_ORGIN, P_ORGXX, and P_PERNR
AUTHORITY CHECK OBJECT Object_name
ID fieldname1 FIELD fieldvalue1
ID fieldname2 FIELD fieldvalue2
ID fieldname3 FIELD fieldvalue3.
If sy-subrc eq 0. "Authorization exists
Endif.
http://articles.techrepublic.com.com/5100-6329_11-5110893.html
Edited by: JackandJay on Jan 16, 2008 10:21 AM -
Function Module for syntax check on the repository objects
Hi Experts,
Can anyone help me in finding out the function module used to do syntax check on Repository objects(PRograms/Smartforms/FUnction Modules...etc.,)
Dr. Arif ShaikHi,
Can you please check following function modules? But I am not sure that you can get it all in one.
EDITOR_SYNTAX_CHECK (For any report)
SSF_PREPARE_SYNTAX_CHECK (For any smarrt form)
RS_SYNTAX_CHECK ( ABAP Syntax Check with Dialog and Navigation)
CHECK_FORM_ITF_SYNTAX
RS_DISPLAY_SYNTAX_DIAGRAM
RS_CUA_INTERNAL_SYNTAX_CHECK
SEO_CLASS_CHECK_INCLUDE_SYNTAX
SEO_CLIF_GET_SYNTAX_INFO
C195_TEST_SYNTAX_CHECK
C1F0_PHRID_SYNTAX_CHECK
Pls let me know if anything is unclear.
Regards,
Lokesh.
Edited by: Lokesh Tarey on Apr 8, 2010 10:59 AM -
Syntax check for inactive programs(object)
I am having some program in internal table now i have to do syntax check for the programs, actually I can use SLIN but SLIN will not do Syntax check if the object is not active, is there any way that I can check for many programs one after the other.
Hi Vikram,
USe the transaction SAMT.
Please flooow the link below it will solve u r pblm.
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40c62223-639e-2a10-dd9a-b1dd9af73aeb
Thanks -
SQL Developer 1.1.0.21: Issues with Data Grid and SQL syntax checking
In this new release of SQL Dev, when I execute a SQL in the SQL Worksheet and click in the Data Grid in the Results tab and try to navigate within a record using arrow keys, the grid cell enters into edit mode by default and so I cannot use the Left or Right arrow keys to navigate the grid. I am forced to use tab key to navigate. This is counter intuitive in my opinion.
Is there any option to change this behavior?
Another issue that I have come across is with SQL syntax checking. In some cases, when I press F9 to execute a SQL, it shows the SQL as executed i.e. shows something like 0.0134 seconds in the toolbar and no results displayed. In reality, the SQL had some syntax error which were NOT reported. This can be frustrating since now I have to fall back to SQL*Plus or TOAD just for syntax check.
I like the fact that SQLDev highlights the current SQL but it would be more useful if it just indicated the first line of the current sql instead of highlighting the whole sql.
Manish"In this new release of SQL Dev, when I execute a SQL in the SQL Worksheet and click in the Data Grid in the Results tab and try to navigate within a record using arrow keys, the grid cell enters into edit mode by default and so I cannot use the Left or Right arrow keys to navigate the grid. I am forced to use tab key to navigate. This is counter intuitive in my opinion."
In the "Results" tab, Click Ctrl & Tab keys (at the same time) or with mouse click on any cell other than the first column (a sequence or rownum), you will be able to navigate using the arrow keys.
"Another issue that I have come across is with SQL syntax checking. In some cases, when I press F9 to execute a SQL, it shows the SQL as executed i.e. shows something like 0.0134 seconds in the toolbar and no results displayed. In reality, the SQL had some syntax error which were NOT reported. This can be frustrating since now I have to fall back to SQL*Plus or TOAD just for syntax check."
The 0.0134 seconds could be the result of the most recently executed successful statement. Check the Script Output tab for errors. Use F5 (Run Script option) instead of F9.
"I like the fact that SQLDev highlights the current SQL but it would be more useful if it just indicated the first line of the current sql instead of highlighting the whole sql."
On the SQL statement (or code), Right Click -> Format SQL (or press Ctrl & B), proper formatting would help.
I use version 1.0.0.15.57 and seems to be working allright.
- Babu Rangasamy
Maybe you are looking for
-
Editing iChat status menu doesn't show in menubar icon
Instead of having various status menu options ("surfing the web", "at home", "out to lunch", "in a meeting:", etc.) I prefer to edit the list down to just "available" and "away" When I edit the status menu from the buddy list drop down (by deleting t
-
Hello everyone, I have a java portal that comunicates with SAP to use a few RFC functions. I would like to use the employee photos that we can see on transaction pa30 to appear on my website. Is there a specific url, table, or something like that, fr
-
I have been trying to make a purchase from the apple store and I keep being asked to answer my security questions. I don't remember what my answers are. Is there a way to reset your questions or find out the answers to your old ones?
-
What does "Exif Time Stamp Error" mean?
Hi there, could anyone be so kind and explain to me the meaning / impact of the "Exif Time Stamp Error" that was introduced in the 1.4 update for lightroom? I imported about 200 pics yesterday and converted let them be converted to the DNG format aut
-
Hi Experts, I need to valuate a fx spot transaction with M (Standard translation at average rate). The configuration that I have for key date valuation for product type (60A) is as follows: Define Price Valuation Procedure for Forward Exchange Transa