Show message of dialog box via RFC - abap

I am calling this via RFC:
SUBMIT (IV_REPORT_NAME)
WITH SELECTION-TABLE selection_table
AND RETURN.
I get an empty result.
If I call this code via se80, then I get this message:
Narrow down the selection
Is there a way to get this message programmatically?
I would like to return this message in my RFC function module.

Related

Slack API: how to get state of all input/action elements at once upon submit

I'm trying to build rich, interactive Slack messages. Example: message with date picker, set of checkboxes and a long text. Upon submit (if modal) or push of an action button, I'd like to receive the current state of all interactive components.
I have tried regular messages with both input and action blocks...also tried modals. I get a message from Slack for every individual change to an interactive object, but not the state of all objects at once. Since the receiver of the interaction payload is stateless, this makes it impossible for me to properly react to the message.
Am I missing something? Appreciate every bit of advice.
OK, error seems to be on my side. I was just looking at the action payload preview in the Slack Block Kit Builder. When actually posting a message I see the state of all elements in the response.

react-admin: How to suppress multiple 401 notifications?

I'm using react-admin and I have a page that makes api calls via the dataProvider to /posts, but there is also a custom UserMenu that fetches /user, and the authProvider also runs an AUTH_CHECK that fetches /session.
On the first page load, all three requests are issued and all three correctly return 401 unauthorized, but then I also get three pop-up notifications with the same message: "Request failed with status code 401".
Is there a way to either
show this message only once
not show any of these messages at all
Also, is there a way to customize the text of this message to something more user friendly?

Display error on actionProductUpdate hook execution

Is there any way to display an error message after actionProductUpdate hook is executed in a module?
Looking at the Prestashop code, the hook is triggered in AdminProductController, but the return value is not being processed. Also adding any message in passed Product object seems to be out of my requirement.
The purpose is to provide user with an error message in case of wrong input, database update error etc after clicking on Save button in back-office product edit page.
in belvg blog user Prestarocket post the the very helpful comment:
"Why not using hookActionProductSave ?
With this hook, you can add errors to the controller ($this->context->controller->errors[])"
Regards

Add Action Message In Struts 2 Interceptor After Action Invocation

I have a unique problem with passing an action message in a JSON result.
Right now, if I add an action message within my action (in a JSON action), I will pick that up in JavaScript and capture the action message and alert the user via JGrowl. However, I don't want the logic of adding an action message in each action. I have an underlying service project with a request context that is shared among the request, and I am able to add warning messages there. What I'd like to do is to transform those warning messages to action messages for use on my front end, but the action will never have to be aware of them. This is useful because I can insert warnings when accessing databases, or if there are hairy business rules, etc.
As I mentioned before, it already works when adding them directly in the action so I know the JSON result works fine and passes along the action messages correctly. We have an interceptor that is hit every time for managing this request context already, so I'd like to append on the action messages in this interceptor to the action being called.
However, the problem I'm finding is that I need to call actionInvocation.invoke() first as any warning messages will be generated as a result of that. After that, I check for the messages and attempt to apply them as action messages. These action messages never show up in my JSON response, so I'm wondering if it's possible to add those messages into the response in the interceptor AFTER the invoke() call. Here's the bulk of my intercept method:
try {
// Invoke the action.
String result = actionInvocation.invoke();
//add all warning messages as an action message to be displayed on that front end
if (CollectionUtils.isNotEmpty(context.getWarningMessages())) {
ActionSupport action = (ActionSupport) actionInvocation.getAction();
for (String s : context.getWarningMessages()) {
action.addActionError(s);
}
}
return result;
I tried adding the logic to add the action messages in the finally block instead of after the call to invoke() to no avail.
Thanks,
Andy
The result has been rendered by the time invoke returns.
You need to implement a PreResultListener as discussed in the "Writing Interceptors" docs.

facebook send dialog return

Any way to capture activities on send dialog ?
what message is being sent?
to whom?
user has clicked "send" or "cancel"
I was checking return parameter of facebook send dialog, but could not locate it.
Thanks in adv.
Raxit
The Facebook Send dialog is very limited. According to: https://developers.facebook.com/docs/reference/dialogs/send/
you can not see what message was sent nor to whom. The only thing in the callback parameter is a value which can be null (Cancel hit) or an empty Array (in Chrome and Firefox) indicating something was sent.