Handling sy-Subrc in Code Inspector
Hello all,
I think, I am mad - but I dont't find the handling of sy-subrc in the code inspector.
I found many hints, that it should be in Security- Checks, but here I have only this entries.
Critical Statements
Dynamic and Client-Specific Accesses in SELECT
Dynamic and Client-Specific Accesses with INSERT, UPDATE, MODIFY, DELETE
Client-Specific Shared Objects Methods
Whats wrong ?
Best wishes
Stefanie
Hi Stefanie,
What exactly you are planning to with the sy-subrc checks......?
Please eleborate what you are thinking. I can then be able to help you..
Regards,
Kunjal
Similar Messages
-
Code inspector error with exception
I have below code :
IF P_SUMM = C_ON.
CALL FUNCTION 'ZSD_REPORT_HEADER' "Write std Nike header
EXPORTING
PROGRAM = V_PROGRAM
LINE_SIZE = SY-LINSZ
RUN_DATE = V_DATE
RUN_TIME = V_TIME
TITLE_1 = TEXT-025
TITLE_5 = '1424'
PAGE_NO = SY-PAGNO.
IF SY-SUBRC <> 0.
WRITE: 'Problem with ZSI_REPORT_HEADER'(019).
ENDIF.
However in the code inspector it is giving error :
Program ZSDR_TOP_ACC Include ZSDR_TOP_ACC Row 988 Column 0
No EXCEPTION to set SY_SUBRC Declared for CALL FUNCTION 'ZSI_REPORT_HEADER'
Thus the value of SY-SUBRC is always 0
Could you please suggest me how to eleminate error. YOUR Helpis highy appreciated.
Thanks in advance and happy new year.
Code Formatted by: Alvaro Tejada Galindo on Jan 4, 2010 5:34 PMCALL FUNCTION 'ZSI_REPORT_HEADER'
EXPORTING
PROGRAM = V_PROGRAM
LINE_SIZE = SY-LINSZ
RUN_DATE = V_DATE
RUN_TIME = V_TIME
TITLE_1 = TEXT-016
TITLE_5 = '1425'
PAGE_NO = SY-PAGNO
*ADD Exceptions even the FM does not have exceptions.
EXCEPTIONS
OTHERS = 1.
IF SY-SUBRC NE 0.
WRITE: 'Problem with ZSI_REPORT_HEADER'(028).
ENDIF.
We can add exception like above even though the exception was not declared in Function module. -
I am validating the delivery status field in vbuk table as it exists in my selection screen.
I am not having vbeln field in my selection screen .
CODE INSPECTOR ERROR:
Large table VBUK: No field of a table index in WHERE CONDITION.
I am getting above error how to resolve this.
Is there any other solution to resolve this error rather than creating secondary index on this field.
METHOD validate_delivery_status.
IF s_lfstk-low IS NOT INITIAL.
SELECT lfstk
INTO g_lfstk
FROM vbuk UP TO 1 ROWS
WHERE lfstk EQ s_lfstk-low.
ENDSELECT.
IF sy-subrc NE 0.
IF g_lfstk IS INITIAL.
MESSAGE e043(z12). “ There is no data match your selection.
ENDIF.
ENDIF.
IF s_lfstk-high IS NOT INITIAL.
CLEAR g_lfstk.
SELECT lfstk
INTO g_lfstk
FROM vbuk UP TO 1 ROWS
WHERE lfstk EQ s_lfstk-high.
ENDSELECT.
IF sy-subrc NE 0.
IF g_lfstk IS INITIAL.
MESSAGE e043(z12). “ There is no data match your selection.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDMETHOD.
Thanks in Advance
Regards,
Avinash.There's no need to keep repeating information already given.
As it stands your validation won't work. What if the user enters a selection of ranges? Or an exclusion? Or just an "*" to get everything?
Use the correct function module to get the valid values for the domain LFSTK (see here: GET DOMAIN FIXED VALUE - Code Gallery - SCN Wiki) into an internal table. Then
DATA match TYPE abap_bool. match = abap_false. LOOP domain_values INTO domain_value. CHECK domain_value IN s_lfstk. match = abap_true. ENDLOOP.
IF match EQ abap_false.
..." Sorry, pal, not valid.
ENDIF.
Validating select options is not straightforward. If you need to validate against a db table, then you can only use
SELECT SINGLE blah FROM dbtable INTO otherblah WHERE field IN s_field.
IF sy-subrc IS NOT INITIAL:
" Sorry, pal, not valid
ENDIF.
Which, as you've seen, is not very efficient. -
My first Code Inspector extension
I'm trying to write my first own extension of Code Inspector. I don't like to discover again new wheel so I'm asking You:
Is in ABAP any test which check how long is procedure (how many lines is beetwene FORM ENDFORM statement?) which return warnings when length is just a little bit to big and errors when exceed a lot maximum length?
<b>I'm only interesting that is already in SAP this kind of test.</b>
Cheers, TomekHello Thomasz,
you will see all SAP checks when starting SCI. Only with the newer releases there is a check on program metrics.
Regards,
Klaus
<b>Documentation</b>
Determining Complexity of Procedures in ABAP Programs
The check calculates different complexity measurements for procedures in ABAP programs. These measurements are:
Number of Statements. Cyclical complexity. Here there is also the variant through a test parameter as to whether a CASE statement is treated as a simple or multiple branch.
Number of Versions. This measurement can only be determined in the original system of the respective program since these versions are only there.
In the results display, there is only one single information message. The results list is displayed when you double-click this message. In this list, the above-mentioned complexity measurements are specified after the procedure type and the procedure name. In addition, the Include and the line where the respective procedure begins are displayed. By double-clicking here, you can branch to the source code. The list can be sorted, as usual, by any column you wish. In addition, the standard procedures for exporting (for example, to Excel) are provided.
The test specifies the various procedure types in the results list in the following manner:
METH : Methods
FORM: Forms
FUNC: Function modules
MOD: Modules
STAS: START-OF-SELECTION event
TOPS: TOP-OF-PAGE event
<b>Some code excerpt</b>
method RUN .
data:
L_EXCP type ref to CX_EXCEPTION,
L_NAME type STRING,
L_CLASS type STRING.
if REF_SCAN is initial.
check GET( ) = 'X'.
endif.
check REF_SCAN->SUBRC = 0.
if PA_VERSION = 'X'.
GET_PROC_VERSIONS( ).
endif.
STATEMENT_INDEX = 1.
try.
do.
read table REF_SCAN->STATEMENTS index STATEMENT_INDEX into STATEMENT_WA.
if SY-SUBRC <> 0. exit. endif.
add 1 to STATEMENT_INDEX.
check STATEMENT_WA-FROM <= STATEMENT_WA-TO.
*-- avoid native SQL
check STATEMENT_WA-TYPE na 'EMPSDR'.
case KEYWORD( ).
when 'PROGRAM'
or 'REPORT'
or 'START-OF-SELECTION'.
CHECK( P_PROC_TYPE = 'SSEL' P_PROC_NAME = '%' ).
when 'END-OF-SELECTION'.
CHECK( P_PROC_TYPE = 'ESEL' P_PROC_NAME = '%' ).
when 'FORM'.
L_NAME = GET_TOKEN_REL( 2 ).
CHECK( P_PROC_TYPE = 'FORM' P_PROC_NAME = L_NAME ).
when 'FUNCTION'.
L_NAME = GET_TOKEN_REL( 2 ).
CHECK( P_PROC_TYPE = 'FUNC' P_PROC_NAME = L_NAME ).
when 'METHOD'.
L_NAME = GET_TOKEN_REL( 2 ).
concatenate L_CLASS '=>' L_NAME into L_NAME.
CHECK( P_PROC_TYPE = 'METH' P_PROC_NAME = L_NAME ).
when 'MODULE'.
L_NAME = GET_TOKEN_REL( 2 ).
if GET_TOKEN_REL( 3 ) = 'OUTPUT'.
CHECK( P_PROC_TYPE = 'MODO' P_PROC_NAME = L_NAME ).
else.
CHECK( P_PROC_TYPE = 'MODI' P_PROC_NAME = L_NAME ).
endif.
when 'CLASS'.
L_CLASS = GET_TOKEN_REL( 2 ).
when 'INITIALIZATION'.
CHECK( P_PROC_TYPE = 'INIT' P_PROC_NAME = '%' ).
when 'GET'.
L_NAME = GET_TOKEN_REL( 2 ).
if GET_TOKEN_REL( 3 ) = 'LATE'.
CHECK( P_PROC_TYPE = 'GETL' P_PROC_NAME = L_NAME ).
else.
CHECK( P_PROC_TYPE = 'GET' P_PROC_NAME = L_NAME ).
endif.
when 'AT'.
L_NAME = GET_TOKEN_REL( 2 ).
if strlen( L_NAME ) > 2 and L_NAME(2) = 'PF'.
L_NAME = L_NAME+2.
CHECK( P_PROC_TYPE = 'ATPF' P_PROC_NAME = L_NAME ).
else.
case L_NAME.
when 'USER-COMMAND'.
CHECK( P_PROC_TYPE = 'ATUC' P_PROC_NAME = '%' ).
when 'LINE-SELECTION'.
CHECK( P_PROC_TYPE = 'LISE' P_PROC_NAME = '%' ).
when 'SELECTION-SCREEN'.
L_NAME = GET_TOKEN_REL( 3 ).
if L_NAME is initial.
CHECK( P_PROC_TYPE = 'ATSS' P_PROC_NAME = '%' ).
else.
CHECK( P_PROC_TYPE = 'ATSS' P_PROC_NAME = L_NAME ).
endif.
endcase.
endif.
when 'TOP-OF-PAGE'.
if GET_TOKEN_REL( 2 ) = 'DURING'.
CHECK( P_PROC_TYPE = 'TOPS' P_PROC_NAME = '%' ).
else.
CHECK( P_PROC_TYPE = 'TOPA' P_PROC_NAME = '%' ).
endif.
when 'END-OF-PAGE'.
CHECK( P_PROC_TYPE = 'ENPA' P_PROC_NAME = '%' ).
when 'LOAD-OF-PROGRAM'.
CHECK( P_PROC_TYPE = 'LDPR' P_PROC_NAME = '%' ).
endcase.
enddo.
catch CX_EXCEPTION into L_EXCP.
raise event MESSAGE exporting
P_SUB_OBJ_TYPE = C_TYPE_INCLUDE
P_SUB_OBJ_NAME = L_EXCP->INCLUDE
P_LINE = L_EXCP->LINE
P_COLUMN = L_EXCP->COLUMN
P_KIND = C_WARNING
P_TEST = C_MY_NAME
P_CODE = 'SYNTAX'.
endtry.
endmethod.
method CHECK .
data:
L_INCLUDE type PROGRAM,
L_LINE type I,
L_COLUMN type TOKEN_COL,
L_COMPLEXITY type I value 1,
L_STMNTS type I,
L_VERSIONS type I,
L_COMPLEXITY_C type SYCHAR10,
L_STMNTS_C type SYCHAR10,
L_VERSIONS_C type SYCHAR10,
L_NESTED_C type SYCHAR10,
L_PARAM_1 type STRING,
L_TOKEN type STRING,
L_PROC_VERSION like line of PROC_VERSIONS,
L_NESTED type I,
L_MAX_NESTED type I.
L_INCLUDE = GET_INCLUDE( ).
L_LINE = TOKEN_WA-ROW.
L_COLUMN = TOKEN_WA-COL.
do.
read table REF_SCAN->STATEMENTS index STATEMENT_INDEX into STATEMENT_WA.
if SY-SUBRC <> 0.
exit.
endif.
add 1 to STATEMENT_INDEX.
check STATEMENT_WA-FROM <= STATEMENT_WA-TO.
check STATEMENT_WA-TYPE na 'PS'.
*-- avoid native SQL
* check STATEMENT_WA-TYPE na 'EMDR'.
case KEYWORD( ).
when 'IF' or 'WHILE' or 'LOOP' or 'DO' or 'PROVIDE'.
if TOKEN_WA-ROW <> 0.
add 1 to L_COMPLEXITY.
add 1 to L_NESTED.
if L_NESTED > L_MAX_NESTED.
L_MAX_NESTED = L_NESTED.
endif.
endif.
when 'ELSEIF'.
if TOKEN_WA-ROW <> 0.
add 1 to L_COMPLEXITY.
endif.
when 'ENDIF' or 'ENDWHILE' or 'ENDLOOP' or 'ENDDO' or 'ENDTRY'.
subtract 1 from L_NESTED.
when 'TRY'.
add 1 to L_NESTED.
if L_NESTED > L_MAX_NESTED.
L_MAX_NESTED = L_NESTED.
endif.
when 'SELECT'.
when 'ENDSELECT'.
if TOKEN_WA-ROW <> 0.
add 1 to L_COMPLEXITY.
add 1 to L_NESTED.
if L_NESTED > L_MAX_NESTED.
L_MAX_NESTED = L_NESTED.
endif.
subtract 1 from L_NESTED.
endif.
when 'CHECK'.
if TOKEN_WA-ROW <> 0.
add 1 to L_COMPLEXITY.
endif.
when 'CASE'.
if PA_WITH_CASE = 'X'.
add 1 to L_COMPLEXITY.
endif.
add 1 to L_NESTED.
if L_NESTED > L_MAX_NESTED.
L_MAX_NESTED = L_NESTED.
endif.
when 'ENDCASE'.
subtract 1 from L_NESTED.
when 'WHEN'.
if PA_WITH_CASE <> 'X' and TOKEN_WA-ROW <> 0.
if GET_TOKEN_REL( 2 ) <> 'OTHERS'.
add 1 to L_COMPLEXITY.
endif.
endif.
when 'ENDFORM' or 'ENDFUNCTION' or 'ENDMETHOD' or 'ENDMODULE'.
exit.
when 'FORM'
or 'FUNCTION'
or 'MODULE'
or 'START-OF-SELECTION'
or 'END-OF-SELECTION'
or 'TOP-OF-PAGE'
or 'END-OF-PAGE'
or 'LOAD-OF-PROGRAM'
or 'INITIALIZATION'
or 'CLASS'.
subtract 1 from STATEMENT_INDEX.
exit.
when 'GET'.
if GET_TOKEN_REL( 2 ) <> 'TIME'.
case GET_TOKEN_REL( 3 ).
when 'LATE' or 'FIELDS' or ''.
subtract 1 from STATEMENT_INDEX.
exit.
endcase.
endif.
when 'AT'.
L_TOKEN = GET_TOKEN_REL( 2 ).
if strlen( L_TOKEN ) > 2 and L_TOKEN(2) = 'PF'.
subtract 1 from STATEMENT_INDEX.
exit.
else.
case L_TOKEN.
when 'USER-COMMAND'.
subtract 1 from STATEMENT_INDEX.
exit.
when 'LINE-SELECTION'.
subtract 1 from STATEMENT_INDEX.
exit.
when 'SELECTION-SCREEN'.
subtract 1 from STATEMENT_INDEX.
exit.
endcase.
endif.
add 1 to L_NESTED.
if L_NESTED > L_MAX_NESTED.
L_MAX_NESTED = L_NESTED.
endif.
add 1 to L_COMPLEXITY.
when 'ENDAT'.
subtract 1 from L_NESTED.
endcase.
if PA_VERSION = 'X'.
loop at REF_SCAN->TOKENS from STATEMENT_WA-FROM to STATEMENT_WA-TO into TOKEN_WA.
check TOKEN_WA-ROW <> 0.
CL_CI_PROVIDE_CHECKSUM=>GEN_CHKSUM_FROM_STRING( exporting P_PARAM = TOKEN_WA-STR
changing P_CRC_VALUE = L_PROC_VERSION-CRC ).
endloop.
endif.
add 1 to L_STMNTS.
enddo.
L_PROC_VERSION-PROC_TYPE = P_PROC_TYPE.
L_PROC_VERSION-PROC_NAME = P_PROC_NAME.
collect L_PROC_VERSION into PROC_VERSIONS.
loop at PROC_VERSIONS transporting no fields where PROC_TYPE = P_PROC_TYPE and PROC_NAME = P_PROC_NAME.
add 1 to L_VERSIONS.
endloop.
L_COMPLEXITY_C = L_COMPLEXITY.
L_NESTED_C = L_MAX_NESTED.
L_STMNTS_C = L_STMNTS.
L_VERSIONS_C = L_VERSIONS.
concatenate P_PROC_TYPE P_PROC_NAME L_STMNTS_C L_COMPLEXITY_C L_NESTED_C L_VERSIONS_C into L_PARAM_1 separated by ' '.
condense L_PARAM_1.
raise event MESSAGE exporting
P_SUB_OBJ_TYPE = C_TYPE_INCLUDE
P_SUB_OBJ_NAME = L_INCLUDE
P_LINE = L_LINE
P_COLUMN = L_COLUMN
P_KIND = C_NOTE
P_TEST = C_MY_NAME
P_CODE = C_CODE_SUMMARY
P_PARAM_1 = L_PARAM_1.
if L_COMPLEXITY >= PA_COMPLEXITY.
raise event MESSAGE exporting
P_SUB_OBJ_TYPE = C_TYPE_INCLUDE
P_SUB_OBJ_NAME = L_INCLUDE
P_LINE = L_LINE
P_COLUMN = L_COLUMN
P_KIND = C_WARNING
P_TEST = C_MY_NAME
P_CODE = C_CODE_COMPLEXITY
P_PARAM_1 = L_COMPLEXITY_C.
endif.
if L_STMNTS >= PA_STMNTS.
raise event MESSAGE exporting
P_SUB_OBJ_TYPE = C_TYPE_INCLUDE
P_SUB_OBJ_NAME = L_INCLUDE
P_LINE = L_LINE
P_COLUMN = L_COLUMN
P_KIND = C_WARNING
P_TEST = C_MY_NAME
P_CODE = C_CODE_STMNTS
P_PARAM_1 = L_STMNTS_C.
endif.
if L_NESTED >= PA_NESTED.
raise event MESSAGE exporting
P_SUB_OBJ_TYPE = C_TYPE_INCLUDE
P_SUB_OBJ_NAME = L_INCLUDE
P_LINE = L_LINE
P_COLUMN = L_COLUMN
P_KIND = C_WARNING
P_TEST = C_MY_NAME
P_CODE = C_CODE_NESTED
P_PARAM_1 = L_NESTED_C.
endif.
if L_VERSIONS >= PA_VERSIONS.
raise event MESSAGE exporting
P_SUB_OBJ_TYPE = C_TYPE_INCLUDE
P_SUB_OBJ_NAME = L_INCLUDE
P_LINE = L_LINE
P_COLUMN = L_COLUMN
P_KIND = C_WARNING
P_TEST = C_MY_NAME
P_CODE = C_CODE_VERSIONS
P_PARAM_1 = L_VERSIONS_C.
endif.
endmethod. -
Hi All,
I am trying to do the check to my program i.e CODE INSPECTOR. i am seeing the following warning messages below.
1 warning message
Program zraj0xxx include zraj0xxx row 000083 Column0000
%LINR-VBUP contains a hyphen
(The Hyphen is used as a dereferencing operator! )
Note: when i double click on the above message its taking me to the below code of my program.
DATA %COUNT-VBUP(4) TYPE X.
DATA %LINR-VBUP(2).
TABLES VBPA.
DATA %COUNT-VBPA(4) TYPE X.
DATA %LINR-VBPA(2).
2 warning message
Program zraj0xxx include zraj0xxx row 000079 Column0000
Field string VLPMA is not referenced statically in the program
Note: when i double click on the above message its taking me to the below code of my program.
SELECTION-SCREEN: BEGIN OF BLOCK PROG
WITH FRAME TITLE TEXT-F58.
TABLES: VLPMA,
VLKPA.
TABLES VBUP.
3 warning message
Program zraj0xxx include zraj0xxx row 000001 Column0000
TEXT- GOH from the text pool is not used.
Note: when i double click on the above message its taking me to the below code of my program.
REPORT ZHYD0147 LINE-SIZE 255 NO STANDARD PAGE HEADING
MESSAGE-ID ZB
LINE-COUNT 065(001).
Thanks in advance.
Rajesh.Hi Rajesh,
First warning message.
DATA %COUNT-VBUP(4) TYPE X.
DATA %LINR-VBUP(2).
TABLES VBPA.
DATA %COUNT-VBPA(4) TYPE X.
DATA %LINR-VBPA(2).
Here you are not supposed to use hyphen but instead use '_'.
Second warning message
Program zraj0xxx include zraj0xxx row 000079 Column0000
Field string VLPMA is not referenced statically in the program
That means you are not using this VLPMA any where in your program so bettr delete fromt he Top Include.
Note: when i double click on the above message its taking me to the below code of my program.
Third warning message
Program zraj0xxx include zraj0xxx row 000001 Column0000
TEXT- GOH from the text pool is not used.
this also means that you are not using this Text elemnt anywhere of your program.So delete this one also.
Thanks
Rohini. -
Customizing the code inspector with check for two executable statements in same line
Hi Everyone,
I have a reuirement to customize the code inspector.I need to create a check 'Two executable statements should not be in the same line'.
While doing so i am facing one problem as in internal table it is capturing the report as word by word with same row number nd different line number.
If anyone have worked on this before then help me out.
I am using CL_CI_TEST_SCAN as superclass and making the changes in the run method.
Regards,
KhushbooIn the source code you will have this in comment right, use the "#EC ENHOK.
-
Select query gives error in Code inspector and extended program check
Hi,
I have a query .
SELECT pernr
FROM pa9100
INTO TABLE t_nca_tab
WHERE endda EQ c_date AND
z_nca_required EQ c_yes.
This query gives me an error in Code inspector like :
Large table pa0001: No first field of table index in WHERE condition
I have one more query that gives error in extended program check
SELECT SINGLE stell ename
INTO (g_stell, g_name)
FROM pa0001
WHERE pernr EQ wa_nca_tab-pernr AND
endda EQ c_date.
The warning says:
*In "SELECT SINGLE ...", the WHERE condition for the key field "SEQNR" does not
test for equality. Therefore, the single record in question may not be unique.*
Its too urgent.
Please reply.
Regards,
Binay.The first field is PERNR .. so if UR not giving pernr it will fetch
all the data from the said table and between the given dates ..
Check if this is your requirement ...
write the select as ...
where r_pernr is a range ...
SELECT pernr
FROM pa9100
INTO TABLE t_nca_tab
WHERE pernr in r_pernr <----
endda EQ c_date AND
z_nca_required EQ c_yes.
As UR using select single it's expecting to use all the key
fields in the where condition ...
U can ignore this warning message -
Execute ABAP Code Inspector from Outside of SAP
Hi all...
For reporting purpose, I would like to use ABAP Code Inspector (transaction SCI) for generating output as a file, it should call from outside of SAP through RFC function module and generate the list (output) as flat file (or XML), does anyone have been done with similar work like this? I wonder if you could share your experience with me...
thanks in advance,
yayan irianto.I managed to set up the variant, however found a problem.
I used "Search ABAP Statement Patterns" under "Search Functs" and set the pattern like followings.
SELECT + INTO *
SELECT SINGLE + INTO *
However following statements were detected.
SELECT * INTO TABLE IT_DRAW FROM DRAW.
SELECT MANDT INTO TABLE IT_DRAW FROM DRAW.
SELECT SINGLE * INTO TABLE IT_DRAW FROM DRAW.
SELECT SINGLE MANDT INTO TABLE IT_DRAW FROM DRAW.
It's because + means one ABAP token in the code inspector.
Is there anyway to find only "SELECT SINGLE *" and "SELECT *" ? -
Hi Abapers,
I have done recording for Tcode:pa30 in my report and used call transaction method. because of this i'm getting one error in when i check code inspector.
error message:
CA CL_CI_TEST_CRITICAL_STATEMENTS0002
Critical Statements
Call of Transaction &1
&1 = Name of Transaction
For CALL TRANSACTION there must already be a suitable transaction authorization with the calling transaction.
Kindly help me out to fix this error.
Thanks in advance.Hi
Goto SE24
enter this class CL_CI_TEST_CRITICAL_STATEMENTS
and see its documentation.
It shows the all critical errors that are there in code.
Regards
Anji -
How to exclude the standard Include programs in Code Inspector?
I am running code inspector (SCi) on all the development objects using a package. But in certain repository objects standard include programs have been used. I want to exclude the standard include programs while running SCI on the package. What are the ways to achieve this?
Hi,
while defining an object set choose:(in the menu)
Edit - Exclude View Maintenance Function Groups.
This should exclude most or at least some of the includes from being checked.
Kind regards,
Hermann -
Hi All,
I am doing Code Inspector Check for my Program.
Doing this, I am getting an Error Message Indicating to use TYPE TABLE OF instead of OCCURS 0 statement while declaring Internal Tables.
Question is, Is there any difference between TYPE TABLE OF and OCCURS 0 (Performance wise) ?
Helpful answers will be rewarder by points.
Thanks & Regards
Swatantra PathakHI,
Yes.
OCCURS 0 is obsolete now.
When we define internal table with OCCURS 0 it will allocate a default memory of 8KB. In TYPE TABLE/STANDARD TABLE OF it is dynamic i.e as and when we get a record memory will be allocated.
eg: If ur itab is with OCCURS 0 and u have data of size 2kb then 6KB memory is wasted i.e allocated and not used.
eg2: If ur itab is with OCCURS 0 , Each record accupies 1 KB. Then after filling 8 records and at the time of getting 9 th records another 8KB is allocated. If u have 9 records in ur table then 7KB is wasted.
If u r getting allocated with some memory(Resource) and not using means performancewise it is bad.
Hope above examples are clear.
Thanks,
Vinod. -
Differences between SLIN and Code Inspector
Hi,
Can anyone tell me the differences between SLIN and Code Inspector(SCI)..?
and in which cases we use SLIN and SCI..?
and as an ABAPer, which one should we prefer..?
Thanks,
Pradeep.Hi
Extended syntax check or SLIN is used to check the program in all aspects for the different syntaxes like
When you use select single whether you have passed all the key fields or not>
whether you have maintained the text elements texts or not,
Have you used UNIT...CURRENCY along with the QTY and AMOUNT fields when displayed using the WRITE statement
and check for all the varities of statements used in the code, and if there is some problem with that statement/command, it will display as error or warning.
Check following links -
slin
can any one tell me abt SLIN T-CODE
Reward points if useful
Regards
Anji -
Hello,
I am trying to use the Code Inspector and I would like to check only specific Includes from a Function Group.
In my Object Set I specified the Function Group I wanted to scan (Tab Classes, Function Groups, etc.) and I specified the Include I wanted to specially verify in the Program Tab.
It takes a lot of time to run and I get a runtime error. I have about 10 Includes to check so it should not take that long.
Is there a way to combine 2 different selections in the standard selection fields without considering modifying the source code?
I've checked the Code Inspector documentation but did not really find something that could help me solve my problem.
Does anyone have a solution?
Thanks in advance.
SylvainHi guys,
Thanks for the answers but it's not solving my problem.
Here is an example of the situation I am going through:
The SAP standard program SAPLYDEVCM contains a lot of standard Includes and some new Customer specific Includes that were added during the project.
I want to scan only the Customer Includes Y* and Z*. When I enter the specific Include names the Code Inspector scan all Includes of the main program SAPLYDEVCM and that is not what I want.
Is it possible to scan only the Customer Specific Includes?
I hope my example was clear enough.
Thanks for the help.
Regards,
Sylvain -
Code Inspector Showing Error!!!
Hi All,
How to correct the following error raised by Code Inspector Check!!!!
ProgramZFTSRPRECC Include ZFTSRPRECC Row 1 Column 0
The namespace of the programZFTSRPRECC has the setting "C" and cannot be
tested
A possible cause for this is that an SAP program is being checked in a customer
system
Note, the following rule applies after a change in the sourcecode:
For testing the namespace settingis ignored for one week.
regards,
naveen.....Check the attributes of the program, whether u may be selected "C" in Application option, if yes change to something else and test.
Pls get back with the result. -
How to remove Unicode errors from extended check and code inspector
Hi
We are working on making all our ABAP program to make unicode compliant. We are activating unicode flag in attribute and correcting syntax errors. After this when we do the extended checks or SLIN or code inspector, usually giving error for many statements such as whenever there is message.
<b>Code is :</b>message a208 with text-004.
<b>Error description is</b> :
The message 208 for id zz has no long text.
You can hide this message using "#EC *
208 is - & does not exist in & &. And text 004 is - Cannot open the output file
By using #EC * we can remove errors. But Is this the correct way and what does this indicate? Please explain.Hi Yogesh,
Can you check whether the message number 208 in message id ZZ has the Self Explanatory checkbox as checked or not? I think it is not checked and u have also not maintained any long text. Hence the error.
By using #EC - you do not remove the error, however u hide it from SLIN.
It is used if there is some known error you cannot avoid which is returned by SLIN and you dont want it to be reported. Also, a way to "cheat" the reviewer who might be checking for errors.
Not good !!
Regards,
Aditya
Maybe you are looking for
-
KPSI (RKNMABTC) on company code level
Hello, I would like to ask, if somebody of you have already tried following: We would like to run the KPSI (Plan reconciliation / target = actual-IAA) on company code level. It is possible e.g. if create an appropriate cost center group. The problem
-
Cant download Mountain Lion, I get an error every time
I have a 2012 mac book pro 13 inch model and I cant get mountain lion to download, It keeps coming up with an error. What am i not doing right, its a brand new computer and I shouldnt be having this trouble. the operating system is 10.7.4 currently.
-
Could this be another bug in iOS 7
I don't know if anyone has come across this yet, but when launching an app, for example Facebook. As it launches, drag your finger across the screen. The background goes black and all app icons flash with a cross in the corner. Interesting one. Is th
-
How to calculate age for a business partner for segmentation purposes?
How do I calculate the age of a BP based on this person's maintained birthday on BP master data? I need to use this information to segment based on age groups, eg age 30-40, age 25 and below etc. I did quite a bit of search on this forum but couldn'
-
Annual Budget by Month table no longer working.
I am using a "budget" spreadsheet created using a template from an older version of Numbers, and now using newest version of Numbers on Mac and iOS devices. It worked fine for years until a few weeks ago, when the "Annual Budget by Month" stopped im