cancel
Showing results for 
Search instead for 
Did you mean: 

Validating input data send from gateway/frontend

0 Kudos

I have a scenario to create vendor disbursement data using UI5 app in ECC. I am taking care of the ODATA service. I have created the CRUD service for this, however data validation and  pre-populated data has to be shown. User enters PO number through the APP.How do I validate this po number in ECC and send back required information like vendor details back to the APP. In case PO is not found in the backend error handling needs to be done.Message has to be passed back to the APP.

Experts,please help.

Accepted Solutions (0)

Answers (2)

Answers (2)

vinita_kasliwal
Active Contributor
0 Kudos

HI Sharique

If your gateway system is not embedded in ECC then call the below FM BAPI_PO_GETDETAILS  via RFC call and see for the structure PO_header is not empty which means the PO exists in ECC ?

Regards

Vinita

mike_reader3
Active Participant
0 Kudos

If you have coded a class based gateway service (ie your CRUD operations are not mapped to FMs) - then you can raise an exception if the PO is not found.

Something like this:

RAISE EXCEPTION TYPE /iwbep/cx_mgw_busi_exception
         EXPORTING
           textid  = /iwbep/cx_mgw_busi_exception=>business_error
           message = 'your error message'.