Technical Articles
Enhancing the Workflow Work-item information screen in My inbox via CDS and metadata extensions (RAP)
In this SAP blog, we dive into the realm of SAP RAP with CDS and metadata extensions to embark on a journey to enhance the Workflow Work-item’s information screen in My inbox App.
it is common to find UI-based visualization options in most SAP standard workflows, allowing for better readability and navigation of business object information. This is managed through the SWFVISU transaction in SAP, where the service path and parameters exposed to the UI are maintained. In this blog, we will explore how to extend the information screen in My Inbox for the Settlement Document Workflow, using it as an example. Please note that while the example focuses on a flexible workflow, the enhancement can be applied to both classical and flexible workflows in a similar manner.
Before we proceed, let’s examine the screen provided by SAP standard for the Settlement Document Workflow WS02000445.
Workflow Work-item Information screen in My Inbox App:
Fig 1: Before- Settlement Document Work-item Information in My Inbox
Standard SWFVISU Configuration
Fig 2: SWFVISU Configuration for Settlement Document Work-item Information in My Inbox
To enhance the screen to have additional parameters on the screen shown in Fig 1, we will extend the CDS C_SETTLMTDOCWRKFLWDET (as it’s the CDS related to service LO_SETMAN_SDOC_WRKFLW as shown in Fig 2). The below field will be added to the screen (Fig 1) under the following headers:
Basic Data:
- Payment Method with Description
- Settlement Period (In format DD.MM.YYYY – DD.MM.YYYY)
Condition Contract:
- Company Code with Description
- Sales Office with Description
- Condition Contract Type with Description
- Condition Contract Customer with Name
- Sales Manager Name (Extended Field in Table WCOCO – Condition Contract)
Extended Screen (Workflow Work-item Information screen in My Inbox App:):
Fig 3After- Settlement Document Work-item Information in My Inbox App
CDS C_SETTLMTDOCWRKFLWDET to be extended with name ZEXT_C_SETTLMTDOCWRKFLWDET (or any relevant name can be given name) to add the below fields in the CDS. Metadata extension ZMDEXT_C_SETTLMTDOCWRKFLWDET to be implemented to have the below fields on the above screen (in green boxes in Fig 3) on the work item information in My Inbox screen. Details of Fields added:
Payment Method
- Text added in CDS I_SETTLMTDOC via CDS extension ZEXT_I_SETTLMTDOC
- Field added in CDS C_SETTLMTDOCWRKFLWDET via CDS extension ZEXT_C_SETTLMTDOCWRKFLWDET along with text.
- Annotations added via Metadata Extension ZMDEXT_C_SETTLMTDOCWRKFLWDET
Settlement Period
- Field added in CDS C_SETTLMTDOCWRKFLWDET via CDS extension ZEXT_C_SETTLMTDOCWRKFLWDET along with text.
- Annotations added via Metadata Extension ZMDEXT_C_SETTLMTDOCWRKFLWDET
Company Code:
- Field added in CDS C_SETTLMTDOCWRKFLWDET via CDS extension ZEXT_C_SETTLMTDOCWRKFLWDET along with Company code text.
- Annotations added via Metadata Extension ZMDEXT_C_SETTLMTDOCWRKFLWDET
Sales Office
- Field added in CDS C_SETTLMTDOCWRKFLWDET via CDS extension ZEXT_C_SETTLMTDOCWRKFLWDET along with Sales Office text.
- Annotations added via Metadata Extension ZMDEXT_C_SETTLMTDOCWRKFLWDET
Condition Contract Type
- Field added in CDS C_SETTLMTDOCWRKFLWDET via CDS extension ZEXT_C_SETTLMTDOCWRKFLWDET along with text.
- Annotations added via Metadata Extension ZMDEXT_C_SETTLMTDOCWRKFLWDET
Condition Contract Customer
- Field added in CDS C_SETTLMTDOCWRKFLWDET via CDS extension ZEXT_C_SETTLMTDOCWRKFLWDET along with text.
- Annotations added via Metadata Extension ZMDEXT_C_SETTLMTDOCWRKFLWDET
Sales Manager
- Field ZZ1_SALES_MANAGER_CCH added in CDS E_CONDITIONCONTRACT via CDS extension ZEXT_E_CONDITIONCONTRACT
- Field added in CDS I_CONDITIONCONTRACT via CDS extension ZEXT_I_CONDITIONCONTRACT
- Field added in CDS C_SETTLMTDOCWRKFLWDET via CDS extension ZEXT_C_SETTLMTDOCWRKFLWDET
- Annotations added via Metadata Extension ZMDEXT_C_SETTLMTDOCWRKFLWDET
CDS Extensions:
ZEXT_I_SETTLMTDOC: ‘Extension of CDS I_SETTLMTDOC’ |
|
ZEXT_E_CONDITIONCONTRACT: ‘Extension of CDS E_CONDITIONCONTRACT’ |
|
ZEXT_I_CONDITIONCONTRACT: ‘Extension of CDS I_CONDITIONCONTRACT’ |
|
ZEXT_C_SETTLMTDOCWRKFLWDET: ‘Extension of CDS C_SETTLMTDOCWRKFLWDET’ |
|
Metadata Extensions:
ZMDEXT_C_SETTLMTDOCWRKFLWDET_01 |
|
In conclusion, our exploration of enhancing the Work item information screen in My inbox through CDS and metadata extensions (RAP) has shed light on the immense potential for optimizing workflow efficiency and improving user experience. By leveraging these powerful tools and techniques, SAP users can unlock new levels of productivity and seamlessly manage their work items. We hope this blog has provided valuable insights and inspired you to embark on your own journey of enhancement within SAP.
To know more about Metadata Extensions, follow the link Explaining Metadata Extension