cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Legacy Business Object with Parent Key

Seph
Explorer
0 Likes
490

Hello,

I want to use BOPF with already existing tables, so I use the DAC /BOBF/CL_DAC_LEGACY_TABLE. I have the problem that fields in relation to each other have a different name.

Fields Table A:

ID

Titel

 

Fields Table B:

ID

PARENT_ID

Parameter

Every table has their own ID-field names 'ID'. Entries of table B are in relation to table A via the PARENT_ID field.

The BOPF has table A as root and table B as subnote. I created an alternative key ‘DB_KEY’ for the root, with a structure containing only the ID field. The subnote uses this structure for the 'PARENT_KEY'. In addison the subnote has it’s own ‘DB_KEY’, with a structure containing the ID and the PARENT_ID.

Unfortunately, BOPF is connection the tables via the ID field at the moment which is wrong. It need to be connected from PARENT_ID to ID.

Is there a way to tell the BO how it should work? Maybe with an association class or redefining the DAC?

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Seph
Explorer
0 Likes

It's working now.

I created a new structure containing only the PARENT_ID field. I now use this structure as ‘PARENT_KEY’ of the subnote. So the ‘PARENT_KEY’ uses now the name of table B.
BOPF can map ‘DB_KEY’ of the root node and ‘PARENT_KEY’ of the subnote.

 

Answers (0)