Syntax check please

I am getting error as
<b>"r_bktxt " is a table with out header line  and therefore no component called "SIGN"</b>
with the below code . Could you please correct .I am writing this code in method of  BADI in sap4.7.
To remove the hardcode logic and use the ZKAP entry
DATA : wa_zcharval1 TYPE zkap-zcharval1.
DATA : r_bktxt TYPE RANGE OF zkap-zcharval1.
    r_bktxt-sign = 'I'.
    r_bktxt-option = 'BT'.
    SELECT zcharval1 INTO wa_zcharval1
           FROM  zkap
           WHERE zcharfld1 = 'U319'
           AND   zcharfld2 = 'ACTIVE_BURKS'
           AND   znumfld1  = '0'
           AND   zseqno    = '0'.
      r_bktxt-low = wa_zcharval1.
      APPEND r_bktxt.
    ENDSELECT.
    SELECT uzawe
           UP TO 1 rows
           FROM  lfb1
           INTO  wa_uzawe
           WHERE lifnr = i_rbkpv-lifnr    " bseg-lifnr
           AND   bukrs IN r_bktxt.
    ENDSELECT.

Hello Sam
You coding is correct but you need to define a separate work area.
DATA :
  r_bktxt TYPE RANGE OF zkap-zcharval1,  " itab w/o header line
  ls_rng  LIKE LINE OF r_bktxt.
  ls_rng-sign = 'I'.
  ls_rng-option = 'EQ'.
  APPEND ls_rng TO r_bktxt.
