Warning assigning 0 to BA... in ABAP syntax check on DELETE itab statement

Hello,
I didn't see an answer to that question in the forum/internet, nor in SAP notes, so I post it.
I have a 7.01 system, and this code:
TYPES : BEGIN OF ts_record,
          carrid    TYPE S_CARR_ID,
          employees TYPE p,
        END OF ts_record.
TYPES tt_record TYPE SORTED TABLE OF ts_record
      WITH UNIQUE KEY carrid.
DATA lt_record TYPE tt_record.
DELETE lt_record WHERE employees = 0.
The syntax check sends the following warning and places the cursor on the number "0" of the DELETE statement:
Assigning "0" to "BA" could result in data loss. It is therefore not
possible to optimize the LOOP. The components and values should have
identical types The types have identical types
Same thing if I make the internal table hashed or non-unique.
The warning is removed only if I replace 0 by a data object of same type as EMPLOYEES, or if I make the internal table standard.
Do you now why, I mean what is the intrinsec kernel algorithm that would make something slow? (and why a "data loss"?, what is "BA", is it a wrong translation or something else?)
Thank you
Sandra

Hi Gautham,
So, it would mean something like "hey do you know you could access the internal table by using = on the key fields and it will be optimized", like a kind of advertisement, but sent only in a few cases, I don't see why in other ones they are not sent... Hopefully we don't have this warning with READ TABLE. Maybe this warning is more useful in 7.02 with secondary index... ( BTW could somebody test if the warning is sent in 7.02 systems? )
In German, I get a better message I think, so "BA" is a bug:
Die Zuweisung von "0" nach "EMPLOYEES" ist potentiell nicht
verlustfrei. Es sind deshalb keine Optimierungen beim LOOP möglich.
Bitte eine identische Typisierung bei Komponenten und Werten benutzen.
which is google-translated:
The assignment of "0" after "EMPLOYEES" is potentially not
without loss. It is therefore not possible to use optimizations for LOOP.
Please identical components and typing in values.
which seems a better translation.
Hi Maximilian,
you're right, <= keeps the warning from being displayed, that's fun!
Well, I guess the warning is not very welcome, I hope that will be changed in the future!
Thanks for your valuable answers
Sandra
Edited by: Sandra Rossi 1 minute later
One more question: Is there a way to suppress this warning from the syntax check?

