SYntax error - on Perform Statement

Hello friends,
I have a syntax error in the following code.
the error is      The field "P_I_PA0000" is unknown, but there are the following fields          
in the function module.
Any suggestions.
Thanks,
Raju.
PARAMETERS: ps_file1like rlgrap-filename         " Incoming file 1
                DEFAULT 'c:\HR\ZCNV0008.txt' LOWER CASE,
DATA:  BEGIN OF i_pa0000 OCCURS 100.
        INCLUDE STRUCTURE pa0000.
DATA:  END OF i_pa0000.
  PERFORM upload_local_file USING ps_file1
                         CHANGING i_pa0000[].
*&      Form  upload_local_file
      text
     -->P_PS_FILE1  text
     <--P_I_PA0000  text
FORM upload_local_file  USING    p_ps_file1
                        CHANGING p_i_pa0000[].
  CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
      filename                = p_ps_file1
      filetype                = 'ASC'
    TABLES
      data_tab                = p_i_pa0000[]
    EXCEPTIONS
      file_open_error         = 1
      file_read_error         = 2
      no_batch                = 3
      gui_refuse_filetransfer = 4
      invalid_type            = 5
      no_authority            = 6
      unknown_error           = 7
      bad_data_format         = 8
      header_not_allowed      = 9
      separator_not_allowed   = 10
      header_too_long         = 11
      unknown_dp_error        = 12
      access_denied           = 13
      dp_out_of_memory        = 14
      disk_full               = 15
      dp_timeout              = 16
      OTHERS                  = 17.
ENDFORM.                    " upload_local_file

If it doesn't work, why did you mark it as "solved"?
I think this is what you are trying to do:
PARAMETERS: ps_file1 LIKE rlgrap-filename " Incoming file 1
            DEFAULT 'c:\HR\ZCNV0008.txt' LOWER CASE.
DATA: BEGIN OF i_pa0000 OCCURS 100.
        INCLUDE STRUCTURE pa0000.
DATA: END OF i_pa0000.
PERFORM upload_local_file
        TABLES i_pa0000
        USING ps_file1.
*&      Form  upload_local_file
*       text
FORM upload_local_file
    TABLES p_i_pa0000
    USING p_ps_file1.
  CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
      filename                = p_ps_file1
      filetype                = 'ASC'
    TABLES
      data_tab                = p_i_pa0000
    EXCEPTIONS
      file_open_error         = 1
      file_read_error         = 2
      no_batch                = 3
      gui_refuse_filetransfer = 4
      invalid_type            = 5
      no_authority            = 6
      unknown_error           = 7
      bad_data_format         = 8
      header_not_allowed      = 9
      separator_not_allowed   = 10
      header_too_long         = 11
      unknown_dp_error        = 12
      access_denied           = 13
      dp_out_of_memory        = 14
      disk_full               = 15
      dp_timeout              = 16
      OTHERS                  = 17.
ENDFORM. " upload_local_file
Rob