Regards
  Uwe

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

  • 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

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

  • 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

  • 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

  • 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

  • Error during program syntax check

    Hi,
    I have written the following code
    INCLUDE zfirf_rfd_final_top.
    * INCLUDE ZFIRF_RFD_FINAL1_O01                    .  " PBO-Modules
    * INCLUDE ZFIRF_RFD_FINAL1_I01                    .  " PAI-Modules
    INCLUDE ZFIRF_RFD_FINAL_F01                    .  " FORM-Routines
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS:     p_keydt TYPE erdk-erdat OBLIGATORY.
    SELECT-OPTIONS: s_bp    FOR  erdk-partner,
                    s_ca    FOR  erdk-vkont.
    SELECTION-SCREEN END OF BLOCK b1.
    INITIALIZATION.
      SET TITLEBAR 'REFUND'.
    START-OF-SELECTION.
    PERFORM get_data_from_selection.
    FORM get_data_from_selection.
      SELECT opbel
             partner
             vkont
        FROM erdk
        INTO CORRESPONDING FIELDS OF TABLE t_erdk
       WHERE verart      EQ c_43
         AND simulated   EQ space
         AND stokz       EQ space
         AND tobreleasd  EQ space
         AND intopbel    EQ space
         AND invoiced    NE space
         AND partner     IN s_bp
         AND vkont       IN s_ca.
    ENDFORM.
    when i do a syntax check i get the following error
    The IN operator with "S_BP" is followed neither by an internal table nor by a value list.
    Can you suggest what is the error in the program ?
    Regards,
    Imran

    Hi Imran,
    please try this one dont try in perform and form
    INCLUDE zfirf_rfd_final_top.
    INCLUDE ZFIRF_RFD_FINAL1_O01                    .  " PBO-Modules
    INCLUDE ZFIRF_RFD_FINAL1_I01                    .  " PAI-Modules
    INCLUDE ZFIRF_RFD_FINAL_F01                    .  " FORM-Routines
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS:     p_keydt TYPE erdk-erdat OBLIGATORY.
    SELECT-OPTIONS: s_bp    FOR  erdk-partner,
                    s_ca    FOR  erdk-vkont.
    SELECTION-SCREEN END OF BLOCK b1.
    INITIALIZATION.
      SET TITLEBAR 'REFUND'.
    START-OF-SELECTION.
      SELECT opbel
             partner
             vkont
        FROM erdk
        INTO CORRESPONDING FIELDS OF TABLE t_erdk
       WHERE verart      EQ c_43
         AND simulated   EQ space
         AND stokz       EQ space
         AND tobreleasd  EQ space
         AND intopbel    EQ space
         AND invoiced    NE space
         AND partner     IN s_bp
         AND vkont       IN s_ca.
    reward points to all helpful answers
    kiran.M

  • 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

  • 26 Error during syntax check of IDoc (outbound)

    Hi Experts
    I am using TPSDLS - Idoc(outbound).
    When we view in WE02 : for few of the deliveries it is working fine , but for some it is giving the following error
    26     Error during syntax check of IDoc (outbound)
    Please any one help me out for the same
    Thanks & Regards
    Shaveta

    Please check the segments for the idocs in error status in WE02. The segments in the idoc should be in the same sequence as defined while creating idoc in WE30.
    For eg. taking the case of invoic02 idoc.
    Segment E1EDP01 cannot come prior to segment E1EDK01.
    As in WE30 it is defined to come after E1EDK01\
    Please reward the points if this information is useful.

  • Error Message code 1900 in syntax check and code LV_ERR in user interface

    In my webdynpro component when i did the code inspector check i have an error message in syntax check
    which says "Message code 1900: ObjectType WDYN Object name ZXXXX Row 1 Column 0 the size of the PXA buffer reached a critical value at 158 percent. The maximum size is currently 4,194,304 bytes ==> The size of the PXA buffer reached a critical value at 158 percent. The maximum size is currently 4,194,304 bytes.
    Another Error message in user interface
    which says: "Message Code LV_ERR:ObjectType WDYN Object name ZXXXX Sub-Object Type  Sub-Object Name  Error  Load unit of component is very large (generation limit).==> Error  Load unit of component is very large (generation limit) .
    Please help in resolving these issues.
    Thanks in advance.

    Hi,
    you need to discuss with the basis team to increase the abap buffersize.
    there is a parameter in the transaction rz11.
    go to RZ11 and then wirte parameter as abap/buffersize
    check its value.
    if you increase it,   problem will be solved i guess.
    thanks
    sarbjeet

  • 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

  • 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

  • Syntax-check cmd

    Hi Experts,
       can you please post few examples on syntax-check cmd completely.
    ex: syntax-check for itab message...........
    thanks in advance,
    aadi.
    \[subject changed by moderator - please don't use words like urgent - see community guidelines\]
    Edited by: Jan Stallkamp on Jun 17, 2008 6:29 PM

    this is all explained in the supplied help by SAP and should be very easy to understand for an ABAP expert.
    You do understand that the path to reach this forum is:
    Expert Forums >ABAP Development>ABAP, General
    This implies that members should be considered, or at least thrive to be experts.
    Regards, Rob.

  • 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

Maybe you are looking for

  • Printing reports on double-sided pages

    Is there a way in Oracle reports to force each record to print on an even number of pages? This is for double-sided printing. Thanks for any help or advice.

  • Insert Record Problems

    I am trying to create an insert record instance, but even though my database connection is ok and I have simplified my form down to one entry, I cannot get the query to work. The lastest error I am getting is: The field 'ARTISTS.LASTNAME' cannot cont

  • Multiple Channels for Campaigns

    Hi Folks , Is it Possible to possible to Execute a Campaign for Different Communications Channels at Once - If so , how is it possible ? Needed valueable inputs - Thanks in Advance. Regards, Amrita.

  • Max cursors exceeds problem(ORA-01000)

    Hi In my server open_cursors is set as 300 .We are developing a java application(using struts & Jboss web server) nearly 10 computers access the oracle 10g server through plsql procedures/functions ,frequently I am getting ORA-01000 -MAX CURSOR EXCEE

  • Agent Patching - inventory errors

    Hi Experts, I am trying to apply a patch to my agent, but am seeing some errors I am not sure how to resolve. It's true that the agent home is not in the inventory file, but if I set the home to a DB home I get a component not found error instead. Ha