Similar Messages

  • Text Editor & ABAP Syntax Check

    Hi all,
    I've included a text editor box into my project to allow the user to key in ABAP codes. i got the codes of a sample program but i'm not sure how it works. can anyone kind enough to explain to me how to add buttons or assign functions to the buttons?
    secondly, because i allow free-text for the user to key in ABAP codes, is there a function to check the syntax of the codes entered by the user?
    i'll reward handsomely for any help rendered and it will be better if you could include sample codes as well(:
    thanks!!! (:
    SAMPLE CODE FOR TEXT EDITOR:
    IF CODE_EDITOR IS INITIAL.
        CREATE OBJECT CODE_EDITOR_CONTAINER
           EXPORTING
             CONTAINER_NAME = 'GEN_CODE'
           EXCEPTIONS
             CNTL_ERROR = 1
             CNTL_SYSTEM_ERROR = 2
             CREATE_ERROR = 3
             LIFETIME_ERROR = 4
             LIFETIME_DYNPRO_DYNPRO_LINK = 5.
        CREATE OBJECT CODE_EDITOR
          EXPORTING
            PARENT = CODE_EDITOR_CONTAINER
            WORDWRAP_MODE =
            CL_GUI_TEXTEDIT=>WORDWRAP_OFF
              CL_GUI_TEXTEDIT=>WORDWRAP_AT_FIXED_POSITION
            CL_GUI_TEXTEDIT=>WORDWRAP_AT_WINDOWBORDER
            WORDWRAP_POSITION = G_EDITOR_LENGTH
            WORDWRAP_TO_LINEBREAK_MODE = CL_GUI_TEXTEDIT=>TRUE.
    ENDIF.
    Edited by: Leslie Koh on Jan 18, 2008 4:28 AM

    Hi Leslie
    There is a abap key word which may help your purpose to do the syntax check. Please check the key work "SYNTAX-CHECK FOR itab " to be more in details,
    Basic form :
    SYNTAX-CHECK FOR itab ...MESSAGE f ...LINE g ...WORD h.
    Extras:
    1. ... PROGRAM f1
    2. ... INCLUDE f2
    3. ... OFFSET  f3
    4. ... TRACE-TABLE itab1
    5. ... DIRECTORY ENTRY f4
    6. ... REPLACING f5
    7. ... FRAME ENTRY f6
    8. ... MESSAGE-ID f7
    9. ... ID id TABLE itab2
    10.... SHORTDUMP-ID f8
    11.... FILTER f9
    This syntax will help you to check the syntax errors of ABAP program passed as internal table. You can get the entries keyed in by user in editor control through class method CL_GUI_TEXTEDIT->GET_TEXT_AS_R3TABLE in your PAI.
    Hope this helps !
    Kind Regards
    Ranganath

  • 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 Shaik

    Hi,
    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

  • Tool to do syntax check on DML/DDL

    Is there any tool in Toad or SQL Plus or any other IDE to do a syntax check on DDL/DML statements without executing them ?

    In my Toad Verson 7.6, there is a built in formatter namely -> Formatter Plus v4.8.0. This will format any given SQL Statement/ PL/SQL Code.
    Also if your statement is wrong syntactically, the formatter will throw an error.
    You just have to type the code and right click -> Formatting Tools -> Format Code. Alas your code gets formatted neatly!!
    Thanks,
    Jithendra

  • 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,
    Nihad

    Hi,
    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..

  • 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. Buksh

    Hi,
    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

  • Syntax check warning

    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,
    sahakla

    Hi..,
    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

  • 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 solution

    Your 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 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.

  • 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

  • ER: HTML Applet tag syntax warning - or HTML syntax checker for JDEV.

    Hi,
    I just spent ages (an hour or two) debugging an applet and it turned out that I had left a comma "," out of my 'archive=..' parameter of the 'applet' tag in the HTML :-(.
    E.g. I had <applet code="x" archive="a.jar b.jar, c.jar, d.jar"> and IE simply didn't load 'b.jar' so I got the usual 'class not found' exception. After signing every jar and putting every jar in every directory I finally noticed the commas between some of the jars.
    I can understand IE not helping me load an Applet since, from MS's point of view, that is evil Java code, but JDev must know the syntax of a HTML applet tag too so it could highlight the error for me.
    Alternatively does anyone know of a HTML checker plugin for JDEV?
    Regards,
    Simon.

    No comments?
    I've been looking around for a HTML syntax checker and there are plenty around - just google "html validation". None so far have picked up the missing comma in my busted applet tag. I guess with a missing comma it just looks like a file name with a space in it anyway.
    I still think JDeveloper could flag semantic errors like this at development time.
    Cheers,
    Simon.

  • Syntax check of code

    I am passing certain code in table itab and then doing a syntax check using SYNTAX-CHECK FOR itab MESSAGE mess LINE lin WORD wrd .The problem with this method is it check the code line by line and assign mess with the first error msg  but I want to trap all the error message of the code in itab at once in another table.
    Is it possible to trap all the error msg at once in a internal table.

    Hi,
    This is similar to what ABAP Editor sytax check does. You cannot check sytax of the "futher" code as the "closer" code may affect the "further". Unless you correct the first error you cannot therefore check if futher lines are correct. If this worked like you want it would have to correct "closer" errors first by itself, then it could check rest of the code. But how the compilator (generall meaning) would have to know what to place there. This is of course impossible. There is no such compliator doing so in none of known to me programming languages.
    You may skip this by a trick. Looping at the table with a code and checking each line of this with a check syntax. Then collect all these errors within an error table.
    Nevetherless be carefull !! You would have to place excatly one statement per line in code table. Otherwise it won't pass the exam. Moreover you cannot use any of chain statements i.e.
    write: 'first line',
            'second line'.
    ...should be replaced with
    write 'first line'.
    write 'second line'.
    Hope this give you some idea:)
    Regards
    Marcin

  • Extended syntax check

    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

  • Extended syntax checks off

    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: jbussche

    Hello 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

  • 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.

Maybe you are looking for