cancel
Showing results for 
Search instead for 
Did you mean: 

How to add new fields to existing message type with IoT service on SCP?

former_member243278
Participant
0 Kudos

We created a message type which is used by 100 different IoT devices. This message type includes eight fields. We have more than one million records on message type. However, we want to add two more additional fields to existing message type. In IoT cockpit, it is not possible to edit or modify the message type. How can we solve this problem? We do not want to create a new message type because we have more than one million records on table.

What is the solution of this situation?

Accepted Solutions (1)

Accepted Solutions (1)

anton_levin
Advisor
Advisor
0 Kudos

Hello Baris,

three aspect here:

  1. MessageType: once created, it is not possible to add or remove message type fields.
  2. DeviceType: it is possible to add and remove MessageTypes to existing DeviceType via the API (not via the Cockpit). See "Assigning and Removing MessageTypes" [1] for more details.
  3. Customized table mapping option [2]. For reference below.

So, I could suggest the following for your case:

  1. Create a new MessageType (with 2 additional fields)
  2. Assign your new MessageType to the existing DeviceType, so that your on-boarded Devices which are mapped to that DeviceType could use that new MessageType
  3. Alter your existing table in the DB with 2 new columns (column types should match the types of the new MessageType fields)
  4. Configure your custom table mapping, following the [2], so that messages of the new MessageType from the devices of the existing DeviceType land in your existing table.
  5. Adapt edge part, so that your devices send messages using the new MessageType ID and JSON payload.

Hope this helps,

Anton

[1] https://help.sap.com/viewer/7436c3125dd5491f939689f18954b1e9/Cloud/en-US/38fad8a378d84dff9c3854b023b...

[2] https://help.sap.com/viewer/7436c3125dd5491f939689f18954b1e9/Cloud/en-US/c665f61f0bf64aaca766d9d1a84...

former_member243278
Participant
0 Kudos

Thank you Anton!

In addition, is there any plan to create an easier solution for this process by SAP? I think, there should be easier way to do it.

anton_levin
Advisor
Advisor
0 Kudos

Hello Barış, I have no info on that. Regards, Anton

former_member243278
Participant

Hello Anton,

I searched this topic on internet and talked with SAP. In IoT 4.0 this process is very simple. You can edit the related node or message types without any problem. IoT 4.0 is based on PlatOne. Therefore, everything is in iot 4.0 can be extended easily.

I also tried myself IoT 4.0 with more than one protocol. I worked on HTTP, MQTT, ModBus, COAP etc. It is available just based on Amazon Cloud infrastructure with SAP. They will also release IoT 4.0 for SCP infrastructure but I do not know when they will release it. Just for you information.

Answers (0)