Syntax Error in Generation of Datasource

Hi,
I am attempting to generate a datasource for a planning area in APO-DP.  I go to Admin of DP & SNP, and in "Change Planning Area", I am in Extras-->Data extraction tools.  I name the datasource "DCDatasource" and click to generate.  A secondary screen comes up asking to input the Datasource Name.  9A is already in front and locked, then I type in "DCdatasource" after that and click the green check mark.  This is when I get a runtime error. 
It is a Syntax error in program "/SAPAPO/CL_IM_EXTRACT_EX======CP"
What happened?
    Error in the ABAP Application Program
    The current ABAP program "CL_EXIT_MASTER================CP" had  to be terminated because it has come across a statement that unfortunately cannot be executed.
    The following syntax error occurred in program
     "/SAPAPO/CL_IM_EXTRACT_EX======CP " in include
     "/SAPAPO/CL_IM_EXTRACT_EX======CM002 " in
    line 6:
    "The type "/BI0/9AOIVWKNDGD" is unknown."
Any ideas??

Please check all your infoobjects are properly active and then genarate the data source

Similar Messages

  • Error in Generation of datasource

    Hi Experts,
    Ii have requirement variant configuration and same i need to develop in BI system.
    when i try to generate the datasource by using Tcode CTBW error is displaying BW meta data is incomplete. i Searched  prvious thread couldn't get a solution . i dont hjave service .sap.com  to search the issue .can any one suggest me on this issue.
    Regards
    Sivaraju
    Edited by: kolli sivaraju on May 5, 2010 8:47 AM

    Hi,
    Try with these links
    CTBW error "BW metadata is incomplete"
    Problem in extracting classification data of a material
    Thx
    Edited by: satya prasad on May 6, 2010 9:17 AM

  • Syntax error on query generation

    Hi,
    When I try to generate report syntax error occures. It's not a custom code. What do you think about it ?
    (syntax error in the following code:
      return.
      perform Debug_xfems.
    See some piece of generated file :
    REPORT RSRRNAME.
    FORM SELECT_4.
      if G_S_QCF-cmess eq rrkg_C_cmess-error.
        perform CU_MESS_send.
      endif.
        read Table <G_THX_s> assigning <G_SX_S>
             with table key k = G_SX_s-k.
        if sy-subrc gt 0.
          insert G_SX_S into table <G_THX_S> assigning <G_SX_S>.
        endif.
    ENDFORM.
      FORM MOVE_Z_SP_0001.
    ENDFORM.
      return.
      perform Debug_xfems.
    form check_fems using value(I_fems) type i.
      perform I_fems of           " REP I_FEMS = 2
              MOVE_Z_SP_0001
              DEBUG_XFems.
    endform.                      " now look at G_TSX_XFems
    Thanks in advance.
    Fiodar.

    Hi,
    I would suggest that you check OSS for existing SAP notes on the issue and if you find nothing, please create a SAP customer message.
    All the best,
    Mike

  • Syntax error in program "SAPLXRSA " -SENT

    Hi Guys,
    I have done user exit in R/3 datasource when I do the test extraction using RSA3 and geting the data without any error. I've transport the requet to Test Box and tried to do the extraction in TestBox and getting the below SYNTAX Error message. Kindly advise it's very URGET. Thanks in advance.
    ShrtText
    Syntax error in program "SAPLXRSA ".
    What happened?
    Error in ABAP application program.
    The current ABAP program "SAPLRSAP" had to be terminated because one of the
    statements could not be executed.
    This is probably due to an error in the ABAP program.
    In program "SAPLXRSA ", the following syntax error occurred
    in the Include "ZXRSAU01 " in line 21:
    "Field "ZOXPRO0043" is unknown. It is neither in one of the specified t"
    "ables nor defined by a "DATA" statement. "DATA" statement."
    Author and last person to change the Include are:
    Author "SAPCHEOLENG "
    Last changed by "CCEV200 "
    What can you do?
    Please eliminate the error by performing a syntax check
    (or an extended program check) on the program "SAPLXRSA ".
    You can also perform the syntax check from the ABAP/4 Editor.
    If the problem persists, proceed as follows:
    Print out the error message (using the "Print" function)
    and make a note of the actions and input that caused the
    error.
    To resolve the problem, contact your SAP system administrator.
    You can use transaction ST22 (ABAP Dump Analysis) to view and administer
    termination messages, especially those beyond their normal deletion
    date.
    is especially useful if you want to keep a particular message.
    Error analysis
    In program "SAPLXRSA ", the following syntax error occurred:
    "Field "ZOXPRO0043" is unknown. It is neither in one of the specified t"
    "ables nor defined by a "DATA" statement. "DATA" statement."
    How to correct the error
    Probably the only way to eliminate the error is to correct the program.
    If you cannot solve the problem yourself and you wish to send
    an error message to SAP, include the following documents:
    1. A printout of the problem description (short dump)
    To obtain this, select in the current display "System->List->
    Save->Local File (unconverted)".
    2. A suitable printout of the system log
    To obtain this, call the system log through transaction SM21.
    Limit the time interval to 10 minutes before and 5 minutes
    after the short dump. In the display, then select the function
    "System->List->Save->Local File (unconverted)".
    3. If the programs are your own programs or modified SAP programs,
    supply the source code.
    To do this, select the Editor function "Further Utilities->
    Upload/Download->Download".
    4. Details regarding the conditions under which the error occurred
    or which actions and input led to the error.
    System environment
    SAP Release.............. "640"
    Application server....... "hawk"
    Network address.......... "137.132.12.22"
    Operating system......... "HP-UX"
    Release.................. "B.11.23"
    Hardware type............ "ia64"
    Character length......... 8 Bits
    Pointer length........... 64 Bits
    Work process number...... 0
    Short dump setting....... "full"
    Database server.......... "hawk"
    Database type............ "ORACLE"
    Database name............ "QAS"
    Database owner........... "SAPR3"
    Character set............ "en_US.iso88591"
    SAP kernel............... "640"
    Created on............... "Oct 16 2006 20:35:55"
    Created in............... "HP-UX B.11.23 U ia64"
    Database version......... "OCI_920 "
    Patch level.............. "153"
    Patch text............... " "
    Supported environment....
    Database................. "ORACLE 9.2.0.., ORACLE 10.1.0.., ORACLE
    10.2.0.."
    SAP database version..... "640"
    Operating system......... "HP-UX B.11"
    Memory usage.............
    Roll..................... 16128
    EM....................... 12569760
    Heap..................... 0
    Page..................... 65536
    MM Used.................. 1716768
    MM Free.................. 2470608
    SAP Release.............. "640"
    User and Transaction
    Client.............. 220
    User................ "CCEENGG"
    Language key........ "E"
    Transaction......... "RSA3 "
    Program............. "SAPLRSAP"
    Screen.............. "SAPMSSY0 1000"
    Screen line......... 6
    Information on where terminated
    The termination occurred in the ABAP program "SAPLRSAP" in
    "CALL_DATA_CUSTOMER_FUNCTION".
    The main program was "RSFHGEN2 ".
    The termination occurred in line 96 of the source code of the (Include)
    program "LRSAPF06"
    of the source code of program "LRSAPF06" (when calling the editor 960).
    Source Code Extract
    Line
    SourceCde
    66
    CALL FUNCTION BW_BTE_CALL_BW204010_E
    67
    EXPORTING
    68
    I_DATASOURCE = L_DATASOURCE
    69
    I_UPDMODE    = P_UPDMODE
    70
    TABLES
    71
    I_T_SELECT   = P_T_SELECT
    72
    I_T_FIELDS   = P_T_FIELDS
    73
    C_T_DATA     = P_T_DATA
    74
    C_T_MESSAGES = L_T_MESSAGES
    75
    EXCEPTIONS
    76
    OTHERS       = 1.
    77
    DESCRIBE TABLE P_T_DATA LINES L_LINES.
    78
    MESSAGE S408 WITH L_LINES.
    79
    Handle BTE-Exit error messages
    80
    IF SY-SUBRC <> 0.
    81
    P_SUBRC = SY-SUBRC.
    82
    IF 1 = 2. MESSAGE E021 WITH ''. ENDIF.
    83
    MESSAGE_WRITE 'E' 'R3' '021' 'BW_BTE_CALL_BW204010_E' '' '' ''.
    84
    ENDIF.
    85
    IF NOT L_T_MESSAGES IS INITIAL.
    86
    PERFORM WRITE_BTE_EXIT_MESSAGES TABLES   L_T_MESSAGES
    87
    CHANGING P_SUBRC.
    88
    ENDIF.
    89
    ENDIF.
    90
    ENDIF.
    91
    92
    Call Customer-Exit
    93
    DESCRIBE TABLE P_T_DATA LINES L_LINES.
    94
    MESSAGE S407 WITH 'EXIT_SAPLRSAP_001' 'CMOD' L_LINES.
    95
    CLEAR SY-SUBRC.
    >>>>>
    CALL CUSTOMER-FUNCTION '001'
    97
    EXPORTING
    98
    I_DATASOURCE             = L_DATASOURCE
    99
    I_ISOURCE                = L_12B_SOURCE
    100
    I_UPDMODE                = P_UPDMODE
    101
    TABLES
    102
    I_T_SELECT               = P_T_SELECT
    103
    I_T_FIELDS               = P_T_FIELDS
    104
    C_T_DATA                 = P_T_DATA
    105
    C_T_MESSAGES             = L_T_MESSAGES
    106
    EXCEPTIONS
    107
    RSAP_CUSTOMER_EXIT_ERROR = 1
    108
    OTHERS                   = 2.
    109
    DESCRIBE TABLE P_T_DATA LINES L_LINES.
    110
    MESSAGE S408 WITH L_LINES.
    111
    112
    Handle Customer-Exit error messages
    113
    IF SY-SUBRC <> 0.
    114
    P_SUBRC = SY-SUBRC.
    115
    IF 1 = 2. MESSAGE E020 WITH ''. ENDIF.
    Contents of system fields
    Name
    Val.
    SY-SUBRC
    0
    SY-INDEX
    1
    SY-TABIX
    1
    SY-DBCNT
    0
    SY-FDPOS
    0
    SY-LSIND
    0
    SY-PAGNO
    0
    SY-LINNO
    1
    SY-COLNO
    1
    SY-PFKEY
    SY-UCOMM
    SY-TITLE
    Report for the extractor call
    SY-MSGTY
    S
    SY-MSGID
    R3
    SY-MSGNO
    407
    SY-MSGV1
    EXIT_SAPLRSAP_001
    SY-MSGV2
    CMOD
    SY-MSGV3
    100
    SY-MSGV4
    Active Calls/Events
    No.   Ty.          Program                             Include                             Line
    Name
    5 FUNCTION     SAPLRSAP                            LRSAPF06                               96
    CALL_DATA_CUSTOMER_FUNCTION
    4 FORM         SAPLRSAP                            LRSAPF06                               96
    CALL_DATA_CUSTOMER_FUNCTION
    3 FORM         GP3PDR0GQDXJ0ZOA35DPGNCU80M         GP3PDR0GQDXJ0ZOA35DPGNCU80M           274
    PROCESS_DATA_PACKAGE
    2 FORM         GP3PDR0GQDXJ0ZOA35DPGNCU80M         GP3PDR0GQDXJ0ZOA35DPGNCU80M           170
    DATA_TRANSFER
    1 EVENT        RSFHGEN2                            RSFHGEN2                               59
    START-OF-SELECTION

    Hello Raja,
    I think some objects should still lying in the dev. server which are yet to be transported, also try to deactivate and reactivate the project for user exit for BW and transport it .
    Also manually request can be created for transporting object "ZOXPRO0043" into quality environment and transport it .
    Let us know the output for the same.
    Hope that helps.
    Regards
    Kapadia
    ***Assigning points is the way to say thanks in SDN.***

  • 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 in start routine

    Dear All,
    I have activated the infocube 0sd_c03 with grouping "in data flow before" and the infocube is activated with datasources
    2LIS_11_VAITM
    2LIS_11_VAHDR
    2LIS_12_VCITM
    2LIS_12_VCHDR
    2LIS_13_VDITM
    2LIS_13_VDHDR in 3.x where as
    TRCS 2LIS_13_VDITM -> CUBE 0SD_C03 in transformation with DTP.
    when I activate the transformation I get error as mentioned below:
    Start Routine: Syntax error in routine and in the start routine when I check the details of the error is
                      E:In PERFORM or CALL FUNCTION "ROUTINE_9998", the actual parameter
                               "SOURCE_PACKAGE" is incompatible with the formal parameter
                                   "DATA_PACKAGE".
    If source pakage is replaced by data package the system message is data_package is not available.
    What do I do to resolve this issue.
    KS

    hi,
    There is a structral diffrence between SOURCE_PACKAGE and DATA_PACKAGE
    so you need to change tys_SC_1_full
    go through the below links for similar problem
    Re: 0IC_C03: 2LIS_03_BF Transformation Start Routine Activation error
    Re: 2LIS_03_BF transformation problem

  • Syntax error  while executing Key Figure routine

    Hello,
    I am posting my question again, as I have not got any solution. Please help it will be really appreciated. Here's the description
    I am loading data from flatfile to an Infocube with 3 keyfigures: Sales Price , Sales Quantity, Sales Revune. Getting values for Sales Price and Salea Quantity  from flatfile and calculating for Sales Revunue IO_VB_REV using routine
    - I created Transformations, and under Rule Group: Standard Group box I have not mapped IO_VB_REV  any datasource field and see 'X' sign against the field.
    - In rules detail screen, I add two source fields of Rule , IO_VB_QU and IO_VB_PRC. I see IO_VB_REV already added under 'Target fields of Rule' section
    - I then add the only following line to routine
    RESULT = SOURCE_FIELDS_RULE-/BIC/IO_VB_QU * SOURCE_FIELDS_RULE-/BIC/IO_VB_PRC .
    - Clicking on check button it gives no syntax error message. I save and exit back to Rule Details page.
    - For IO_VB_REV field If I select any of 2 options i.e. Fixed Unit or No conversion it gives me a dump. So I select 'from conversion' option. In that case I enter USD against 'Conversion Type' field. It gives me information box popup with 'Incorrect Input Message'
    - When check button hit on 'Rule Details' page, it gives me error message ' Syntax error in routine '
    Why is it giving me syntax error, inspite of the fact that I get 'no syntax error' message on routine page. Also why am I getting short dumps on changing Conversion Type

    Hi Olivier,
    I really thank you for ur efforts in helping me solving this problem. Below is complete description of KF defined,
    1. Created InfoObjects for Sales Quantity, Sales Price, Sales Revunue
    Definition of <b>Sales Quantity</b>
    Name: IO_VB_QU
    Type/Data Type : Quantity
    Data Type: QUAN - Quantity field, points to unit field with format UN
    Currency / unit of measure
    Unit / Currency: 0UNIT
    Definition of <b>Sales Price</b>
    Name: IO_VB_PRC
    Type/Data Type : Amount
    Data Type: CURR - Currency field, stored as DEC
    Currency / unit of measure
    Fixed Currency: USD
    Definition of <b>Sales Revunue</b>
    Name: IO_VB_REV
    Type/Data Type : Amount
    Data Type: CURR - Currency field, stored as DEC
    Currency / unit of measure
    Fixed Currency: USD
    2. As the data is being read from flatfile, created DataSource with fields for Sales ID, Sales Price, Sales Quantity. As I am reading unit for quantity from file (has values EA,BOX,CSE), I have a corresponding field UNIT in DataSource. No field for Sales Revunue.
    3. I use 'Create Transformation' functionality to automatically create transformations.
    4. Rule Details page of each of 3 KFs has following values
    <b>Rule Details page of Sales Quantity</b>
    Rule Type: Direct Assignment
    Aggregation : Summation
    Target Unit: 0UNIT
    Unit: from Source
    Source Unit: UNIT
    Source Fields of Rule: /BIC/IO_VB_QU, UNIT
    Target Fields of Rule: 0UNIT, IO_VB_QU
    <b>Rule Details page of Sales Price</b>
    Rule Type: Direct Assignment
    Aggregation : Maximum
    Fixed Target Currency : USD
    Currency: No Conversion
    Source Fields of Rule: /BIC/IO_VB_PRC
    Target Fields of Rule:  IO_VB_PRC
    <b>Rule Details page of Sales Revunue</b>
    Rule Type: Routine   
    Aggregation : Summation
    Fixed Target Currency : USD
    Currency: from Conversion
    Conversion Type: ??????.....(I entered USD it gives me Incorrect Input message)
    Source Fields of Rule: /BIC/IO_VB_PRC, /BIC/IO_VB_QU, UNIT
    Target Fields of Rule:  IO_VB_REV
    I have this line is the routine 
    RESULT = SOURCE_FIELDS_RULE-/BIC/IO_VB_QU *   SOURCE_FIELDS_RULE-/BIC/IO_VB_PRC.
    Let me know if u need any other info......
    I really appreciate u trying  to help me
    Vidya

  • Getting syntax error while executing keyfigure routine BI 7.0

    Hello,
    I am writing a very simple keyfigure routine to calculate sales revune using sales quantity and sales price, I am getting error as follows
    - I am in 'Rules Details' screen and I have selected 'Routine' as the rule type. I enter the following code in routine
         RESULT = SOURCE_FIELDS_RULE-/BIC/IO_VB_QU *
         SOURCE_FIELDS_RULE-/BIC/IO_VB_PRC .
    - I hit the check button on the routine page, it says no syntax errors
    - Now I am back in the 'Rules Details' page and I hit the 'Check' button it gives me the following error
    Rule(target IO_VB_REV, group: Standard Group): Syntax error in routine
    Please tell me what is wrong. what should i check

    Hi Vaibhav,
    Here are the details
    - I am loading data from flatfile to an Infocube with 3 keyfigures: IO_VB_PRC (Sales Price) , IO_VB_QU (Sales Quantity), IO_VB_REV (Sales Revune). Getting values for IO_VB_QU and IO_Vb_PRC from flatfile and calculating for IO_VB_REV using routine
    - I created Transformations, and under  Rule Group: Standard Group box I see 'X' sign against 'IO_VB_REV' field, meaning not mapped to any datasource field
    - In rules detail screen, I add two source fields of Rule , IO_VB_QU and IO_VB_PRC. I see IO_VB_REV already added under 'Target fields of Rule' section
    - I then add the only following line to routine
    RESULT = SOURCE_FIELDS_RULE-/BIC/IO_VB_QU *    SOURCE_FIELDS_RULE-/BIC/IO_VB_PRC .
    Clicking on check button it gives no syntax error message. I save and exit back to Rule Details page.
    - I specify 'USD' as the Conversion Type and then click on check button it initially gives me 'Incorrect Input'  written in an information message box and then error that Syntax error in routine
    Let me know what is that I am missing
    Thanks for helping

  • Runtime Error in CA01 - Syntx error or generation error in a screen 1200.

    Hi,
    I am unable to identify the exact reson for this runtime error, please guid what i need to do to overcome this error.
    Transaction CA01.
    I am getting below Syntax Error in Screen 1200 of Prog SAPLCPDA
    Element CHANGE_RULE touches or overlaps other element
    Message no. 37315
    Please find below Error Log.
    Short text
        Syntx error or generation error in a screen.
    What happened?
        At the screen generation it was detected that a screen to be generated
        has a syntax error or could not be generated due to another error.
    What can you do?
        Note which actions and input led to the error.
        For further help in handling the problem, contact your SAP administrator
        You can use the ABAP dump analysis transaction ST22 to view and manage
        termination messages, in particular for long term reference.
    Error analysis
        Screen "SAPLCPDA" 1200 could not be generated.
    How to correct the error
        Rerport the error to SAP if it is a SAP screen.

    Hi,
    What are the possible reasons for getting this error.
    Runtime Error in CA01 - Syntx error or generation error in a screen 1200.
    Thanks in advance

  • EEWB - Syntax error while generating Enhancement Project component

    Hi,
    I'm using SAP CRM 7.0. I used EEWB (Extended Enhancement Workbench) to create a project and add 3 fields to Business Partner (BUPA). On generation I get an error 'Syntax error in Function Group SAPLZZG00BUPA: The field '"GV_ZZATTR1_PAI_ERROR" is unknown.
    There are these fields ZZATTR1 .... ZZATTR9 created by someone. Do not know in which enhancement they are in. But somehow the program generated by SAP - APLZZG00BUPA is giving this error. Is there a way to fix it?
    Any help or guidance will be appreciated.
    Regards,

    Hi Harshit,
    I check the details as mentioned by the thread. The structures are created properly.
    To give you more details:
    1. There is already one extension in the system created by someone - ADD NEW FIELDS - which created the structure with additional fields - ZBSTC0000000002.
    2. I did an extension - ADD NEW FIELDS which added another structure in CI_EEW_BUT000 and CI_EEW_BUT000_X - ZBSTC00009JACQV
    3. When I generate the project I get syntax error in SAPLZZG00BUPA - as the fields from prior structure do not exist in this program which is generated during the project generation.
    Regards,

  • MS SQL - Syntax error for valid query

    I have a problem with the second query in this code (gives me
    a syntax error in my HAVING line)
    <cfquery name="getDupes" datasource="#application.ODBC1#"
    dbtype="ODBC" username="#application.userNameODBC1#"
    password="#application.userPassODBC1#">
    SELECT *
    FROM view_FormCount
    WHERE formCount >= 2
    ORDER BY formNum
    </cfquery>
    <cfset variables.lstForms = "">
    <cfoutput query="getDupes">
    <cfset variables.lstForms=
    listAppend(variables.lstForms,"'#getDupes.formNum#'")>
    </cfoutput>
    <cfset variables.whereClause = "(formNum =
    #ReplaceNoCase(variables.lstForms,',',' OR formNum =
    ','ALL')#)">
    <cfquery name="getDetails"
    datasource="#application.ODBC1#" dbtype="ODBC"
    username="#application.userNameODBC1#"
    password="#application.userPassODBC1#">
    SELECT tblForms.formNum, tblForms.formName,
    tblForms.formCustNum, tblCompanies.companyAbbr
    FROM tblForms INNER JOIN tblCompanies ON tblForms.formCustNum
    = tblCompanies.companyNum
    GROUP BY tblForms.formNum, tblForms.formName,
    tblForms.formCustNum, tblCompanies.companyAbbr
    HAVING #variables.whereClause#
    ORDER BY tblForms.formNum, tblForms.formCustNum
    </cfquery>
    Now, the really odd thing is if I just take the query text
    out of the CFQUERY tags and use CFOUTPUT instead (to see in my
    browser what query is getting executed) I get a query that I can
    paste into Enterprise Mgr and runs fine.
    I can even paste the resulting text into my code in a CFQUERY
    and CF will run it fine.
    In other words, the dynamic version query gives me an error,
    but if I just output the SQL statement, copy-and-paste that into
    the CFQUERY that's erroring out (replacing what's there) to run as
    a static query, it works fine (sample of static query below).
    The error I get when I try to do it dynamically is "Error
    Executing Database Query. [Macromedia][SQLServer JDBC
    Driver][SQLServer]Line 4: Incorrect syntax near '10169318'. The
    error occurred on line 21." which is where the HAVING clause
    starts.
    SELECT tblForms.formNum, tblForms.formName,
    tblForms.formCustNum, tblCompanies.companyAbbr FROM tblForms INNER
    JOIN tblCompanies ON tblForms.formCustNum = tblCompanies.companyNum
    GROUP BY tblForms.formNum, tblForms.formName, tblForms.formCustNum,
    tblCompanies.companyAbbr HAVING (formNum = '10169318' OR formNum =
    '1016CONCERTA' OR formNum = '1016NSAIDS' OR formNum =
    '1016STRATTERA' OR formNum = '1016WELLBUTRIN' OR formNum =
    '18504211' OR formNum = '185093807' OR formNum = '73208565' OR
    formNum = '732120027' OR formNum = '7322154' OR formNum = '7323402'
    OR formNum = '7323522' OR formNum = '73238900' OR formNum =
    '7324211' OR formNum = '7324211S' OR formNum = '7324265' OR formNum
    = '73242891' OR formNum = '732434341' OR formNum = '732434342' OR
    formNum = '73243435' OR formNum = '73243436' OR formNum =
    '73243439' OR formNum = '73243440' OR formNum = '73243441' OR
    formNum = '73243442' OR formNum = '73243443' OR formNum = '7324359'
    OR formNum = '7324360' OR formNum = '7324370' OR formNum =
    '7324560' OR formNum = '7324959' OR formNum = '7326411ptreg' OR
    formNum = '7326599' OR formNum = '7326600' OR formNum = '7326620'
    OR formNum = '7326707' OR formNum = '7326931' OR formNum =
    '7328410' OR formNum = '732851031TOP' OR formNum = '7328512' OR
    formNum = '7328548' OR formNum = '7328548P2' OR formNum =
    '7328548P3' OR formNum = '7328548P4' OR formNum = '73289400' OR
    formNum = '73290D' OR formNum = '7329154' OR formNum =
    '73291544JHS' OR formNum = '73291545JHS' OR formNum =
    '73291546JHSMH' OR formNum = '73291547JHSMH' OR formNum = '7329174'
    OR formNum = '7329308' OR formNum = '7329402' OR formNum =
    '7329424' OR formNum = '7329455' OR formNum = '7329520' OR formNum
    = '7329539' OR formNum = '73297701JH' OR formNum = '73298273' OR
    formNum = '73298400' OR formNum = '73298403' OR formNum =
    '73298404' OR formNum = '7329883' OR formNum = '73298860' OR
    formNum = '7329887' OR formNum = '73298974' OR formNum = '7329899'
    OR formNum = '7329899S' OR formNum = '73299190' OR formNum =
    '7329987' OR formNum = '7329999PTO' OR formNum = '732AV5160' OR
    formNum = '732CMHFRAZ' OR formNum = '732HIPAA' OR formNum =
    '732HIPAAFLYERS' OR formNum = '734HEART' OR formNum = '7444711' OR
    formNum = '7449230' OR formNum = '744HR4991' OR formNum =
    '7538014MI' OR formNum = '77511044' OR formNum = '77511045' OR
    formNum = '775stampnochange' OR formNum = '80851001BLUE' OR formNum
    = '80MR4200' OR formNum = '80MR4273' OR formNum = '80MR4274' OR
    formNum = '80MR4300' OR formNum = '80MR9934' OR formNum =
    '80MR9935' OR formNum = '80SHC100' OR formNum = '80SHC4301' OR
    formNum = '80SHC9830' OR formNum = '80SHC9832') ORDER BY
    tblForms.formNum, tblForms.formCustNum

    AWFrueh1808 wrote:
    > OK, that's simple enough. But then I'm really confused
    as to why the query in
    > my original post/example didn't work.
    >
    > The only single quotes in my #whereClause# variable were
    wrapped around each
    > varchar value in the WHERE clause (well, HAVING) as in
    HAVING formNum = '12345'
    > OR formNum = '54321'
    >
    > I never used a single quote within the value itself. And
    yet
    > preservesinglequotes fixed it. So what was CF doing? Why
    did the single
    > quotes still show up in the error msg - and in the right
    place?
    >
    As I said the default behavior is to escape the quotes in
    your variables
    as data. So the default output of your SQL statement, before
    preserveSingleQuotes() would be like this.
    HAVING formNum = ''12345'' OR formNum = ''54321''
    As you can see that is not the desired results in your case.
    In your
    case you have the proper number of single quotes in your
    string and you
    do not want any added. You want to preserve them so to say.
    Thus
    adding preserveSingleQuotes() around your whereClase
    variable, i.e.
    preserveSingleQuotes(whereClause) says do not add any quotes,
    keep them
    all single.

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

  • Hierarchy load - Error RSAR 683 Syntax error in generated program, row 0

    Hi guys,
    When I load the hierarchy on ZMATERIAL (load from 0MATERIAL hierarchy - source system BW), I have this error message : RSAR 683 Syntax error in generated program, row 0.
    I have found several SAP notes, especially [Sap Note 944842|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_bw_whm/~form/handler], but the implementation on our system does not change anything.
    We are working on BW3.5 SP12.
    Can anyone could tell me what to do ?
    Will this issue be solved once we upgrade until SP18 as it is mentionned in the SAPNote ?
    Thanks,
    Alexandra
    Edited by: Alexandra Guillaux on Apr 1, 2009 4:36 PM

    Hello Alex,
    after implementing the corrrection part of note 944842 via SNOTE, plaese also:
    1. replicate datasource
    2. activate transfer structure (report RS_TRANSTRU_ACTIVATE_ALL)
    3. activate infoobject   (make dummy change to description
    of infoobject etc, save and activate it, remove change and save and
    activate it again).
    Hope it could resolve the incident.
    Thank you & Best regards,
    Vince

  • Syntax Error in generated program.

    Hi Experts -
    I saw a similar thread regarding the issue I'm having but I thought I'd open another thread.
    0CMMT_ITEM_FMCI_PU_HIER Syntax Error for Generated Program
    I'm doing an extraction for 0CRM_ORGUNIT_HR01_HIER in RSA3 of CRM.
    I get an error message:
    Message RJ028 : Error 6 in function module RSS_PROGRAM_GENERATE
    There is a syntax error in the code.
    How do you solve this issue?
    We applied OSS note 822323 but still get the same error. The code still has the syntax error.
    Any one saw this or have any solutions? Please let me know. Thanks a lot in advance!

    Hi,
    Use the program RSA1HCAT in SE38 to check your hierarchy.
    Transaction RSA3 was not developed for checking hierarchy DataSources.
    Rather, it is only for transaction and attribute/text datasources.  If
    you want to check the extraction of hierarchy datasources in the R/3
    system, you should use the report RSA1HCAT.  In this report, enter the
    name of the hierarchy datasource in the "DataSource with HierarchyType"
    field.
    For this problem look at the note: 632920.
    Regards,
    Srikanth.

  • Syntax error in insert query

    I have a flash form that is used to inserts a record into an
    Access database table. In the for there are 4 datefields, several
    text input fields, and several select fields. When I submit the
    form, I get a syntax error that reads:
    Executing Database Query. [Macromedia][SequeLink JDBC
    Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver]
    Syntax error in INSERT INTO statement.
    The error occurred on line 184. Complex object types cannot
    be converted to simple values.
    Line 184 is the last line of the Values in the insert query.
    The query looks like this:
    <CFQUERY DATASOURCE="#REQUEST.DataSource#">
    INSERT INTO EstimateNumber(
    BidNumber,
    Project,
    JobSite,
    EstimatedBy,
    Region,
    Company,
    Division,
    InquiryNumber,
    SafetyChecklist,
    SafetyChecklistDate,
    QCChecklist,
    QCChecklistDate,
    EstimatedValue,
    UserUsername,
    UserPassword,
    Updated,
    ReviewDate,
    ReviewedBy,
    Discipline,
    BidDate,
    JobNumber,
    UpdatedBy
    VALUES(
    #FORM.BidNumber#,
    '#FORM.Project#',
    '#FORM.JobSite#',
    '#FORM.EstimatedBy#',
    #FORM.Region#,
    #FORM.Company#,
    #FORM.Division#,
    '#FORM.InquiryNumber#',
    #FORM.SafetyChecklist#,
    #FORM.SafetyChecklistDate#,
    #FORM.QCChecklist#,
    '#FORM.QCChecklistDate#',
    #FORM.EstimatedValue#,
    '#FORM.UserUsername#',
    '#FORM.UserPassword#',
    #FORM.Updated#,
    #FORM.ReviewDate#,
    #FORM.ReviewedBy#,
    #FORM.Discipline#,
    #FORM.BidDate#,
    #FORM.JobNumber#,
    '#FORM.UpdatedBy#'
    </CFQUERY>
    Any recomendations?

    Date/Time in Access provide some pretty strage hurdles. In
    many occassions I have simply changed the field to a Text field and
    ran with that and never seemed to have problems with the result. I
    didn't like doing it but I never received errors. I have been
    receiving some parameter errors with <cfqueryparam> like the
    database doesn't recognized the preceding declared field in the
    update or insert query. Here is an example of a wierd error with
    Access. I have 2 tables. One is for estimate numbers and the other
    is for sub estimate numbers that can be assigned to specific
    estimate numbers. If is actually a complicated explanation about
    what is taking place behind the doors on this. The concept is
    simple on the surface. Both tables have the same fields except the
    subestimate table has 1 extra for a user defined subestimate
    number. The only relation between the two will be the estimate
    number. This insert works fine.
    INSERT INTO EstimateNumber(
    BidNumber,
    Project,
    JobSite,
    EstimatedBy,
    Region,
    Company,
    Division,
    InquiryNumber,
    SafetyChecklist,
    SafetyChecklistDate,
    QCChecklist,
    QCChecklistDate,
    EstimatedValue,
    UserUsername,
    UserPassword,
    ReviewDate,
    Discipline,
    BidDate,
    JobNumber,
    UpdatedBy
    VALUES(
    #FORM.BidNumber#,
    '#FORM.Project#',
    '#FORM.JobSite#',
    '#FORM.EstimatedBy#',
    #FORM.Region#,
    #FORM.Company#,
    #FORM.Division#,
    '#FORM.InquiryNumber#',
    #FORM.SafetyChecklist#,
    <cfqueryparam
    value="#FORM.SafetyChecklistDate#"
    cfsqltype="CF_SQL_DATE "
    maxlength="50"
    >,
    #FORM.QCChecklist#,
    <cfqueryparam
    value="#FORM.QCChecklistDate#"
    cfsqltype="CF_SQL_DATE "
    maxlength="50"
    >,
    #FORM.EstimatedValue#,
    '#FORM.UserUsername#',
    '#FORM.UserPassword#',
    <cfqueryparam
    value="#FORM.ReviewDate#"
    cfsqltype="CF_SQL_DATE "
    maxlength="50"
    >,
    #FORM.Discipline#,
    <cfqueryparam
    value="#FORM.BidDate#"
    cfsqltype="CF_SQL_DATE "
    maxlength="50"
    >,
    #FORM.JobNumber#,
    '#FORM.UpdatedBy#'
    This next one is the same exact query with the same table
    setup with one added field but kicks back a parmeter error
    expecting 4. I can't explain it.
    INSERT INTO SubEstimate(SubBidNumber,
    BidNumber,
    Project,
    JobSite,
    EstimatedBy,
    Region,
    Company,
    Division,
    InquiryNumber,
    SafetyChecklist,
    SafetyChecklistDate,
    QCChecklist,
    QCChecklistDate,
    EstimatedValue,
    UserUsername,
    UserPassword,
    ReviewDate,
    Discipline,
    BidDate,
    JobNumber,
    UpdatedBy
    VALUES(#FORM.SubBidNumber#,
    #FORM.BidNumber#,
    '#FORM.Project#',
    '#FORM.JobSite#',
    '#FORM.EstimatedBy#',
    #FORM.Region#,
    #FORM.Company#,
    #FORM.Division#,
    '#FORM.InquiryNumber#',
    #FORM.SafetyChecklist#,
    <cfqueryparam
    value="#FORM.SafetyChecklistDate#"
    cfsqltype="CF_SQL_DATE "
    maxlength="50"
    >,
    #FORM.QCChecklist#,
    <cfqueryparam
    value="#FORM.QCChecklistDate#"
    cfsqltype="CF_SQL_DATE "
    maxlength="50"
    >,
    #FORM.EstimatedValue#,
    '#FORM.UserUsername#',
    '#FORM.UserPassword#',
    <cfqueryparam
    value="#FORM.ReviewDate#"
    cfsqltype="CF_SQL_DATE "
    maxlength="50"
    >,
    #FORM.Discipline#,
    <cfqueryparam
    value="#FORM.BidDate#"
    cfsqltype="CF_SQL_DATE "
    maxlength="50"
    >,
    #FORM.JobNumber#,
    '#FORM.UpdatedBy#'
    IF I get rid of the cfqueryparam fields it works. If I simply
    remove the param, I get a Syntax error. Needless to say I commented
    this query for the sake of sanity for the time being.

Maybe you are looking for

  • HT1692 Do I need outlook to sync my iPhone and ipad calendar?

    Do you need to setup outlook to be able to sync your ipad and iPhone calendars?

  • Installing Lightroom 5 on windows 7 64bit does not work.

    Installing Lightroom on Windows 7 doesn't work. It just sits at the "preparing files"stage and does nothing.

  • Updates are failing on Photoshop Elements 9 and Premier 9.

    I had to replace a failing hard drive so I deactivated my Photoshop Elements and Premier 9 before replacing the hard drive.  Reinstalled successfully.  Tried to do the updates but they fail with the following messages:  I have tried to run the update

  • Requirement in Sales

    Hi!! I Just had a requirement in Sales Process. Clients Sales Employee is Based at Customers Place from where he creates Sales Orders. During the process, Customer makes a bargain on Price of a product. Now Sales Employee cannot create Sales order on

  • Select into Temp Table Identity Column

    I'm trying to select data into a temp table but how would I select the identity column into my temp table. This is what I have so far(RefId is the identity Column (1,1) BEGIN TRAN SELECT [RefId] ,[Name] ,[CreationDate] ,[CreatedBy] ,[ModificationDate