cancel
Showing results for 
Search instead for 
Did you mean: 

Product Configuration with ODATA Service

Former Member
0 Kudos

Hi Folks,

I just at the start of a new implementation of a product configurator with ODATA Services and I have a general question regarding the architecture .

My problem is that I am not sure how to desing my data model in a way it reflects my requirements.

Of course I can design a model that represents a product with the corresponding characteristics and values but the complicated part for me is how to reveice the validation of a configuration (like constraints and text input validaton) out of the serice as I do not want to soruce the logic out to the client application.


The point is that I have a mixture between static data (characteristic textes and values...) and the dynamic validation information that depends on the current configuration represented in the client.

So my question is: can I somehow implement a READ Operation that receives the current configuration as a parameter (not key) and returns the characteristicValueSet with the information if they are still valid or not to the client?

I also thouth about implementing special Actions in my service like getCharacteristicWithValidationBasedOnConfiguration and passing the configuraton from the client but i hope that there is smarter solution for this.

As you recognize I am quite new to ODATA so please be clement

Looking forward to your suggestions.


Br

Sebastian

Accepted Solutions (1)

Accepted Solutions (1)

former_member184867
Active Contributor
0 Kudos

The modelling part is important and should be done carefully. OData metadata is kind of declarative meta model, which restricts dynamic/ unpredictable response.

I did not understand the requirement very clearly.

I would create Configuration entity with corresponding entityset. If the configurations are not always of similar structure , I may create  base configuration entity and inherit it into specific Configuration entities.

I shall define specific function imports for specific checks with specific input prams and would return the configuration entity(or may be entity set).


I may also choose to create a Big master configuration Entity which may contain all the possible properties.


In this case I would use $select to receive specific / intended properties from the monolithic entity returned by functionImport.


Sometimes I may also prefer to perform $filter on the configuration if a FunctionImport is not inevitable.

Former Member
0 Kudos

HI Atanu,

thank you for your answer.

I adapted your approach and created an configuration  entity that represent a specifc configuration by defining the ordernumber (that reflects the configuration) as the key. So the EntitiySet for the configuration is virtually a collection of all possible configurations (not addressable of course). As an attribute of this entity I have a field called "status" that tells me exaclty the status of the configuration specified by the key (=order number).

Beside that I modelled entities for the characteristics and the values but again always with the order number as key.

Now I need to check if the peformance for the getEntitiy  implementation as I have to gather all information  again for each server roundtrip. Maybe I need to check on SharedObjects for this!.

Looking forward to your comments.

Br

Sebastian

former_member184867
Active Contributor
0 Kudos

In Gateway we have the tools for performance check. Please refer to http://help.sap.com/saphelp_gateway20sp09/helpdata/en/9d/da3a2ceca344cf85568ae927e9858d/content.htm

and

for further information.

However I did not understand the following part


Now I need to check if the peformance for the getEntitiy  implementation as I have to gather all information  again for each server roundtrip.

Is it not possible to overcome it by a custom expand or a batch operation ?

May be you can give a thought.

Regards,

Atanu

Answers (0)