Openbravo Issue Tracking System - Modules
View Issue Details
0041071ModulesSAP Connector Mappingspublic2019-06-11 13:122019-12-26 18:39
samuel_nicuesa 
nonofrancisco 
highmajorunable to reproduce
closedfixed 
5
 
 
aferraz
0041071: In some circumstances some cash ups are not exported to SAP
In some circumstances, some cash ups are not exported to SAP
When processing a cashup (and any DAL object), the updated column is not updated when the object is committed, but when the object is flushed.

It could happen that the cashup export process is run between the moment a cashup is flushed and the moment it is committed.

In that case, this cashup won't be exported during this process because although it meets the updated condition, it hasn't been committed to the database yet.

It will neither be exported during next export processes because it won't meet the updated condition anymore.
Add EM_SAPOBMP_ISEXPORTED column to cashup table with defaultValue 'N'.

Take into account this column, instead of updated column, in cashup export query; same as we do in invoice export query.

Add a modulescript to update EM_SAPOBMP_ISEXPORTED to 'Y' to every cashup with updated column < cashup last synchronization date (present in OBEI_Entity_Synchronization table).
No tags attached.
related to design defect 0041150 new Triage Platform Base In some circumstances some cash ups are not exported to SAP 
Issue History
2019-06-11 13:12samuel_nicuesaNew Issue
2019-06-11 13:12samuel_nicuesaAssigned To => platform
2019-06-11 13:12samuel_nicuesaResolution time => 1562018400
2019-06-13 09:41aferrazAssigned Toplatform => Triage Finance
2019-06-13 13:21aferrazSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=18915#r18915
2019-06-13 13:21aferrazProposed Solution updated
2019-06-13 13:22aferrazAssigned ToTriage Finance => nonofrancisco
2019-06-17 19:52nonofranciscoStatusnew => scheduled
2019-06-18 12:37aferrazAssigned Tononofrancisco => platform
2019-06-18 12:37aferrazStatusscheduled => acknowledged
2019-06-18 12:37aferrazStatusacknowledged => scheduled
2019-06-18 12:37aferrazStatusscheduled => feedback
2019-06-18 12:37aferrazStatusfeedback => new
2019-06-18 12:39aferrazNote Added: 0112856
2019-06-19 13:03AugustoMauchAssigned Toplatform => AugustoMauch
2019-06-19 15:45martinsdanIssue Monitored: martinsdan
2019-06-19 16:03rafarodaIssue Monitored: rafaroda
2019-06-21 12:58aferrazNote Added: 0112937
2019-06-21 13:00aferrazNote Edited: 0112937bug_revision_view_page.php?bugnote_id=0112937#r18975
2019-06-21 13:00aferrazRelationship addedrelated to 0041150
2019-06-21 13:01aferrazAssigned ToAugustoMauch => nonofrancisco
2019-06-21 13:01aferrazCategorySAP Connector => SAP Connector Mappings
2019-06-21 21:25nonofranciscoStatusnew => scheduled
2019-06-26 06:01nonofranciscoNote Added: 0113022
2019-06-26 22:57nonofranciscoNote Edited: 0113022bug_revision_view_page.php?bugnote_id=0113022#r19005
2019-06-26 22:58nonofranciscoNote Edited: 0113022bug_revision_view_page.php?bugnote_id=0113022#r19006
2019-06-26 23:02nonofranciscoNote Edited: 0113022bug_revision_view_page.php?bugnote_id=0113022#r19007
2019-06-27 18:30hgbotCheckin
2019-06-27 18:30hgbotNote Added: 0113075
2019-06-27 18:30hgbotStatusscheduled => resolved
2019-06-27 18:30hgbotResolutionopen => fixed
2019-06-27 18:30hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.service.integration.sap.ecc.mappings/rev/b6e347875fb1d1d2a7ec7790d762a40aa4763315 [^]
2019-06-27 18:30aferrazReview Assigned To => aferraz
2019-06-27 18:30aferrazStatusresolved => closed

Notes
(0112856)
aferraz   
2019-06-18 12:39   
We could have the same problem with any entity being exported to SAP based on its updated column.

Fix should be done in the infrastructure part.
(0112937)
aferraz   
2019-06-21 12:58   
(edited on: 2019-06-21 13:00)
Finally, we will fix the cashup export in the mappings module and we will report a new design defect to fix the problem in the core module for every entity: 0041150

(0113022)
nonofrancisco   
2019-06-26 06:01   
(edited on: 2019-06-26 23:02)
Test Plan

Install SAP ECC Mappings module

1.- On ERP Back End
As Openbravo/The White Valley Group Admin

Go to Initialize Entity Synchronization Table window
  External System type: SAP ECC
  Start Integration From Time: now
  Click on Done button

