Skip to Content
avatar image
Former Member

Fiori app using CDS BOPF CRUD - with Header and item

Hi All,

Trying to create an Fiori App using CDS BOPF CRUD operations. It's an simple app with an header and its corresponding item. Similar to VBAK/VBAP

The CDS is activated. BO structure with root and sub-node is ready and the Fiori app is displayed. The header and its corresponding item are displayed fine.

The issue is when clicking on + (Create New). When creating a new record, only the Header is visible for create. The item(sub-node) is not visible. The annotations which am using are:

Basic CDS Header

@ObjectModel: {
                modelCategory: #BUSINESS_OBJECT,
                compositionRoot: true,
                semanticKey:  [ 'VBELN' ],
                representativeKey: 'VBELN',
                transactionalProcessingEnabled: true,
                writeActivePersistence: 'VBAK',
                createEnabled: true,
                updateEnabled: true,
                deleteEnabled: true 
              }

Basic CDS Item

@ObjectModel: {
                writeActivePersistence: 'VBAP',
                semanticKey:  [ 'VBELN', 'POSNR' ],
                representativeKey: 'POSNR' ,
                createEnabled: true,
                updateEnabled: true,
                deleteEnabled: true
              }

Consumption Header

@ObjectModel: {
                transactionalProcessingDelegated: true,
                semanticKey:  [ 'VBELN' ],
                representativeKey: 'VBELN',
                createEnabled: true,
                updateEnabled: true,
                deleteEnabled: true 
              }

Consumption Item

@ObjectModel: {
                    semanticKey:  [ 'VBELN', 'POSNR' ],
                    representativeKey: 'POSNR',
                    createEnabled: true,
                    updateEnabled: true,
                    deleteEnabled: true
}

Anything am I missing in order to get the item in Create New? Thanks in advance.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Sep 08, 2017 at 10:18 AM

    Hi Sujin, In my case Item details are coming in next screen and ADD(+) button also active but when I tried to add item its not working but for header I am able to create.
    If your issue is resolved, Could you please let me know how can we pass key field from header to Item without making it as editable field?

    Regards,

    Arjun.

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 08, 2017 at 10:35 AM

    Hi,

    Have you structured your bopf such that you have a parent child relationship with your header and items? if so you should be able to create items on the object page of the app.

    Add comment
    10|10000 characters needed characters exceeded