SAP Function Modules

PTRM_WEB_TRIPS_GET_LIST SAP Function module







PTRM_WEB_TRIPS_GET_LIST 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 PTRM_WEB_TRIPS_GET_LIST into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: PTRM_WEB_TRIPS
Released Date: Not Released
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM PTRM_WEB_TRIPS_GET_LIST - PTRM WEB TRIPS GET LIST





CALL FUNCTION 'PTRM_WEB_TRIPS_GET_LIST' "
  EXPORTING
    i_employeenumber =          " bapiempl-pernr  Personnel Number
*   i_language = SY-LANGU       " bapitrvxxx-langu  Language Key
*   i_show_trips_from_date =    " datum         Date
    i_show_open_trips =         " xfeld         Checkbox
    i_show_settled_trips =      " xfeld         Checkbox
    i_show_requested_trips =    " xfeld         Checkbox
    i_show_planned_trips =      " xfeld         Checkbox
    i_show_transferred_trips =   " xfeld        Checkbox
    i_show_trips_with_alerts =   " xfeld        Checkbox
*   i_with_weekly_reports =     " xfeld
*   i_show_seperation_allowance = 'X'  " xfeld
*   i_preselection = SPACE      " xfeld
  IMPORTING
    e_request_active =          " xfeld
    e_plan_active =             " xfeld
    e_expense_active =          " xfeld
    e_own_trips_only =          " xfeld
  TABLES
    et_trips =                  " ptrv_web_trips_ext_t  Table of Current Trips of an Employee
    et_return =                 " bapirettab    Table with BAPI Return Information
    .  "  PTRM_WEB_TRIPS_GET_LIST

ABAP code example for Function Module PTRM_WEB_TRIPS_GET_LIST





The ABAP code below is a full code listing to execute function module PTRM_WEB_TRIPS_GET_LIST 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:
ld_e_request_active  TYPE XFELD ,
ld_e_plan_active  TYPE XFELD ,
ld_e_expense_active  TYPE XFELD ,
ld_e_own_trips_only  TYPE XFELD ,
it_et_trips  TYPE STANDARD TABLE OF PTRV_WEB_TRIPS_EXT_T,"TABLES PARAM
wa_et_trips  LIKE LINE OF it_et_trips ,
it_et_return  TYPE STANDARD TABLE OF BAPIRETTAB,"TABLES PARAM
wa_et_return  LIKE LINE OF it_et_return .


DATA(ld_i_employeenumber) = Check type of data required

DATA(ld_i_language) = Check type of data required
DATA(ld_i_show_trips_from_date) = 'Check type of data required'.
DATA(ld_i_show_open_trips) = 'Check type of data required'.
DATA(ld_i_show_settled_trips) = 'Check type of data required'.
DATA(ld_i_show_requested_trips) = 'Check type of data required'.
DATA(ld_i_show_planned_trips) = 'Check type of data required'.
DATA(ld_i_show_transferred_trips) = 'Check type of data required'.
DATA(ld_i_show_trips_with_alerts) = 'Check type of data required'.
DATA(ld_i_with_weekly_reports) = 'Check type of data required'.
DATA(ld_i_show_seperation_allowance) = 'Check type of data required'.
DATA(ld_i_preselection) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_et_trips to it_et_trips.

"populate fields of struture and append to itab
append wa_et_return to it_et_return. . CALL FUNCTION 'PTRM_WEB_TRIPS_GET_LIST' EXPORTING i_employeenumber = ld_i_employeenumber * i_language = ld_i_language * i_show_trips_from_date = ld_i_show_trips_from_date i_show_open_trips = ld_i_show_open_trips i_show_settled_trips = ld_i_show_settled_trips i_show_requested_trips = ld_i_show_requested_trips i_show_planned_trips = ld_i_show_planned_trips i_show_transferred_trips = ld_i_show_transferred_trips i_show_trips_with_alerts = ld_i_show_trips_with_alerts * i_with_weekly_reports = ld_i_with_weekly_reports * i_show_seperation_allowance = ld_i_show_seperation_allowance * i_preselection = ld_i_preselection IMPORTING e_request_active = ld_e_request_active e_plan_active = ld_e_plan_active e_expense_active = ld_e_expense_active e_own_trips_only = ld_e_own_trips_only TABLES et_trips = it_et_trips et_return = it_et_return . " PTRM_WEB_TRIPS_GET_LIST
IF SY-SUBRC EQ 0. "All OK 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_e_request_active  TYPE XFELD ,
ld_i_employeenumber  TYPE BAPIEMPL-PERNR ,
it_et_trips  TYPE STANDARD TABLE OF PTRV_WEB_TRIPS_EXT_T ,
wa_et_trips  LIKE LINE OF it_et_trips,
ld_e_plan_active  TYPE XFELD ,
ld_i_language  TYPE BAPITRVXXX-LANGU ,
it_et_return  TYPE STANDARD TABLE OF BAPIRETTAB ,
wa_et_return  LIKE LINE OF it_et_return,
ld_e_expense_active  TYPE XFELD ,
ld_i_show_trips_from_date  TYPE DATUM ,
ld_e_own_trips_only  TYPE XFELD ,
ld_i_show_open_trips  TYPE XFELD ,
ld_i_show_settled_trips  TYPE XFELD ,
ld_i_show_requested_trips  TYPE XFELD ,
ld_i_show_planned_trips  TYPE XFELD ,
ld_i_show_transferred_trips  TYPE XFELD ,
ld_i_show_trips_with_alerts  TYPE XFELD ,
ld_i_with_weekly_reports  TYPE XFELD ,
ld_i_show_seperation_allowance  TYPE XFELD ,
ld_i_preselection  TYPE XFELD .


ld_i_employeenumber = Check type of data required

"populate fields of struture and append to itab
append wa_et_trips to it_et_trips.

ld_i_language = Check type of data required

"populate fields of struture and append to itab
append wa_et_return to it_et_return.
ld_i_show_trips_from_date = 'Check type of data required'.
ld_i_show_open_trips = 'Check type of data required'.
ld_i_show_settled_trips = 'Check type of data required'.
ld_i_show_requested_trips = 'Check type of data required'.
ld_i_show_planned_trips = 'Check type of data required'.
ld_i_show_transferred_trips = 'Check type of data required'.
ld_i_show_trips_with_alerts = 'Check type of data required'.
ld_i_with_weekly_reports = 'Check type of data required'.
ld_i_show_seperation_allowance = 'Check type of data required'.
ld_i_preselection = 'Check type of data required'.

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 PTRM_WEB_TRIPS_GET_LIST or its description.