Troubleshooting
Problem
Below are file formatting issues in RTAM Full Sync agent generated CSV file.
(1) The CSV file contains actual data but not the Header Info (e.g. Column Names).
(2) The CSV filename is InventoryAvailability.csv.
As per business requirement, filename should have timestamp (e.g. InventoryAvailability_currenttimestamp.csv).
(2) The CSV filename is InventoryAvailability.csv.
As per business requirement, filename should have timestamp (e.g. InventoryAvailability_currenttimestamp.csv).
Symptom
Steps to reproduce:
(1) Add below entries in customer_overrides.properties
yfs.scwc.sdf.csv.dir=C\:\\RTAM_95
yfs.scwc.sdf.csvformat=mm:PartNumber,mm:OnlineStoreUniqueID,mm:physicalStoreIdentifier,mm:InventoryStatus,mm:AvailableQuantity,mm:AvailableQuantityUOM,mm:AvailabilityTime,mm:AvailabilityOffset,mm:LastUpdate
(2) Modify the template for SendAvailabilityChangeToInventoryAvailabilityCSV.xsl
(3) Enable REALTIME_AVAILABILITY_CHANGE_LIST event for REALTIME_ATP_MONITOR_OP3 to call syncInvChangesCSV Action. Enable Publish Data.
(4) Rebuild resources.jar, update EAR and restart server.
(5) Run RTAM Full Sync agent & check the InventoryAvailability.csv.
yfs.scwc.sdf.csv.dir=C\:\\RTAM_95
yfs.scwc.sdf.csvformat=mm:PartNumber,mm:OnlineStoreUniqueID,mm:physicalStoreIdentifier,mm:InventoryStatus,mm:AvailableQuantity,mm:AvailableQuantityUOM,mm:AvailabilityTime,mm:AvailabilityOffset,mm:LastUpdate
(2) Modify the template for SendAvailabilityChangeToInventoryAvailabilityCSV.xsl
(3) Enable REALTIME_AVAILABILITY_CHANGE_LIST event for REALTIME_ATP_MONITOR_OP3 to call syncInvChangesCSV Action. Enable Publish Data.
(4) Rebuild resources.jar, update EAR and restart server.
(5) Run RTAM Full Sync agent & check the InventoryAvailability.csv.
Actual Result: The CSV file doesn't contain Header Info & filename is (InventoryAvailability.csv) without timestamp.
Cause
Requested changes can't be implemented in the product because of design constraint and backward compatibility.
Environment
IBM Sterling Order Management 9.5
Resolving The Problem
The business requirement can be achieved through customization.
(1) Customize the service scwc_sdf_syncInventoryChangesCSV --> generateCSV (com.yantra.scwc.utils.SCWCCsvUtils.class). This service actually reads xml output after the xsl translation and creates a csv file. Implement the logic to add headers when the file is created for the first time.
(2) Custom code can be added in (SCWCCsvUtils.class) to change the filename to have timestamp.
Sample code is as below:
(2) Custom code can be added in (SCWCCsvUtils.class) to change the filename to have timestamp.
Sample code is as below:
-----------------------------
import java.util.Date;
...
private static String getFileNameFromMonitorOption(String monitorOption)
...
private static String getFileNameFromMonitorOption(String monitorOption)
{
Date date = new Date();
SimpleDateFormat sdf = null;
sdf = new SimpleDateFormat("ddMMMyyyy");
String sDate = sdf.format(date);
String fileName = "";
if (monitorOption.equalsIgnoreCase("3"))
fileName = "InventoryAvailability_FULL" + sDate;
else
Date date = new Date();
SimpleDateFormat sdf = null;
sdf = new SimpleDateFormat("ddMMMyyyy");
String sDate = sdf.format(date);
String fileName = "";
if (monitorOption.equalsIgnoreCase("3"))
fileName = "InventoryAvailability_FULL" + sDate;
else
{
fileName = "InventoryAvailability_DELTA" + sDate;
}
fileName = "InventoryAvailability_DELTA" + sDate;
}
return fileName;
}
Document Location
Worldwide
[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SS6PEW","label":"Sterling Order Management"},"Component":"","Platform":[{"code":"PF033","label":"Windows"}],"Version":"9.5","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]
Was this topic helpful?
Document Information
Modified date:
27 March 2019
UID
ibm10876906