cancel
Showing results for 
Search instead for 
Did you mean: 

How to solve simple requirement with RAP, Fiori Elements and FPM

pfoehn
Explorer
0 Kudos
639

Dear RAP / Fiori Elements / FPM Developers

I am lost, please help me find a solution or clues how i can develop this simple App lined out to you below with Standard Tools like RAP, Fiori Elements and FPM.

The essence of the app is: A List-Object App where the List displays a table of Employees and the Object Page shows the Documents for a selected Employee. Documents can be uploaded, changed, deleted. Employees can NOT be created, updated or deleted.

Leading Entity: CDS_LIST_OF_EMPLOYEES
No Behaviour Definition, it is not allowed to change or create Employees. Data from multiple Standard SAP Tables PAxxxx

Composition: CDS_LIST_OF_DOCUMENTS  (1 Employee has * Documents)
With Behaviour Definition: Upload Document, Delete and Change allowed. Data is in a Z-Table.

Sounds simple? 
I tried out now so many ways, always within the boundaries of RAP, Fiori Elements and FPM (Flexible Programming Model). I went from a pure Fiori Elements App to a Custom Page and Building Blocks from FPM....to no avail. It always felt like I scratched the boundaries of these technologies...with this simple requirement!

For me the best guiding tutorial was from Marius Freitag / Devtoberfest:
https://www.youtube.com/watch?v=SMc1ZzKAWW4 

Yet I couldn't get my app running after hours of "translating" the offered solutions in this video to my specific requirements.

Also glad if you could share your experience with these technologies in REAL LIFE environment (within SAP Modules) and not these vanilla cases of the tutorials.

Thanks so much for your input.
Kind Regards
Paul

View Entire Topic
pfoehn
Explorer
0 Kudos

Dear Patrick

I tried once more to understand your proposed solution. As I wrote earlier I still doubt that your solution is correct and covers my use case which should display a list of employees (from SAP HR Tables PAxxxx) first and only then in the Object Page the CRUD Operations for the Documents of a selected Employee.

I relly can't see how your root view entity ZPW_I_EMPL (which has your basic Table zpw_empl in the "select") could display a list of existing employees from table PAxxxx.

From  your attachment:

define root view entity ZPW_I_EMPL
as select from zpw_empl
composition [0..*] of ZPW_I_DOC as _Doc
{
@ui.facet: [ {
id: 'ZPW_I_DOC',
purpose: #STANDARD,
type: #LINEITEM_REFERENCE,
label: 'Document',
position: 1 ,
targetElement: '_Doc'
} ]
@ui.lineItem: [ {
position: 1
} ]
key employee_id as EmployeeId,
_Doc
}

I would very much appreciate if you could elaborate your proposed solution to me. 
Thank you very much.

Kind regards
Paul

PS:
I guess the ommitance of projection views and Metadata is due to the fact, that it was only "a quick and dirty" approach.

 

patrick_winkler
Product and Topic Expert
Product and Topic Expert
0 Kudos
I focused on the behavior definition to answer your question what you define a simple requirement and thus use a dummy employee table. For hierarchy related or (remote) HCM table access I cannot help you
pfoehn
Explorer
0 Kudos
We go around in circles. Your proposed solution is not solving my use case (list emplpoyees from PAxxxx Tables, Display Mode only - object page with CRUD for Documents for a selected Employee. Forget about all the my other headaches. Please read my last reply again. If you think your solution works, then please attach all artefacts and I will try it out on our system.