cancel
Showing results for 
Search instead for 
Did you mean: 

Fiori app using CDS BOPF CRUD - with Header and item

former_member306391
Participant
0 Kudos

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.

Accepted Solutions (0)

Answers (2)

Answers (2)

smith_john
Active Participant
0 Kudos

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.

Former Member
0 Kudos

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.