Error in syntax .check manual

Hi
I am getting on value of variable(sj) from database and storing in list and using that value to get ID from same table.
Now problem ---- if value of variable (psj = yyuyu "ghgh jkjkj" ghghg ) OR (psj=hjhjhj 'hjhjh jkjkj' hhjhjh).It gives error "you have error in syntax......." .(because of presence of sigle or double quote.how to correct this .I am newbie
i tried both but same result
a)String psj=(String)kjk.get(y);
resultsetnt=statement.executeQuery("select ID from tbl where Text='"+psj+"'");
b)String psj=(String)kjk.get(y);
resultsetnt=statement.executeQuery("select ID from tbl where Text=\""+psj+"\""); where id continas integer

a)
<%for(int p=0;p<o.size();p++){
String psj=(String)kjk.get(y);
resultsetnt=statement.executeQuery("select ID from tbl where Text='"psj"'"); }}
As you can see that above is java code.how to reform the query using your solution? one thing to be noted is psj is variable which hold the value not the string itself
vNewVal := replace(string,'"',null);
Edited by: user515494 on Sep 10, 2008 9:04 AM
Edited by: user515494 on Sep 10, 2008 9:06 AM

Similar Messages

  • No syntax error on syntax check, but syntax error on activation

    Hi all,
    I have a confusing problem.
    I want to default some values on item level of purchase order (ME21N). I added a module call in flow logic of screen 1313 of program SAPLMEGUI. The module itself I added to include LMEVIEWSF01. Here I default some fields of structure MEPO1313. This structure is defined in TOP-include using TABLES.
    Before modification I debugged the transaction and found out, that structure MEPO1313 is accessible during PBO. Changes in debugger are shown as expected on screen.
    Now, syntax check on LMEVIEWSF01 and even on SAPLMEGUI returns no error. But on activation I get syntax error saying MEPO1313 is not know ??
    So, structure MEPO1313 is accessible in debugger, no syntax error on syntax-check, but syntax error on activation ?
    What is going on ??
    Elko

    go to SE80 and Check syantax at package level.
    you might  be checking syantax for other include and problem si somw ehere else, justa  thought.

  • 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 during syntax check of IDoc (outbound)

    Hello,
    I did an insert into idoc_data of segment E1TXTH8 (level 3 - as child of E1EDL20) and E1TXTP8 (level 4 as child of E1TXTH8).
    inside user-exit ZXTRKU02.
    But idoc is created with error 26 (and hierarchy is not respected! (WE05)).
    Am I using the right user-exit or i miss something in the sequence while insert??
    Error:
    EDI: Syntax error in IDoc (segment cannot be identified)
    Message no. E0078
    Diagnosis
    The segment E1TXTH8 does not occur at the current level of the basic type DELVRY03 (extension ).
    This error can have several reasons:
    The segment E1TXTH8 is assigned to a group whose header segment does not occur.
    The segment E1TXTH8 does not exist in the syntax description of the basic type DELVRY03 (extension ).
    The sequence of segments in the group in which the segment appears is incorrect.
    Previous errors ('mandatory' segment or group missing) may be due to this error.
    Procedure
    Please check the IDoc or the syntax description of the basic type DELVRY03 (extension ).
    Thank you in advance for your help.
    Edited by: Fakher Baklouti on Apr 9, 2010 7:12 PM

    Hello Faker,
    It depends on the previous available segment.
    Here is the procedure,
    1. Get all the segments from the database table IDOCSYN where basic type is DELVRY03
    2. Sort them by Sequential number in DESCENDING
    3. Get the Index (say GV_INDEX) of the segment in IDOCSYN which you want to insert or edit
    4. LOOP internal table of IDOCSYN from index GV_INDEX and check for the availability of the segment of IDOCSYN in idoc data
    5. If it is success, break the loop and now you got the previous available segment
    6. Now just insert your segment in the idoc table just after it.

  • Error in Syntax check in code

    Hi,
    We are developing a report, where we have written the following piece of code:
    LOOP AT lt_kondd2.
          DO.
           If lv_first = "X".                                            "1
              READ TABLE lt_kotd2 WITH KEY knumh = lt_kondd2-knumh.
           Else.                                                         "1
              READ TABLE lt_kotd2 WITH KEY knumh = lv_smatn.
           Endif.      
          Some Statements.
         Enddo.
        Some statements
    Endloop.
    During syntax check the above code is giving the following error:
    Field "READ" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement.
    Please help point out what could be wrong.
    Thanks,
    Peter

    >
    Peter Grosvenor wrote:
    >       
    If lv_first = "X".                                            "1
    You are using double quotes (") rather than single quotes (').
    Next time, do more desk checking before posting here.
    Rob

  • Error 26: Error during syntax check of IDoc (outbound)

    Hi all,
       I am getting error when we try to generate IDoc in Outbound process (to send data from SAP to external Interface).
      Error no is 26. And I have checked the status records, it shows the below error message. "EDI: Syntax error in IDoc (too many repetitions of a group). According to the syntax description of the basic type SHPMNT05 (customer enhancement ZSHPMNT05), the segment group E1EDL37 can be repeated a maximum of 0000000260 times. However, this segment group occurs more frequently in the IDoc. Please check the IDoc or the syntax description of the basic type SHPMNT05 (customer enhancement ZSHPMNT05).
      Can any one tell me is there any limitation for data records for segment E1EDL37?
      Kindly suggest me what is the problem & what needs to be done to fix this.
    Thanks in advance.
    Regards
    Mohammad.

    Hi Guys,
    This is a problem which occurs throughout lots of SAP systems. This occurs due to someone changing the IDOCSYN table without making the neccessary changes to the EDISYN table.
    For more information on this you can check out the note - 370021. Also if you run the following program in your system and make the changes to your IDOC segment, this error will go away.
    (Please note that this program is provided by SAP and I just made a small adjustment by adding the COMMIT WORK AND WAIT statement) .
    Hope this helps.
    REPORT ze1edp19.
    TABLES: idocsyn, edisyn, cimsyn.
    DATA: old_idocsyn TYPE idocsyn,
          lt_idocsyn  TYPE STANDARD TABLE OF idocsyn,
          ls_idocsyn  TYPE idocsyn,
          old_edisyn  TYPE edisyn,
          lt_edisyn   TYPE STANDARD TABLE OF edisyn,
          ls_edisyn   TYPE edisyn.
    PARAMETER idoc_typ TYPE idocsyn-idoctyp DEFAULT 'ORDERS05'.
    PARAMETER idoc_seg TYPE idocsyn-segtyp  DEFAULT 'E1EDP19'.
    PARAMETER occmax   TYPE idocsyn-occmax  DEFAULT '99'.
    PARAMETER upd_flag AS   CHECKBOX        DEFAULT space.
    START-OF-SELECTION.
    table IDOCSYN
      SELECT * FROM idocsyn
             INTO TABLE lt_idocsyn
             WHERE idoctyp = idoc_typ.
      READ TABLE lt_idocsyn INTO ls_idocsyn
                            WITH KEY idoctyp = idoc_typ
                                     segtyp  = idoc_seg.
      IF sy-subrc = 0.
        MOVE ls_idocsyn TO old_idocsyn.
        ls_idocsyn-occmax = occmax.
        IF upd_flag EQ 'X'.
          UPDATE idocsyn FROM ls_idocsyn.
         COMMIT WORK AND WAIT.
          WRITE: 'Table IDOCSYN updated',
                 /,'         Idoctype:      ',idoc_typ,
                 /'         segment number: ',ls_idocsyn-nr.
          WRITE: /,'OCCMAX changed from',old_idocsyn-occmax,
                 ' to ',ls_idocsyn-occmax.
        ELSE.
          WRITE: 'No UPDATE done in table IDOCSYN',
                 /,'         Idoctype:      ',idoc_typ,
                 /'         segment number: ',ls_idocsyn-nr.
          WRITE: /,'OCCMAX changed from',old_idocsyn-occmax,
                 ' to ',ls_idocsyn-occmax.
        ENDIF.
      ELSE.
        WRITE: 'no such record in table IDOCSYN'.
      ENDIF.
      ULINE.
    table EDISYN
      SELECT * FROM edisyn
             INTO TABLE lt_edisyn
             WHERE idoctyp = idoc_typ AND
                   cimtyp  = space.
      READ TABLE lt_edisyn INTO ls_edisyn
                           WITH KEY idoctyp = idoc_typ
                                    cimtyp  = space
                                    segtyp  = idoc_seg.
      IF sy-subrc = 0.
        MOVE ls_edisyn TO old_edisyn.
        ls_edisyn-occmax = occmax.
        IF upd_flag EQ 'X'.
          UPDATE edisyn FROM ls_edisyn.
          WRITE: 'Table EDISYN updated',
                 /,'         Idoctype:      ',idoc_typ,
                 /'         segment number: ', ls_edisyn-posno.
          WRITE: /,'OCCMAX changed from',old_edisyn-occmax,
                 ' to ',ls_edisyn-occmax.
        ELSE.
          WRITE: 'No UPDATE done in table EDISYN',
                 /,'         Idoctype:      ',idoc_typ,
                 /'         segment number: ',ls_idocsyn-nr.
          WRITE: /,'OCCMAX changed from',old_idocsyn-occmax,
                 ' to ',ls_idocsyn-occmax.
        ENDIF.
      ELSE.
        WRITE: 'no such record in table EDISYN'.
      ENDIF.

  • Idoc error during syntax check - error26

    hi everyone
    I need help understanding where this idoc error is generating and what is it about. I went through the steps many times but it's still the same.

    hi
    where is the section which populates the segments? Could you ask for the info you need I am happy to take screen shots because till now from all suggestions so far I'm not able to solve this.
    Here is the idoc program for this:
    *& Report  ZIDOCPG
    REPORT  ZIDOCPG.
    PARAMETERS PLIFNR TYPE LIFNR.
    PARAMETERS PNAME1 TYPE NAME1_GP.
    PARAMETERS PORT01 TYPE ORT01_GP.
    DATA VSEG LIKE Z1TRANS.
    DATA VEDP13 LIKE EDP13.
    DATA: BEGIN OF FEDIDC OCCURS 0.
        INCLUDE STRUCTURE EDIDC.
    DATA: END OF FEDIDC."MASTER IDOC
    DATA: BEGIN OF TEDIDC OCCURS 0.
        INCLUDE STRUCTURE EDIDC.
    DATA: END OF TEDIDC."COMM IDOC
    DATA: BEGIN OF TEDIDD OCCURS 0.
      INCLUDE STRUCTURE EDIDD.
    DATA: END OF TEDIDD.
    SELECT SINGLE * FROM EDP13 INTO VEDP13 WHERE MESTYP = 'ZTMSG'   AND
      IDOCTYP = 'ZTRANS'.
    VSEG-LIFNR = PLIFNR.
    VSEG-NAME1 = PNAME1.
    VSEG-ORT01 = PORT01.
    TEDIDD-SEGNAM = VSEG.
    TEDIDD-SDATA = VSEG.
    APPEND TEDIDD.
    *TO GEN IDOC CONTROL RECORD.
    FEDIDC-MESTYP = 'ZTMSG'.
    FEDIDC-DOCTYP = 'ZTRANS'.
    FEDIDC-RCVPOR = VEDP13-RCVPOR.
    FEDIDC-RCVPRN = VEDP13-RCVPRN.
    FEDIDC-RCVPRT = VEDP13-RCVPRT.
    APPEND FEDIDC.
    CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
      EXPORTING
        MASTER_IDOC_CONTROL                  = FEDIDC
      TABLES
        COMMUNICATION_IDOC_CONTROL           = TEDIDC
        MASTER_IDOC_DATA                     = TEDIDD.
    COMMIT WORK.

  • Syntax check and auto-format disagree

    Flash 8 Pro: Well, I'm coding along quite nicely and decide
    to auto-format. Auto-format says the code has errors, the syntax
    check says there are none. I can run my code (though it's not doing
    what I want) without getting an error.
    Are there specific scenarios that cause the syntax check and
    auto-format to disagree?
    In just about every other development tool I've used, it will
    auto format regardless of errors, even if the formatting is messed
    up. it's a good aid to highlighting syntax errors! Why can't flash
    do the same?
    Thanks,
    Paul

    Well, after commenting out lots of code until the error went
    away and then removing the comments and making some tweaks, the
    problem has gone away..

  • Idoc outbound errors05(error during translation) 07(error during syntax ch)

    hi,
            i found all idocs in the system fails with status 07(error during syntax check)
    idoc got different stats:
      flow of status:01
                          30
                          03
                          18
                          24
                          05 (error during translation)
                          07 (error during syntax check)
                        what could be the problem ?

    Hi,
    This could be the format which you are sending not matching with other system.
    For example, if your are sending the Idocs to EDI, system, the mapping should be correct with the idoc which you have are sending. If haven't changed any posting program logic or idoc segments, then check with other system who is supposed to transmit the idocs.
    Regards,
    Ashok

  • Non riesco a ricevere acquisti fatti su itunes, mi da questo errore :erreu : you have an error in your sql syntax; checkthe manual that corresponds to your mysql server version for the right syntax to use near from news order by id desc at line. cosa devo

    non riesco a ricevere acquisti fatti su itunes, mi da questo errore :erreu : you have an error in your sql syntax; checkthe manual that corresponds to your mysql server version for the right syntax to use near from news order by id desc at line. cosa devo fare?  grazie

    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]

  • Syntax check error in the standard include

    Hi,
    I have modified one standard include using access key to insert one logic as per businness requirements.Now after inserting that code iam getting syntax error but while activating it is not showing the error and getting activated.
    The include is V05XZZMO in that i have inserted code is as follows
    FORM MOVE_USERFIELDS USING ZP.
      CASE ZP.
        WHEN 'VBRK'.
        header
        MOVE LVBRK-XXXXX TO LFAMTV-ZZXXXXX.
    *{   INSERT         GDVK934083                                        1
              MOVE LVBRK-ZUONR TO LFAMTV-ZZZUONR.
    *}   INSERT
        WHEN 'VBRP'.
        item
        MOVE LVBRP-XXXXX TO LFAMTV-ZZXXXXX.
    *{   INSERT         GDVK934083                                        2
       MOVE LVBRP-MATWA TO LFAMTV-ZZMATWA.
    *}   INSERT
      ENDCASE.
    ENDFORM.
    now it is throwing error saying that LFAMTV doesn't exist...when I double click on that it is taking me to the FM RV_INVOICE_VIEW_2 where it is defined....
    Can anyone know the reason why it is throwing the error when we go for the syntax check but when u activate the program it is getting activated.. so can this error can be neglected?
    Any help on this will be appreciated..
    Regards,
    Rohan.

    Hi,
    First comment ur code and then activate the include.
    Now put a break point in the form and then in the debug mode check the structre LFAMTV is visible or not.
    if yes then once again add ur code and then activate the whole program.
    and now once again debug it and see...., whether the values are updated to the strurure LFAMTV.
    Regards,
    Nagaraj

  • Getting Error 26 in ALE IDOC scenario .- EDI Syntax Check Error...

    Hi..
    i am working in ALE Idoc scenario...I am getting Status 3 as well as status 26 in we02 transaction in my custom IDOC scenario for outbound process..
    The error is 'EDI- SYntax Check'..
    How to remove this error..
    Pls help.

    ya, there is only one segment available in IDOC..named i.e zseg_a .
    So , error in postion is avoided..
    How to find syntax error then?

  • Syntax error in validation check "DHVALID", step "001"

    Hi,
    I have booked invoice for $ 25,000.00, now i want to make this  payment via t-code F-53. At that time system giving error  i.e.  "Syntax error in validation check "DHVALID", step 001*"
    Request to you please tell me what are the steps to resolve this issue.
    Regards,
    Nilesh Surve.

    Hi,
    Check validations in ob28. It seems there are some validations, for which paramters are set for accounts or transaction code.
    Regards

  • No error messages by Syntax Checker, even there a lot

    Our Design Editors (9.0.2.94.11) Syntax Checker gives never an error message, not even there are syntax errors. What can I do?

    Check your wireless router. For same strange reason my router locks up every time an iphone update is installed. To fix it, I have to disconnect it (Linksys WRT54G v.3) from my cable modem and clear all of its settings by holding in its reset button. I then have to log onto the router with the old default password (the one I set was cleared when I pressed reset) and then reset my wireless security, name, etc.. Then I restart my PC that is connected to the router and everything works again. iPhone and laptop can now connect to wireless.

  • 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