Run update.database
Verify the following information is shown when modulescript UpdateExportedFlagInCashUpModuleScript is executed
3 OBPOS_APP_CASHUP records updated for WPUUMS mapping on client The White Valley Group
3 OBPOS_APP_CASHUP records updated for WPUTAB mapping on client The White Valley Group

2.- On Retail Front End
As vallblanca User in VBS-1 terminal

Create a new ticket
Pay the ticket in Cash
Create a new Cash Up

3.- On ERP Back End
As Openbravo/The White Valley Group Admin

Go EDL Configuration window
Add a new record
  EDL Process: BOB ID Based Export Process
Go to Output tab
Add a new record
  Output Type: Debug

Go to Communication with SAP ECC Server window
Add a new record
  Communication Protocol: Debug
  Path to iDoc folder: path where documents will be exported

Go to Organization window
Edit Vall Blanca Store organization
Set some value in SAP Filiale field

Go to Tax Rate window
Edit Entregas IVA 21% tax rate
Set some value in SAP Code field

Go to Channel Touchpoint window
Edit VBS POS Terminal terminal
Set some value in SAP Terminal field

Go to Payment Methods window
Edit Cash payment method
Set some value in SAP Code field

Go to Process Request window
Add a new record
  Process: SAP ECC Export Synchronization Process
  Timming: Run Immediately

Reschedule process SAP ECC Export Synchronization Process

Go to path where iDocs should be generated
Verify WPUUMS and WPUTAB documents were generated

Go to Cashup History window
Edit the last Cashup created
Verify the flags
  Has been exported to SAP in a WPUUMS iDoc
  Has been exported to SAP in a WPUUTAB iDoc
are checked

4.- On Retail Front End
As vallblanca User in VBS-1 terminal

Create a new ticket
Pay the ticket in Cash
Create a new Cash Up

5.- On ERP Back End
As Openbravo/The White Valley Group Admin

Go to Cashup History window
Edit the last Cashup created
Verify the flags
  Has been exported to SAP in a WPUUMS iDoc
  Has been exported to SAP in a WPUUTAB iDoc
are unchecked

(0113075)
hgbot   
2019-06-27 18:30   
Repository: erp/pmods/org.openbravo.service.integration.sap.ecc.mappings
Changeset: b6e347875fb1d1d2a7ec7790d762a40aa4763315
Author: Nono Carballo <nonofce <at> gmail.com>
Date: Tue Jun 25 16:31:37 2019 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.service.integration.sap.ecc.mappings/rev/b6e347875fb1d1d2a7ec7790d762a40aa4763315 [^]

Fixes issue 41071: Controls when Cash Up records have been exported.

Two new columns were created in OBPOS_AppCashUp table to record when a CashUp
has been exported in a WPUMMS or WPUTAB iDoc. The columns are shown in
Cash Up History and Channel Touch Point/Cash Up History windows.

The new columns were alse added to SAPOBMP_CashUp view.

Two new RecordScheduledToBeExportedListener implementations were created to
update the new columns when a WPUTAB/WPUUMS iDoc is generated.

Exporters for WPUTAB and WPUUMS were modified to consider the new column
instead of the updated column.

A modulescript was added to set the new columns as exported for CashUps whose
updated date is prior the last synchronization date of WPUUMS/WPUTAB iDocs.

---
M src-db/database/model/views/SAPOBMP_CASHUP.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/AD_FIELD.xml
M src/org/openbravo/service/integration/sap/ecc/mappings/exporter/CashUpExporter.java
M src/org/openbravo/service/integration/sap/ecc/mappings/exporter/CashUpWPUTABExporter.java
A build/classes/org/openbravo/service/integration/sap/ecc/mappings/modulescript/UpdateExportedFlagInCashUpData.class
A build/classes/org/openbravo/service/integration/sap/ecc/mappings/modulescript/UpdateExportedFlagInCashUpModuleScript.class
A src-db/database/model/modifiedTables/OBPOS_APP_CASHUP.xml
A src-util/modulescript/src/org/openbravo/service/integration/sap/ecc/mappings/modulescript/UpdateExportedFlagInCashUpModuleScript.java
A src-util/modulescript/src/org/openbravo/service/integration/sap/ecc/mappings/modulescript/UpdateExportedFlagInCashUp_data.xsql
A src/org/openbravo/service/integration/sap/ecc/mappings/exporter/ExportedCashupListener.java
A src/org/openbravo/service/integration/sap/ecc/mappings/exporter/ExportedWPUTABListener.java
A src/org/openbravo/service/integration/sap/ecc/mappings/exporter/ExportedWPUUMSListener.java
---