Skip to Content
0

Fiori app using CDS BOPF CRUD - with Header and item

Dec 29, 2016 at 03:05 PM

454

avatar image
Former Member

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.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

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

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.

Share
10 |10000 characters needed characters left characters exceeded
Neil Ward Sep 08, 2017 at 10:35 AM
0

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.

Share
10 |10000 characters needed characters left characters exceeded