Skip to content

Instantly share code, notes, and snippets.

@pokrakam
Last active December 13, 2021 14:08
Show Gist options
  • Save pokrakam/e1ad899018218f13aabd919235991886 to your computer and use it in GitHub Desktop.
Save pokrakam/e1ad899018218f13aabd919235991886 to your computer and use it in GitHub Desktop.
Update table without GUI View or Fiori
----------
Table
----------
@EndUserText.label : 'Test'
@AbapCatalog.enhancementCategory : #NOT_EXTENSIBLE
@AbapCatalog.tableCategory : #TRANSPARENT
@AbapCatalog.deliveryClass : #A
@AbapCatalog.dataMaintenance : #LIMITED
define table ztest {
key client : abap.clnt not null;
key id : abap.char(5) not null;
string : abap.string(0);
}
-----------
CDS View:
-----------
@AbapCatalog.sqlViewName: 'ZIVTEST'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Test data maintenance'
@OData.publish: true
@ObjectModel: {
createEnabled: true,
draftEnabled: false,
modelCategory: #BUSINESS_OBJECT,
transactionalProcessingEnabled: true,
updateEnabled: true,
deleteEnabled: true,
writeActivePersistence: 'ZTEST'
}
define view zI_Test
as select from ztest
{
key id as Id,
string as String
}
-----------
Use Postman to POST:
-----------
{
"d" : {
"Id" : "1",
"String" : "Foo"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment