on 01-11-2023 9:15 PM
Hello experts,
I know that the navigation in rap model applications are standard behavior. but I'm trying to write an custom action in a RAP Model based application, is there anyway to trigger Create action? or maybe navigate to object. is there anything that could help?
all suggestions are welcomed.
Mohammed
Hi,
You should be able to do so by calling the createDocument method of the controllerextension (page)
Best Regards,
Sandeep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you want to create custom action(comparing to standard CRUD operations) in List Report/Object page, there are two ways:
1. Define action in behavior pool of root entity object.
action testaction;
static action testaction;
(if you do not need context of object, which means, action is enabled without clicking on row)
Display it in list report or object page
//action visible in list report table
UI.lineitem{position: 10, label 'testactionlabel', type: #FORACTION, dataAction: 'testaction'}
//action visible in object page
UI.identification{position: 10, label 'testactionlabel', type: #FORACTION, dataAction: 'testaction'}
If you want some input parameters from user before invoking action, one way is to create abstract entity which appears as dialog.
2. On frontend side defined in manifest.json
There you will handle everything in extension controller.
https://sapui5.hana.ondemand.com/sdk/#/topic/7619517a92414e27b71f02094bd08d06.html
If you want to invoke abap rap action defined in behaviour pool in extension controller, then you can use ODATA V2 api for that:
https://sapui5.hana.ondemand.com/sdk/#/api/sap.suite.ui.generic.template.ListReport.extensionAPI.Ext...
Sidenote: If you want to trigger standard CRUD operations in ODATA V2, then you can use oModel.create, oModel.update and oModel.remove methods, but i´m not sure, if it will be handled by ABAP RAP runtime(not tested it yet).
Br,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mohammed,
Sorry I should have checked first! I was talking about the fe V4 here. I am not aware if this is allowed in fe V2 - let's wait to hear from other colleagues then!
Best Regards,
Sandeep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
75 | |
9 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.