cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Fiori Bank Payment approval app. Help please!!

0 Kudos

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.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member184867
Active Contributor
0 Kudos

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

0 Kudos

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.

former_member184867
Active Contributor
0 Kudos

Two entities can be sent only by batch method. One can also try a $expand if a nested response is useful. However you need to check UI5 code in Fiori to decide which OData call to use..

0 Kudos

Thanks for the response.

What I was looking for is someone that has this app and has the list of defined entities. Also how entity PaymentBatch is defined and the code that is executed after a payment approval. This will definitely help!

Regards,

Iñigo.