Trabajos
>
Barcelona

    Online SAP ABAP tutor - Barcelona, España - TeacherOn

    TeacherOn
    Default job background
    A tiempo parcial
    Descripción

    Hi there, first of all sorry if this is not the place to post this, it is my first time and i am not sure about that.

    I have a problem. I am developing my first api rest with sap abap in eclipse. I have defined the tables, views, metadata, behaviors and service. My api does nothing but have employees, departments and projects. Each employee can belong to a single department, but each department can have 0 or N employees. At the same time each department has 0 or n projects and each project only belongs to one department.


    The problem I have is that if an employee has two projects I get two entries for that employee, one with one project and one with another, but each entry repeats all the employee's information.

    I would like to be able to see only the employees and once I click on an employee, to show me only all the projects that employee has, without duplicating again all the information of the employee.

    Can this be done without having to create a fiori app? That is, just working with the views and metadata? Thank you very much for your help.

    This is my view, my projection and my metadata:

    @AbapCatalog

    sqlViewName:
    'ZDVIEW_EMPLOYEE'

    @AbapCatalog

    compilercompareFilter:
    true

    @AbapCatalog

    preserveKey:
    true

    @AccessControl

    authorizationCheck:
    #CHECK

    'Employee and Projects View'

    define root view Z_I_EMPLOYEE

    as select from zempleados_tabla as emp

    left outer join zdepart_table as Department on emp.emplo_department = Department.dept_number

    association [0..*] to zproj_table as _Projects on Department.dept_number = _Projects.dept_numb

    {

    key emp.emplo_number,

    key emp.emplo_department,

    emp.emplo_name,

    ,

    ,

    emp.start_date,

    emp.end_date,

    Department.dept_name,

    Department.location,

    Department.dept_number,

    _Projects.project_id

    }

    'projection view'

    @AccessControl

    authorizationCheck:
    #CHECK

    @Metadata

    allowExtensions:
    true

    @OData

    publish:
    true

    define root view entity z_c_employee as projection on Z_I_EMPLOYEE

    {

    key emplo_number,

    key emplo_department,

    emplo_name,

    status,

    email,

    start_date,

    end_date,

    dept_name,

    location,

    dept_number,

    project_id

    }

    #CORE

    @UI:
    {


    headerInfo:
    {


    typeName:
    'Employee',


    typeNamePlural:
    'Employees',


    title:
    {


    type:
    #STANDARD,


    label:
    'Employees'

    }

    }

    }

    annotate view z_c_employee with

    {

    [

    {id:
    'idGeneralInformation', type:
    #COLLECTION, label:
    'Employee Information', position: 10},

    {id:
    'idIdentification', type:
    #IDENTIFICATION_REFERENCE, label:
    'General Employee Information', parentId: 'idGeneralInformation', position: 10}

    ]

    true

    emplo_number;

    @UI

    selectionField:
    [{ position: 10 }]

    @UI

    lineItem:
    [{ position: 20, label:
    'Employee Name' }]

    @UI

    identification:
    [{ position: 30, label:
    'Name' }]

    @Consumption

    valueHelpDefinition:
    [{ entity:
    { element : 'EmploName', name: 'Z_HELP_SEARCH_EMP' } }]

    emplo_name;

    @UI

    selectionField:
    [{ position: 20 }]

    @UI

    lineItem:
    [{ position: 30, label:
    'Department' }]

    @UI

    identification:
    [{ position: 40, label:
    'Department' }]

    @Consumption

    valueHelpDefinition:
    [{ entity:
    { element : 'EmploDepartment', name: 'Z_HELP_SEARCH_EMP' } }]

    emplo_department;

    @UI

    selectionField:
    [{ position: 50 }]

    @UI

    lineItem:
    [{ position: 40, label:
    'Status' }]

    @UI

    identification:
    [{ position: 50, label:
    'Status' }]

    status;

    @UI

    selectionField:
    [{ position: 60 }]

    @UI

    lineItem:
    [{ position: 50, label:
    'Email' }]

    @UI

    identification:
    [{ position: 60, label:
    'Email' }]

    email;

    @UI

    lineItem:
    [{ position: 60, label:
    'Start Date' }]

    @UI

    identification:
    [{ position: 70, label:
    'Start Date' }]

    start_date;

    @UI

    lineItem:
    [{ position: 70, label:
    'End Date' }]

    @UI

    identification:
    [{ position: 80, label:
    'End Date' }]

    end_date;

    @UI

    lineItem:
    [{ position: 80, label:
    'Department Name' }]

    @UI

    identification:
    [{ position: 90, label:
    'Department Name' }]

    dept_name;

    @UI

    lineItem:
    [{ position: 100, label:
    'Projects' }]

    // Ocultar en vistas generales

    @UI

    identification:
    [{ position: 100, label:
    'Projects' }] // Mostrar en la página de detalles

    project_id;

    }


    Level:
    Expert


    Gender Preference:
    None


    Meeting options:
    Available online - via skype etc.