on 2022 May 13 4:43 PM
Hi,
I am attempting to override the default permission logic using the Overrule Subscription BAdI, but nothing I implement seems to make any difference in the system.
I am trying to customize such that no subscription will be opted in unless there is a corresponding permission (regardless of the date of the permission or whether it is implicit or explicit)
DATA: ls_subscription TYPE if_cuan_mp_subscription_check=>ts_subscription,
ls_permission TYPE if_cuan_mp_subscription_check=>ts_permission,
lo_subscr_check_helper TYPE REF TO cl_cuan_mp_subscr_check_helper.
ls_subscription = subscription.
lo_subscr_check_helper->get_perm_of_subscr(
EXPORTING
subscription = ls_subscription
IMPORTING
permission = ls_permission
).
IF ls_subscription-subscriptionsignupexists = 'Y' AND ls_permission-permissiongranted = 'Y'.
ls_subscription-subscriptionsignupexists = 'Y'.
ELSE.
ls_subscription-subscriptionsignupexists = 'N'.
ENDIF.
MOVE-CORRESPONDING ls_subscription TO subscription_result.
The above does not seem to work, so I then tried a really simple example - just set all subscriptions to opted out regardless of anything, to check that the BAdI is doing something, but even this has no effect, the contact UI still shows subscriptions as 'opted in':
DATA: ls_subscription TYPE if_cuan_mp_subscription_check=>ts_subscription,
ls_permission TYPE if_cuan_mp_subscription_check=>ts_permission,
lo_subscr_check_helper TYPE REF TO cl_cuan_mp_subscr_check_helper.
ls_subscription = subscription.
ls_subscription-subscriptionsignupexists = 'N'.
MOVE-CORRESPONDING ls_subscription TO subscription_result.
Can anyone spot where I am going wrong?
Thanks,
Simon
Request clarification before answering.
Hi Simon,
The logic looks good. Did you publish the logic then refresh the contact UI to check the output?
And you can use custom logic trace the check whether the logic is called.
If issue persists, please create an incident in component CEC-MKT-DM-PER for further analysis.
Best regards,
Jayce
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
18 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.