Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0021277Openbravo ERPA. Platformpublic2012-08-01 12:222012-08-29 19:26
gorkaion 
marvintm 
highminorN/A
closedfixed 
20Gentoo
pi 
3.0MP15 
migueldejuana
Core
No
0021277: CallStoredProcedure do not support procedures that do not return a value
Current call method of the CallStoredProcedure class assumes that always is used to call a function.

When trying to call a procedure using oracle the process fails.
There are 2 places in pi where this issue has been workarounded:

CostingAlgorithm.java line 524: Replace the CostingData.calculateWorkEffort by a call to CallStoredProcedure.

MRPManufacturingPlanProcess.java: Replace the private call method with a call to CallStoredProcedure.
The CallProcess class already manages calls to procedures, but in this case it is assumed that these procedures have an ad_pinstance_id as unique parameter.

A new method should be created in the CallStoredProcedure that mixes current call implementation with the procedure calling of the CallProcess class.
No tags attached.
related to design defect 00212113.0MP15 closed gorkaion MRP performance should be improved. 
related to design defect 0036186 closed platform MA_PRODUCTION_COST procedure can not be call from OB in oracle instance using CallStoredProcedure 
Issue History
2012-08-01 12:22gorkaionNew Issue
2012-08-01 12:22gorkaionAssigned To => networkb
2012-08-01 12:22gorkaionModules => Core
2012-08-01 12:22gorkaionRelationship addedrelated to 0021270
2012-08-01 12:24gorkaionAssigned Tonetworkb => marvintm
2012-08-06 08:55gorkaionRelationship addedrelated to 0021211
2012-08-06 08:56gorkaionRelationship deletedrelated to 0021270
2012-08-22 10:05hgbotCheckin
2012-08-22 10:05hgbotNote Added: 0051448
2012-08-22 10:05hgbotStatusnew => resolved
2012-08-22 10:05hgbotResolutionopen => fixed
2012-08-22 10:05hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/39a08f4bf306aa67c18938df871350257de1f3c7 [^]
2012-08-23 10:06miruritaNote Added: 0051494
2012-08-23 10:06miruritaStatusresolved => new
2012-08-23 10:06miruritaResolutionfixed => open
2012-08-23 10:09hgbotCheckin
2012-08-23 10:09hgbotNote Added: 0051495
2012-08-23 10:09hgbotStatusnew => resolved
2012-08-23 10:09hgbotResolutionopen => fixed
2012-08-23 10:09hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/39a08f4bf306aa67c18938df871350257de1f3c7 [^] => http://code.openbravo.com/erp/devel/pi/rev/76bc4890f3db0c294d1086335b8e983aa17bd806 [^]
2012-08-23 10:47hgbotCheckin
2012-08-23 10:47hgbotNote Added: 0051497
2012-08-23 10:55miruritaNote Added: 0051498
2012-08-29 19:26migueldejuanaClosed by => migueldejuana
2012-08-29 19:26migueldejuanaNote Added: 0051654
2012-08-29 19:26migueldejuanaStatusresolved => closed
2017-06-13 18:34aferrazRelationship addedrelated to 0036186

Notes
(0051448)
hgbot   
2012-08-22 10:05   
Repository: erp/devel/pi
Changeset: 39a08f4bf306aa67c18938df871350257de1f3c7
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Wed Aug 22 10:05:16 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/39a08f4bf306aa67c18938df871350257de1f3c7 [^]

Fixed issue 21277. Added call method to CallStoredProcedure which supports calling of procedures in Oracle.

---
M src/org/openbravo/costing/CostingAlgorithm.java
M src/org/openbravo/erpCommon/ad_actionButton/MRPManufacturingPlanProcess.java
M src/org/openbravo/service/db/CallStoredProcedure.java
---
(0051494)
mirurita   
2012-08-23 10:06   
If you call to this method with an empty List of parameters in PostgreSQL the preparedstatement is built as follows:

SELECT MA_PRODUCTION_COST AS RESULT FROM DUAL

and it fails because does not have parenthesis after the procedure. It tries to do a select from a table.

Caused by: java.lang.IllegalStateException: org.postgresql.util.PSQLException: ERROR: column "ma_production_cost" does not exist
(0051495)
hgbot   
2012-08-23 10:09   
Repository: erp/devel/pi
Changeset: 76bc4890f3db0c294d1086335b8e983aa17bd806
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Aug 23 10:09:14 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/76bc4890f3db0c294d1086335b8e983aa17bd806 [^]

Fixed issue 21277. Now the method will not produce broken sql if there are no parameteres.

---
M src/org/openbravo/service/db/CallStoredProcedure.java
---
(0051497)
hgbot   
2012-08-23 10:47   
Repository: erp/devel/pi
Changeset: f1c506df75cd74e6097818165d887d2318411c44
Author: Mikel Irurita <mikel.irurita <at> openbravo.com>
Date: Thu Aug 23 10:46:07 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/f1c506df75cd74e6097818165d887d2318411c44 [^]

Related to issue 21277: missing parameters on MA_PRODUCTION_COST

---
M src/org/openbravo/costing/CostingAlgorithm.java
---
(0051498)
mirurita   
2012-08-23 10:55   
Code review + functional testing done change on CostingAlgorithm java class.
(0051654)
migueldejuana   
2012-08-29 19:26   
Tested and reviewed in pi@19952d22eb0a