Similar Messages

  • [Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE statement.

    Hi,
    I am getting following error message ,
    [Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE statement.
    When run this code.
    <%@ page import= "java.sql.*"%>
    <%
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con = DriverManager.getConnection("jdbc:odbc:bspipdb");
    Statement st = con.createStatement();
    st.executeUpdate("update tscipshift set 11-Aug-08='M' where TechN='Elamparuthi'");
    %>
    tscipshift=table ,column=11-Aug-08 are all exist.
    I dont know why I am getting error mesage.
    Any idea why?

    Shahbaz2008 wrote:
    you haven't set your user name and password hereI don't believe that's necessary with Access. Then again, it's not an enterprise database.
    Connection con = DriverManager.getConnection("jdbc:odbc:bspipdb");
    change it to this
    Connection con = DriverManager.getConnection("jdbc:odbc:bspipdb","+username+","+password+");
    here pass your username and password...
    In Oracle default user name and password is
    username = scott
    password = tigerSo who uses that? Only an eejit would leave that account open.
    So the statement would be
    Connection con = DriverManager.getConnection("jdbc:odbc:bspipdb","scott","tiger");
    or In Mirosoft Access there is no user name and password so the statement will be Like I said - unnecessary, and not the reason the OP is having problems.
    Connection con = DriverManager.getConnection("jdbc:odbc:bspipdb","","");>
    Besides this change your table name 11-Aug-08 to anything that is not start with number or any special symbols.
    for example aug112008 is good or aug is too good.No, it's still not good if you understand ANYTHING about relational databases and normalization.
    I think it would work.I think you're just as stup!d as the OP.
    %

  • JDBC: Syntax error in UPDATE statement???

    Hi,
    I have been trying to solve this seemingly simple problem for the past 4 hours, and I had no success. I am working on a jdbc:odbc connection which utilizes MS Access. I have been constantly getting "Syntax error in UPDATE statement", and this is the statement
    (name of the table is CDs, columns are number, artist, album, label and date - all strings):
    query = "UPDATE CDs SET artist = '" + fields.artist.getText() +"', album = '" +
    fields.album.getText() + "', label = '" +
    fields.label.getText() + "', date = '" +
    fields.date.getText() + "' WHERE number = '" + fields.number.getText() + "'";
    Can anybody recognize an error? Thank you,
    mirkokrug

    A couple of possibilities.
    If the column NUMBER is numeric then it wouldn't need quotes around the data value. Also if the column DATE is a date or date/time type then the format from the textbox may not be correct.
    Col

  • Syntax Error with EXPORT statement in ECC 6

    Hi All,
    I have one issue with EXPORT statement syntax.
    I have declared data like below:
    DATA: BEGIN OF mem_id,
              mandt LIKE sy-mandt,
              uname LIKE sy-uname,
              modno LIKE sy-modno,
            END OF mem_id.
    export the memory id
        EXPORT E_VBKOK XANZPK TEXTTAB XBOLNR TO MEMORY ID MEM_ID.
    When I am checking the syntax error i am getting like "MEM_ID" must be a character-type field (data type C, N, D or T). by "INTERFACE". by "INTERFACE". "INTERFACE". by "INTERFACE". by "INTERFACE".
    I know this statement would be like IMPORT ITAB TO JTAB FROM MEMORY ID 'table'. So I have written like below
    EXPORT E_VBKOK XANZPK TEXTTAB XBOLNR TO MEMORY ID 'MEM_ID'. But still it is throwing an error.
    Can you please let me know how can I resolve this?
    Regards,
    Jyothi CH.

    Hi Jyothi,
    data: l_var type string.
    concatenate '6' '8' into l_var separated by space.
    export l_var to memory id 'BB'.
    Here we have to declare the type(structure) for l_var not for BB
    and in another program
    data:l_var type string.
    import l_var from memory id 'BB'.
    write : l_var.

  • Syntax Error in Update Statement

    Would a smart and kind CF pro mind putting a fresh pair of
    eyes on this code and tell me where the syntax error is? All the
    fields in the statement are numeric except the last one (comments).
    I have enclosed them in val() to ensure they are numeric when
    inserted into the DB. The fields they're being inserted into are
    numeric. I need to be numeric because I will be doing calculations
    on them. Also, I have triple-checked to ensure the datasource,
    table, and field names all match.
    Thanks,
    GwenH

    Try using <cfqueryparam>
    <cfquery datasource="reviews">
    UPDATE evals
    SET focus = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.focus#">
    , strengths = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.strengths#">
    , tailored = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.tailored#">
    , badinfo = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.badinfo#">
    , format = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.format#">
    , visual = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.visual#">
    , grammar = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.grammar#">
    , pronouns = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.pronouns#">
    , written = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.written#">
    , achieve = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.achieve#">
    , sell = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.sell#">
    , negative = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.negative#">
    , top = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.top#">
    , general = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.general#">
    , intro = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.intro#">
    , orientation = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.orientation#">
    , paragraphs = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.paragraphs#">
    , two = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.two#">
    , length = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.length#">
    , none = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.none#">
    , comments = <cfqueryparam cfsqltype="cf_sql_clob"
    value="#form.comments#">
    WHERE resumeID = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.resumeID#">
    </cfquery>
    Ken Ford
    Adobe Community Expert Dreamweaver/ColdFusion
    Adobe Certified Expert - Dreamweaver CS3
    Adobe Certified Expert - ColdFusion 8
    Fordwebs, LLC
    http://www.fordwebs.com
    "GwenH" <[email protected]> wrote in message
    news:[email protected]...
    > Would a smart and kind CF pro mind putting a fresh pair
    of eyes on this
    > code
    > and tell me where the syntax error is? All the fields in
    the statement are
    > numeric except the last one (comments). I have enclosed
    them in val() to
    > ensure
    > they are numeric when inserted into the DB. The fields
    they're being
    > inserted
    > into are numeric. I need to be numeric because I will be
    doing
    > calculations on
    > them. Also, I have triple-checked to ensure the
    datasource, table, and
    > field
    > names all match.
    >
    > Thanks,
    > GwenH
    >
    > <cfquery datasource="reviews">
    > UPDATE evals
    > SET
    > focus = val(#form.focus#)
    > , strengths = val(#form.strengths#)
    > , tailored = val(#form.tailored#)
    > , badinfo = val(#form.badinfo#)
    > , format = val(#form.format#)
    > , visual = val(#form.visual#)
    > , grammar = val(#form.grammar#)
    > , pronouns = val(#form.pronouns#)
    > , written = val(#form.written#)
    > , achieve = val(#form.achieve#)
    > , sell = val(#form.sell#)
    > , negative = val(#form.negative#)
    > , top = val(#form.top#)
    > , general = val(#form.general#)
    > , intro = val(#form.intro#)
    > , orientation = val(#form.orientation#)
    > , paragraphs = val(#form.paragraphs#)
    > , two = val(#form.two#)
    > , length = val(#form.length#)
    > , none = val(#form.none#)
    > , comments = '#form.comments#'
    > WHERE resumeID = #form.resumeID#
    > </cfquery>
    >

  • Syntax error in INSERT STATEMENT

    A problem on the date part of the query but why I don´t
    know, Thanks for any pointers,
    TIA
    <cfquery name="update1" datasource="trevor_SecurityDB">
    INSERT INTO imagesproducts
    (title, info, date)
    VALUES ( '#form.title#', '#form.info#', '#DateFormat(Now())#'
    </cfquery>
    Error Occurred While Processing Request
    Error Executing Database Query.
    [Macromedia][SequeLink JDBC Driver][ODBC
    Socket][Microsoft][ODBC Microsoft Access Driver] Syntax error in
    INSERT INTO statement.
    The error occurred in uploadmember.cfm: line 28
    26 : INSERT INTO imagesproducts
    27 : (title, info, date)
    28 : VALUES ( '#form.title#', '#form.info#',
    '#DateFormat(Now())#' )
    29 : </cfquery>
    30 :
    SQL INSERT INTO imagesproducts (title, info, date) VALUES (
    'News test', 'Testing news info', '12-Jul-07' )
    DATASOURCE trevor_SecurityDB
    VENDORERRORCODE -3502
    SQLSTATE 42000

    Perhaps it is a reserved word issue with the date column,
    since
    date is an ODBC Reserved Keyword. You might try enclosing it
    within brackets [ ].
    <cfquery name="update1" datasource="trevor_SecurityDB">
    INSERT INTO imagesproducts
    (title, info, [date])
    VALUES ( '#form.title#', '#form.info#', '#DateFormat(Now())#'
    </cfquery>
    Or, if that doesn't help, you might try using a cfqueryparam
    tag for the '#DateFormat(Now())#' value using a cfsqltype =
    "CF_SQL_TIMESTAMP" (assuming a date/time datatype on the column).
    Also, you might look into using one of the CreateODBCDateTime() or
    CreateODBCDate() functions.
    Phil

  • Help!  Syntax Error in SQL statement

    Hello. I'm getting an error message and I'm just not seeing
    where I went wrong. The SQL statement is:
    updateSQL = "UPDATE TrainingHistory SET Status='" &
    fFormat(Request.Form(cStatus)) & "', StatusComments='" &
    fFormat(Request.Form(cStatusComments)) & " WHERE Training_ID="
    & fFormat(Request.Form(cTrainingID))
    The error message is:
    [Microsoft][ODBC Microsoft Access Driver] Syntax error in
    string in query expression '' WHERE Training_ID=9054'.
    I've been looking at it for a while. Not sure where I went
    wrong. Here is a more complete version of the code:
    <%
    Function fFormat(vText)
    fFormat = Replace(vText, "'", "''")
    End Function
    Sub sRunSQL(vSQL)
    set cExecute = Server.CreateObject("ADODB.Command")
    With cExecute
    .ActiveConnection = MM_coldsuncrea_lms_STRING
    .CommandText = vSQL
    .CommandType = 1
    .CommandTimeout = 0
    .Prepared = true
    .Execute()
    End With
    End Sub
    If Request.Form("action")="update" Then
    'Set variables for update
    Dim updateSQL, i
    Dim cTrainingID, cStatus, cStatusComments
    'Loop through records on screen and update
    For i = 1 To fFormat(Request.Form("counter"))
    'Create the proper field names to reference on the form
    cTrainingID = "Training_ID" & CStr(i)
    cStatus = "Status" & CStr(i)
    cStatusComments = "StatusComments" & CStr(i)
    'Create the update sql statement
    updateSQL = "UPDATE TrainingHistory SET Status='" &
    fFormat(Request.Form(cStatus)) & "', StatusComments='" &
    fFormat(Request.Form(cStatusComments)) & " WHERE Training_ID="
    & fFormat(Request.Form(cTrainingID))
    'Run the sql statement
    Call sRunSQL(updateSQL)
    Next
    'Refresh page
    Response.Redirect("ClassUpdateRoster.asp?Training_ID=") &
    (rsClassDetails.Fields.Item("event_ID").Value)
    End If
    %>

    You need another single quote after the double quote before
    the WHERE clause. You are not closing the single quote you used to
    delimit the value for StatusComments.

  • Syntax error in modify statement

    Hi Friends,
    There is an Internal table IT_STATUS which is the Parameter in BADI Method IF_EX_WORKORDER_UPDATE~BEFORE_UPDATE.
    Below is the code i have written
    Data:  wa_status type cobai_s_status,
                       stat TYPE TABLE OF jstat,
                       wa_stat type jstat.
          CALL FUNCTION 'STATUS_READ'
            EXPORTING
             client                 = sy-mandt
              objnr                  = gv_objnr
    *     ONLY_ACTIVE            = ' '
    *   IMPORTING
    *     OBTYP                  =
    *     STSMA                  =
    *     STONR                  =
           TABLES
             status                 = stat
           EXCEPTIONS
             object_not_found       = 1
             OTHERS                 = 2
          IF sy-subrc <> 0.
            MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ELSE.
           loop at it_status into wa_status.
            read table stat into wa_stat with key STAT = wa_status-stat.
            if sy-subrc = 0.
             wa_status-stat = wa_stat-stat.
             wa_status-INACT = wa_stat-INACT.
             modify it_status from wa_status transporting stat inact.
            endif.
           endloop.
          ENDIF.
    At Modify statement it is giving a syntax error 'The <b>field "IT_STATUS" cannot be changed.-</b>'. what could be the reason?
    Please provide me the solution.
    Thanks & Regards,
    Satish

    Hi Rob,
    This is the whole code which i had written in method
    METHOD if_ex_workorder_update~before_update.
      DATA: gv_aufnr TYPE afih-aufnr,
            gv_objnr TYPE jest-objnr,
            stat TYPE TABLE OF jstat,
            wa_stat TYPE jstat,
            wa_header TYPE cobai_s_header,
            wa_status TYPE cobai_s_status,
            it_status_new TYPE cobai_t_status.
      DATA: status_index TYPE sy-tabix.
      BREAK-POINT.
      LOOP AT it_header INTO wa_header.
        SELECT SINGLE aufnr FROM afih INTO gv_aufnr WHERE warpl = wa_header-warpl AND abnum = 1.
        IF sy-subrc = 0.
          CONCATENATE 'OR' gv_aufnr INTO gv_objnr.
          CALL FUNCTION 'STATUS_READ'
            EXPORTING
             client                 = sy-mandt
              objnr                  = gv_objnr
    *     ONLY_ACTIVE            = ' '
    *   IMPORTING
    *     OBTYP                  =
    *     STSMA                  =
    *     STONR                  =
           TABLES
             status                 = stat
           EXCEPTIONS
             object_not_found       = 1
             OTHERS                 = 2
          IF sy-subrc <> 0.
            MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ELSE.
            LOOP AT it_status INTO wa_status.
              status_index = sy-tabix.
              READ TABLE stat INTO wa_stat WITH KEY stat = wa_status-stat.
              IF sy-subrc = 0.
                wa_status-stat = wa_stat-stat.
                wa_status-inact = wa_stat-inact.
                MODIFY it_status INDEX status_index FROM wa_status TRANSPORTING stat inact.
              ENDIF.
            ENDLOOP.
          ENDIF.
        ENDIF.
      ENDLOOP.
    ENDMETHOD.
    Hope it will get resolved
    Regards,
    Satish

  • Syntax error using try statement in WLST

    Hi All,
    I have a WLST script to create some JMS resources.
    I want to implement exception handling in such a way that if the script fails at any point, all the changes done should be reverted back.
    However, whenever I am trying to put a try block, the script is throwing syntax error on the first line after the try statement.
    Please find below the script I am using. Please suggest
    import sys
    from java.lang import System
    *# Putting a try statement here results in a syntax error at the below line*
    print "Starting the script ..."
    connect('weblogic',password,'t3://osbdev:7001')
    edit()
    startEdit()
    servermb=getMBean("Servers/osb_server")
    if servermb is None:
    print 'Value is Null'
    else:
    +# Creating the JMS Server+
    jmsserver1mb = create('WLSTJMSServer','JMSServer')
    jmsserver1mb.addTarget(servermb)
    +# Creating the JMS Module+
    jmsMySystemResource = create("WLSTJmsSystemResource","JMSSystemResource")
    jmsMySystemResource.addTarget(servermb)
    subDep1mb = jmsMySystemResource .createSubDeployment('WLSTJMSSubDeployment')
    subDep1mb.addTarget(jmsserver1mb)
    theJMSResource = jmsMySystemResource.getJMSResource()
    connfact1 = theJMSResource.createConnectionFactory('WLSTConnFact1')
    connfact1.setJNDIName('jms.WLSTConnFact1')
    connfact1.setSubDeploymentName('WLSTJMSSubDeployment')
    print "Creating WLSTQueue1..."
    jmsqueue1 = theJMSResource.createQueue('WLSTJMSQueue1')
    jmsqueue1.setJNDIName('jms.WLSTJMSQueue1')
    jmsqueue1.setSubDeploymentName('WLSTJMSSubDeployment')
    print "Creating WLSTQueue2..."
    jmsqueue2 = theJMSResource.createQueue('WLSTJMSQueue2')
    jmsqueue2.setJNDIName('jms.WLSTJMSQueue2')
    jmsqueue2.setSubDeploymentName('WLSTJMSSubDeployment')
    *# try statement is working at only this point of the program*
    try:
    save()
    activate(block="true")
    print "script returns SUCCESS"
    except:
    save()
    cancelEdit(defaultAnswer="y")
    print "Error while trying to connect to server !!!"
    print "Unexpected error: ", sys.exc_info()[0]
    dumpStack()
    raise
    Edited by: Chintan Parekh on Mar 16, 2011 7:06 AM

    Hi Chintan,
    Try doing copy pasting the below code, you have to hit the tab or space after try or except to create its block and keep an eye on the alinement's of it.
    try:
         save()
         activate(block="true")
         print "script returns SUCCESS"
    except:
         save()
         cancelEdit(defaultAnswer="y")
         print "Error while trying to connect to server !!!"
         print "Unexpected error: ", sys.exc_info()[0]
         dumpStack()Also I made the alinement's properly and the script is running properly with out any error.
    print "Starting the script ..."
    connect('weblogic','weblogic','t3://localhost:7001')
    edit()
    startEdit()
    servermb=getMBean("Servers/AdminServer")
    if servermb is None:
         print 'Value is Null'
    else:
         # Creating the JMS Server
         jmsserver1mb = create('WLSTJMSServer','JMSServer')
         jmsserver1mb.addTarget(servermb)
         # Creating the JMS Module
         jmsMySystemResource = create("WLSTJmsSystemResource","JMSSystemResource")
         jmsMySystemResource.addTarget(servermb)
         subDep1mb = jmsMySystemResource .createSubDeployment('WLSTJMSSubDeployment')
         subDep1mb.addTarget(jmsserver1mb)
         theJMSResource = jmsMySystemResource.getJMSResource()
         connfact1 = theJMSResource.createConnectionFactory('WLSTConnFact1')
         connfact1.setJNDIName('jms.WLSTConnFact1')
         connfact1.setSubDeploymentName('WLSTJMSSubDeployment')
         print "Creating WLSTQueue1..."
         jmsqueue1 = theJMSResource.createQueue('WLSTJMSQueue1')
         jmsqueue1.setJNDIName('jms.WLSTJMSQueue1')
         jmsqueue1.setSubDeploymentName('WLSTJMSSubDeployment')
         print "Creating WLSTQueue2..."
         jmsqueue2 = theJMSResource.createQueue('WLSTJMSQueue2')
         jmsqueue2.setJNDIName('jms.WLSTJMSQueue2')
         jmsqueue2.setSubDeploymentName('WLSTJMSSubDeployment')
    # try statement is working at only this point of the program
    try:
         save()
         activate(block="true")
         print "script returns SUCCESS"
    except:
         save()
         cancelEdit(defaultAnswer="y")
         print "Error while trying to connect to server !!!"
         print "Unexpected error: ", sys.exc_info()[0]
         dumpStack()Below is the output
    java weblogic.WLST test.py
    Initializing WebLogic Scripting Tool (WLST) ...
    Welcome to WebLogic Server Administration Scripting Shell
    Type help() for help on available commands
    Starting the script ...
    Connecting to t3://localhost:7001 with userid weblogic ...
    Successfully connected to Admin Server 'AdminServer' that belongs to domain 'Domain_7001'.
    Warning: An insecure protocol was used to connect to the
    server. To ensure on-the-wire security, the SSL port or
    Admin port should be used instead.
    Location changed to edit tree. This is a writable tree with
    DomainMBean as the root. To make changes you will need to start
    an edit session via startEdit().
    For more help, use help(edit)
    You already have an edit session in progress and hence WLST will
    continue with your edit session.
    Starting an edit session ...
    Started edit session, please be sure to save and activate your
    changes once you are done.
    MBean type JMSServer with name WLSTJMSServer has been created successfully.
    MBean type JMSSystemResource with name WLSTJmsSystemResource has been created successfully.
    Creating WLSTQueue1...
    Creating WLSTQueue2...
    Saving all your changes ...
    Saved all your changes successfully.
    Activating all your changes, this may take a while ...
    The edit lock associated with this edit session is released
    once the activation is completed.
    Activation completed
    script returns SUCCESSRegards,
    Ravish Mody
    http://middlewaremagic.com/weblogic
    Come, Join Us and Experience The Magic…
    Edited by: Ravish Mody-MiddewareMagic on Mar 16, 2011 8:33 PM

  • Error in PERFORM statement in SAPSCRIPT...

    Hello Experts,
    I am having an error in my code below:
    SAPSCRIPT:
    Begin of insertion DEVK940799 11/10/2008 DEL_HIDALGO
    DEFINE &LTYC_NAME1& = ''.
    DEFINE &LTYC_NAME2& = ''.
    DEFINE &LTYC_STR_SUPPL1& = ''.
    DEFINE &LTYC_STR_SUPPL2& = ''.
    DEFINE &LTYC_STR_SUPPL3& = ''.
    DEFINE &LTYC_POST_CODE1& = ''.
    DEFINE &LTYC_CITY1& = ''.
    DEFINE &LTYC_BEZEI& = ''.
    DEFINE &LTYC_LAND1& = ''.
    PERFORM GET_VENDOR_DETAILS IN PROGRAM Z9999RFI_Z2574FFI_RA
    USING &REGUH-LIFNR&
    CHANGING &LTYC_NAME1&
    CHANGING &LTYC_NAME2&
    CHANGING &LTYC_STR_SUPPL1&
    CHANGING &LTYC_STR_SUPPL2&
    CHANGING &LTYC_STR_SUPPL3&
    CHANGING &LTYC_POST_CODE1&
    CHANGING &LTYC_CITY1&
    CHANGING &LTYC_BEZEI&
    CHANGING &LTYC_LAND1&
    ENDPERFORM
    &LTYC_NAME1&     &LTYC_NAME2&
    &LTYC_STR_SUPPL1&
    &LTYC_STR_SUPPL2&
    &LTYC_STR_SUPPL3&
    &LTYC_POST_CODE1&
    &LTYC_CITY1&
    &LTYC_BEZEI&
    &LTYC_LAND1&
    End of insertion DEVK940799 11/10/2008 DEL_HIDALGO
    PROGRAM:
    *& Report  Z9999RFI_Z2574FFI_RA
    REPORT  z9999rfi_z2574ffi_ra.
    * Start of Selection event
    START-OF-SELECTION.
    *&      Form  get_vendor_details
    *       text
    *      -->IM_LIFNR       text
    *      -->CH_NAME1       text
    *      -->CH_NAME2       text
    *      -->CH_STR_SUPPL1  text
    *      -->CH_STR_SUPPL2  text
    *      -->CH_STR_SUPPL3  text
    *      -->CH_POST_CODE1  text
    *      -->CH_CITY1       text
    *      -->CH_BEZEI       text
    *      -->CH_LAND1       text
    FORM get_vendor_details USING im_lifnr
                            CHANGING ch_name1      TYPE adrc-name1
                                     ch_name2      TYPE adrc-name2
                                     ch_str_suppl1 TYPE adrc-str_suppl1
                                     ch_str_suppl2 TYPE adrc-str_suppl2
                                     ch_str_suppl3 TYPE adrc-str_suppl3
                                     ch_post_code1 TYPE adrc-post_code1
                                     ch_city1      TYPE adrc-city1
                                     ch_bezei      TYPE bezei
                                     ch_land1      TYPE t005-land1.
      DATA: ltyc_adrnr TYPE lfa1-adrnr.
      SELECT SINGLE adrnr
        FROM lfa1
        INTO ltyc_adrnr
       WHERE lifnr = im_lifnr.
      IF sy-subrc = 0.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            input  = ltyc_adrnr
          IMPORTING
            output = ltyc_adrnr.
        SELECT SINGLE name1 name2 str_suppl1
                      str_suppl2 str_suppl3 post_code1
                      city1
          FROM adrc
          INTO (ch_name1, ch_name2, ch_str_suppl1,
                ch_str_suppl2, ch_str_suppl3, ch_post_code1,
                ch_city1)
         WHERE addrnumber = ltyc_adrnr.
      ENDIF.
    ENDFORM.                    "get_names
    It says that there is an error in perform but they both have the same number of parameters.

    What do you mean by "Is it ok to customize the standard program RFFOUS_C"? I think you only have to copy a standard SAPScript for checks (if there is any...) and modify it acc. to your requirements. In the system you can customize that the standard print program will call your Z... SAPScript.
    On the other hand I believe that all variables you want to use in the SAPScript has to be defined in as global in the print program (except the ones, which you define in the script (with DEFINE))

  • Syntax Error in SELECT statement

    Hi,
    My ABAP statement is:
    select b1~fa a1~fb
    INTO CORRESPONDING FIELDS OF TABLE it_1
    from (table_nm) as a1 inner join db_tab2 as b1
    on a1~fb = b1~fb.
    For this statement it gives me following error in syntax check:
    *Wrong expression "INNER" in FROM clause. WHERE condition.     *     
    Thanks,
    CD

    Hi
    Try something like this:
    DATA: BEGIN OF ITAB OCCURS 0,
            A,
            B,
          END   OF ITAB.
    DATA: TABLENAME(30).
    DATA: WA_FTAB(72) TYPE C,
          FTAB        LIKE TABLE OF WA_FTAB.
    WA_FTAB = 'A'.   APPEND WA_FTAB TO FTAB.
    SELECT (FTAB) FROM (TABLENAME) INTO TABLE ITAB.
    LOOP AT ITAB.
      SELECT SINGLE A FRO <TABLE 2>
        INTO ITAB-B
        WHERE A = ITAB-A.
      MODIFY ITAB.
    ENDLOOP.
    See this sample:
    DATA: BEGIN OF ITAB OCCURS 0,
            VBELN LIKE VBAK-VBELN,
            POSNR LIKE VBAP-POSNR,
            VKORG LIKE VBAK-VKORG,
          END   OF ITAB.
    DATA: TABLENAME(30) VALUE 'VBAP'.
    DATA: WA_FTAB(72) TYPE C,
          FTAB        LIKE TABLE OF WA_FTAB.
    WA_FTAB = 'VBELN'.   APPEND WA_FTAB TO FTAB.
    WA_FTAB = 'POSNR'.   APPEND WA_FTAB TO FTAB.
    SELECT (FTAB) UP TO 10 ROWS FROM (TABLENAME) INTO TABLE ITAB.
    LOOP AT ITAB.
      SELECT SINGLE VKORG FROM VBAK INTO ITAB-VKORG
        WHERE VBELN = ITAB-VBELN.
      MODIFY ITAB.
    ENDLOOP.

  • How to check syntax errors in ABAP Queries

    HI Guys,
    How to check syntax errors in ABAP queries, Can please provide the T-Codes.
    Advande thanks to everybody.
    Thanks,
    Gourisankar

    Hi
    with these you can check syntax errors and performance points
    Hi
    these all are doing t he same thing that is checking the program for better performance
    Tools for Performance Analysis
    Run time analysis transaction SE30
    SQL Trace transaction ST05
    Extended Program Check (SLIN)
    Code Inspector ( SCI)
    Run time analysis transaction SE30 :This transaction gives all the analysis of an ABAP program with respect to the database and the non-database processing.
    SQL Trace transaction ST05: The trace list has many lines that are not related to the SELECT statement in the ABAP program. This is because the execution of any ABAP program requires additional administrative SQL calls. To restrict the list output, use the filter introducing the trace list.
    The trace list contains different SQL statements simultaneously related to the one SELECT statement in the ABAP program. This is because the R/3 Database Interface - a sophisticated component of the R/3 Application Server - maps every Open SQL statement to one or a series of physical database calls and brings it to execution. This mapping, crucial to R/3s performance, depends on the particular call and database system. For example, the SELECT-ENDSELECT loop on a particular database table of the ABAP program would be mapped to a sequence PREPARE-OPEN-FETCH of physical calls in an Oracle environment.
    The WHERE clause in the trace list's SQL statement is different from the WHERE clause in the ABAP statement. This is because in an R/3 system, a client is a self-contained unit with separate master records and its own set of table data (in commercial, organizational, and technical terms). With ABAP, every Open SQL statement automatically executes within the correct client environment. For this reason, a condition with the actual client code is added to every WHERE clause if a client field is a component of the searched table.
    To see a statement's execution plan, just position the cursor on the PREPARE statement and choose Explain SQL. A detailed explanation of the execution plan depends on the database system in use.
    Extended Program Check
    This can be called in through transaction SE38 or through transaction SLIN. This indicates possible problems that may cause performance problems.
    Code Inspector (SCI)
    You can call the Code Inspector from the ABAP Editor (SE38), the Function Builder (SE37), the Class Builder (SE24), or as a separate transaction (SCI).
    The Code Inspector indicates possible problems. However, note that, especially with performance issues: There is no rule without exception. If a program passes an inspection, it does not necessarily mean that this program will have no performance problems.
    reward if usefull

  • Error while transporting Transformation: Syntax error in Start Routine

    Hi Everyone,
    I'm facing a strange problem during transporting one of the Business Content cubes from Dev. to Quality.
    I'd activated the DSO 'Purchase Order Items (0PUR_O01)' and its entire data flow from the 4 datasources 2LIS_02_CGR, 2LIS_02_SCN, 2LIS_02_SGR, and 2LIS_02_ITM from BC. Then I migrated the Transfer/Update rules to transformations and the DataSources to BI7 DataSource. So far so good. The migration was successful and all the objects were activated.
    Now when I transport the same to Quality, the import fails with return code 8 and the error message says:
    'Start of the after-import method RS_TRFN_AFTER_IMPORT for object type(s) TRFN (Activation Mode)'
    'Start Routine: Syntax error in routine'
    I verified that the transformation where the error orrured was the one from InfoSource Z2LIS_02_ITM to DSO 0PUR_O01. I went and checked the start routine and it did indeed have a syntax error:
    'In PERFORM or CALL FUNCTION "ROUTINE_9998", the actual parameter SOURCE_PACKAGE" is incompatible with the formal parameter DATA_PACKAGE". '
    But when I check in the Dev. system, there is no syntax error for the same routine. Later, I tried to transport only the said transformation by re-activating it in Dev, and again I got the same error.
    I have no idea why I'm getting a syntax error in the start routine when there are non in the Dev. system. Also none of the coding is customised, it was only the BC code, migrated to a transformation.
    Any suggestions on the steps I could take to transport the transformation to my quality system?
    Thanks,
    Ram

    Hi Ajay, Shanthi, svu and Ray
    I do indeed have a start routine in my transformation and it was migrated from a 3.x update rule to a BI 7 transformation routine.
    The migration was successful and the Start Routine has NO syntax errors in the start routine in the Dev. system. I only encounter the error while transporting it to the Quality system. I cannot modify the code in the Quality system because it is non-changelable and there is no point in trying to change the code in Dev. because there are no errors over there.
    I've also made sure that I've transported all the necessary objects required by the transformations to quality. The routine does not perform a lookup, it simply deletes some records from the data package based on the processkey value (which is itself present in the data package).

  • Syntax Error while writing VBScript in OFT 9.1

    Hi All,
    I am new to OFT 9.1 (not using OpenScript). I have a simple VBScript code which I have copied inside Test Scriptlet After Page. After pasting code, I click "Done" button and then save the script. While doing this the script pane shows me syntax error but does not tell me what it is but highlights it with red color. I am even able to execute this VBScript code and get the desired result.
    Below is the code:
    Dim blnVal1
    Dim strVal
    Dim strTemp
    Function fn1(strTemp)
    MsgBox strTemp
    fn1 = True
    End Function
    strVal = "Hello World"
    blnVal1 = fn1(strVal)
    I get a syntax error for the statement where MsgBox line of code is written.
    Please can anyone help me why I am getting this syntax error. This is driving me nuts. Thanks.
    Regards,
    Harman

    My guess is that it doesn't like the Function statement and that you will have to just write your code page by page without the use of a function

  • Error in this  statement

    This statement return an SQLException which says:
    Syntax error in INSERT INTO statement
    String mySql_1 = " INSERT INTO MEAL(MEAL_AMT_LOADED)"
    "WHERE MEAL.STU_NUM = '" jtfStNo.getText().trim()
    "'VALUES('"+jtfAmLd.getText().trim()+"')";
    I want the following query statement to allow me to insert a meal amount of a particular student through jtfAmLd into the MEAL table whereby a student must be identified by a student number also to be provided in jtfStNo.
    I'll be glad if you can help me with this statement
    Cool.

    I want to know how am i going to update the second table MEAL which
    contains a foreign key STU_NUM which referenced STUDENT the table which contains STU_NUM as a primary key using the criteria of a STU_NUM.
    Duffymo and DrClap i have tried UPDATE as follows:
    String query = "UPDATE STUDENT,MEAL"+
    "SET MEAL.MEAL_AMT_LOADED = '" + jtfAmLd.getText().trim() +"',"+
    "MEAL.MEAL_REL_MADE = '"+jtfRM.getText().trim()+ "' "+
    "WHERE STUDENT.STU_NUM = MEAL.STU_NUM"+
    "AND STUDENT.STU_NUM = '" + jtfStNo.getText().trim() + "'";
    But it returns an error which says:
    Failed to insertjava.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE statement.

Maybe you are looking for