on 2024 Nov 07 10:44 AM
Dear experts,
I am wandering if it is possible to issue both success and error messages in one validation handler and return both successful records and failed records back to the frontend?
I have a scenario where e.g. 4 entities are submitted for backend processing. Two of these entities are failed, two are processed successfully. If I add two of failed entities to FAILED / REPORTED changing parameter of a method - the frontend receives a results with two error messages. And to the frontend it looks like that the whole request failed.
Is there a way to pass both successful and failed records back to the frontend - for the simple reason that I'd like to show to application users that, hey, there are two successful "bookings" and two failed ones (with the attached error messages)?
Thanks in advance.
Request clarification before answering.
Hi @imihailovs
if I understood the question correctly, try using the code to display messages below
reported-zrswatovo = VALUE #(
( %msg = new_message_with_text( severity = if_abap_behv_message=>severity-success text = 'Dummy message' ) )
( %msg = new_message_with_text( severity = if_abap_behv_message=>severity-error text = 'Dummy message' ) )
( %msg = new_message_with_text( severity = if_abap_behv_message=>severity-warning text = 'Dummy message' ) )
( %msg = new_message_with_text( severity = if_abap_behv_message=>severity-information text = 'Dummy message' ) )
).
BR,
Oleg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
72 | |
30 | |
8 | |
7 | |
6 | |
6 | |
6 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.