Neptune Data Parsing Error

The Neptune data parser that processes JSON data can error when presented with specific shapes of data. 


One known scenario is when:

  1. the data contains a field whose value is a large number (more than 11 digits), and
  2. that field is not in the associated attribute's field definition (the field will be discarded), and
  3. there is another field in the data with a value of "null",
  4. and that field's definition is not character based.


Conditions

This can occur when:

  1. a field containing a large number is added to a sync record in the application JavaScript, and
  2. the application is restarted, as
    • Neptune caches array data is stored as jsonh
    • When array data is converted to jsonh from json the header fields section contains all the fields used in the records of the array
    • When jsonh data is converted back to a json array (at application start):
      • All the records in the array are created with all the field from the header section
      • If the record doesn't have a value for that field then it gets the value "null"
  3. The record is then sent to the Neptune backed (via sync or iother request)


It is very rare for these conditions to be met.


Resolution

The issue is caused when the Neptune data parser writes the large value into a small dummy integer typed variable. This causes a secondary parser to be used and this parser can error processing the null values.


Neptune has provided a fix which replaces the dummy integer typed variable with a string typed variable. If you are running Neptune DXP 6.0.24, then you can import the fix from Neptune attached to this post, otherwise follow the steps to manually apply the fix, set out below.


1. Manually Apply Correction in SAP Development System


SAP Application Class: /NEPTUNE/CL_NAD_JSON


Perform a modification to method restore_type replacing the code referencing "eat_number idummy" with "eat_number sdummy".  


The points of change are shown in the image below with the file before changes on the left, after update on the right.



  • Activate - You will be prompted for a transport. Reference the Neptune hotfix "Neptune-DXP-6.0.024-Hotfix-12-17986-json-deserialize"


2. Test & Transport to Production

Follow your normal SAP change management procedures to test the update and ultimately transport to production. 


Licensed Download of Software

All software, content and other intellectual property available on this site is proprietary to Accenture (or Accenture's partners or third party licensors). Unauthorized or inappropriate use, access, download, transfer, distribution, reverse engineering, interference, modifying, copying or disabling without appropriate license will be considered breach of use and we reserve the right to bring appropriate action as a result.

zip
Login or Signup to post a comment

Site Data and Privacy Policy