on 2022 May 30 2:35 PM
Hi,
We are using Flexible Workflow for Supplier Invoice approval in S/4HANA Cloud and have implemented an additional condition at the Step level (BAdI definition SWF_WORKFLOW_CONDITION_DEF). We can see our custom condition when setting up a workflow and have assigned it to multiple steps.
I need to execute different logic depending on which step is currently being evaluated. When I trace the runtime of our implementation of the evaluation BAdI (definiton SWF_WORKFLOW_CONDITION_EVAL), I cannot find any information about the Step number in the importing parameters. The Supplier Invoice and Fiscal Year are supplied in the first two SONT_KEY_PART_n components of the IS_SAP_OBJECT_NODE_TYPE parameter, but no Step number.
If I cannot get the Step number from the importing parameters, is there a released S/4HANA Cloud CDS view from which I can get the Steps that have already been processed? I cannot use the I_WorkflowStatusDetails CDS view, as a workflow task does not get created when a Step is skipped. I can see the information I want at the bottom of the detail page in the Supplier Invoices List app, but I can't find a way of getting hold of that info in the BAdI implementation.
Any help would be greatly appreciated!
Many thanks,
Hello Andrew,
Unfortunately I didn't have the time to perform a test in one of our internal S/4HANA Cloud environments, however I believe that the information you might be wanting to find should be found in the internal table it_parameter_value. If the ID is not found, maybe you can find the condition name in the field "name". You can also take a look at a sample scenario posted in one of our blogs some time ago: SAP S/4HANA Cloud – Flexible Workflow with new custom Pre-Condition for Purchase Requisition. It is an example for a purchase requisition but it is also applicable to supplier invoices.
Please, let me know if this clarifies your doubt.
Have a great week.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
70 | |
8 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.