Skip to Content
Jan 16, 2018 at 02:47 PM

How to know if an IndividualProduct already exists in SAP ByDesign?


Hello experts,

I'm working on an application (developped by using SAP Cloud Applications Studio) that creates IndividualProduct objects into SAP ByDesign. From what I could see until now, creating an IndividualProduct that already exists will raise no errors, because SAP ByDesign already controls duplicate entries. Apparently, the SerialID is checked for that. However, I would like to implement a specific notification if such a thing happens.

When I create an IndividualProduct in my code, I perform the following steps:

- I create an InstallationPoint

- I create an InstalledObject from that InstallationPoint

- I create an IndividualProduct with its details (ServiceProcessInformation...)

- I activate the InstallationPoint

- I activate the IndividualProduct

I know that somewhere after creating the IndividualProduct, there's something raising that this IndividualProduct already exists. I can see the following message being displayed in the application and tracable in the debug mode: "09:19:09 [1:I] Trace LOG :: ERROR > The product registered (100280986)7P85122901 for the serial 7SP022856 already exists!"

So my question is, is there any variables/properties/attributes that can be used to assess that the IndividualProduct already exists and perform an action? I don't even know how to retrieve the LOG ERROR message above.

Any helps would be greately appreciated.

Thank you in advance.