I am trying to create a tool that will access a range of different object types. I have created all of these as persistent objects which have been defined using the same business key.
The issue I am having is the order of the fields in the key seems to be quite random so for the first object I am getting
TYPES: BEGIN OF typ_business_key ,
wl_item TYPE numc3 ,
wl_key TYPE numc10 ,
END OF typ_business_key .
But when I repeat the same process for the next object I get
TYPES: BEGIN OF typ_business_key ,
wl_key TYPE numc10 ,
wl_item TYPE numc3 ,
END OF typ_business_key .
What this means is that when I try to use the interface method "IF_OS_FACTORY~CREATE_PERSISTENT_BY_KEY" in the agent class. The key that is passed gets interpreted incorrectly for some of my objects.
Is there any way to control the order of the fields in the business key when generating the persistent class?