NCR and CAPA
NCR and CAPA (Non-conformance reporting and Corrective actions / Preventative actions) is a capability that forms part of the Quality Management module and can used throughout the ERP process. It helps manufacturers and distributors control quality standards within their organization to ensure these are upheld and continually improved.
The corrective and preventative actions (CAPA) component of this feature enables the effective management of an incident that caused a deviation from quality standards. It allows any department to report and effectively manage, correct and prevent non-compliance incidents.
Exploring
The NCR and CAPA (Non-conformance reporting and Corrective actions / Preventative actions) functionality enables businesses to identify, document and address deviations from product or process standards.
-
Non conformance details are captured in real time, which helps organizations take prompt corrective action, ensuring compliance with both internal and regulatory standards.
-
Corrective and preventive actions are integrated with NCR to ensure corrective actions are implemented to resolve non conformances while preventative actions are established to prevent a re-occurrence.
-
CAPA promotes continuous improvement that supports long term quality assurance by analyzing root causes and ensuring that solutions are systematically applied across the business.
-
Compliance with industry standards
-
Early detection of non-conformances
-
Visibility into recurring issues and systemic problems.
-
Decision making and risk management
-
Efficiency and cost reduction
-
Consistency and continuous improvement
-
Customer satisfaction
-
Empowerment by fostering an accountability culture
The programs related to this feature are accessed from the Program List of the SYSPRO menu:
- Program List > Quality Management > Non Conformance Reporting
In non-conformance reporting, cause categories help classify the risks or reasons behind non-conformances, enabling organizations to identify patterns and implement effective corrective actions. By categorizing the causes of non-conformances, organizations can better analyze trends, improve processes, and prevent future issues. Some common cause categories are:
-
Human Error
Mistakes made by individuals during operations, such as miscommunication, inadequate training, or failure to follow procedures.
-
Process Failure
Breakdowns or inefficiencies in established processes, including inadequate controls, insufficient procedures, or lapses in quality checks.
-
Material Deficiency
Issues related to raw materials or components, such as substandard quality, improper specifications, or defects from suppliers.
-
Equipment Failure
Breakdowns or malfunctions of machinery or tools, which may arise from inadequate maintenance, wear and tear, or design flaws.
-
Environmental Factors
External conditions affecting production or product quality, including temperature, humidity, or contamination from the surroundings.
-
Design Issues
Flaws in the design or specifications of a product that lead to non-conformance, such as incorrect dimensions or inadequate functionality.
-
Regulatory Non-Compliance
Failures to meet legal or industry standards, resulting in products or processes that do not adhere to necessary regulations.
-
Documentation Errors
Problems stemming from inadequate or incorrect documentation, such as missing instructions, outdated procedures, or incorrect labels.
Corrective action forms part of the NCR and CAPA (Non-conformance reporting and Corrective actions / Preventative actions) functionality.
It refers to the methodology used to eliminate the root cause of a non-conformance and prevent it from happening again. It involves identifying the issue, analyzing its underlying cause, and implementing changes to processes, materials, or practices.
Specific actions take place in the activity area in a non-conformance report, e.g. investigate root-cause, close-out, corrective actions, preventative actions and audit.
Non-conformance management refers to the process of identifying, documenting, and addressing deviations from established standards, specifications, or regulations within an organization.
It involves detecting instances where products, services, or processes fail to meet quality or compliance requirements, followed by corrective actions to prevent recurrence. Effective non-conformance management helps improve quality control, reduce risks, and ensure continuous improvement in operations.
The non-conformance process is a systematic procedure used by organizations to identify, document, analyze, and resolve deviations from established standards, specifications, or regulations.
This process typically involves several steps, including the initial detection of a non-conformance, the creation of a non-conformance report, root cause analysis, implementation of corrective and preventive actions, and verification of effectiveness. The goal of the non-conformance process is to ensure that issues are addressed promptly, preventing recurrence and promoting continuous improvement in quality and compliance.
A non-conformance report (NCR) is a formal document that is created when a deviation occurs against an standard.
The report identifies and records instances where products, processes, or services fail to meet specified quality standards or requirements. It outlines the nature of the non-conformance, including details such as the issue, its cause, and its impact. The NCR also serves as a tool for tracking corrective actions taken to address the problem and prevent its recurrence, ensuring continuous improvement and compliance.
A non-conformance standard refers to the established criteria or benchmarks that define acceptable performance, quality, or compliance for products, services, or processes. When these standards are not met, it results in a non-conformance. The standard serves as a reference point for evaluating deviations and determining the necessary corrective or preventive actions to ensure alignment with industry regulations or internal requirements.
A non-conformance report (NCR) is created when a transaction deviates from the non-conformance standard.
Non-conformance types are used to describe the type of deviation that occurred, which could be the following:
-
Product non-conformances occur when a product fails to meet specified quality or performance standards, such as dimensional inconsistencies or material fault. A type of product non-conformance could be a defect.
-
Process non-conformances involve deviations in the execution of operational processes, leading to issues like incorrect procedures or failure to follow established protocols. A type of process non-conformance could be an incorrect product assembly.
-
Regulatory non-conformances arise when operations or products do not comply with industry regulations or legal requirements, potentially resulting in fines or penalties.
-
Supplier non-conformances occur when materials or components received from suppliers do not meet agreed-upon quality or specification standards.
Preventative action forms part of the NCR and CAPA (Non-conformance reporting and Corrective actions / Preventative actions) functionality.
It refers to the methodology used to implement proactive measures taken to eliminate potential causes of non-conformances before they occur. It involves identifying risks, analyzing potential issues, and implementing changes to processes or systems to prevent future problems. The goal is to avoid non-conformances by addressing vulnerabilities and improving overall quality and compliance ahead of time.
The priority of a non-conformance report indicates which report must be resolved first. This is calculated using the severity level and expected due date of non-conformance reports for an owner and department.
An organization typically creates a quality policy which, in part, defines the rules dictating when an NCR is required to be created, it’s severity, priority and required time-to-resolution. This quality policy will drive the configuration of the Non Conformance Reporting module.
The responsible department in non-conformance reporting refers to the specific team or organizational unit that owns, or is accountable for addressing and resolving the identified non-conformance. This department is tasked with investigating the issue, implementing corrective or preventive actions, and ensuring that the problem does not recur. The responsible department is typically selected based on the ownership of the standard raised against the NCR, ensuring that relevant expertise and resources are applied to resolve the issue effectively.
Severity levels are set against the standard within the NCR and CAPA (Non-conformance reporting and Corrective actions / Preventative actions) functionality. The following severity levels categorize the impact and help prioritize actions and resources based on the severity and and urgency of a non-conformance:
-
Critical
A non-conformance that poses a significant risk to safety, regulatory compliance, or product functionality, often requiring immediate corrective action. Critical issues can halt operations or lead to severe consequences.
-
Major
A serious non-conformance that impacts product quality or processes but does not pose immediate safety risks. While not as urgent as critical issues, major non-conformances still require prompt action to prevent further problems.
-
Minor
A less severe non-conformance that has minimal impact on product quality or performance. It may not require immediate correction but should be addressed to avoid potential escalation into larger issues.
-
Log only
Minor deviations that do not impact quality, safety, or compliance. These are often recorded for tracking purposes but typically do not require corrective actions.
The time to resolution (TTR) refers to the total time taken from the identification of a non-conformance to its complete resolution. This metric tracks the duration required to investigate the issue, implement corrective or preventive actions, and verify that the problem has been effectively addressed. TTR is used to measure efficiency in handling non-conformances and is critical for maintaining quality, compliance, and operational performance.
Starting
To enable this capability in SYSPRO 8 2024, you must install the following hotfix:
-
SYSPRO.8.2024.KB8110297
To use this feature, the following setup option(s) must be enabled:
Setup Options > Keys > Manufacturing
-
-
Suppress leading zeros
-
Presentation length
To use this feature, the following eSignatures must be defined accordingly in the Electronic Signature Configuration Setup program (as this allows for the various functions in the related programs):
-
NCR Change Severity Level
-
NCR Add Non Conformance Report
-
NCR Change Non Conformance Report
-
NCR Add Process
-
NCR Change Process
-
NCR Delete Process
-
NCR Add Standard
-
NCR Change Standard
-
NCR Delete Standard
-
NCR Add Type
-
NCR Change Type
-
NCR Delete Type
-
NCR Add Process Per Standard
-
NCR Delete Process Per Standard
-
NCR Add Cause Category
-
NCR Change Cause Category
-
NCR Delete Cause Category
-
NCR Add Department Stakeholder
-
NCR Change Department Stakeholder
-
NCR Delete Department Stakeholder
-
NCR Add Department
-
NCR Change Department
-
NCR Delete Department
-
NCR Add Action
-
NCR Change Action
-
NCR Delete Action
To use this feature, the following module(s) must be installed according to the terms of your software license agreement:
-
Quality Management
You can secure this feature by implementing a range of controls against the affected programs. Although not all these controls are applicable to each feature, they include the following:
- You restrict operator access to activities within a program using the Operator Maintenance program.
- You can restrict operator access to the fields within a program (configured using the Operator Maintenance program).
- You can restrict operator access to functions within a program using passwords (configured using the Password Definition program). When defined, the password must be entered before you can access the function.
- You can restrict access to the eSignature transactions within a program at operator, group, role or company level (configured using the Electronic Signature Configuration Setup program). Electronic Signatures provide security access, transaction logging and event triggering that gives you greater control over your system changes.
- You can restrict operator access to programs by assigning them to groups and applying access control against the group (configured using the Operator Groups program).
- You can restrict operator access to programs by assigning them to roles and applying access control against the role (configured using the Role Management program).
Solving
Why don't you drop us a line with some useful information we can add here?
Using
-
Define the non conformance types using the Non Conformance Type program.
-
Define the process that will be followed once a non-conformance is raised using the Non Conformance Process program.
-
Define the severity levels that will apply to the non conformance using the Non Conformance Severity Level program.
-
Use the Non Conformance Department program to define the departments that will own, address and resolve the non conformance issue, and to add both the default and any other necessary stakeholders for each department.
-
Define the non conformance standard using the Non Conformance Standard program by linking the type, severity level and departments to the standard.
-
Link the process to the standard using the Non Conformance Process Per Standard program
-
Link the corrective and preventative actions to the standard using the Non Conformance Standard Actions program.
-
Define the cause categories into which the non conformance incidents can be grouped using the Non Conformance Cause Category program.
-
Identify a non-conformance incident either by observation, some information on a report or dashboard that highlights an anomaly or via an automatic trigger that is supported by VBSCripting.
-
Create the non-conformance report using the Non Conformance Report Maintenance program.
-
The following processes run concurrently once the NCR is created, and can be started or completed separately. All the steps in this section are maintained using the Non Conformance Report Maintenance program
-
Record the details of the investigation in the Investigate Root-cause tab of the program.
-
Once all details have been captured, the NCR can be closed using the Closeout tab of the program.
-
Once the root cause of the NCR is known, you can define the corrective actions that must be implemented. This can be captured on the Corrective Actions tab of the program.
-
Specify the preventative actions that must be carried out within the Preventative Actions tab of the program.
-
Once all plans and action are completed the NCR is audited and the Audit section of the NCR is updated.
No other actions can be recorded during the audit phase.
-
The Non Conformance Cost Review program can be used throughout the process to report on costs relating to the non-conformance incident.
-
The Non Conformance Report report can be used during the process to determine:
-
the next NCR a stakeholder should address, and
-
the next stakeholder who should address the NCR.
-
-
The following are possible status codes for a non conformance report:
Status | Description |
---|---|
A - Performing audit |
This status is displayed when a start date is saved against the audit, i.e. a start date is saved in the Audit tab of the Non Conformance Report Maintenance program. |
AC - Audit complete |
This status is displayed when the Audit complete option is selected. |
C - Complete |
This status is displayed when the non conformance report has been completed, i.e. the Complete field on the NCR header is ticked. |
C - Investigation complete |
This status is displayed when all actions listed in the Investigate Root Cause tab of the Non Conformance Report Maintenance program have been completed, i.e. details have been recorded against each action using the Notes option. |
CAC - Corrective action complete |
This status is displayed when an end date is saved against all corrective actions listed in the Corrective Actions tab of the Non Conformance Report Maintenance program. |
CAC - Prevetative action complete |
This status is displayed when an end date is saved against all preventative actions listed in the Preventative Actions tab of the Non Conformance Report Maintenance program. |
CLC - Close-out complete |
This status is displayed when the Close out complete option is selected. |
CLS - Close-out in progress |
This status is displayed when a start date is saved against the close out, i.e. a start date is saved in the Close out tab of the Non Conformance Report Maintenance program. |
CPP - CA/PA in progress |
This status is displayed when a start date has been entered against the first action defined in the Corrective Actions or Preventative Actionstabs of the Non Conformance Report Maintenance program. |
CPS - CA/PA started |
This status is displayed when a start date has been entered against the corrective or preventative action plan. |
I - Investigating |
This status is displayed when the stakeholder defined as the investigator started the NCR investigation by adding comments and notes in the Investigate Root Cause tab of the Non Conformance Report Maintenance program. |
N - New |
This status is displayed when the NCR header has been created, but the investigation hasn't commenced yet. |
The non conformance report statuses are saved within the SqmNcStatus table and the status is displayed at the Report status field within the Non Conformance Report Maintenance program.
The following indicates areas in the product that may be affected by implementing this feature:
Program List > Quality Management > Non Conformance Reporting > Setup
This program lets you define and configure the severity levels assigned to a non-conformance report (NCR).
The severity configuration dictates the processes that must be followed for each NCR. The severity level is linked to specific non-conformance standards that trigger the creation of an NCR.
Program List > Quality Management > Non Conformance Reporting > Setup
This program lets you create and maintain the types of deviation that could occur, e.g. a defect.
Program List > Quality Management > Non Conformance Reporting > Setup
This program lets you create and maintain the causes of non-conformances, so that you can prevent future issues, analyze trends and ultimately improve processes.
Program List > Quality Management > Non Conformance Reporting > Setup
This program lets you attach or link a method to the NCR to document in which business process the non-conformance occurred. This is done for reporting purposes to identify trends.
Program List > Quality Management > Non Conformance Reporting > Setup
This program lets you apply a default process against an NCR standard.
Program List > Quality Management > Non Conformance Reporting > Setup
This program lets you create a standard against which a non-conformance report can be raised.
Program List > Quality Management > Non Conformance Reporting > Setup
This program lets you define the actions that will be applied to a non-conformance report that is created when a deviation occurs from a non-conformance standard.
Program List > Quality Management > Non Conformance Reporting > Setup
This program lets you define the departments that own non-conformances and are accountable for addressing and resolving these. It controls the functions which each stakeholder can carry out within the department.
Program List > Quality Management > Non Conformance Reporting > Transaction Processing
This program lets you create and maintain non-conformance reports.
Program List > Quality Management > Non Conformance Reporting > Transaction Processing
This program lets you review detailed costs associated with non conformance reports.
Program List > Quality Management > Non Conformance Reporting > Transaction Processing
This program lets you review details of non-conformance reports.
Program List > Quality Management > Non Conformance Reporting > Reports
This program lets you generate a list of non-conformance reports.
Accessible from the following programs
-
The Browse fields against various stakeholders within the Non Conformance Department program.
-
The Responsible stakeholder field within the Non Conformance Standard Actions program.
This program lets you view and select from a list of stakeholders.
Accessible from the Browse field within the Non Conformance Report Maintenance program.
This program lets you view all stakeholders that have been assigned activities against a non-conformance report.
The following indicates the business objects that are affected by this feature:
The Severity Level Setup business object lets you define and configure the severity levels assigned to a non-conformance report (NCR).
The Non-Conformance Standard Setup business object lets you create a standard against which a non-conformance report can be raised.
The Non Conformance Plan Setup business object lets you define the action plan that will be applied to a non-conformance report that is created when a deviation occurs from a non-conformance standard.
The Non-Conformance Type Setup business object lets you create and maintain the types of deviation that could occur, e.g. a defect.
The Non-conformance Process Setup business object lets you create and maintain the processes used to ensure compliance to the organization's chosen quality standards, maintain quality, and prevent the recurrence of quality issues.
The NCR Process Per Standard Setup business object lets you apply a default process against an NCR standard.
The Non-conformance Cause Category Setup business object lets you create and maintain the causes of non-conformances, so that you can prevent future issues, analyze trends and ultimately improve processes.
The NCR Stakeholder Per Department Setup business object lets you create and maintain the stakeholders applicable to each department.
The Non-conformance Department Setup business object lets you define the departments that own non-conformances and are accountable for addressing and resolving these.
The Quality Management Document Maintenance business object lets you attach and maintain all documents used in the non conformance process.
The Non Conformance Report Maintenance business object lets you create and maintain a non-conformance report when a deviation occurred from one of the non-conformance standards.
The Non conformance Report Review Query business object lets you query and review a list of non-conformance reports.
The Non conformance Report Query business object lets you query the information of a non-conformance report.
The following VBScript examples indicate how scripting can be used to trigger non-conformance reports for the listed events.
These VBScript examples must be configured to support your unique requirements and NCR configurations.
' Sample VBscript triggered from PORPRI (PO Inspection)
' This script contains functions for form and field events.
' You must not modify the name of the functions.
Option Explicit
' Declare the variables to be used for processing
dim XMLOut, XMLParam, XMLDoc
Function QuantityRejected_OnSubmit()
' Call SQMTRP to record the deviation when inspected items have been rejected
if QuantityRejected.CodeObject.Quantity <> 0 then
call record_non_conformance_deviation()
end if
End Function
' This function calls the functions that setup the SQMTRP XML documents (Parameter&XMLIn)
' and then proceeds to call the Business object for posting
Function record_non_conformance_deviation()
' Setup the XML parameters document
call setup_Xml_parameters()
'Setup the XMLIn document
call setup_xmlIn_doc()
'Call SQMTRP to process and check for any errors on return
on error resume next
XMLOut = CallTrn("SQMTRP",XMLParam,XMLDoc,"Post","auto")
if err then
msgbox err.Description, vBCritical, "Calling Business Object"
exit function
end if
' Switch on error handling
on error goto 0
End function
' This function sets up the XML parameters document
function setup_Xml_parameters()
XMLParam = XMLParam & " <?xml version='1.0' encoding='Windows-1252'?>"
XMLParam = XMLParam & " <!-- Copyright 1994-2024 SYSPRO Ltd.-->"
XMLParam = XMLParam & " <!-- "
XMLParam = XMLParam & " Sample XML for the NCR Report Maintenance Post Business Object"
XMLParam = XMLParam & " -->"
XMLParam = XMLParam & " <PostNonConformance>"
XMLParam = XMLParam & " <Parameters>"
XMLParam = XMLParam & " <ActionType>A</ActionType>"
XMLParam = XMLParam & " <ValidateOnly>N</ValidateOnly>"
XMLParam = XMLParam & " <IgnoreWarnings>Y</IgnoreWarnings>"
XMLParam = XMLParam & " <ApplyIfEntireDocumentValid>N</ApplyIfEntireDocumentValid>"
XMLParam = XMLParam & " </Parameters>"
XMLParam = XMLParam & " </PostNonConformance>"
end function
' This function sets up the XMLIn document
function setup_xmlIn_doc()
XMLDoc = XMLDoc & " <?xml version='1.0' encoding='Windows-1252'?>"
XMLDoc = XMLDoc & " <!-- Copyright 1994-2024 SYSPRO Ltd.-->"
XMLDoc = XMLDoc & " <!-- "
XMLDoc = XMLDoc & " Sample XML for the NCR Report Maintenance Posting Business Object"
XMLDoc = XMLDoc & " -->"
XMLDoc = XMLDoc & " <PostNonConformance>"
XMLDoc = XMLDoc & " <Item>"
XMLDoc = XMLDoc & " <LineAction>A</LineAction>"
XMLDoc = XMLDoc & " <NcrNumber />"
XMLDoc = XMLDoc & " <NcrDescription>PO lines failed inspection</NcrDescription>"
XMLDoc = XMLDoc & " <NcrStandard>OTT</NcrStandard>"
XMLDoc = XMLDoc & " <Owner>ADMIN</Owner>"
XMLDoc = XMLDoc & " <Manager>PETER</Manager>"
XMLDoc = XMLDoc & " <NcrProcess/>"
XMLDoc = XMLDoc & " <LongDescription>PO items failed inspection and were susbequently rejected</LongDescription>"
XMLDoc = XMLDoc & " <PotentialCauses>"
XMLDoc = XMLDoc & QuantityRejected.CodeObject.Description
XMLDoc = XMLDoc & " </PotentialCauses>"
XMLDoc = XMLDoc & " <Impact>Replacements needed from supplier and a return will be processed once goods have been delivered</Impact>"
XMLDoc = XMLDoc & " <Priority />"
XMLDoc = XMLDoc & " <Complete />"
XMLDoc = XMLDoc & " <Origin>"
XMLDoc = XMLDoc & " <OriginateType>P</OriginateType>"
XMLDoc = XMLDoc & " <OriginOrder>"
XMLDoc = XMLDoc & InspectionDetails.CodeObject.PurchaseOrder
XMLDoc = XMLDoc & " </OriginOrder>"
XMLDoc = XMLDoc & " </Origin>"
XMLDoc = XMLDoc & " <eSignature>{36303032-3330-3031-3038-323434363433}</eSignature>"
XMLDoc = XMLDoc & " </Item>"
XMLDoc = XMLDoc & " </PostNonConformance>"
end function
' Sample VBScript triggered from WIPPIP (WIP Inspection maintenance) Scrap pane
' This script contains functions for form and field events.
' You must not modify the name of the functions.
Option Explicit
' Declare the variables to be used for processing
dim XMLOut, XMLParam, XMLDoc
Function Scrap_OnSubmit()
' Call SQMTRP to record the deviation when quantity of items scrapped exceeds
' 2 and the warehouse is "N"
if (Scrap.CodeObject.QuantityScrapped > 2 and WIPInspectionDetails.CodeObject.Warehouse = "N") then
call record_non_conformance_deviation()
end if
End Function
' This function calls the functions that setup the SQMTRP XML documents (Parameter&XMLIn)
' and then proceeds to call the Business object for posting
Function record_non_conformance_deviation()
' Setup the XML parameters document
call setup_Xml_parameters()
'Setup the XMLIn document
call setup_xmlIn_doc()
'Call SQMTRP to process and check for any errors on return
on error resume next
XMLOut = CallTrn("SQMTRP",XMLParam,XMLDoc,"Post","auto")
if err then
msgbox err.Description, vBCritical, "Calling Business Object"
exit function
end if
' Switch on error handling
on error goto 0
End function
' This function sets up the XML parameters document
function setup_Xml_parameters()
XMLParam = XMLParam & " <?xml version='1.0' encoding='Windows-1252'?>"
XMLParam = XMLParam & " <!-- Copyright 1994-2024 SYSPRO Ltd.-->"
XMLParam = XMLParam & " <!-- "
XMLParam = XMLParam & " Sample XML for the NCR Report Maintenance Post Business Object"
XMLParam = XMLParam & " -->"
XMLParam = XMLParam & " <PostNonConformance>"
XMLParam = XMLParam & " <Parameters>"
XMLParam = XMLParam & " <ActionType>A</ActionType>"
XMLParam = XMLParam & " <ValidateOnly>N</ValidateOnly>"
XMLParam = XMLParam & " <IgnoreWarnings>Y</IgnoreWarnings>"
XMLParam = XMLParam & " <ApplyIfEntireDocumentValid>N</ApplyIfEntireDocumentValid>"
XMLParam = XMLParam & " </Parameters>"
XMLParam = XMLParam & " </PostNonConformance>"
end function
' This function sets up the XMLIn document
function setup_xmlIn_doc()
XMLDoc = XMLDoc & " <?xml version='1.0' encoding='Windows-1252'?>"
XMLDoc = XMLDoc & " <!-- Copyright 1994-2024 SYSPRO Ltd.-->"
XMLDoc = XMLDoc & " <!-- "
XMLDoc = XMLDoc & " Sample XML for the NCR Report Maintenance Posting Business Object"
XMLDoc = XMLDoc & " -->"
XMLDoc = XMLDoc & " <PostNonConformance>"
XMLDoc = XMLDoc & " <Item>"
XMLDoc = XMLDoc & " <LineAction>A</LineAction>"
XMLDoc = XMLDoc & " <NcrNumber />"
XMLDoc = XMLDoc & " <NcrDescription>Failed Work In Progress Inspections</NcrDescription>"
XMLDoc = XMLDoc & " <NcrStandard>OTT</NcrStandard>"
XMLDoc = XMLDoc & " <Owner>ADMIN</Owner>"
XMLDoc = XMLDoc & " <Manager>PETER</Manager>"
XMLDoc = XMLDoc & " <NcrProcess/>"
XMLDoc = XMLDoc & " <LongDescription> WIP items failed inspection and were subsequently scrapped </LongDescription>"
XMLDoc = XMLDoc & " <PotentialCauses>"
XMLDoc = XMLDoc & Scrap.CodeObject.ScrapCodeDescription
XMLDoc = XMLDoc & " </PotentialCauses>"
XMLDoc = XMLDoc & " <Impact>Rework needs to be performed on the items that failed inspection</Impact>"
XMLDoc = XMLDoc & " <Priority />"
XMLDoc = XMLDoc & " <Complete />"
XMLDoc = XMLDoc & " <Origin>"
XMLDoc = XMLDoc & " <OriginateType>J</OriginateType>"
XMLDoc = XMLDoc & " <OriginOrder>"
XMLDoc = XMLDoc & WIPInspectionDetails.CodeObject.Job
XMLDoc = XMLDoc & " </OriginOrder>"
XMLDoc = XMLDoc & " </Origin>"
XMLDoc = XMLDoc & " <eSignature>{36303032-3330-3031-3038-323434363433}</eSignature>"
XMLDoc = XMLDoc & " </Item>"
XMLDoc = XMLDoc & " </PostNonConformance>"
end function
' Sample VBScript triggered from WIPPIP (WIP Inspection maintenance) Scrap pane
' This script contains functions for form and field events.
' You must not modify the name of the functions.
Option Explicit
' Declare the variables to be used for processing
dim XMLOut, XMLParam, XMLDoc
Function Scrap_OnSubmit()
' Call SQMTRP to record the deviation when quantity of items scrapped exceeds
' 2 and the warehouse is "N"
if (Scrap.CodeObject.QuantityScrapped > 2 and WIPInspectionDetails.CodeObject.Warehouse = "N") then
call record_non_conformance_deviation()
end if
End Function
' This function calls the functions that setup the SQMTRP XML documents (Parameter&XMLIn)
' and then proceeds to call the Business object for posting
Function record_non_conformance_deviation()
' Setup the XML parameters document
call setup_Xml_parameters()
'Setup the XMLIn document
call setup_xmlIn_doc()
'Call SQMTRP to process and check for any errors on return
on error resume next
XMLOut = CallTrn("SQMTRP",XMLParam,XMLDoc,"Post","auto")
if err then
msgbox err.Description, vBCritical, "Calling Business Object"
exit function
end if
' Switch on error handling
on error goto 0
End function
' This function sets up the XML parameters document
function setup_Xml_parameters()
XMLParam = XMLParam & " <?xml version='1.0' encoding='Windows-1252'?>"
XMLParam = XMLParam & " <!-- Copyright 1994-2024 SYSPRO Ltd.-->"
XMLParam = XMLParam & " <!-- "
XMLParam = XMLParam & " Sample XML for the NCR Report Maintenance Post Business Object"
XMLParam = XMLParam & " -->"
XMLParam = XMLParam & " <PostNonConformance>"
XMLParam = XMLParam & " <Parameters>"
XMLParam = XMLParam & " <ActionType>A</ActionType>"
XMLParam = XMLParam & " <ValidateOnly>N</ValidateOnly>"
XMLParam = XMLParam & " <IgnoreWarnings>Y</IgnoreWarnings>"
XMLParam = XMLParam & " <ApplyIfEntireDocumentValid>N</ApplyIfEntireDocumentValid>"
XMLParam = XMLParam & " </Parameters>"
XMLParam = XMLParam & " </PostNonConformance>"
end function
' This function sets up the XMLIn document
function setup_xmlIn_doc()
XMLDoc = XMLDoc & " <?xml version='1.0' encoding='Windows-1252'?>"
XMLDoc = XMLDoc & " <!-- Copyright 1994-2024 SYSPRO Ltd.-->"
XMLDoc = XMLDoc & " <!-- "
XMLDoc = XMLDoc & " Sample XML for the NCR Report Maintenance Posting Business Object"
XMLDoc = XMLDoc & " -->"
XMLDoc = XMLDoc & " <PostNonConformance>"
XMLDoc = XMLDoc & " <Item>"
XMLDoc = XMLDoc & " <LineAction>A</LineAction>"
XMLDoc = XMLDoc & " <NcrNumber />"
XMLDoc = XMLDoc & " <NcrDescription>Failed Work In Progress Inspections</NcrDescription>"
XMLDoc = XMLDoc & " <NcrStandard>OTT</NcrStandard>"
XMLDoc = XMLDoc & " <Owner>ADMIN</Owner>"
XMLDoc = XMLDoc & " <Manager>PETER</Manager>"
XMLDoc = XMLDoc & " <NcrProcess/>"
XMLDoc = XMLDoc & " <LongDescription> WIP items failed inspection and were subsequently scrapped </LongDescription>"
XMLDoc = XMLDoc & " <PotentialCauses>"
XMLDoc = XMLDoc & Scrap.CodeObject.ScrapCodeDescription
XMLDoc = XMLDoc & " </PotentialCauses>"
XMLDoc = XMLDoc & " <Impact>Rework needs to be performed on the items that failed inspection</Impact>"
XMLDoc = XMLDoc & " <Priority />"
XMLDoc = XMLDoc & " <Complete />"
XMLDoc = XMLDoc & " <Origin>"
XMLDoc = XMLDoc & " <OriginateType>J</OriginateType>"
XMLDoc = XMLDoc & " <OriginOrder>"
XMLDoc = XMLDoc & WIPInspectionDetails.CodeObject.Job
XMLDoc = XMLDoc & " </OriginOrder>"
XMLDoc = XMLDoc & " </Origin>"
XMLDoc = XMLDoc & " <eSignature>{36303032-3330-3031-3038-323434363433}</eSignature>"
XMLDoc = XMLDoc & " </Item>"
XMLDoc = XMLDoc & " </PostNonConformance>"
end function
' Sample VBScript triggered from IMP01B (Job Receipts)
' This script contains functions for form and field events.
' You must not modify the name of the functions.
Option Explicit
' Declare the variables to be used for processing
dim XMLOut, XMLParam, XMLDoc
dim ActualCompletionDate
dim JobDeliveryDate
Function JobDetails_OnSubmit()
' Change the dates from plain strings to strings with a date format
ActualCompletionDate = Mid(JobDetails.CodeObject.ActualJobCompletionDate, 1, 4) & "-" & Mid(JobDetails.CodeObject.ActualJobCompletionDate, 5, 2) & "-" & Mid(JobDetails.CodeObject.ActualJobCompletionDate, 6)
JobDeliveryDate = Mid(JobDetails.CodeObject.JobDeliveryDate, 1, 4) & "-" & Mid(JobDetails.CodeObject.JobDeliveryDate, 5, 2) & "-" & Mid(JobDetails.CodeObject.JobDeliveryDate, 6)
' Call SQMTRP to record the deviation when the job Delivery date is later
' than the Actual date
if ActualCompletionDate > JobDeliveryDate then
call record_non_conformance_deviation()
end if
End Function
' This function calls the functions that setup the SQMTRP XML documents (Parameter&XMLIn)
' and then proceeds to call the Business object for posting
Function record_non_conformance_deviation()
' Setup the XML parameters document
call setup_Xml_parameters()
'Setup the XMLIn document
call setup_xmlIn_doc()
'Call SQMTRP to process and check for any errors on return
on error resume next
XMLOut = CallTrn("SQMTRP",XMLParam,XMLDoc,"Post","auto")
if err then
msgbox err.Description, vBCritical, "Calling Business Object"
exit function
end if
' Switch on error handling
on error goto 0
End function
' This function sets up the XML parameters document
function setup_Xml_parameters()
XMLParam = XMLParam & " <?xml version='1.0' encoding='Windows-1252'?>"
XMLParam = XMLParam & " <!-- Copyright 1994-2024 SYSPRO Ltd.-->"
XMLParam = XMLParam & " <!-- "
XMLParam = XMLParam & " Sample XML for the NCR Report Maintenance Post Business Object"
XMLParam = XMLParam & " -->"
XMLParam = XMLParam & " <PostNonConformance>"
XMLParam = XMLParam & " <Parameters>"
XMLParam = XMLParam & " <ActionType>A</ActionType>"
XMLParam = XMLParam & " <ValidateOnly>N</ValidateOnly>"
XMLParam = XMLParam & " <IgnoreWarnings>Y</IgnoreWarnings>"
XMLParam = XMLParam & " <ApplyIfEntireDocumentValid>N</ApplyIfEntireDocumentValid>"
XMLParam = XMLParam & " </Parameters>"
XMLParam = XMLParam & " </PostNonConformance>"
end function
' This function sets up the XMLIn document
function setup_xmlIn_doc()
XMLDoc = XMLDoc & " <?xml version='1.0' encoding='Windows-1252'?>"
XMLDoc = XMLDoc & " <!-- Copyright 1994-2024 SYSPRO Ltd.-->"
XMLDoc = XMLDoc & " <!-- "
XMLDoc = XMLDoc & " Sample XML for the NCR Report Maintenance Posting Business Object"
XMLDoc = XMLDoc & " -->"
XMLDoc = XMLDoc & " <PostNonConformance>"
XMLDoc = XMLDoc & " <Item>"
XMLDoc = XMLDoc & " <LineAction>A</LineAction>"
XMLDoc = XMLDoc & " <NcrNumber />"
XMLDoc = XMLDoc & " <NcrDescription>Late Job delivery</NcrDescription>"
XMLDoc = XMLDoc & " <NcrStandard>OTIF</NcrStandard>"
XMLDoc = XMLDoc & " <Owner>ADMIN</Owner>"
XMLDoc = XMLDoc & " <Manager>PETER</Manager>"
XMLDoc = XMLDoc & " <NcrProcess/>"
XMLDoc = XMLDoc & " <LongDescription>Job was delivered later than originally planned</LongDescription>"
XMLDoc = XMLDoc & " <PotentialCauses>Raw materials were delivered late</PotentialCauses>"
XMLDoc = XMLDoc & " <Impact>Plant Manager might have to allocate overtime hours for rework</Impact>"
XMLDoc = XMLDoc & " <Priority />"
XMLDoc = XMLDoc & " <Complete />"
XMLDoc = XMLDoc & " <Origin>"
XMLDoc = XMLDoc & " <OriginateType>J</OriginateType>"
XMLDoc = XMLDoc & " <OriginOrder>"
XMLDoc = XMLDoc & JobDetails.CodeObject.Job
XMLDoc = XMLDoc & " </OriginOrder>"
XMLDoc = XMLDoc & " </Origin>"
XMLDoc = XMLDoc & " <eSignature>{36303032-3330-3031-3038-323434363433}</eSignature>"
XMLDoc = XMLDoc & " </Item>"
XMLDoc = XMLDoc & " </PostNonConformance>"
end function
' Sample VBScript triggered from IMP01B (Job Receipts)
' This script contains functions for form and field events.
' You must not modify the name of the functions.
Option Explicit
' Declare the variables to be used for processing
dim XMLOut, XMLParam, XMLDoc
Function JobDetails_OnSubmit()
' Call SQMTRP to record the deviation when the value of the QTY receipted
' is less than the QTY to make
if (JobDetails.CodeObject.Quantity < JobInformation.CodeObject.ToMake) then
call record_non_conformance_deviation()
end if
End Function
' This function calls the functions that setup the SQMTRP XML documents (Parameter&XMLIn)
' and then proceeds to call the Business object for posting
Function record_non_conformance_deviation()
' Setup the XML parameters document
call setup_Xml_parameters()
'Setup the XMLIn document
call setup_xmlIn_doc()
'Call SQMTRP to process and check for any errors on return
on error resume next
XMLOut = CallTrn("SQMTRP",XMLParam,XMLDoc,"Post","auto")
if err then
msgbox err.Description, vBCritical, "Calling Business Object"
exit function
end if
' Switch on error handling
on error goto 0
End function
' This function sets up the XML parameters document
function setup_Xml_parameters()
XMLParam = XMLParam & " <?xml version='1.0' encoding='Windows-1252'?>"
XMLParam = XMLParam & " <!-- Copyright 1994-2024 SYSPRO Ltd.-->"
XMLParam = XMLParam & " <!-- "
XMLParam = XMLParam & " Sample XML for the NCR Report Maintenance Post Business Object"
XMLParam = XMLParam & " -->"
XMLParam = XMLParam & " <PostNonConformance>"
XMLParam = XMLParam & " <Parameters>"
XMLParam = XMLParam & " <ActionType>A</ActionType>"
XMLParam = XMLParam & " <ValidateOnly>N</ValidateOnly>"
XMLParam = XMLParam & " <IgnoreWarnings>Y</IgnoreWarnings>"
XMLParam = XMLParam & " <ApplyIfEntireDocumentValid>N</ApplyIfEntireDocumentValid>"
XMLParam = XMLParam & " </Parameters>"
XMLParam = XMLParam & " </PostNonConformance>"
end function
' This function sets up the XMLIn document
function setup_xmlIn_doc()
XMLDoc = XMLDoc & " <?xml version='1.0' encoding='Windows-1252'?>"
XMLDoc = XMLDoc & " <!-- Copyright 1994-2024 SYSPRO Ltd.-->"
XMLDoc = XMLDoc & " <!-- "
XMLDoc = XMLDoc & " Sample XML for the NCR Report Maintenance Posting Business Object"
XMLDoc = XMLDoc & " -->"
XMLDoc = XMLDoc & " <PostNonConformance>"
XMLDoc = XMLDoc & " <Item>"
XMLDoc = XMLDoc & " <LineAction>A</LineAction>"
XMLDoc = XMLDoc & " <NcrNumber />"
XMLDoc = XMLDoc & " <NcrDescription>QTY under delivery</NcrDescription>"
XMLDoc = XMLDoc & " <NcrStandard>QUD</NcrStandard>"
XMLDoc = XMLDoc & " <Owner>ADMIN</Owner>"
XMLDoc = XMLDoc & " <Manager>PETER</Manager>"
XMLDoc = XMLDoc & " <NcrProcess/>"
XMLDoc = XMLDoc & " <LongDescription>Manufactured quantity is not sufficient</LongDescription>"
XMLDoc = XMLDoc & " <PotentialCauses>Artisans read the Job card incorrectly</PotentialCauses>"
XMLDoc = XMLDoc & " <Impact>Scheduling of a new job required</Impact>"
XMLDoc = XMLDoc & " <Priority />"
XMLDoc = XMLDoc & " <Complete />"
XMLDoc = XMLDoc & " <Origin>"
XMLDoc = XMLDoc & " <OriginateType>J</OriginateType>"
XMLDoc = XMLDoc & " <OriginOrder>"
XMLDoc = XMLDoc & JobDetails.CodeObject.Job
XMLDoc = XMLDoc & " </OriginOrder>"
XMLDoc = XMLDoc & " </Origin>"
XMLDoc = XMLDoc & " <eSignature>{36303032-3330-3031-3038-323434363433}</eSignature>"
XMLDoc = XMLDoc & " </Item>"
XMLDoc = XMLDoc & " </PostNonConformance>"
end function
' Sample VBScript triggered from INVP63 (Stock Take Capture by Stock Code)
' This script contains functions for form and field events.
' You must not modify the name of the functions.
Option Explicit
' Declare the variables to be used for processing
dim XMLOut, XMLParam, XMLDoc
Function StockTakeQuantityCaptureByStockCod_OnSubmit()
' Call SQMTRP to record the deviation when the value of the QTY on hand
' does not match up with the captured qty
if (StockTakeQuantityCaptureByStockCod.CodeObject.QtyOnHand <> StockTakeQuantityCaptureByStockCod.CodeObject.TotalCapturedQuantity) then
call record_non_conformance_deviation()
end if
End Function
' This function calls the functions that setup the SQMTRP XML documents (Parameter&XMLIn)
' and then proceeds to call the Business object for posting
Function record_non_conformance_deviation()
' Setup the XML parameters document
call setup_Xml_parameters()
'Setup the XMLIn document
call setup_xmlIn_doc()
'Call SQMTRP to process and check for any errors on return
on error resume next
XMLOut = CallTrn("SQMTRP",XMLParam,XMLDoc,"Post","auto")
if err then
msgbox err.Description, vBCritical, "Calling Business Object"
exit function
end if
' Switch on error handling
on error goto 0
End function
' This function sets up the XML parameters document
function setup_Xml_parameters()
XMLParam = XMLParam & " <?xml version='1.0' encoding='Windows-1252'?>"
XMLParam = XMLParam & " <!-- Copyright 1994-2024 SYSPRO Ltd.-->"
XMLParam = XMLParam & " <!-- "
XMLParam = XMLParam & " Sample XML for the NCR Report Maintenance Post Business Object"
XMLParam = XMLParam & " -->"
XMLParam = XMLParam & " <PostNonConformance>"
XMLParam = XMLParam & " <Parameters>"
XMLParam = XMLParam & " <ActionType>A</ActionType>"
XMLParam = XMLParam & " <ValidateOnly>N</ValidateOnly>"
XMLParam = XMLParam & " <IgnoreWarnings>Y</IgnoreWarnings>"
XMLParam = XMLParam & " <ApplyIfEntireDocumentValid>N</ApplyIfEntireDocumentValid>"
XMLParam = XMLParam & " </Parameters>"
XMLParam = XMLParam & " </PostNonConformance>"
end function
' This function sets up the XMLIn document
function setup_xmlIn_doc()
XMLDoc = XMLDoc & " <?xml version='1.0' encoding='Windows-1252'?>"
XMLDoc = XMLDoc & " <!-- Copyright 1994-2024 SYSPRO Ltd.-->"
XMLDoc = XMLDoc & " <!-- "
XMLDoc = XMLDoc & " Sample XML for the NCR Report Maintenance Posting Business Object"
XMLDoc = XMLDoc & " -->"
XMLDoc = XMLDoc & " <PostNonConformance>"
XMLDoc = XMLDoc & " <Item>"
XMLDoc = XMLDoc & " <LineAction>A</LineAction>"
XMLDoc = XMLDoc & " <NcrNumber />"
XMLDoc = XMLDoc & " <NcrDescription>Stock Take Deviations</NcrDescription>"
XMLDoc = XMLDoc & " <NcrStandard>STT</NcrStandard>"
XMLDoc = XMLDoc & " <Owner>ADMIN</Owner>"
XMLDoc = XMLDoc & " <Manager>PETER</Manager>"
XMLDoc = XMLDoc & " <NcrProcess/>"
XMLDoc = XMLDoc & " <LongDescription>Quantity captured less that on Hand</LongDescription>"
XMLDoc = XMLDoc & " <PotentialCauses>under counted on previous stock take</PotentialCauses>"
XMLDoc = XMLDoc & " <Impact>correct via Inventory movements</Impact>"
XMLDoc = XMLDoc & " <Priority />"
XMLDoc = XMLDoc & " <Complete />"
XMLDoc = XMLDoc & " <Origin>"
XMLDoc = XMLDoc & " <OriginateType>I</OriginateType>"
XMLDoc = XMLDoc & " <StockCode>"
XMLDoc = XMLDoc & StockTakeQuantityCaptureByStockCod.CodeObject.StockCode
XMLDoc = XMLDoc & " </StockCode>"
XMLDoc = XMLDoc & " </Origin>"
XMLDoc = XMLDoc & " <eSignature>{36303032-3330-3031-3038-323434363433}</eSignature>"
XMLDoc = XMLDoc & " </Item>"
XMLDoc = XMLDoc & " </PostNonConformance>"
end function
Copyright © 2024 SYSPRO PTY Ltd.