cancel
Showing results for 
Search instead for 
Did you mean: 

ERP SC (SSP in ECC6 EhP6) always rejected when only level type A in process schema

laurent_burtaire
Active Contributor
0 Kudos
148

Hello,

we created a SC workflow based on:

-          SC total amount,

-          Requester code (CUF)

As standard BRF+ function /SRMERP/F_WF_IS_NO_LEVEL_VALID has only two importing parameters:

-          IV_BO_TYPE,

-          IV_DOC_SUBSET_KEY

and it is not possible to get SC item and header data inside BRF+ workbench based on IV_DOC_SUBSET_KEY, we created specific BRF+ function.

As a consequence, we do an overwrite-exit of START_PROCESS method from /SRMERP/CL_SC_D_GET_APPROVER class.

In this way, we use the DSS name to transfer data we need (level number, requester code and SC amount) through a BAdI implementation for interface /SRMERP/IF_EX_WF_DSS_MAPPER.

Then, with those data, we call a specific BRF+ to get correct process schema.

We have three process schema:

-          one for automatic rejection if SC amount = 0,

-          one for automatic approval if no process level match with our data,

-          one for approval if at least one process level matches with our data.

Then, if process schema for approval is determined, we check its process levels based on our DSS name. We call a specific BRF+ function and not the standard one (/SRMERP/F_WF_IS_NO_LEVEL_VALID).

Then, if process level is valid, we use BAdI implementation for interface /SRMERP/IF_EX_WF_RESP_RESOLVER based on standard implementation /SRMERP/BD_WF_SC_RR_RULE. Here, we create our own DS name based on a decision table.

Finally, we get approvers by area guid through a specific class based on the standard one /SRMERP/CL_WF_AREA_BRFP_DS.

This works fine: approvers (technical or not) are correctly determined.

The problem occurs when you click onto “Order” button: error message ‘Workflow can't be started because of invalid configuration’ is raised.

According to CREATE_PROCESS_INSTANCE method from /SRMERP/CL_WF_PROCESS_MANAGER class, this is normal because no evaluation of process levels is done (which is not correct).

So, we made an overwrite-exit in order to call our specific BRF+ function to evaluate process levels.

But now, when process schema for approval is determined, when SC is ordered, it is always rejected.

For process schema for automatic rejection, SC is rejected (which is correct) and for process schema for automatic approval, SC is approved (which is correct).

Thank you for support.

Regards.

Laurent.

Accepted Solutions (1)

Accepted Solutions (1)

laurent_burtaire
Active Contributor
0 Kudos

Hello,

a check is done by standard task TS46000016 from sub-workflow WS46000015 using EVALUATE_CURRENT_PROCESS_LEVEL method from /SRMERP/CL_WF_PROCESS_MGR_SBWF class.

Indeed, as we use a specific BRF+ function to evaluate process levels from process schema, first process level is considered as not valid, so automatic rejection is done: our problem came from DETERMINE_LEVEL_VALIDATION method from /SRMERP/CL_WF_RC_BRFPLUS class which was calling the standard BRF+ function.

So we made an OverWriteExit of DETERMINE_LEVEL_VALIDATION standard method.

Answers (0)