Maybe you are looking for

  • What are the basic settings required to run webdynpro for abap application?

    Hi,           i want some information regarding settings(HOST,Port) to run our application through Browser.What are the settings can i give to run my Application.and also i got some problem that when i create a VIEW it didnt shows the Standard Toolba

  • ITunes Match with 2 different apple IDs and crossing 2 devices!

    iTunes is on my PC and accessible thru my apple ID. My partner has a new iPad and it is registered under her apple ID. I have signed up to iTunes Match in the hope that we can access the iTunes library on my PC on her iPad thru iCloud. Is this possib

  • LRT 214 Issue connecting to windstream network running thru adtran switch to cisco modem

    Well this one has been perplexing and I am not sure where my problem might be.  Currently the site has a static IP coming in on a T1 that is running data and voip.  The cisco modem is in bridge mode and it connects to an adtran switch then it connect

  • Audit specific objects for specific users

    audit statement has the option to choose audit by user list audit object has the option to choose audited objects now i need to audit specific objects, i.e. user A's tables accessed by a specific group of users, let's say ALL users other than A Is it

  • Unsatisfied Linker error:J3D

    hello I am having problem with my j3d. I have installed it properly but for some functions there is an exception. i.e Unsatisfied linker error on a function setTransform it gives error and also says that java.lang.loader cannot load that class. Kindl