on 11-12-2015 4:02 PM
Hi all.
We have installed this app in our systems but only the frontend and data model. The backend? Created from scratch based on the URIs called from the fronted. A lot of debugging to have now the app completed and working. Of course, I still miss some functionality i'm not able to enable it.
Basically I want to make the binding between frontend and backend with success or error messages. I have tried with several things like:
*Returning entity details (PaymentBatch)
copy_data_to_ref( EXPORTING is_data = ls_header
CHANGING cr_data = er_data ).
* Returning a message
GET_MESSAGE_CONTAINER( )->ADD_MESSAGE(
EXPORTING
IV_MSG_TYPE = 'S'
IV_MSG_ID = '/IWBEP/CM_OCI'
IV_MSG_NUMBER = '010'
IV_MSG_TEXT = LS_MESSAGE-MESSAGE
IV_IS_LEADING_MESSAGE = abap_true
IV_ADD_TO_RESPONSE_HEADER = abap_true ).
Of course, i haven't been able to get the success message in the frontend. After some debugging I have seen that frontend is expecting something like oResults. I have tried to add this in my entity PaymentBatch but the code then is not able to find fields like MessageNumber or MessageType. Attached is a screenshot of this debugging.
Can someone help me to understand what should be returned to the frontend?
Thanks in advance.
The DPC code that you have mentioned will return a success message at the HTTP header.
In chrome check for the HEADERS of your HTTP call.
Regards
Atanu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Atanu.
A already tried that, using the code I posted. Unfortunately it seems the frontend is expecting something different. I think that somehow I need to send two entities at the same time as reponse, one is PaymentBatch and the other should be Results, but not sure how to send them back and also if this is what the frontend is expecting.
Regards,
Iñigo.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.