Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BADI TRIP_WEB_CHECK

Former Member
0 Kudos

Dear all,

I am now working on a BADI enhancement in travel management area. Travel expense receipts would be created using ESS portal and when the user tries to save the receipts, it should trigger this BADI “TRIP_WEB_CHECK” to make validations on certain expense types.

In BADI, we have to check if total amount of the application exceed certain amount. If the check fails, a popup message has to appear saying “Amount has been exceeded.” It seems that method USER_CHECK_RECEIPTS could be used and parameter RECEIPTS could be used for checking on the payment amount. However, we have no idea on how to calling them and how to publish the error message to ESS portal. Grateful if you could let know on how to work with this, million thanks!

Best regards,

Anne

1 REPLY 1

aditya_niyogi
Participant
0 Kudos

Hi Anne,

I could not find the answer in your question, so I am going to post the answer -

The best way would be to use the method - IF_EX_TRIP_WEB_CHECK~USER_CHECK_LINE_OF_RECEIPTS.

To make an error message pop-up, all that is required is to append an entry to the RETURN table.

Sample Code:

X_ERROR-TYPE = 'E'.

X_ERROR-ID = 'Z*.

X_ ERROR-NUMBER = '000'.

Append X_ERROR to ERROR.

Hope this helps.

Thanks & Regards,

Aditya