on 05-21-2015 5:19 PM
Hi experts,
my requirement is to complete some data when the user approval process has finished and just before the replication process.
Is it possible to derive entity data on a workflow background step?
Best regards,
Jordi
I really wouldn't do this, both from a technical and a business perspective: You cannot react on errors / messages from the validation logic in the background step, and especially for Material (MDG-M), changes to classification would be totally unchecked until activation - which will then fail w/ hard to debug errors. Furthermore, the changed data is not what the last user has approved, which goes pretty much against the idea of MDG.
I'd rather read out the MDG Application Context (class CL_USMD_APP_CONTEXT) in your derivation and then run some derivations only at the start of the last approval step. The API tells you the WF step number and such things.
Alternative is brute writing data in the background step using the Convenience API (CL_USMD_MDG_CONV_API).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, I assume that you have a
In that case, you can wedge another task between activation and replication, then hard-code the necessary derivations using the respective backend APIs/BAPIs.
Sounds a bit ominous though, as defaulting data after CR activation would mean that these changes somewhat bypass the governance.
Regards, Ingo Bruß
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ingo,
thanks for your answer, I will try to explain better my scenario.
Nowadays there is a nightly background process in ERP that mantains the companies assigned to a supplier according to his country. For instance, if the supplier country is UK and the user has assigned only a company of UK, the background process will assign the rest of companies of UK, say five companies more.
This background process should be implemented in our new MDG-S hub (flex option) in some step between the last user approval and the user activation, completing the BP_COMPNY entity data.
Best regards,
Jordi
Hi, you are using MDG-S in Flex mode (not reuse)? That would be a modification to the MDG-S solution as shipped by SAP.
After CR activation, you can't edit an entity without creating a new CR.
And (as stated above) you can't edit Flex entities without a CR.
So you'd need to create a new CR in the background WF step
Regards, Ingo Bruß
You should use cross-entity derive BAdi for this. Your rule fires whenever the country changes, and then you create the company code level view(s).
You get old and new value in the CE Derive, so when changing, you also delete all the old countries company codes.
The above will work for the CREATE process. If you need this in CHANGE process as well, then you additionally need to check which company codes are already in primary persistence and NOT delete those of course.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.