How to rectify Extended Syntax check warning , when object REF TO is used..
hi all,
when running "Extended program check " for the below , I am getting warning error when I delcare the below stmts.
DATA: go_alv TYPE REF TO cl_salv_table.
lo_selections TYPE REF TO cl_salv_selections,
lo_display_settings
TYPE REF TO cl_salv_display_settings,
lo_events TYPE REF TO cl_salv_events_table,
lo_content_top TYPE REF TO cl_salv_form_element,
THE MESSAGE ARE
Field GO_ALV is not referenced statically in the program
(The message can be hidden with "#EC *)
Program: ZJTEST Row: 69
Field LO_EVENTS is not referenced statically in the program
(The message can be hidden with "#EC *)
Program: ZJTEST Row: 74
Field LO_DISPLAY_SETTINGS is not referenced statically in the program
(The message can be hidden with "#EC *)
Program: ZJTEST Row: 76
Field LO_SELECTIONS is not referenced statically in the program
(The message can be hidden with "#EC *)
is there any way I can avoid this warning message apart using #EC ??? is there any way to avoid this ??/
kindly help
thanks
In Program
a)
DATA: lo_top_element TYPE REF TO cl_salv_form_layout_grid,
lo_grid TYPE REF TO cl_salv_form_layout_grid,
lo_header TYPE REF TO cl_salv_form_header_info,
lo_label TYPE REF TO cl_salv_form_label,
lo_text TYPE REF TO cl_salv_form_text,
lo_logo TYPE REF TO cl_salv_form_layout_logo,
lv_logo TYPE bds_typeid,
lv_title_h TYPE sytitle.
TYPES: ty_logo(70) TYPE c.
CONSTANTS:
lc_alv_logo TYPE ty_logo VALUE 'CE_NEW_LOGO'.
CREATE OBJECT lo_top_element
EXPORTING
columns = 3.
lo_grid = lo_top_element->create_grid( row = 3
column = 1 ).
CONCATENATE 'Header ' 'Information' INTO
lv_title_h SEPARATED BY space.
Row 1 header information is set
lo_header = lo_grid->create_header_information(
row = 1
column = 1
text = lv_title_h
tooltip = lv_title_h ).
lo_grid->add_row( ).
Row 2 Doc. date is set
lo_label = lo_grid->create_label(
row = 2
column = 1
text = text-b02
tooltip = text-b02 ).
lo_text = lo_grid->create_text(
row = 2
column = 2
text = s_docket-low
tooltip = s_docket-low ).
lo_text = lo_grid->create_text(
row = 2
column = 3
text = s_docket-high
tooltip = s_docket-high ).
lo_grid->add_row( ).
CREATE OBJECT lo_logo.
lo_logo->set_left_content( lo_grid ).
lv_logo = lc_alv_logo.
lo_logo->set_right_logo( lv_logo ).
pt_content_top = lo_logo.
Extended program check :
No read access to field LO_HEADER
(The message can be hidden with "#EC NEEDED)
No read access to field LO_LABEL
(The message can be hidden with "#EC NEEDED)
No read access to field LO_TEXT
(The message can be hidden with "#EC NEEDED)
Kindly giude
Similar Messages
-
Warning in query in Extended Syntax Check
Hi all,
I perform Extended Syntax Check.
It generates following warning for the query: -
In "SELECT SINGLE....", the WHERE condition for the key field "MATNR" does not test for equality. Therefore the single record in question may not be unique.
(You can hide the message using "#EC *)
Please tell me what does it mean. How can I suppress this warning?
Regards,
Saurabh A. BukshHi,
whenu r using select single use a variable or a workarea don't use tables.
select single matnr from mara into v_matnr
where matnr in s_matnr.
also as it is warning message u can neglectit .
when u r using select single u should give entire key information also.
Regards,
Nagaraj
Message was edited by: nagaraj kumar nishtala -
Extended Program Check Warning For Syntax Check
Warning:
Syntax Check Warning
This Warning only Displayed in SLIN
WHERE lgtyp IN S_LGTYP.
Messages :
In "SELECT SINGLE...", the where condition for the key field "LGTYP" does not test for equality .
There fore the single record yuor searching may not be unique.
IF NOT S_LGTYP[] IS INITIAL.
SELECT SINGLE * FROM T301
WHERE lgtyp IN S_LGTYP.----
>IT SHOWING THIS LINE
IF SY-SUBRC NE 0.
MESSAGE E005(Z01).
ENDIF.
ENDIF.Hi Raghu,
When you are using SELECT SINGLE, it is always better to use EQ in the condition than IN.
Instead of using select-options S_LGTYP, declare a parameter: P_LGTYP and if possible re-write the select query as below:
SELECT SINGLE * FROM T301 into lv_variable
WHERE lgtyp EQ P_LGTYP .
Regards
Deepa. -
Doubt in Extended Syntax check
Hi all ,
I am facing a problem when i do a Extended Syntax check for a program . The message i am getting is as follows :
Messages for CALL FUNCTION interfaces(Todo Prio3)
Program: SAPLZC_BWSPI Include: LZC_BWSPIF01 Row: 496 [Prio 3]
No EXCEPTION to set SY_SUBRC Declared for CALL FUNCTION 'FIRST_DAY_IN_TP_GET'
Thus the value of SY-SUBRC is always 0
(The message can be hidden with "#EC *)
can anyone suggest me how to correct it .
thanks,
kumaranSUPPOSE IF YOU HAVE YOUR CODE AS :
CALL FUNCTION XYZ
IMPORTING -
EXPORTING----
JUST WRITE
CALL FUNCTION XYZ "#EC *
IMPORTING -
EXPORTING----
IF SY-SUBRC <> 0.
ENDIF.
THATS ENOUGH.
OR ELSE TRY.
CALL FUNCTION XYZ
IMPORTING -
EXPORTING----
IF SY-SUBRC <> 0. "#EC *
ENDIF. -
Syntax check warning message related to exception
Hello When I do extended check to a Z include inside another Include SAPMV45A...
Messages for Syntax check warnings(Error)
Program: SAPMV45A Include: ZV841INC Row: 122 [Prio 1]
Syntax check warning
The exception CX_AI_SYSTEM_FAULT is neither caught nor is it declared in the
RAISING clause of "USEREXIT_SAVE_DOCUMENT_PREPARE".
Internal Message Code: MESSAGE G-Q
(The message cannot be hidden using pseudo-comment "#EC .., bzw. durch SET
EXTENDED CHECK OFF/ON)
<B>The Piece of code is </b>
CATCH cx_ai_system_fault .
DATA fault TYPE REF TO cx_ai_system_fault .
CREATE OBJECT fault.
WRITE :/ fault->errortext.
ENDTRY.
Could you please suggest any solutionYour code looks wrong. You don't use CREATE with an exception class inside the CATCH. It should look something like this:
DATA fault TYPE REF TO cx_ai_system_fault .
TRY...
CATCH cx_ai_system_fault INTO fault.
WRITE :/ fault->errortext.
ENDTRY.
matt -
Extended Syntax Check in abap code
Hi Guys,
We are upgrading from 4.6 C to ECC 6.0. When I do the Extended Syntax check for the custom function module it gives me the following error. Please help.
The EXCEPTION "REPORT_NOT_EXISTENT" is not defined in the interface of the function module "RS_VARIANT_CONTENTS" "RS_VARIANT_CONTENTS". Internal Message Code: MESSAGE G-7.
(The message can be hidden with "#EC ARGCHECKED)
Regards,
Shankar<b>Don't suppress the message. </b> You should only suppress messages if you are aware of why they are appearing, and they are not an error.
What it means is, that in your custom function module, there is some code like
CALL FUNCTION 'RS_VARIANT_CONTENTS'
EXPORTING
report = v_report
variant = v_variant
EXCEPTIONS
VARIANT_NON_EXISTENT = 1
VARIANT_OBSOLETE = 2
REPORT_NOT_EXISTENT = 3
OTHERS = 4
But if you look at FM rs_variant_contents, you'll see this exception is not defined. The correct course of action is to remove it from your call.
matt -
Error in extended syntax check
HI all,
I have declared some constants like this.
constants: c_str1(20) value 'abcdefg,,,,,',
c_str2(4) value 'xyz',
c_str(30).
concatenate c_str1 c_str2 into c_str.
I am getting an error for c_str1 in extended syntax check that 'charetecter strings without text elements will not be translated'.
I am not writing c_str1 anywhere and I just need it for concatenation.
When I tried like this
constants: c_str1(20) value 'abcdefg,,,,,,,'(000).
It is showing a sysntax error that offset is not allowed.
Please provide me the answer.
Regards,
Mungala.hi Praveena,
do this way
concatenate text-001 text-002 into c_str.
double click on text-001 and text-002 and create text elements with abcdefg,,,,,' and 'xyz' values. In 4.6 and above versions .. you got to save and activate ...else just save to remove that error .
REgards,
Santosh -
Regardding Extended syntax check of one program from another program
Hi,
I have one issue related to Extended syntax check.
I am working on one report [<b>REPORT2</b>] from that i am doing extended syntax check of another Report [<b>REPORT1</b>] which is already developed.
For that i have use <b>F.M</b> <b>EXTENDED_PROGRAM_CHECK</b> it returns no of errors of <b>REPORT1</b> now my issue over here is i want to output all the errors of <b>REPORT1</b> into REPORT2 output with <b>Line No & Error Message</b>.
How can i solve this issue!
Thanks in advance.
Thanks,
Deep.Hi ,
You can use the FM <b>EXTENDED_PROGRAM_CHECK_SHOW</b> , to get the details of the check.
Regards
Arun -
Regarding Extended Syntax Check
hi,
during extended syntax check the given program is read and obsolete statements is displayed.
from where it compares for obsolete statement.
is there any table? if not then how it compares for obsolete statement.
Thanks.Hi
Check the table RODIR...here you can give the object type and its name...and there is a field which indicates if it is Obsolete or not. If it is checked, then it is Obsolete..otherwise not.
Vishwa. -
In ECC 6.0, I have two errors in my extended syntax check
1). Char. strings w/o text elements will not be translated:
'Store%'
(The message can be hidden with "#EC NOTEXT)
with below coding
SELECT kunnr name2 j_3astcu
FROM kna1
INTO TABLE gt_kna1
FOR ALL ENTRIES IN gt_soldto1
WHERE ( name2 LIKE 'STORE%'
OR name2 LIKE 'Store%'
OR name2 LIKE 'store%'
OR name2 LIKE 'DC%'
AND land1 = 'US' )
OR ( j_3astcu = gt_soldto1-store_no
AND land1 = 'US' ).
2).
SELECT-OPTIONS : s_mail1 FOR somlreci1-receiver NO INTERVALS.
The current ABAP command is obsolete
With "LOOP AT itab", one of the additions "INTO", "ASSIGNING", or "TRANSPORTING NO
FIELDS" is required in the 00 context
Internal Message Code: LOOP 012
(The message cannot be hidden using pseudo-comment "#EC .., bzw. durch SET
EXTENDED CHECK OFF/ON)
LOOP AT s_mail1.
*-----If email id entered on the selection screen doesnot contain
'@' and '.', then give relevent message to user as popup.*
IF s_mail1-low NA gc_at OR s_mail1-low NA gc_dot.
MESSAGE e038(zs) WITH text-m08 text-m09 text-m13.
ENDIF.
ENDLOOP.
Please suggest me howcan I avoid string Store% as well as select-option.In my opinion, the answers given to your first question so far, are wrong. When there is a specific reason for using a text string in a select, then it should remain precisely as that. So you should use "#EC NOTEXT. It is wrong to put them in a text element, as they will never be translated.
The extended syntax check doesn't exist so that you can remove the cause, it is so that you can address it. Many violations of the extended syntax checker have a valid reason. That's why you get the "#EC exceptions. But if you use them, then make sure you can justify it.
matt -
Hi All,
I hav a small query . i m working in upgrade and in slin syntax check warning i m getting warning
i hav a statement like ULINE AT 0(120).
Its giving a warning " Syntax check warning
The static output position "0" must be positive."
Can anyone plzz guide me regarding this,
thanking u all.
regards,
sahaklaHi..,
in list output..
the list output length will be counted in terms of characters.. the default list length is 132 characters..
maximum no.of characters is 1023..
the count starts from 1.
thats it !!
there is nothing much abt it.
plz do remember to close the thread when ur problem is solved !! reward all helpful answers !!
regards,
sai ramesh -
How to resolve Extended Systax check Error..
Hi All,
In Syntax check i am not getting any errors,If i have check Extended Syntax check I have got 2 error in SLIN ( Extended Syntax Check) Like
ERRORS :
#Messages for MESSAGE(Error)
Program: ZMXXR600A Row: 416
No. of WITH fields of MESSAGE 021 for ID Z1: 1
No. of placeholders in this message: 0
Message: Non Statistical posting not allowed for Account 52979100
No long text exists for this message
(The message can be hidden with "#EC *)
Program: ZMXXR600A Row: 418
No. of WITH fields of MESSAGE 022 for ID Z1: 1
No. of placeholders in this message: 0
Message: Please use the same IO to credit and debit
No long text exists for this message
(The message can be hidden with "#EC *)
The Code i write for this Eroors
CASE SY-SUBRC.
WHEN 0.
MESSAGE S021 WITH P_FILE. line :416
WHEN 1.
MESSAGE W022 WITH P_FILE. line :418
WHEN OTHERS.
ENDCASE.
P_FILE is declraed as;
PARAMETERS: P_FILE LIKE RLGRAP-FILENAME DEFAULT C_FILE.
Can you give some inputs to resolve the Errors ASAP.
Thanks,
SridharMESSAGE S021 WITH P_FILE. line :416
WHEN 1.
MESSAGE W022 WITH P_FILE. line :418
in both messages & needed
check 021 and 022 in both messages there is no <b>&</b> where you can place your actual value.
for Ex: message 021
Ex 1) hi print
Ex 2) hi print <b>&</b>
so now you can call this with
1)MESSAGE S021 .
2)MESSAGE S021 WITH P_FILE.
as you not maintain & it is giving error for extended check so mention & where you want to print p_file
or just call message with out passing P_file.
Rewards if useful..........
Minal Nampalliwar
null -
SLIN - Syntax check warning error
Hi, guys. I got SLIN syntax check warning error:
Program: ZBT_RT_POS Include: ZBT_RT_POSTOP Row: 172 [Prio 1]
Syntax check warning
The Unicode flag is not set for class "ZBRT_POS". This is not possible with
globally activated Unicode checks. .
Internal Message Code: MESSAGE G{4
(The message cannot be hidden using pseudo-comment "#EC .., bzw. durch SET
EXTENDED CHECK OFF/ON)
Can u help me resolve this?
Thanks,
NihadHi,
Goto to your program...' ZBT_RT_POS ' not the class... its attributes .. and check the unicode Checks active ....
Some more knowledge on unicodes:
Unicode Checks Active.
1) Unicode is intended to imply "unique", "universal", and "uniform".
2) To Support multilingual property of the program.
3) From Release 6.10 ABAP support multibyte coding in unicode before that ABAP use only character that was based on single byte or double byte.
Check your version also... Maybe that is the reason you are not able you check it.. -
Error in Extended syntax check- Select Query
Hi all,
Iam getting this following error in Extended syntax check
" Large table PA0002: No field of a table index in WHERE
condition"
Code :SELECT SINGLE PERNR INTO (G_PERNR) FROM PA0002 WHERE ZZLEGACY_PAYROLL = I_FILETAB-PRNO
AND ZZLEGACY_PAYSYS = I_FILETAB-PRSYS
AND ZZLEGACY_PAYINS = I_FILETAB-PRINS.
can anyone help on this?Hi,
Change the code like this and check............
For this u need put INSIDE LOOP.
Select single PERNR into G_PERNR from PA0002 where PERNR = I_FILETAB-PRNO and .......... and ......
Check like this...
Thanks.
If this helps you reward with points.
Message was edited by: KDeepak
Message was edited by: KDeepak -
I have a program which has the extended syntax checks turned off and only turned on again after all the form pools, checks and update routines are performed. Is there any security implication from this extended check being off considering that it makes no sence to secure it with an authorization group?
Message was edited by: jbussche
AH! I see that I forgot to say "please". )
Does anyone have any infos on this other than the abap keyword documentation, please?
Message was edited by: jbusscheHello Julius,
I don't see any serious security implication with the extended syntax checks turned off. (But it might have implications to the quality of the program...)
You run the (extended) syntax checks during development.
There is one check which is related to security: The authorizations test checks whether the specified authorization object occurs in the table TOBJ and whether the authorization fields are correctly specified. -> This test checks the syntax of AUTHORITY-CHECK statements.
Authorization groups are not related to the extended syntax check: The system checks the authorization for the authorization object S_PROGRAM based on an authorization group assignment before starting a report.
Kind Regards
Frank Buchholz
Checking a Program
http://help.sap.com/saphelp_nw2004s/helpdata/en/d1/801af0454211d189710000e8322d00/frameset.htm
Maybe you are looking for
-
How to make use of customer reserve pricing types in copying control
Hi All Please inform how to make use of 'customer reserve' pricing types like 'X,Y,Z & 1-9' keys in copying control. Right now I'm on maintenance & supporting project for european client. They used pricing type 'Z' for copying condition records from
-
Cannot convert PDF to Word properly. Comes back scrambled.
I just bought today PDF to Word converter today. I tried all possiblities and the document always comes back scrambled. What do I do wrong?
-
Hi all I have one query can any one help to solve this. I received a post dated cheque from my customer .If i enter this as incomming payment then my customers liability ends.But I want to hold his liability till the cheque cleared.How to treat this
-
Hi! I generated web service client using clientgen tool. This client is searching for webservice listening on url specified in wsdl. Is there any chance to change the target endpoint address like setting some property so there would be no need to gen
-
Bat file for running scheduled jobs
Hi I am not entirely sure whether this is the correct forum to post this question, so apologies if I have posted this question in the wrong place. Anyhow, I would like to know how to create two automated bat file scripts that will execute a PL/SQL pa