Step 1: Create an OData Service
Open SEGW (Gateway Service Builder):
- T-code: SEGW.
- Create a new project for your table maintenance (e.g.,
Z_TABLE_MAINTENANCE
).
Create Entity Type:
- In the Data Model section, right-click on Entity Types and choose Create.
- Define the Entity Type based on your SAP table (e.g.,
MARA
).
Create Entity Set:
- Right-click on Entity Sets and create an entity set that corresponds to the table (e.g.,
MaterialSet
forMARA
). - Map the entity type to the entity set.
- Right-click on Entity Sets and create an entity set that corresponds to the table (e.g.,
Generate Runtime Objects:
- Once your data model is complete, right-click on the project and choose Generate Runtime Objects.
Implement CRUD Operations in DPC_EXT:
- Navigate to SE80 or SE24 to access the DPC_EXT class (Data Provider Class Extension).
- Implement the CRUD methods like CREATE_ENTITY, UPDATE_ENTITY, DELETE_ENTITY, and GET_ENTITYSET to handle the operations for your SAP table.
Register and Activate the OData Service:
- Go to T-code /IWFND/MAINT_SERVICE to register and activate your OData service.
- Test the service by accessing
/sap/opu/odata/sap/<SERVICE_NAME>/
to verify that the service is working as expected.
Step 2: Create a Fiori Elements App (List Report App)
Set up SAP Web IDE or Business Application Studio:
- Open SAP Web IDE or SAP Business Application Studio (BAS) to create your app.
Create a New Project:
- From the welcome screen, select New Project from Template.
- Choose SAP Fiori Elements – List Report Application template.
Provide OData Service Information:
- Select the system and service you created in SEGW (e.g.,
Z_TABLE_MAINTENANCE_SRV
). - Select the Entity Set created for your table (e.g.,
MaterialSet
forMARA
).
- Select the system and service you created in SEGW (e.g.,
Configure the List Report and Object Page:
- Define your list report settings like filters and table columns.
- Configure the Object Page for detail views.
Step 3: Enable Editing (CRUD Operations)
- Edit the manifest.json:
- Ensure that the app allows editing by setting the necessary flags in the
manifest.json
.
- Configure the CDS View (if used):
- If you are using a CDS view, ensure that you annotate the fields appropriately for editing using annotations like
@UI.fieldGroup
for forms and@UI.lineItem
for table display.
- If you are using a CDS view, ensure that you annotate the fields appropriately for editing using annotations like
Step 4: Deploy to SAP Fiori Launchpad
Deploy the Fiori App to the ABAP Repository:
- In SAP Web IDE or BAS, right-click on the project and select Deploy > Deploy to ABAP Repository.
- Provide your SAP system details and select the package and transport request.
Configure the Fiori Launchpad:
- Access the Fiori Launchpad Designer using the T-code /UI2/FLPD_CUST.
- Create a new Catalog and Group.
- Define a new Tile for the app in the catalog.
- Set up Target Mapping to link the tile to your deployed Fiori app by entering the Semantic Object and Action.
Assign the Tile to a Role:
- Use PFCG to create a new role or update an existing role.
- Assign the catalog or tile to the user roles that will have access to the app.
Step 5: Assign Roles and Access in Fiori Launchpad
- Assign Roles to Users:
- In PFCG, add the catalog or group to the role and assign the role to the relevant users.
- Users assigned with the role will see the app tile in the Fiori Launchpad.
Step 6: Test and Use the App
- Test CRUD Operations:
- Access the Fiori Launchpad as the user.
- Click on the app tile and test the CRUD operations (Create, Update, Delete) for the SAP table.
- Verify that you can maintain the SAP table's data directly from the Fiori UI.
By following these detailed steps, you will be able to create a Fiori app that allows users to maintain (Create, Update, Delete) data in an existing SAP table through the SAP Fiori Launchpad without using SE11 or SE80 directly.