I'm trying to make an error check. When a user enters, int his case, an airline code that doesn't exists, the page should show an error message. The thing is: i'm using BAPI_FLIGHT_GETLIST BAPI and when I execute EXECUTE_BAPI_FLIGHT_GETLIST method and try to get the sy-subrc value it always gets 0. My code it's like this:
...
data lo_componentcontroller type ref to ig_componentcontroller .
lo_componentcontroller = wd_this->get_componentcontroller_ctr( ).
lo_componentcontroller->execute_bapi_flight_getlist(
airline = lv_query " bapisflkey-airlineid
* destination_from = " bapisfldst
* destination_to = " bapisfldst
* max_rows = " bapisflaux-bapimaxrow
).
if sy-subrc <> 0.
wd_this->error_check(
).
endif.
even when the Carrier code doen't exist, the error message is not showing up. The method error_check( ) it's also working fine, because if i take way the if statement before it's call, the message is being shown. Hope I'm explaining myself. Thank you.