激活CDS视图后未生成BOPF对象,请求排查问题原因
Let's walk through the key issues that might be stopping your BOPF object from showing up in /n/BOBF/CONF_UI:
1. You’re using legacy CDS view syntax
Your current code uses the older define view syntax, but CDS-based BOPF objects require the modern CDS entity syntax (define view entity) (introduced in ABAP 7.52+). The legacy define view type doesn’t support the full set of annotations needed to auto-generate a BOPF business object.
Fix this by rewriting your view with the entity syntax:
@AbapCatalog.sqlViewName: 'ZPOC_CDS_ORDERS' @AbapCatalog.compiler.compareFilter: true @AccessControl.authorizationCheck: #NOT_REQUIRED @EndUserText.label: 'Order for VALEAN POC' @ObjectModel.compositionRoot: true @ObjectModel.modelCategory: #BUSINESS_OBJECT @ObjectModel.semanticKey: ['OrderId'] -- Use your actual business key here @ObjectModel.representativeKey: 'OrderId' @ObjectModel.writeActivePersistence: 'ZPOC_ORDERS' @ObjectModel.createEnabled: true @ObjectModel.deleteEnabled: true @ObjectModel.updateEnabled: true @OData: { publish: true } define view entity ZPOCCDSORDERS as select from zpoc_orders { key draft_id as DraftId, key draft_item as DraftItem, order_id as OrderId, sales_org as SalesOrg, sales_dist as SalesDist, sales_div as SalesDiv, customer_id as CustomerId, recipient_id as RecipientId, po_ref as PoRef, }
2. Your semantic key configuration is off
You’ve set @ObjectModel.semanticKey to use DraftId and DraftItem—these are draft-specific fields, not your actual business identifier. While this might not block BOPF object creation entirely, it can cause unexpected behavior. The semantic key should map to your object’s unique business key (like OrderId in this scenario).
3. Verify your underlying persistence table is active
The @ObjectModel.writeActivePersistence annotation points to table ZPOC_ORDERS. Make sure this table is fully activated and contains all the fields referenced in your CDS view. If the table is missing or inactive, the CDS view activation might silently skip generating the BOPF object.
4. Check the CDS view activation logs
After activating your view, go to SE80, navigate to your CDS view, and open the activation log (right-click → Activation Log). Look for warnings or errors related to BOPF object generation—this will give you direct insights into what went wrong during activation.
5. Adjust your search in /n/BOBF/CONF_UI
Double-check your search steps in the BOPF configuration UI:
- Select Business Object from the top dropdown menu
- Search for the exact name of your CDS view (
ZPOCCDSORDERS) instead of justZ*—wildcard searches can sometimes miss results if there are naming inconsistencies - Confirm you’re working in the correct client (BOPF objects are client-dependent)
Once you fix these issues, reactivate your CDS view and check /n/BOBF/CONF_UI again—your BOPF object should appear as expected.
内容的提问来源于stack exchange,提问作者softshipper

