cancel
Showing results for 
Search instead for 
Did you mean: 

yMkt Cloud Open channel action - Check parameters before execution

arunprakash_karuppanan
Active Contributor
0 Kudos

Dear Community members,

We have implemented an open channel campaign action in yMkt cloud, to interface with another system. We have defined certain custom header attributes (via BADI), which are rendered in the Campaign UI for this OC action. Some of these attributes are mandatory in our use case. However, we have no way to force the user to fill them. Of course not all users are careful and we have seen some users design elaborate multi step campaigns culminating in the OC action with none of the parameters filled.

The most we can do (as far as I know) is to raise an error during the action execution and force the campaign to fail. However, once the campaign has been started, there is no more possibility to edit the parameter values for the open channel action in the automation tab. The campaign thus becomes useless and the user will be forced to create another campaign and this time, make sure that values are provided for the said parameters. This is even worse if it is a multi step campaign, as we would lose whatever happened before this OC action was executed.

What I would like to know is if the possibility exists to make these parameters mandatory. Or, a possibility to validate these parameters *before* the campaign can be started and give the user a chance to correct the step in automation. Thanks!


Best Regards,

Arun Prakash

Accepted Solutions (0)

Answers (2)

Answers (2)

arunprakash_karuppanan
Active Contributor
0 Kudos

Hi Saurabh,

Thanks for the answer. But, like I said, forcing the campaign into error is as good as discarding it. You cannot change the campaign design anyway. I understand the reasoning behind disallowing the option to edit the campaign once it is started and I fully agree. But we should be given a chance to validate the design before allowing it to start - I will go ahead and make a feature request. I will leave this question open for a few more days. Thanks!

Best Regards,

Arun Prakash

former_member226
Employee
Employee
0 Kudos

Hi,

As per my experience, There is no option to validate the input before the start of campaign. But you can very well put the idea on https://influence.sap.com/sap/ino/#/campaign/38 .

As an alternative you can write a validation on Step 3 "(3) Open Channel: Define Global Settings for Execution" for which sample code could be as follow. Drawback of this approach is that result will only be validated or simulated upon START of campaign.

    read table HEADER_ATTRIBUTES assigning FIELD-SYMBOL(<fs_head>) WITH KEY param_name = 'Z_OC_TEST_FLAG'.  // Z_OC_TEST_FLAG is my attribute coming from open channel implementation parameters
    if sy-subrc eq 0 and if <fs_head>-param_value eq abap_true.
data: wa_msg type HPA_ERROR_MESSAGE.
wa_msg = 'Testing flag marked as true.'.
append wa_msg to ERROR_MESSAGES.
clear: wa_msg.
ERROR_OCCURED = abap_true.
      return.
    endif.


As a result you will get an error as follow:

Thanks

Saurabh