Sunday 31 May 2020

S/4 Purchase Order Flexible Workflow: Value Helps (OData + CDS)

SAP ABAP CDS, SAP ABAP Guides, SAP ABAP Learning, SAP ABAP Certification, SAP ABAP Exam Prep

Continuing to talk about PO Flexible Workflows (and some things here will also exist in other Flexible WFs as well), let’s explore the Value Helps Tab:


SAP ABAP CDS, SAP ABAP Guides, SAP ABAP Learning, SAP ABAP Certification, SAP ABAP Exam Prep

As you know, Value Helps will help the user ho is configuring the Flexible Workflow scenario in many ways. Above, as the Flexible Workflows are configured in a FIORI App, you can see the OData Service Paths for each help scenario (Company Code, Currency, etc.). Let’s here explore the “people picker” type, for selecting Users:

SAP ABAP CDS, SAP ABAP Guides, SAP ABAP Learning, SAP ABAP Certification, SAP ABAP Exam Prep

Note that, for the PO WF, they all relate to the S_MMPURWorkflowVH_CDS:

SAP ABAP CDS, SAP ABAP Guides, SAP ABAP Learning, SAP ABAP Certification, SAP ABAP Exam Prep

As you know, OData services that “ends” with _CDS, comes from CDS Views.

The Models for CDS:

SAP ABAP CDS, SAP ABAP Guides, SAP ABAP Learning, SAP ABAP Certification, SAP ABAP Exam Prep

So let’s explore the mentioned CDS View, the S_MMPURWorkflowVH:

SAP ABAP CDS, SAP ABAP Guides, SAP ABAP Learning, SAP ABAP Certification, SAP ABAP Exam Prep

Note the @OData.publish: true Annotation, that makes this CDS available as a OData service (to be registered in /IWFND/MAINT_SERVICE).

As we want to know about the POUser Entity, it’s the _POUserVH association:

SAP ABAP CDS, SAP ABAP Guides, SAP ABAP Learning, SAP ABAP Certification, SAP ABAP Exam Prep

Navigating through the association, we find the CDS View: S_POWorkflowRecipientVH:

SAP ABAP CDS, SAP ABAP Guides, SAP ABAP Learning, SAP ABAP Certification, SAP ABAP Exam Prep

Above you can see all the CDS Views that this view selects to display the users, like the test below:

SAP ABAP CDS, SAP ABAP Guides, SAP ABAP Learning, SAP ABAP Certification, SAP ABAP Exam Prep

This is the data that will be shown on the Flexible Workflow FIORI App.

You could also explore all the other associations, to see where all the Value Helps data comes from:

SAP ABAP CDS, SAP ABAP Guides, SAP ABAP Learning, SAP ABAP Certification, SAP ABAP Exam Prep

And even expand if you wan’t. 😀

No comments:

Post a Comment