cancel
Showing results for 
Search instead for 
Did you mean: 

Derivation BADI Not Getting Triggered for MDG-C

former_member201266
Contributor
0 Kudos

Hi,

I have a requirement where in we have to update some fields from derivation after the request is Rejected/Returned to the requester in Customer Master.

I have written my code in 'Define Validation/Derivation' BADI but its not getting triggered until some data is changed in the fields on the belonging entity types.

Please suggest how I can derive value of certain fields without manually changing any value for any field in UI.

Either suggestion on BRF+ or BADI should help.

Thanks,

Sai Charan.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

The derivation BAdI will only be triggered when the entity changes. If you want to derive values without changing an entity, you can use the cross-entity BAdI.

former_member201266
Contributor
0 Kudos

Hi Abdullah,

Thank you for the response.

We even tried Cross-Entity BADI - but without changing the data it was also not getting triggered.  But to be double sure, will retry it again today and will confirm back.

But if you think we need to be any further setting/configuration then please let me know.

Thanks,

Sai Charan.

former_member201266
Contributor
0 Kudos

Hi Abdullah,


We tried it again, but without changing any data in any entity type the derivation BADI's are not getting triggered.


Any suggestions?


Basically this is an MDG-C Reject scenario where request is returned back to requester and here when requester open the request we have to default/derive some values, please suggest.



Thanks,

Sai Charan.

Answers (2)

Answers (2)

subham2203
Explorer
0 Kudos

Hi,

I am facing a similar issue. In my case I would require the derive badi to be triggered without changing in data on pressing a button. The button action can be anything but non of them is triggering the derive BaDIs (Cross or Single) unless any data is changed. Do you have any way out of this?

bpawanchand
Active Contributor
0 Kudos

Hi,

what I understood from your point is that, there is a button on the UI and when user clicks this button then derivation should happen, irrespective of whether the user modifies the data or not. If this is what you are looking then probably,

  • The first thought which came up in my head was to create a new feeder class by inherting the standard feeder class of the UIBB and redefine the GET_DATA method by instanting the governance API CL_USMD_GOV_API. However, there is also a chance that you might get an error like not possible to instantiate the governance api. If you encounter this error then I would recommend to implement your custom logic ina private method and call it.

Thanks

Pavan

subham2203
Explorer
0 Kudos

Hi Pavan,

Yes we cannot create an instance of GOV API directly now, we have access it via convinience API. But is it recommended to instanciate and use such a heavy API in a feeder class?

Former Member
0 Kudos

Hi Sai,

If you are using rule based workflow then you can use the 'BADI - Calling System Method' to default your values. Add one step in single value decision table after reject step . Maintain condition alias for the same step in non user agent decision table as synchronous method and provide service name for it. Using service name in BADI method you can update the change request data(You have to use API here).

Regards,

Jitendra

former_member201266
Contributor
0 Kudos

Hi Jitendra,

Thank you. Will try on this.

By any change chance do you have any sample code for this?

Thanks,

Sai Charan.