Regarding syntax errors

Hi guys,
Above 46C system, Can we use SLIN or FM 'Extended program check' instead of SCI.
Both outputs are same with respect listing Syntax errors/Warnings/Messages? please confirm.
Regards
Ambichan

Both the Outputs are not same.
SLIN is an extended syntax check.
SCI is Code inspector,  a tool for checking Repository objects regarding performance, security, syntax, and adherence to name conventions and other formats that you set in.You can also determine statistical information or search for certain ABAP words (tokens). In the Code Inspector, you can define inspections that, with the help of check variants, examine certain sets of objects. As the result of an inspection, you receive information messages, warning messages, or error messages on different properties of the examined objects.
SLIN
Many checks are excluded from the standard syntax check for performance reasons. The extended program check performs a complete check that includes the interfaces of external procedures called from your program.
Errors in the extended program check cause exceptions, which in turn cause runtime errors when you run the program. You must correct them. The exception to this is coding that cannot be reached. However, you should delete this to minimize the size of your program and make the source code easier to understand.
Warnings in the extended program check should also be corrected. If your program contains statements that are definitely correct but still produce warnings in the extended program check, you can exclude them from the check using pseudocomments ( "#EC… ).
You should always run the extended program check on a new program. You have not finished developing a new program until you can run the extended program check on it without any errors or warnings. Messages are permissible, since they are generally not critical.
The extended program check is also only a static check. It cannot eliminate all of the circumstances that could lead to exception situations or runtime errors. For example, any statements in which you specify arguments dynamically as the contents of fields, or in which you call procedures dynamically, cannot be checked statically.
SCI
It helps developers to adhere to programming standards and guidelines by creating messages on less-than-optimal coding. The Code Inspector offers various possibilities to define object sets and to combine multiple single checks in so-called "check variants". These functions, and the tool's parallel processing framework, make the Code Inspector a flexible and effective development assistant.
The Code Inspector can be used in various scenarios with different types of checks, thus providing insights into the code quality from various angles.
Usage scenarios
1. Single object checks from the Development Workbench
You can check a single object with the Code Inspector from the ABAP Editor (transaction SE38), the Function Builder (transaction SE37), the Class Builder (transaction SE24), or the ABAP Data Dictionary (transaction SE16). To do this, choose object Check Code Inspector from the menu, where object can be a program, function module, class, or table. The respective single objects are then checked with a default check variant.
2. Checks on transport objects from the Transport Organizer
You can invoke the Code Inspector from within the Transport Organizer (transaction SE09) to check objects in a transport request. To do this, choose Request/Task > Complete Check > Objects (Syntax Check).
3. Checks on sets of objects from transaction SCI
The Code Inspector (transaction SCI) itself enables you to create a wide range of object sets using standard selections via package, software and application component, source system, transport layer, responsible, object type, object name and so on.
In addition, special object collectors are available that allow you to read objects from a file, for example.
An object set can be combined with a check variant to a so-called "inspection" that can be executed in a single process or in parallel.
Types of checks and check variants
Below is a short extract of the types of checks and functions that are offered by Code Inspector. New checks can be implemented if required, see for example Code Inspector - How to create a new check .
• Syntax
Syntax check; extended program check
• Performance
Analysis of WHERE clauses for SELECT, UPDATE and DELETE ; SELECT statements that bypass the table buffer , low-performance operations on internal tables; table attributes check
• Security
Usage of critical statements; dynamic and cross-client database accesses; use of ADBC-interface
• Robustness
Check of SY-SUBRC handling; suspect conversions; activation check for DDIC objects
• Programming Conventions
Naming conventions
• Search Functions
Search of ABAP tokens; search ABAP statement patterns; search for ABAP statements with regular expressions
• Metrics and Statistics
Program complexity test; statement statistics
You can combine any of these single checks into so-called "check variants", for example to check for the adherence to given programming guidelines.
Best Practices
Developers can use the Code Inspector to support their everyday work. For example, the search functions or metric checks of the tool can be a great help when restructuring the code.
The Code Inspector allows developers to define which objects are to be checked and which quality aspect of the code is to be inspected (e.g. performance, security).
It is also possible to define global check variants as general programming guidelines, to ensure standardized programming within a development community.
Check variants can prescribe for example naming conventions or other rules. The global check variants 'DEFAULT' and 'TRANSPORT' inspect objects in the development workbench and in transport requests, respectively. These check variants contain SAP-defined settings, but can be modified as needed.
Another global check variant delivered with every SAP system is 'PERFORMANCE_CHECKLIST' which helps to detect less-than-optimal coding with regard to application performance.
Hope this Helps.
Vinodh Balakrishnan

Similar Messages

  • Regarding syntax error while updating from 4.6b to ECC 6.0

    hello Experts,
    I'm presently working in upgrade project, Here it shows an error for one of the form pasted below.
    FORM MAKEPRINT USING TXT.
    DATA: BEGIN OF CVT_TABLE,
            X0(1) TYPE X VALUE 0,
            C0(1) VALUE '#',
            X1(1) TYPE X VALUE '7F',
            C1(1) VALUE '#',
            END OF CVT_TABLE.
      TRANSLATE TXT USING CVT_TABLE.
    ENDFORM.                    "MAKEPRINT
    Error - CVT_TABLE must be a character type data object ( data type C,N,D,T or STRING ).
    I dont have solution for the above code, Would you please kindly provide me the solution.
    <removed_by_moderator>
    Thanks,
    Abdur
    Edited by: Julius Bussche on Sep 22, 2009 1:26 PM
    Edited by: Julius Bussche on Sep 22, 2009 1:26 PM

    Hi,
           This happens due to unicode conversion in ECC.You will have to change the type X to type C using the class cl_abap_char_utilities. For code help see the below link
    http://help.sap.com/saphelp_nw04/helpdata/EN/79/c554d9b3dc11d5993800508b6b8b11/content.htm

  • ECC 6.0 related syntax error

    Hello Folks,
    My self Chetan , I am working in ABAP. I am on project, Now we are moving to ECC 6.0 from 4.7 and I am facing problem in some program regarding syntax error. I want remove the syntax error. Currently I am facing two problem.
    1. In one program there are three standards includes but they are not define so program is giving error include not found. then how can I remove this error.
    2. In second program it's giving error CCR1S table does not have BUKRS field but in 4.7 it BUKRS field is present .
    Can any bode please guide me in this issue.
    Thanks
    Chetan Chauhan.

    Hi
    1. In one program there are three standards includes but they are not define so program is giving error include not found. then how can I remove this error.
    If the program is a custom program as copy of std one, u should check the std program of rel. ecc 6.00 and find out how now the includes are called.
    If the program is std, u should active the version of release 6.00
    2. In second program it's giving error CCR1S table does not have BUKRS field but in 4.7 it BUKRS field is present .
    U should change the program in order to delete the code using that field, if u can't do it u should create a new structure ZCCR1S including CCR1S and add the field BUKRS, then use this new structure instead of std one.
    Max

  • Regarding EDI: Syntax error in IDoc (segment cannot be identified)

    Hi,
    My requirement is that I was adding two diffrent field values under two diffrent segments as "E1EDKA1" and "E1EDK02" in outbound invoice IDOCS, INVOIC02 (process code: SD09 - IDOC_OUTPUT_INVOIC).
    I am getting the IDOC number through Tcode "VF02". Can any body give me idea how to check that syntax error in debug mode.
    Please find the following error details using TCODE "WE02".
    *EDI: Syntax error in IDoc (segment cannot be identified)*
    *Message no. E0 078*
    *Diagnosis*
    *The segment E1EDKA1 does not occur at the current level of the basic type INVOIC02 (extension ).*
    *This error can have several reasons:*
    *The segment E1EDKA1 is assigned to a group whose header segment does not occur.*
    *The segment E1EDKA1 does not exist in the syntax description of the basic type INVOIC02 (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.*
    Please help me to resolve this problem. <REMOVED BY MODERATOR>
    Regards,
    Skumar.
    Edited by: Alvaro Tejada Galindo on Apr 28, 2008 1:09 PM

    It seems that you added segment E1EDKA1 at a place where it is not supposed to be. That's where this error is coming from. The structure of every IDOC is definded by SAP standard and you cannot change the sequence or the level of standard segments. If you require a certain field at a certain level you have to add that field to a Z-segment and then add that Z-segment where appropriate in your extension.
    Hope that helps,
    Michael

  • Can u suggest me regarding this syntax error

    Hi friends,
    While modifying a SAP program, i came across a syntax error- " Literals cannot be extended more than one line" in ECC6.0 server.
    this is the msg for which i am getting error-
    " MESSAGE 'Associate should be transferred back to the unit
    effective from the forced transfer date' TYPE 'E'.
    i have tried to resolve it by making it a msg of single line but i couldnt. so pls let me know how can i proceed.
    Thank you
    Nasreen

    Hi Nasreen,
              If you are hard coding the message it will take arnd 142 char. the error might be cause it was not activated. just activate and when pop-up comes 'error duringing activation', press Activate anyway.
    if this doesnt help, changes message type as 'I' and make syre thet message is in one line.
    altenately you can go with message class. but dont pass such message as variable coz it will take max of 50 char.
    for example:
    variable = 'abcedd...................... more that 52 char)
    message e000 with <variable>
                the in output you get message defined in message class and 50 char of variable.
    Thank & regards

  • Syntax error while writing a select query.

    Hi all,
    I have a requirement where I have to pick a value if the text for that value is
    MYCARu2019S Lovliest Car.
    And so I wrote a query that
    SELECT     RUECK INTO XRUECK FROM AFVC WHERE ltxa1 = ' MYCARu2019S Lovliest Car'.
                    ENDSELECT.
    But it gives me a syntax error saying     
    u201CLiterals taking up more than one line not permittedu201D.
    Can some one tell me what is wrong. I need to select RUECK value from AFVC  table if
    ltxa1 value is ' MYCARu2019S Lovliest Car'.
    Kindly help what is going wrong...
    Regards,
    Jessica Sam

    Hi,
    Narendran is right use two single quotes.
    also careful wile comparing string. i think as you write ltxa1 value is ' MYCARu2019S Lovliest Car'.
    so while comparing you must not use space just before staring use the following
    SELECT  rueck INTO xrueck FROM afvc WHERE ltxa1 = 'MYCAR''S Lovliest Car'. " Not use Space before M
    ENDSELECT.
    Hope will help you.
    Kind Regards,
    Faisal

  • Syntax error while running a driver program

    Hi experts,
                 I have developed a smartforms,in which i have declared the following,
                    ITAB TYPE TABLE OF MARA, in import tab of form interface...
    and in se38 i have declared...
    data: itab like mara occurs 0.
    bujt when i am running this program, i am getting syntax error "ITAB" is neither specified under "TABLES" nor defined as internal tabels..
    plz tell me why this probleming is occuring?and how can i solve this....
    thnks n regards,
    Ashmita.

    in form interface try to declare in tables tab
    or
    global data > types tab and declare global  table using that type.

  • Can not use SUM in a simple query because of a syntax error?

    Hi
    Thank you for reading my post.
    I am trying to execute the following query:
    q = em.createQuery("SELECT SUM((NE.pipeLength - 0.6)+((NE.networkDepth-NE.initialDepth)*0.41)+ NE.standLenght)  FROM NExpansion NE  where (( NE.contract.contractor=:contractor) AND (NE.pDiameter=:diameter))");
                  q.setParameter("contractor", contractor);
    q.setParameter("diameter", diameter);
         l =  (Long) q.getSingleResult();And I get the following error:
    Caused by: Exception [TOPLINK-8025] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.EJBQLException
    Exception Description: Syntax error parsing the query [SELECT SUM((NE.pipeLength - 0.6)+((NE.networkDepth-NE.initialDepth)*0.41)+ NE.standLenght)  FROM NExpansion NE  where (( NE.contract.contractor=:contractor) AND (NE.pDiameter=:diameter))], line 1, column 12: unexpected token [(].
    Internal Exception: line 1:12: unexpected token: (
            at oracle.toplink.essentials.exceptions.EJBQLException.unexpectedToken(EJBQLException.java:389)
            at oracle.toplink.essentials.internal.parsing.ejbql.EJBQLParser.handleANTLRException(EJBQLParser.java:350)
            at oracle.toplink.essentials.internal.parsing.ejbql.EJBQLParser.addError(EJBQLParser.java:278)
            at oracle.toplink.essentials.internal.parsing.ejbql.EJBQLParser.reportError(EJBQLParser.java:378)
            at oracle.toplink.essentials.internal.parsing.ejbql.antlr273.EJBQLParser.aggregateExpression(EJBQLParser.java:1416)
            at oracle.toplink.essentials.internal.parsing.ejbql.antlr273.EJBQLParser.selectExpression(EJBQLParser.java:1158)
            at oracle.toplink.essentials.internal.parsing.ejbql.antlr273.EJBQLParser.selectClause(EJBQLParser.java:403)
            at oracle.toplink.essentials.internal.parsing.ejbql.antlr273.EJBQLParser.selectStatement(EJBQLParser.java:178)
            at oracle.toplink.essentials.internal.parsing.ejbql.antlr273.EJBQLParser.document(EJBQLParser.java:135)
            at oracle.toplink.essentials.internal.parsing.ejbql.EJBQLParser.parse(EJBQLParser.java:166)
            at oracle.toplink.essentials.internal.parsing.ejbql.EJBQLParser.buildParseTree(EJBQLParser.java:127)
            at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:215)
            at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:189)
            at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:153)
            at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.<init>(EJBQueryImpl.java:114)
            at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.<init>(EJBQueryImpl.java:99)
            at oracle.toplink.essentials.internal.ejb.cmp3.EJBQueryImpl.<init>(EJBQueryImpl.java:86)
            at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerImpl.createQuery(EntityManagerImpl.java:204)
            ... 30 more
    Caused by: line 1:12: unexpected token: (
            at oracle.toplink.essentials.internal.parsing.ejbql.antlr273.EJBQLParser.aggregateExpression(EJBQLParser.java:1365)
            ... 43 morePlease let me know what am I doing wrong?
    Thanks.

    Hello,
    From the grammar in the JPA spec, SUM only takes a state_field_path_expression which is defined as
    state_field_path_expression := {identification_variable | single_valued_association_path_expression}.state_field
    Please feel free to file an enhancement to have this expanded upon.
    Best Regards,
    Chris

  • SYNTAX_ERROR unable to log in to SAP system Syntax error in program "SAPMSE

    hi SAP Experts,
    I have applied Basis patch 12 and I scheduled the background.  Backgroud job was terminated. System became slow. Then I stopped the server and restarted.  Now, I am unable to log in to SAP GUI by entering Username and Password and getting syntax error.
    Syntax error in program "SAPMSEM1".
    What happened?
    Error in the ABAP Application Program
    The current ABAP program '????????????????????????????"
    terminated because it has
    come across a statement that unfortunately cannot be executed.
    The following syntax error occured in program "SAPMSEM1" in include
    "CL_SALV_FORM_ELEMET==========CU" in
    line 13:
    "the type "IF_SALV_FORM_CONFIG" is unknown."
    The include has been created and last changed by:
    Created by: "SAP "
    Last Changed by: "SAP "
    I am unable to access any transction code.
    Please help me..
    Thanks in advance...
    Raju

    hi,
    Thanks for your response.
    i haven't take any back up.  can u pls tell me step by step procedure to implement the SP with TP.
    your answer will be helpful..
    Regards
    Raju

  • DB2 9.7 DFACT.SQL syntax error in Import ABAP phase - System Copy

    Hi all. I'm trying a system copy with a source system SAP ECC 6.0 ehp4 based on NW 701 and db2 LUW 9.1 .
    As it seems supported by SAP, i'm using db2 LUW 9.7 in target system.
    O.S. is Windows 2008.
    I got an error in phase "Import ABAP".
    Sapinst.log says:
    INFO 2010-02-18 10:12:14.337
    An error occured and the user decided to retry the current step: "|NW_ABAP_OneHost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|1|0|NW_CreateDBandLoad|ind|ind|ind|ind|10|0|NW_ABAP_Import_Dialog|ind|ind|ind|ind|5|0|NW_ABAP_Import|ind|ind|ind|ind|0|0|runMigrationMonitor".
    INFO 2010-02-18 10:12:14.509
    Switched to user: devadm.
    INFO 2010-02-18 10:12:14.572
    Creating file C:\Program Files\sapinst_instdir\ERPEhP4\LM\COPY\DB6\SYSTEM\CENTRAL\AS-ABAP\import_monitor.java.log.
    INFO 2010-02-18 10:12:14.603
    Switched to user: devadm.
    INFO 2010-02-18 10:12:14.618
    Working directory changed to C:\Program Files\sapinst_instdir\ERPEhP4\LM\COPY\DB6\SYSTEM\CENTRAL\AS-ABAP.
    INFO 2010-02-18 10:12:14.618
    Output of C:\j2sdk1.4.2_24-x64\bin\java.exe -classpath migmon.jar -showversion -Xmx1024m com.sap.inst.migmon.imp.ImportMonitor -sapinst is written to the logfile import_monitor.java.log.
    WARNING 2010-02-18 10:12:44.790
    Execution of the command "C:\j2sdk1.4.2_24-x64\bin\java.exe -classpath migmon.jar -showversion -Xmx1024m com.sap.inst.migmon.imp.ImportMonitor -sapinst" finished with return code 103. Output:
    java version "1.4.2_24-rev"
    Java(TM) Platform, Standard Edition for Business (build 1.4.2_24-rev-b06)
    Java HotSpot(TM) 64-Bit Server VM (build 1.4.2_24-rev-b06, mixed mode)
    Import Monitor jobs: running 1, waiting 1, completed 73, failed 0, total 75.
    Loading of 'SAPDFACT' import package: ERROR
    Import Monitor jobs: running 0, waiting 1, completed 73, failed 1, total 75.
    WARNING[E] 2010-02-18 10:12:44.790
    CJS-30022  Program 'Migration Monitor' exits with error code 103. For details see log file(s) import_monitor.java.log, import_monitor.log.
    ERROR 2010-02-18 10:12:44.790
    FCO-00011  The step runMigrationMonitor with step key |NW_ABAP_OneHost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|1|0|NW_CreateDBandLoad|ind|ind|ind|ind|10|0|NW_ABAP_Import_Dialog|ind|ind|ind|ind|5|0|NW_ABAP_Import|ind|ind|ind|ind|0|0|runMigrationMonitor was executed with status ERROR .
    Looking into import_monitor.java.log i found that the problem is in dfact import.
    I've looked into sapdfact.log and i found:
    S:\usr\sap\DEV\SYS\exe\uc\NTAMD64\R3load.exe: START OF LOG: 20100218105045
    S:\usr\sap\DEV\SYS\exe\uc\NTAMD64\R3load.exe: sccsid @(#) $Id: //bas/701_REL/src/R3ld/R3load/R3ldmain.c#8 $ SAP
    S:\usr\sap\DEV\SYS\exe\uc\NTAMD64\R3load.exe: version R7.01/V1.4 [UNICODE]
    Compiled Jan 28 2010 20:22:25
    S:\usr\sap\DEV\SYS\exe\uc\NTAMD64\R3load.exe -i SAPDFACT.cmd -dbcodepage 4103 -l SAPDFACT.log -stop_on_error -loadprocedure fast LOAD:COMPRESS_ALL
    (DB) INFO: connected to DB
    (DB6) INFO: COMPRESS YES is set during table creation.
    (DB6) DB2 9.5 automatic dictionary creation does not require an explicit REORG.
    (DB6) Compression threshold is ignored.
    (GSI) INFO: dbname   = "DEV                                                                                "
    (GSI) INFO: vname    = "DB6                             "
    (GSI) INFO: hostname = "UNKNOWN                                                         "
    (GSI) INFO: sysname  = "Windows NT"
    (GSI) INFO: nodename = "SRVSAPDEV"
    (GSI) INFO: release  = "6.0"
    (GSI) INFO: version  = "6002 Service Pack 2"
    (GSI) INFO: machine  = "4x AMD64 Level 6 (Mod 26 Step 5)"
    (DB) ERROR: DDL statement failed with SQL error
    ( ALTER TABLE "/BI0/E0PPM_VC1" DROP PRIMARY KEY  )
      (SQL error -539)
      error message returned by dsql:
    SQL0539N  Table or nickname "SAPDEV./BI0/E0PPM_VC1" does not have a "PRIMARY" key.  SQLSTATE=42888
    (IMP) INFO: a failed DROP attempt is not necessarily a problem
    (DB6) INFO: executing DDL statements for object /BI0/E0PPM_VC1 from external SQL file.
    (DB) ERROR: DDL statement failed with SQL error
    ( CREATE TYPE 2 UNIQUE INDEX "/BI0/E0PPM_VC1~0" ON "/BI0/E0PPM_VC1"   ("KEY_0PPM_VC1T" ,   "KEY_0PPM_VC11" ,   "KEY_0PPM_VC1U" ,   "KEY_0PPM_VC1P" )   USING STOGROUP ___FAI PRIQTY 16   SECQTY 10240 FREEPAGE 0 PCTFREE 0   GBPCACHE CHANGED DEFINE NO   BUFFERPOOL BP3 COPY NO   PIECESIZE 2097152 K CLUSTER NOT PADDED  )
      (SQL error -7)
      error message returned by dsql:
    SQL0007N  The character "_" following "" )   USING STOGROUP" is not valid.  SQLSTATE=42601
    (DB) INFO: disconnected from DB
    S:\usr\sap\DEV\SYS\exe\uc\NTAMD64\R3load.exe: job finished with 1 error(s)
    S:\usr\sap\DEV\SYS\exe\uc\NTAMD64\R3load.exe: END OF LOG: 20100218105045
    So as you can see it seems that there's some syntax error in dfacl.log. The wrong SQL statement referred by sapdfact.log is
    ind: /BI0/E0PPM_VC1~0
    sql: CREATE TYPE 2 UNIQUE INDEX "/BI0/E0PPM_VC1~0" ON "/BI0/E0PPM_VC1"
      ("KEY_0PPM_VC1T" ,
      "KEY_0PPM_VC11" ,
      "KEY_0PPM_VC1U" ,
      "KEY_0PPM_VC1P" )
      USING STOGROUP ___FAI PRIQTY 16
      SECQTY 10240 FREEPAGE 0 PCTFREE 0
      GBPCACHE CHANGED DEFINE NO
      BUFFERPOOL BP3 COPY NO
      PIECESIZE 2097152 K CLUSTER NOT PADDED ;
      |
      ALTER TABLE "/BI0/E0PPM_VC1"
      ADD PRIMARY KEY ("KEY_0PPM_VC1T",
      "KEY_0PPM_VC11",
      "KEY_0PPM_VC1U",
      "KEY_0PPM_VC1P") ;
    Am i missing something?
    Data in referred tables (infocubes) isn't really important.
    Is there a safe way to proceed?
    Thanks in advance.
    Regards
    Simone Zaffalon

    And this is the strange point: my source system is not a BI and my dataclasses .SQL files are not empty.
    Me too i would expect that the files should be empty but instead they are full of object definitions.
    For example i have APPL0.SQL that contains a list of all tables of ECC system, for example
    tab: MAMT
    sql:     CREATE TABLE "MAMT"
            ("MANDT" SAPDB6VARCHAR(000003)
            DEFAULT '000' NOT NULL,
            "MATNR" SAPDB6VARCHAR(000018)
            DEFAULT ' ' NOT NULL,
            "SPRAS" SAPDB6VARCHAR(000001)
            DEFAULT ' ' NOT NULL,
            "MEINH" SAPDB6VARCHAR(000003)
            DEFAULT ' ' NOT NULL,
            "MTXID" SAPDB6VARCHAR(000002)
            DEFAULT ' ' NOT NULL,
            "LFDNR" SAPDB6VARCHAR(000002)
            DEFAULT '00' NOT NULL,
            "MAKTM" SAPDB6VARCHAR(000040)
            DEFAULT ' ' NOT NULL)
            IN "&location&"
            INDEX IN "&locationI&"
            LONG  IN "&locationL&"
          COMPRESS YES;
          ALTER TABLE "MAMT" LOCKSIZE ROW;
    and like this for all others tables.
    What would occur if i launch an import with such .SQL files?
    (shuld i put this question to another thread or is fine for you to answer on this?)
    Thank you again.
    Simone Zaffalon

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

  • Source code has syntax error in SAP PI7.1 Mapping Test

    HI All,
    IN SAP P7.1  created simple two data types, message types and Message Mapping with only 2 fields. While testing the mapping in Message Mapping it is giving the error as
    Source text of object Message Mapping: MM_Source_to_Target | http://abc.com has syntax errors:
    Source code has syntax error:
    I am able to activate the Datatypes and Message Types but not able to activate the Messge mapping.
    Please if any body faced the same problem please give the solution.
    One more thing is I am able to test the Message Mapping available in BASIS 7.1 Software Component objects. It is executing successfully...
    but otherthan this SWC it not working success fully.....
    Regards
    Sridhar Goli

    Hi David,
    please check the default trace. It may contain the entry:
    Error in compiling : java.io.IOException: Not enough space
    If that's the case, maybe there's too little space for the swap file/device.
    You should ensure that at least 2X (preferably 3X) of Heap (-Xmx) is configured as real swap
    Hope that helps.
    Regards,
    Gábor Klauzer

  • Start Routine: Syntax error in routine 2LIS_03_BF Transformations

    Hi experts,
    I enhanced the 2lis_03_bf data source, and replicated the data source in bw system, i have mapped the transformations and when i try to activate the transformations it is giving the below error.
    Start Routine: Syntax error in routine
    when i check the start routine it is giving the  below error message.
    E:In PERFORM or CALL FUNCTION "ROUTINE_9998", the actual parameter
    "SOURCE_PACKAGE" is incompatible with the formal parameter
    "DATA_PACKAGE".
    please provide me the solution.
    Regards
    venuscm

    Hi Venu,
    This seems to me like you have earlier migrated the update rules to transformations. We did the same earlier and faced issues whenever we add new fields/infoobjects. The error message was different, if i remember correctly.
    We had to add the new field/infoobject added, to the structure '_ty_s_*****' that exists at the top of the start routine code. This was one disadvantage of migration of rules.

  • Syntax error in Start Routine routine 9998 in transformation

    Hi Guyz,
    I am getting the below error while doinf the syntax check in start routine in one of the transformation in BW production after the failed TR movement
    E:In PERFORM or CALL FUNCTION "ROUTINE_9998", the actual parameter
    "SOURCE_PACKAGE" is incompatible with the formal parameter
    "DATA_PACKAGE".
    but for the same transformation in quality its showing  no syntax errors found.
    its an odd behaviour.
    please guide with ur expertise.
    cheerz,
    raps.

    Hi,
    Check the note 1052648. it says that:
    Start routine:
               In the start routine, all the fields from the source are always available.
    During the migration, a type '_ty_t_SC_1_full' is generated in '2nd part global'. Since Note 1325124, this type has been adjusted when the field list is changed. In the past, a change to the field list caused syntax errors of the type:
    For update rules:
                        E: For PERFORM or CALL FUNCTION "ROUTINE_9998", the actual parameter "SOURCE_PACKAGE" is not compatible with the formal parameter "DATA_PACKAGE".
    For transfer rules:
                        E:For PERFORM or CALL FUNCTION "STARTROUTINE", the actual parameter "SOURCE_PACKAGE" is not compatible with the formal parameter "DATAPAK".
               If this error continues to occur, go to the solution section to correct it.
               Solution:
               This error should now be automatically corrected with Note 1325124. Access the incorrect start routine in change mode. The type '_ty_s_SC_1_full' is then automatically adjusted to the source structure. If this does not work, you should use the tool 'RSTRAN_MIGRATION_CHECK' (described in Note 1369395) to check and possibly repair the transformation in question.
               If this error still occurs, you can correct it manually as follows:
               Copy the field list of the type     '_ty_s_SC_1' from the 'private section' of the CLASS lcl_transform DEFINITION (you can find this when you scroll up in the routine editor of the start routine) to the type '_ty_s_SC_1_full' of '2nd part global'.
    Regards,
    Anil Kumar Sharma .P

  • Order is getting Syntax Error ????

    I am receiving and error message regarding syntax of the ORDER command. I have attached the code, error message and DDLs for the tables.
    select COALESCE(a.[Material],b.[Part_Number],c.[Part_Number])                 AS [Material],
    COALESCE(a.[Description],b.[Description],c.[Description])                     AS [Description],
    COALESCE(a.[LD],b.[LD],c.[LD])                                                AS [LD],
    COALESCE(a.[SalesOrder],b.[SalesOrder],c.[SalesOrder])                        As [SalesOrder],
    COALESCE(a.[Ln],b.[Ln],c.[Ln])                                                As [Ln],
    COALESCE(a.[S/J],b.[S/J],c.[S/J])                                             As [Type],
    COALESCE(a.[Job],b.[Job],c.[Job])                                             AS [Job], 
    COALESCE(a.[SalesCode],b.[SalesCode],c.[SalesCode])                           As [SalesCode],
    COALESCE(a.[OpenQty],0) + COALESCE(b.[OpenQty],0) + COALESCE(c.[OpenQty],0)   As [OpenQty],
    COALESCE(a.[OrderDate],b.[OrderDate],c.[OrderDate])                           As [OrderDate],
    (Case when b.[PromDate] = '1900-01-01' then '' else a.[PromDate] end)         As [PromDate],
    SUBSTRING(ISNULL(c.[WorkCenter],''),4,11)                                     AS [WorkCenter]
    from
    Select a.Material                                                             As [Material]
           ,Ma.Description                                                        As [Description]
           ,Ma.Lead_Days                                                          As [LD]
           ,a.Sales_Order                                                         As [SalesOrder]
           ,a.SO_Line                                                             As [Ln]
           ,'S'                                                                  
    As [S/J]
           ,a.Job                                                                
    As [Job]
           ,a.Sales_Code                                                          AS [SalesCode]
           ,Sum(a.Order_Qty - a.Picked_Qty - a.Shipped_Qty)                       AS [OpenQty]
           ,Cast(SH.Order_Date As Date)                                           AS [OrderDate]
           ,Cast(a.Promised_Date As Date)                                         AS [PromDate]
     As [WorkCenter]
           from [PRODUCTION].dbo.SO_Detail as a
    inner join [PRODUCTION].dbo.Material As Ma
          on a.Material = Ma.Material 
    inner join [PRODUCTION].dbo.SO_Header As SH
          on a.Sales_Order = SH.Sales_Order
    Where (a.Status = 'Open' or a.Status = 'Backorder') 
    and a.Job <> ''
    and (a.Order_Qty - a.Picked_Qty - a.Shipped_Qty > 0)
    GROUP BY a.Material, a.Job, [S-J], Ma.Sales_Code, Ma.Lead_Days, SH.Order_Date, a.Promised_Date, Ma.Description, a.Sales_Order, a.SO_Line/JBSettings, -J
    )a
    full join
    Select b.Part_Number                                                          As [Part_Number]
           ,ISNULL(b.Description,'')                                              As [Description]
           ,Mb.Lead_Days                                                          As [LD]
           ,'00000'                                                               As [SalesOrder]
     As [Ln]
           ,'J'                                                                  
    As [S/J]
           ,b.Job                                                                
    As [Job]
           ,Mb.Sales_Code                                                         As [SalesCode]
           ,Sum(b.Order_Quantity - b.Shipped_Quantity)                            As [OpenQty]
           ,Cast(b.Order_Date As Date)                                            As [OrderDate]
     As [PromDate] 
     As [WorkCenter] 
    from [PRODUCTION].dbo.Job As b
    left outer join [PRODUCTION].dbo.Material As Mb
          on b.Part_Number = Mb.Material
    Where b.Status = 'Active' and Mb.Type = 'F' and b.Job Not like '%MASTER%' and b.Customer IS null
    GROUP BY b.Part_Number, b.Job, [S-J], Mb.Sales_Code, Mb.Lead_Days, b.Order_Date, b.Description
    )b
    full join
    Select c.Part_Number                                                          As [Part_Number]
           ,ISNULL(c.Description,'')                                              As [Description]
           ,Mc.Lead_Days                                                          As [LD]
           ,'00000'                                                               As [SalesOrder]
     As [Ln]
           ,'J'                                                                  
    As [S/J]
           ,c.Job                                                                
    As [Job]
           ,Mc.Sales_Code                                                         As [SalesCode]
           ,'0'                                                                  
    As [OpenQty]
           ,Cast(c.Order_Date As Date)                                            As [OrderDate]
     As [PromDate]  
           ,Max(Case when JO.Work_Center = 'INSPECTION'                                         and JO.Status = 'O'        
                   then '00 NOT STARTED'
                     when JO.Work_Center = 'INSPECTION'                                         and JO.Status = 'S'
                           then '90 INSPECTION'
                     when JO.Work_Center = 'INSPECTION'                                         and JO.Status = 'C'
                           then '95 COMPLETED'
                     When JO.Work_Center like '%WELD%'                                          and JO.Status =
    'O'                        then '05 NOT STARTED'
                     when JO.Work_Center like '%WELD%'                                          and JO.Status =
    'S'                        then '70 WELD'
                     when JO.Work_Center like '%WELD%'                                          and JO.Status =
    'C'                        then '75 WELD'
                     when JO.Work_Center = 'KITTING'                                            and JO.Status
    = 'O'                        then '05 NOT STARTED'
                     when JO.Work_Center = 'KITTING'                                            and JO.Status
    = 'S'                        then '60 KITTING'
                     when JO.Work_Center = 'KITTING'                                            and JO.Status
    = 'C'                        then '65 KITTED'
                     when JO.Work_Center = 'WIREBENDER'                                         and JO.Status = 'O'
                           then '15 NOT STARTED'
                     when JO.Work_Center = 'WIREBENDER'                                         and JO.Status = 'S'
                           then '50 WIRE BENDING'
                     when JO.Work_Center = 'WIREBENDER'                                         and JO.Status = 'C'
                           then '55 WIRE BENT'
                     when JO.Work_Center = 'TUBEBENDER' and JO.Operation_Service = 'BEND TUBES' and JO.Status = 'O'                        then '20 NOT STARTED'
                     when JO.WOrk_Center = 'TUBEBENDER' and JO.Operation_Service = 'BEND TUBES' and JO.Status = 'S'                        then '40 BENDING
    TUBES'
                     when JO.Work_Center = 'TUBEBENDER' and JO.Operation_Service = 'BEND TUBES' and JO.Status = 'C'                        then '45 TUBES BENT'
                     when JO.Work_Center = 'TUBEBENDER' and JO.Operation_Service = 'CUT TUBES'  and JO.Status = 'O'                        then '25 NOT
    STARTED'
                     when JO.Work_Center = 'TUBEBENDER' and JO.Operation_Service = 'CUT TUBES'  and JO.Status = 'S'                        then '30 CUTTING
    TUBES'
                     when JO.Work_Center = 'TUBEBEnder' and JO.Operation_Service = 'CUT TUBES'  and JO.Status = 'C'                        then '35 TUBES
    CUT'
           else '' end) [WorkCenter]
    from [PRODUCTION].dbo.Job_Operation As JO
    left outer join [PRODUCTION].dbo.Job as c
          on c.Job = JO.Job
    left outer join [PRODUCTION].dbo.Material As Mc
          on c.Part_Number = Mc.Material
    Where c.Status = 'Active' and Mc.Type = 'F' and c.Job Not like '%MASTER%' and c.Customer IS null
    GROUP BY c.Part_Number, c.Job, [S/J], Mc.SalesCode, Mc.Lead_Days, c.Order_Date, c.Description
    )c
    on a.[Material] = b.[Part_Number] and a.[Material] = c.[Part_Number] and a.[Job] = b.[Job] and a.[Job] = c.[Job] and a.[PromDate] = b.[PromDate] and a.[PromDate] = c.[PromDate]
    Order by COALESCE(b.[Part_Number],a.[Material],c.[Part_Number],b.[Job],a.[Job],c.[Job],b.[S/J],a.[S/J],c.[S/J])
    ERROR MESSAGE **********************************************************************************************
    Msg 156, Level 15, State 1, Line 99
    Incorrect syntax near the keyword 'Order'.
    DDL SO_DETAIL *********************************************************************************************
    USE [PRODUCTION]
    GO
    /****** Object:  Table [dbo].[SO_Detail]    Script Date: 05/22/2014 11:41:09 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    SET ANSI_PADDING ON
    GO
    CREATE TABLE [dbo].[SO_Detail](
    [SO_DetailKey] [dbo].[KeyNum] IDENTITY(1,1) NOT NULL,
    [SO_Detail] [dbo].[KeyNum] NULL,
    [Sales_Order] [dbo].[Key10] NOT NULL,
    [SO_Line] [dbo].[T_6] NOT NULL,
    [PO] [dbo].[Key8] NULL,
    [Line] [dbo].[T_6] NULL,
    [Material] [dbo].[T_30] NULL,
    [Ship_To] [int] NULL,
    [Drop_Ship] [bit] NOT NULL,
    [Quote] [varchar](50) NULL,
    [Job] [dbo].[Key10] NULL,
    [Status] [dbo].[T_9] NOT NULL,
    [Make_Buy] [dbo].[T_1] NOT NULL,
    [Unit_Price] [float] NOT NULL,
    [Discount_Pct] [float] NOT NULL,
    [Price_UofM] [dbo].[UofM] NOT NULL,
    [Total_Price] [money] NOT NULL,
    [Deferred_Qty] [float] NOT NULL,
    [Prepaid_Amt] [money] NOT NULL,
    [Unit_Cost] [float] NOT NULL,
    [Order_Qty] [float] NOT NULL,
    [Stock_UofM] [dbo].[UofM] NOT NULL,
    [Backorder_Qty] [float] NOT NULL,
    [Picked_Qty] [float] NOT NULL,
    [Shipped_Qty] [float] NOT NULL,
    [Returned_Qty] [float] NOT NULL,
    [Certs_Required] [bit] NOT NULL,
    [Taxable] [bit] NOT NULL,
    [Commissionable] [bit] NOT NULL,
    [Commission_Pct] [float] NOT NULL,
    [Sales_Code] [dbo].[T_UCode] NULL,
    [Note_Text] [text] NULL,
    [Promised_Date] [datetime] NULL,
    [Last_Updated] [datetime] NOT NULL,
    [Description] [dbo].[T_30] NULL,
    [Price_Unit_Conv] [float] NULL,
    [Rev] [dbo].[T_8] NULL,
    [Tax_Code] [dbo].[T_15] NULL,
    [Ext_Description] [text] NULL,
    [Cost_UofM] [dbo].[T_4] NULL,
    [Cost_Unit_Conv] [float] NULL,
    [Res_Type] [smallint] NULL,
    [Res_ID] [dbo].[T_50] NULL,
    [Res_Qty] [float] NULL,
    [Partial_Res] [bit] NULL,
    [Prepaid_Trade_Amt] [money] NULL,
    [ObjectID] [uniqueidentifier] NOT NULL,
     CONSTRAINT [PK_SO_Detail] PRIMARY KEY NONCLUSTERED 
    [SO_DetailKey] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
    ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
    GO
    SET ANSI_PADDING OFF
    GO
    ALTER TABLE [dbo].[SO_Detail]  WITH NOCHECK ADD  CONSTRAINT [FK_SOH_on_SODetl] FOREIGN KEY([Sales_Order])
    REFERENCES [dbo].[SO_Header] ([Sales_Order])
    ON DELETE CASCADE
    GO
    ALTER TABLE [dbo].[SO_Detail] NOCHECK CONSTRAINT [FK_SOH_on_SODetl]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Drop_Ship]  DEFAULT ((0)) FOR [Drop_Ship]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Status]  DEFAULT ('Open') FOR [Status]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Make_Buy]  DEFAULT ('M') FOR [Make_Buy]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Discount_Pct]  DEFAULT ((0)) FOR [Discount_Pct]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Price_UofM]  DEFAULT ('ea') FOR [Price_UofM]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Deferred_Qty]  DEFAULT ((0)) FOR [Deferred_Qty]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Prepaid_Amt]  DEFAULT ((0)) FOR [Prepaid_Amt]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Order_Qty]  DEFAULT ((0)) FOR [Order_Qty]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Backorder_Qty]  DEFAULT ((0)) FOR [Backorder_Qty]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Picked_Qty]  DEFAULT ((0)) FOR [Picked_Qty]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Certs_Required]  DEFAULT ((0)) FOR [Certs_Required]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Taxable]  DEFAULT ((0)) FOR [Taxable]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Commissionable]  DEFAULT ((0)) FOR [Commissionable]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Commission_Pct]  DEFAULT ((0)) FOR [Commission_Pct]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SO_Detail_Last_Updated]  DEFAULT (getdate()) FOR [Last_Updated]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  CONSTRAINT [DF_SODetail_PriceUofM]  DEFAULT ((1)) FOR [Price_Unit_Conv]
    GO
    ALTER TABLE [dbo].[SO_Detail] ADD  DEFAULT ((0)) FOR [Prepaid_Trade_Amt]
    GO
    DDL Material ************************************************************************************************************************************
    USE [PRODUCTION]
    GO
    /****** Object:  Table [dbo].[Material]    Script Date: 05/22/2014 11:42:02 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    SET ANSI_PADDING ON
    GO
    CREATE TABLE [dbo].[Material](
    [Material] [dbo].[Key30] NOT NULL,
    [Primary_Vendor] [dbo].[Key10] NULL,
    [User_Values] [dbo].[KeyNum] NULL,
    [Shape] [dbo].[Key10] NULL,
    [Location_ID] [dbo].[Key10] NOT NULL,
    [Sales_Code] [dbo].[T_15] NULL,
    [Description] [dbo].[T_30] NULL,
    [Type] [dbo].[T_1] NOT NULL,
    [Status] [dbo].[T_8] NOT NULL,
    [Pick_Buy_Indicator] [dbo].[T_1] NOT NULL,
    [Class] [varchar](10) NULL,
    [Rev] [dbo].[T_8] NULL,
    [Stocked_UofM] [dbo].[UofM] NOT NULL,
    [Purchase_UofM] [dbo].[UofM] NOT NULL,
    [Cost_UofM] [dbo].[UofM] NOT NULL,
    [Price_UofM] [dbo].[UofM] NOT NULL,
    [Selling_Price] [float] NULL,
    [Standard_Cost] [float] NOT NULL,
    [Average_Cost] [float] NULL,
    [Last_Cost] [float] NULL,
    [On_Order_Qty] [float] NULL,
    [Order_Point] [float] NULL,
    [Reorder_Qty] [float] NOT NULL,
    [Lead_Days] [smallint] NOT NULL,
    [UofM_Conv_Factor] [float] NOT NULL,
    [Lot_Trace] [bit] NOT NULL,
    [Rd_Whole_Unit] [bit] NOT NULL,
    [Ext_Description] [text] NULL,
    [Make_Buy] [dbo].[T_1] NOT NULL,
    [Vendor_Reference] [dbo].[T_30] NULL,
    [Drawing] [varchar](30) NULL,
    [Use_Price_Breaks] [bit] NOT NULL,
    [Note_Text] [text] NULL,
    [Last_Updated] [datetime] NOT NULL,
    [GL_Account] [dbo].[T_100] NULL,
    [Price_Unit_Conv] [float] NULL,
    [Holder_ID] [dbo].[T_50] NULL,
    [Job] [dbo].[T_10] NULL,
    [Tax_Code] [dbo].[T_15] NULL,
    [Taxable] [bit] NULL,
    [IS_Length] [float] NULL,
    [IS_Width] [float] NULL,
    [IS_Weight_Factor] [float] NULL,
    [IS_Thickness] [float] NULL,
    [Stock_Item] [dbo].[T_50] NULL,
    [Affects_Schedule] [bit] NULL,
    [ObjectID] [uniqueidentifier] NOT NULL,
    [Shape_OID] [uniqueidentifier] NULL,
    [Tooling] [bit] NULL,
    [IsSerialized] [bit] NOT NULL,
    [MaxUsage] [int] NULL,
    [ShelfLife] [float] NULL,
    [ShelfLifeUofM] [varchar](10) NULL,
     CONSTRAINT [PK_Material] PRIMARY KEY NONCLUSTERED 
    [Material] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
    ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
    GO
    SET ANSI_PADDING OFF
    GO
    ALTER TABLE [dbo].[Material]  WITH NOCHECK ADD  CONSTRAINT [FK_Loc_on_Matl] FOREIGN KEY([Location_ID])
    REFERENCES [dbo].[Location] ([Location_ID])
    GO
    ALTER TABLE [dbo].[Material] NOCHECK CONSTRAINT [FK_Loc_on_Matl]
    GO
    ALTER TABLE [dbo].[Material]  WITH NOCHECK ADD  CONSTRAINT [FK_Shap_on_Matl] FOREIGN KEY([Shape])
    REFERENCES [dbo].[Shapes] ([Shape])
    GO
    ALTER TABLE [dbo].[Material] NOCHECK CONSTRAINT [FK_Shap_on_Matl]
    GO
    ALTER TABLE [dbo].[Material]  WITH NOCHECK ADD  CONSTRAINT [FK_UVal_on_Matl] FOREIGN KEY([User_Values])
    REFERENCES [dbo].[User_Values] ([User_Values])
    GO
    ALTER TABLE [dbo].[Material] NOCHECK CONSTRAINT [FK_UVal_on_Matl]
    GO
    ALTER TABLE [dbo].[Material]  WITH NOCHECK ADD  CONSTRAINT [FK_Vend_on_Matl] FOREIGN KEY([Primary_Vendor])
    REFERENCES [dbo].[Vendor] ([Vendor])
    GO
    ALTER TABLE [dbo].[Material] NOCHECK CONSTRAINT [FK_Vend_on_Matl]
    GO
    ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_Selling_Price]  DEFAULT ((0)) FOR [Selling_Price]
    GO
    ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_Standard_Cost]  DEFAULT ((0)) FOR [Standard_Cost]
    GO
    ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_Average_Cost]  DEFAULT ((0)) FOR [Average_Cost]
    GO
    ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_Last_Cost]  DEFAULT ((0)) FOR [Last_Cost]
    GO
    ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_On_Order_Qty]  DEFAULT ((0)) FOR [On_Order_Qty]
    GO
    ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_Order_Point]  DEFAULT ((0)) FOR [Order_Point]
    GO
    ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_Reorder_Qty]  DEFAULT ((0)) FOR [Reorder_Qty]
    GO
    ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_Lead_Days]  DEFAULT ((0)) FOR [Lead_Days]
    GO
    ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_UofM_Conv_Factor]  DEFAULT ((0)) FOR [UofM_Conv_Factor]
    GO
    ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_Lot_Trace]  DEFAULT ((0)) FOR [Lot_Trace]
    GO
    ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_Rd_Whole_Unit]  DEFAULT ((0)) FOR [Rd_Whole_Unit]
    GO
    ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_Use_Price_Break]  DEFAULT ((0)) FOR [Use_Price_Breaks]
    GO
    ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_Last_Updated]  DEFAULT (getdate()) FOR [Last_Updated]
    GO
    ALTER TABLE [dbo].[Material] ADD  CONSTRAINT [DF_Material_PriceUofM]  DEFAULT ((1)) FOR [Price_Unit_Conv]
    GO
    ALTER TABLE [dbo].[Material] ADD  DEFAULT ((0)) FOR [IsSerialized]
    GO
    ALTER TABLE [dbo].[Material] ADD  DEFAULT ((0)) FOR [MaxUsage]
    GO
    ALTER TABLE [dbo].[Material] ADD  DEFAULT ((0)) FOR [ShelfLife]
    GO
    DDL SO_HEADER ***************************************************************************************************************
    USE [PRODUCTION]
    GO
    /****** Object:  Table [dbo].[SO_Header]    Script Date: 05/22/2014 11:43:29 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    SET ANSI_PADDING ON
    GO
    CREATE TABLE [dbo].[SO_Header](
    [Sales_Order] [dbo].[Key10] NOT NULL,
    [Customer] [dbo].[Key10] NOT NULL,
    [Ship_To] [dbo].[KeyNum] NULL,
    [Contact] [dbo].[KeyNum] NULL,
    [Sales_Rep] [dbo].[Key6] NULL,
    [Order_Taken_By] [dbo].[Key6] NULL,
    [Ship_Via] [dbo].[T_UCode] NULL,
    [Tax_Code] [dbo].[T_UCode] NULL,
    [Terms] [dbo].[T_UCode] NULL,
    [Sales_Tax_Amt] [money] NOT NULL,
    [Sales_Tax_Rate] [float] NOT NULL,
    [Order_Date] [datetime] NOT NULL,
    [Promised_Date] [datetime] NULL,
    [Customer_PO] [dbo].[T_20] NULL,
    [Status] [dbo].[T_8] NOT NULL,
    [Total_Price] [money] NOT NULL,
    [Currency_Conv_Rate] [float] NOT NULL,
    [Trade_Currency] [dbo].[KeyNum] NULL,
    [Fixed_Rate] [bit] NOT NULL,
    [Trade_Date] [datetime] NULL,
    [Note_Text] [text] NULL,
    [Comment] [text] NULL,
    [Last_Updated] [datetime] NOT NULL,
    [User_Values] [int] NULL,
    [Source] [dbo].[T_20] NULL,
    [Prepaid_Tax_Amount] [money] NULL,
     CONSTRAINT [PK_SO_Header] PRIMARY KEY NONCLUSTERED 
    [Sales_Order] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
    ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
    GO
    SET ANSI_PADDING OFF
    GO
    ALTER TABLE [dbo].[SO_Header] ADD  CONSTRAINT [DF_SO_Header_Sales_Tax_Amt]  DEFAULT ((0)) FOR [Sales_Tax_Amt]
    GO
    ALTER TABLE [dbo].[SO_Header] ADD  CONSTRAINT [DF_SO_Header_Sales_Tax_Rate]  DEFAULT ((0)) FOR [Sales_Tax_Rate]
    GO
    ALTER TABLE [dbo].[SO_Header] ADD  CONSTRAINT [DF_SO_Header_Total_Price]  DEFAULT ((0)) FOR [Total_Price]
    GO
    ALTER TABLE [dbo].[SO_Header] ADD  CONSTRAINT [DF_SO_Header_Currency_Conv_Rate]  DEFAULT ((1)) FOR [Currency_Conv_Rate]
    GO
    ALTER TABLE [dbo].[SO_Header] ADD  CONSTRAINT [DF_SO_Header_Fixed_Rate]  DEFAULT ((1)) FOR [Fixed_Rate]
    GO
    ALTER TABLE [dbo].[SO_Header] ADD  CONSTRAINT [DF_SO_Header_Last_Updated]  DEFAULT (getdate()) FOR [Last_Updated]
    GO
    ALTER TABLE [dbo].[SO_Header] ADD  DEFAULT ((0)) FOR [Prepaid_Tax_Amount]
    GO
    DDL JOB *******************************************************************************************************************************
    USE [PRODUCTION]
    GO
    /****** Object:  Table [dbo].[Job]    Script Date: 05/22/2014 11:44:43 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    SET ANSI_PADDING ON
    GO
    CREATE TABLE [dbo].[Job](
    [Job] [dbo].[Key10] NOT NULL,
    [Sales_Rep] [dbo].[Key6] NULL,
    [Customer] [dbo].[Key10] NULL,
    [Ship_To] [dbo].[KeyNum] NULL,
    [User_Values] [dbo].[KeyNum] NULL,
    [Quote] [dbo].[Key10] NULL,
    [Contact] [dbo].[KeyNum] NULL,
    [Ship_Via] [dbo].[T_15] NULL,
    [Terms] [dbo].[T_15] NULL,
    [Tax_Code] [dbo].[T_15] NULL,
    [Sales_Code] [dbo].[T_15] NULL,
    [Top_Lvl_Job] [dbo].[T_10] NULL,
    [Type] [dbo].[T_8] NOT NULL,
    [Order_Date] [datetime] NOT NULL,
    [Status] [dbo].[T_8] NOT NULL,
    [Status_Date] [datetime] NOT NULL,
    [Part_Number] [dbo].[T_30] NULL,
    [Rev] [dbo].[T_10] NULL,
    [Description] [dbo].[T_30] NULL,
    [Ext_Description] [text] NULL,
    [Drawing] [varchar](30) NULL,
    [Build_To_Stock] [bit] NOT NULL,
    [Order_Quantity] [int] NOT NULL,
    [Extra_Quantity] [int] NULL,
    [Pick_Quantity] [int] NULL,
    [Make_Quantity] [int] NOT NULL,
    [Split_Quantity] [int] NULL,
    [Completed_Quantity] [int] NULL,
    [Shipped_Quantity] [int] NULL,
    [FG_Transfer_Qty] [int] NULL,
    [Returned_Quantity] [int] NULL,
    [In_Production_Quantity] [int] NOT NULL,
    [Assembly_Level] [smallint] NULL,
    [Certs_Required] [bit] NOT NULL,
    [Time_And_Materials] [bit] NOT NULL,
    [Open_Operations] [smallint] NULL,
    [Scrap_Pct] [float] NOT NULL,
    [Est_Scrap_Qty] [int] NULL,
    [Est_Rem_Hrs] [float] NULL,
    [Est_Total_Hrs] [float] NULL,
    [Est_Labor] [money] NULL,
    [Est_Material] [money] NULL,
    [Est_Service] [money] NULL,
    [Est_Labor_Burden] [money] NULL,
    [Est_Machine_Burden] [money] NULL,
    [Est_GA_Burden] [money] NULL,
    [Act_Revenue] [money] NULL,
    [Act_Scrap_Quantity] [int] NULL,
    [Act_Total_Hrs] [float] NULL,
    [Act_Labor] [money] NULL,
    [Act_Material] [money] NULL,
    [Act_Service] [money] NULL,
    [Act_Labor_Burden] [money] NULL,
    [Act_Machine_Burden] [money] NULL,
    [Act_GA_Burden] [money] NULL,
    [Priority] [smallint] NULL,
    [Unit_Price] [float] NULL,
    [Total_Price] [money] NULL,
    [Price_UofM] [dbo].[T_4] NULL,
    [Currency_Conv_Rate] [float] NOT NULL,
    [Trade_Currency] [dbo].[KeyNum] NULL,
    [Fixed_Rate] [bit] NOT NULL,
    [Trade_Date] [datetime] NULL,
    [Commission_Pct] [float] NULL,
    [Customer_PO] [dbo].[T_20] NULL,
    [Customer_PO_LN] [dbo].[T_6] NULL,
    [Sched_End] [datetime] NULL,
    [Sched_Start] [datetime] NULL,
    [Quantity_Per] [float] NULL,
    [Profit_Pct] [float] NULL,
    [Labor_Markup_Pct] [float] NOT NULL,
    [Mat_Markup_Pct] [float] NOT NULL,
    [Serv_Markup_Pct] [float] NOT NULL,
    [Labor_Burden_Markup_Pct] [float] NOT NULL,
    [Machine_Burden_Markup_Pct] [float] NOT NULL,
    [GA_Burden_Markup_Pct] [float] NOT NULL,
    [Lead_Days] [smallint] NULL,
    [Profit_Markup] [dbo].[T_1] NULL,
    [Prepaid_Amt] [money] NULL,
    [Split_To_Job] [bit] NOT NULL,
    [Note_Text] [text] NULL,
    [Comment] [text] NULL,
    [Last_Updated] [datetime] NOT NULL,
    [Order_Unit] [dbo].[T_4] NULL,
    [Price_Unit_Conv] [float] NULL,
    [Holder_ID] [dbo].[T_50] NULL,
    [Source] [dbo].[T_20] NULL,
    [Order_Taken_By] [dbo].[T_50] NULL,
    [Plan_Modified] [bit] NULL,
    [ObjectID] [uniqueidentifier] NOT NULL,
    [Released_Date] [datetime] NULL,
    [Prepaid_Tax_Amount] [money] NULL,
    [Prepaid_Trade_Amt] [money] NULL,
    [Last_Updated_By] [dbo].[T_50] NULL,
     CONSTRAINT [PK_Job] PRIMARY KEY NONCLUSTERED 
    [Job] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
    ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
    GO
    SET ANSI_PADDING OFF
    GO
    ALTER TABLE [dbo].[Job]  WITH NOCHECK ADD  CONSTRAINT [FK_Addr_on_Job] FOREIGN KEY([Ship_To])
    REFERENCES [dbo].[Address] ([Address])
    GO
    ALTER TABLE [dbo].[Job] NOCHECK CONSTRAINT [FK_Addr_on_Job]
    GO
    ALTER TABLE [dbo].[Job]  WITH NOCHECK ADD  CONSTRAINT [FK_Cust_on_Job] FOREIGN KEY([Customer])
    REFERENCES [dbo].[Customer] ([Customer])
    GO
    ALTER TABLE [dbo].[Job] NOCHECK CONSTRAINT [FK_Cust_on_Job]
    GO
    ALTER TABLE [dbo].[Job]  WITH NOCHECK ADD  CONSTRAINT [FK_Empl_on_Job] FOREIGN KEY([Sales_Rep])
    REFERENCES [dbo].[Employee] ([Employee])
    GO
    ALTER TABLE [dbo].[Job] NOCHECK CONSTRAINT [FK_Empl_on_Job]
    GO
    ALTER TABLE [dbo].[Job]  WITH NOCHECK ADD  CONSTRAINT [FK_UVal_on_Job] FOREIGN KEY([User_Values])
    REFERENCES [dbo].[User_Values] ([User_Values])
    GO
    ALTER TABLE [dbo].[Job] NOCHECK CONSTRAINT [FK_UVal_on_Job]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Build_To_Stock]  DEFAULT ((0)) FOR [Build_To_Stock]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Order_Quantity]  DEFAULT ((0)) FOR [Order_Quantity]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Extra_Quantity]  DEFAULT ((0)) FOR [Extra_Quantity]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Pick_Quantity]  DEFAULT ((0)) FOR [Pick_Quantity]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Make_Quantity]  DEFAULT ((0)) FOR [Make_Quantity]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Split_Quantity]  DEFAULT ((0)) FOR [Split_Quantity]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Completed_Quantity]  DEFAULT ((0)) FOR [Completed_Quantity]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Shipped_Quantity]  DEFAULT ((0)) FOR [Shipped_Quantity]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_FG_Transfer_Qty]  DEFAULT ((0)) FOR [FG_Transfer_Qty]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Returned_Quantity]  DEFAULT ((0)) FOR [Returned_Quantity]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_In_Production_Quantity]  DEFAULT ((0)) FOR [In_Production_Quantity]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Assembly_Level]  DEFAULT ((0)) FOR [Assembly_Level]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Certs_Required]  DEFAULT ((0)) FOR [Certs_Required]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Time_And_Materials]  DEFAULT ((0)) FOR [Time_And_Materials]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Open_Operations]  DEFAULT ((0)) FOR [Open_Operations]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Scrap_Pct]  DEFAULT ((0)) FOR [Scrap_Pct]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Est_Scrap_Qty]  DEFAULT ((0)) FOR [Est_Scrap_Qty]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Est_Rem_Hrs]  DEFAULT ((0)) FOR [Est_Rem_Hrs]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Est_Total_Hrs]  DEFAULT ((0)) FOR [Est_Total_Hrs]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Est_Labor]  DEFAULT ((0)) FOR [Est_Labor]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Est_Material]  DEFAULT ((0)) FOR [Est_Material]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Est_Service]  DEFAULT ((0)) FOR [Est_Service]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Est_Labor_Burden]  DEFAULT ((0)) FOR [Est_Labor_Burden]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Est_Machine_Burden]  DEFAULT ((0)) FOR [Est_Machine_Burden]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Est_GA_Burden]  DEFAULT ((0)) FOR [Est_GA_Burden]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Act_Revenue]  DEFAULT ((0)) FOR [Act_Revenue]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Act_Scrap_Quantity]  DEFAULT ((0)) FOR [Act_Scrap_Quantity]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Act_Total_Hrs]  DEFAULT ((0)) FOR [Act_Total_Hrs]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Act_Labor]  DEFAULT ((0)) FOR [Act_Labor]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Act_Material]  DEFAULT ((0)) FOR [Act_Material]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Act_Service]  DEFAULT ((0)) FOR [Act_Service]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Act_Labor_Burden]  DEFAULT ((0)) FOR [Act_Labor_Burden]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Act_Machine_Burden]  DEFAULT ((0)) FOR [Act_Machine_Burden]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Act_GA_Burden]  DEFAULT ((0)) FOR [Act_GA_Burden]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Priority]  DEFAULT ((5)) FOR [Priority]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Unit_Price]  DEFAULT ((0)) FOR [Unit_Price]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Total_Price]  DEFAULT ((0)) FOR [Total_Price]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Currency_Conv_Rate]  DEFAULT ((1)) FOR [Currency_Conv_Rate]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Fixed_Rate]  DEFAULT ((1)) FOR [Fixed_Rate]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Commission_Pct]  DEFAULT ((0)) FOR [Commission_Pct]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Quantity_Per]  DEFAULT ((1)) FOR [Quantity_Per]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Profit_Pct]  DEFAULT ((0)) FOR [Profit_Pct]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Labor_Markup_Pct]  DEFAULT ((0)) FOR [Labor_Markup_Pct]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Mat_Markup_Pct]  DEFAULT ((0)) FOR [Mat_Markup_Pct]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Serv_Markup_Pct]  DEFAULT ((0)) FOR [Serv_Markup_Pct]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Labor_Burden_Markup_Pct]  DEFAULT ((0)) FOR [Labor_Burden_Markup_Pct]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Machine_Burden_Markup_Pct]  DEFAULT ((0)) FOR [Machine_Burden_Markup_Pct]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_GA_Burden_Markup_Pct]  DEFAULT ((0)) FOR [GA_Burden_Markup_Pct]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Lead_Days]  DEFAULT ((0)) FOR [Lead_Days]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Prepaid_Amt]  DEFAULT ((0)) FOR [Prepaid_Amt]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Split_To_Job]  DEFAULT ((0)) FOR [Split_To_Job]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_Job_Last_Updated]  DEFAULT (getdate()) FOR [Last_Updated]
    GO
    ALTER TABLE [dbo].[Job] ADD  CONSTRAINT [DF_JOB_PriceUofM]  DEFAULT ((1)) FOR [Price_Unit_Conv]
    GO
    ALTER TABLE [dbo].[Job] ADD  DEFAULT ((0)) FOR [Prepaid_Tax_Amount]
    GO
    ALTER TABLE [dbo].[Job] ADD  DEFAULT ((0)) FOR [Prepaid_Trade_Amt]
    GO
    Order by COALESCE(b.[Part_Number],a.[Material],c.[Part_Number],b.[Job],a.[Job],c.[Job],b.[S/J],a.[S/J],c.[S/J])
    SWProduction

    Given exactly what you posted, there is a stray order by clause in the last batch of your script and it is the only statement in the batch.  Unfortunately, it is likely that something was mangled - which is why it is better to use the [insert code block]
    function as opposed to just copying the entire script into the text of the post.
    To short circuit things a bit, your join syntax is off.  You are joining a to b to c, so the basic structure of your statement should be:
    select
    from a join b on ...
    join c on ...
    where ...
    If you used CTEs instead of derived tables it might be easier for you to visually see that.  As a simple demonstration, consider:
    with ctea as (select 1 as id union all select 2),
    cteb as (select 1 as id union all select 3),
    ctec as (select 1 as id union all select 2 union all select 5)
    select *
    from ctea
    full join cteb on ctea.id = cteb.id
    full join ctec on ctea.id = ctec.id
    order by coalesce(cteb.id, ctea.id, ctec.id);
    go
    with ctea as (select 1 as id union all select 2),
    cteb as (select 1 as id union all select 3),
    ctec as (select 1 as id union all select 2 union all select 5)
    select *
    from ctea
    full join cteb
    full join ctec on ctea.id = cteb.id and ctea.id = ctec.id
    order by coalesce(cteb.id, ctea.id, ctec.id);
     And a last comment which I leave as a hint - do you really need those left joins in your derived tables?

Maybe you are looking for

  • Why am I getting an ICC profile error when making a pdf?

    I have not see this before but now when I export my document to a high quality PDF, then I get an error message which says that "version 4 ICC profiles were converted to version 2 ICC profiles during pdf export." I have used this same setting for yea

  • Is there finally a way to transfer voicemail messages from the iPhone to a Macbook?

    I have some sentimental voicemails I would like to keep/store forever somewhere. I found some discussions on transferring voicemails from iPhone to Macbook from three years ago, and the options were limited. Have there been updates since then to make

  • Hide Upload button in library

    what is easiest way to hide the Upload button in a library or list? I know I did this easily in SharePoint Designer 2007.  But I can't figure out how to do it in SharePoint 2010. thanks!

  • SRM PO Changes

    Hello, I have a requirement where I need to read the PO details, get the WBS Element & replace the WBS Element with a new one which I would have on my selection screen. Now, I am little new to SRM and I believe the coding in SRM will be different tha

  • Editing office documents online after Integrating them from Windows

    Hello all, After following these instructions http://help.sap.com/saphelp_erp2005vp/helpdata/en/ed/b334ea02a2704388d1d2fc3e4298ad/content.htm  to integrate our windows system into the portal, I'd like users to have the ability to edit documents onlin