SAP Function Modules

FITP_HRS_AVAIL SAP Function module







FITP_HRS_AVAIL is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name FITP_HRS_AVAIL into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: FITP_HRS
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM FITP_HRS_AVAIL - FITP HRS AVAIL





CALL FUNCTION 'FITP_HRS_AVAIL' "
  EXPORTING
    currency =                  " hotel_currency
    price_limit =               " hotel_price
    language =                  " spras         Language
    wa_ta23hrs =                " ta23hrs       HRS Access Parameters
    p0002 =                     " p0002         HR Master Record: Infotype 0002 (Personal Data)
  TABLES
    et_hrs_avail =              " trpl_t_hrs_hotel_avail
    et_hrs_details =            " trpl_t_hrs_hotel_detail
    et_hrs_event =              " trpl_t_hrs_event
    et_hrs_location_out =       " trpl_t_hrs_location
    et_hrs_notification =       " ftps_hrs_notification_tab
  CHANGING
    wa_hotel =                  " ftpt_hotel    Travel Request Item - Hotel Service
  EXCEPTIONS
    RFC_ERROR = 1               "
    SOAP_FAULT = 2              "
    SERVER_NOT_AVAILABLE = 3    "
    SPECIFY_LOCATION = 4        "
    NO_RESULTS_FOUND = 5        "
    TOO_MUCH_RESULTS_FOUND = 6  "
    LOCATION_NOT_FOUND = 7      "
    GEO_SEARCH_ERROR = 8        "
    SEARCH_ERROR = 9            "
    INVALID_DATE = 10           "
    .  "  FITP_HRS_AVAIL

ABAP code example for Function Module FITP_HRS_AVAIL





The ABAP code below is a full code listing to execute function module FITP_HRS_AVAIL including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).

DATA:
it_et_hrs_avail  TYPE STANDARD TABLE OF TRPL_T_HRS_HOTEL_AVAIL,"TABLES PARAM
wa_et_hrs_avail  LIKE LINE OF it_et_hrs_avail ,
it_et_hrs_details  TYPE STANDARD TABLE OF TRPL_T_HRS_HOTEL_DETAIL,"TABLES PARAM
wa_et_hrs_details  LIKE LINE OF it_et_hrs_details ,
it_et_hrs_event  TYPE STANDARD TABLE OF TRPL_T_HRS_EVENT,"TABLES PARAM
wa_et_hrs_event  LIKE LINE OF it_et_hrs_event ,
it_et_hrs_location_out  TYPE STANDARD TABLE OF TRPL_T_HRS_LOCATION,"TABLES PARAM
wa_et_hrs_location_out  LIKE LINE OF it_et_hrs_location_out ,
it_et_hrs_notification  TYPE STANDARD TABLE OF FTPS_HRS_NOTIFICATION_TAB,"TABLES PARAM
wa_et_hrs_notification  LIKE LINE OF it_et_hrs_notification .

DATA(ld_wa_hotel) = 'Check type of data required'.
DATA(ld_currency) = 'Check type of data required'.
DATA(ld_price_limit) = 'Check type of data required'.
DATA(ld_language) = 'Check type of data required'.
DATA(ld_wa_ta23hrs) = 'Check type of data required'.
DATA(ld_p0002) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_et_hrs_avail to it_et_hrs_avail.

"populate fields of struture and append to itab
append wa_et_hrs_details to it_et_hrs_details.

"populate fields of struture and append to itab
append wa_et_hrs_event to it_et_hrs_event.

"populate fields of struture and append to itab
append wa_et_hrs_location_out to it_et_hrs_location_out.

"populate fields of struture and append to itab
append wa_et_hrs_notification to it_et_hrs_notification. . CALL FUNCTION 'FITP_HRS_AVAIL' EXPORTING currency = ld_currency price_limit = ld_price_limit language = ld_language wa_ta23hrs = ld_wa_ta23hrs p0002 = ld_p0002 TABLES et_hrs_avail = it_et_hrs_avail et_hrs_details = it_et_hrs_details et_hrs_event = it_et_hrs_event et_hrs_location_out = it_et_hrs_location_out et_hrs_notification = it_et_hrs_notification CHANGING wa_hotel = ld_wa_hotel EXCEPTIONS RFC_ERROR = 1 SOAP_FAULT = 2 SERVER_NOT_AVAILABLE = 3 SPECIFY_LOCATION = 4 NO_RESULTS_FOUND = 5 TOO_MUCH_RESULTS_FOUND = 6 LOCATION_NOT_FOUND = 7 GEO_SEARCH_ERROR = 8 SEARCH_ERROR = 9 INVALID_DATE = 10 . " FITP_HRS_AVAIL
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 6. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 7. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 8. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 9. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 10. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_wa_hotel  TYPE FTPT_HOTEL ,
ld_currency  TYPE HOTEL_CURRENCY ,
it_et_hrs_avail  TYPE STANDARD TABLE OF TRPL_T_HRS_HOTEL_AVAIL ,
wa_et_hrs_avail  LIKE LINE OF it_et_hrs_avail,
ld_price_limit  TYPE HOTEL_PRICE ,
it_et_hrs_details  TYPE STANDARD TABLE OF TRPL_T_HRS_HOTEL_DETAIL ,
wa_et_hrs_details  LIKE LINE OF it_et_hrs_details,
ld_language  TYPE SPRAS ,
it_et_hrs_event  TYPE STANDARD TABLE OF TRPL_T_HRS_EVENT ,
wa_et_hrs_event  LIKE LINE OF it_et_hrs_event,
ld_wa_ta23hrs  TYPE TA23HRS ,
it_et_hrs_location_out  TYPE STANDARD TABLE OF TRPL_T_HRS_LOCATION ,
wa_et_hrs_location_out  LIKE LINE OF it_et_hrs_location_out,
ld_p0002  TYPE P0002 ,
it_et_hrs_notification  TYPE STANDARD TABLE OF FTPS_HRS_NOTIFICATION_TAB ,
wa_et_hrs_notification  LIKE LINE OF it_et_hrs_notification.

ld_wa_hotel = 'Check type of data required'.
ld_currency = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_et_hrs_avail to it_et_hrs_avail.
ld_price_limit = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_et_hrs_details to it_et_hrs_details.
ld_language = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_et_hrs_event to it_et_hrs_event.
ld_wa_ta23hrs = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_et_hrs_location_out to it_et_hrs_location_out.
ld_p0002 = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_et_hrs_notification to it_et_hrs_notification.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name FITP_HRS_AVAIL or its description.