‎2009 Dec 29 4:46 AM
Hi All,
I am working on Persistent Classes for the first time. I have tried to gain some info by going through some related threads and of course Thomas' Blog on Persistent Classes.
My Problem:
I have been trying to create a Persistent Class that takes fields from multiple database tables (KNA1 and KNVV).
I wasn't able to generate mapping successfully.
So, the solution was to create 2 Persistent Classes and create a data model class for these two (It was mentioned in one of the threads)
I have been trying to create a Persistent Class for the fields from table KNA1 (I need only some 11 fields)
When I activate, I again get a warning 'No mapping exists for the fields' as a result of which the main class is not activated.
I read somewhere that all fields from a table needs to be included in the 'Inclusion area', otherwise, the class doesn't activate.
So I tried creating a view, but I get another warning message saying 'Database operations with view are not allowed' and the main class remains unactivated.
Please suggest.
Also, if there are any related materials on how to deal with multiple tables, I would be more than glad.
Thanks for all your time.
‎2009 Dec 29 7:59 AM
If you are creating a persistent class for SAP tables, then effectively you are attempting to update the tables directly. And that is a really bad idea.
See [here|; and [here |; for more discussion on that topic.
Only create persistent classes for database operations on your own tables.
I guess your classes are failing because you haven't done the mapping. Did you click on the button marked "persistence" on the SE24 view of your ZCL class?
matt
One more thing - it's against the forum rules to ask for material and links...
‎2009 Dec 29 4:54 AM
‎2009 Dec 29 7:59 AM
If you are creating a persistent class for SAP tables, then effectively you are attempting to update the tables directly. And that is a really bad idea.
See [here|; and [here |; for more discussion on that topic.
Only create persistent classes for database operations on your own tables.
I guess your classes are failing because you haven't done the mapping. Did you click on the button marked "persistence" on the SE24 view of your ZCL class?
matt
One more thing - it's against the forum rules to ask for material and links...