2015 Apr 22 2:03 PM
Hi,
what about foreign key relation between PARENT_KEY field in a subnode DB table to the DB_KEY field in the DB table of the superior node?
As far as I see such relations are not maintained in the DDIC meta data.
Such relations would be quite helpful to get the persisted DB data model complete and to simplfy the creation of corresponding CDS views.
As far as I understood the DB tables are generated by BOPF design time. Is this simply missing functionality in the DB design time or is there any misunderstanding from my side?
Would it be problematic to maintain such relations manually in SE11 after generation?
Regards, Jürgen
Hi,
what about foreign key relation between PARENT_KEY field in a subnode DB table to the DB_KEY field in the DB table of the superior node?
As far as I see such relations are not maintained in the DDIC meta data.
Such relations would be quite helpful to get the persisted DB data model complete and to simplfy the creation of corresponding CDS views.
As far as I understood the DB tables are generated by BOPF design time. Is this simply missing functionality in the DB design time or is there any misunderstanding from my side?
Would it be problematic to maintain such relations manually in SE11 after generation?
Regards, Jürgen
2015 Apr 22 2:11 PM
Hello Jürgen,
BOPF's association definition is built on top of DDIC, thus there is no need for BOPF to have the information stored in the database table's metadata. Of course you could add those information manually on DB level if you would like.
You didn't mentioned your use case in detail, but I guess you would like to automatically generate CDS out of BOPF. In that case you could also use the BOPF configuration in order to get the knowledge about the existence of foreign key association in BOPF instead of evaluating the database metadata:
" get all associations of a BO (including foreign key associations)
DATA(lo_configuration) = /bobf/cl_frw_factory=>get_configuration( iv_bo_key = IF_YOUR_CONSTANT_INTERFACE=>sc_bo_key ).
data(lt_association) = lo_configuration->get_assoc_tab( ).
" now check the kind of associations (field ASSOC_CAT = SC_ASSOCCAT_FOREIGN_KEY)
Best regards
Tilmann
2015 Apr 22 2:33 PM
Hi Tilmann,
ähem, as far as I know CDS design time does not know anything about BOPF meta data but classical DDIC metadata are evaluated.
Furthermore, for me it would be simply a question of meta data completness.
Re: manual maintenance of foreign key data: would these foreign keys be respected when new fields are added by BOPF design time?
Regards, Jürgen
2015 Apr 22 4:20 PM
Hello Jürgen,
you could maintain that information manually on the table, but BOPF does not take that information into account. I agree, that it would be nice to have that information in case accessing the BOPF table via CDS at design time, but that is not available at the moment.
Best regards
Tilmann
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |