SAP BUILD_ITINERARY Function Module for









BUILD_ITINERARY is a standard build itinerary SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for build itinerary FM, simply by entering the name BUILD_ITINERARY into the relevant SAP transaction such as SE37 or SE38.

Function Group: FITP_INTEGRATION
Program Name: SAPLFITP_INTEGRATION
Main Program: SAPLFITP_INTEGRATION
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function BUILD_ITINERARY pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'BUILD_ITINERARY'"
EXPORTING
EMPLOYEENUMBER = "Personnel Number
TRIPNUMBER = "Trip Number
PLAN_REQUEST = "Plan Request Indicator
* TRIP_SCHEMA = "Trip Schema

IMPORTING
ES_ADDRESS = "Address and Geocoordinates
E_CITY_DISTRICTADR = "
E_CITY_CODEADR = "

TABLES
* ITINERARY = "Stopover
* ITINERARY_UTIL = "Table for DB Structure PTK05

EXCEPTIONS
NO_FURTHER_DESTINATION = 1 NO_PLAN_REQUEST = 2
.



IMPORTING Parameters details for BUILD_ITINERARY

EMPLOYEENUMBER - Personnel Number

Data type: PTRV_HEAD-PERNR
Optional: No
Call by Reference: Yes

TRIPNUMBER - Trip Number

Data type: PTRV_HEAD-REINR
Optional: No
Call by Reference: Yes

PLAN_REQUEST - Plan Request Indicator

Data type: PLAN_REQUEST
Optional: No
Call by Reference: Yes

TRIP_SCHEMA - Trip Schema

Data type: PTRV_HEAD-SCHEM
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for BUILD_ITINERARY

ES_ADDRESS - Address and Geocoordinates

Data type: FTPS_ADDRESS
Optional: No
Call by Reference: Yes

E_CITY_DISTRICTADR -

Data type: AD_CITY2
Optional: No
Call by Reference: Yes

E_CITY_CODEADR -

Data type: AD_CITYNUM
Optional: No
Call by Reference: Yes

TABLES Parameters details for BUILD_ITINERARY

ITINERARY - Stopover

Data type: PTK05
Optional: Yes
Call by Reference: Yes

ITINERARY_UTIL - Table for DB Structure PTK05

Data type: PTRV_UTIL_ZIEL_T
Optional: Yes
Call by Reference: Yes

EXCEPTIONS details

NO_FURTHER_DESTINATION -

Data type:
Optional: No
Call by Reference: Yes

NO_PLAN_REQUEST -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for BUILD_ITINERARY Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.

DATA:
lt_itinerary  TYPE STANDARD TABLE OF PTK05, "   
lv_es_address  TYPE FTPS_ADDRESS, "   
lv_employeenumber  TYPE PTRV_HEAD-PERNR, "   
lv_no_further_destination  TYPE PTRV_HEAD, "   
lv_tripnumber  TYPE PTRV_HEAD-REINR, "   
lt_itinerary_util  TYPE STANDARD TABLE OF PTRV_UTIL_ZIEL_T, "   
lv_no_plan_request  TYPE PTRV_UTIL_ZIEL_T, "   
lv_e_city_districtadr  TYPE AD_CITY2, "   
lv_plan_request  TYPE PLAN_REQUEST, "   
lv_e_city_codeadr  TYPE AD_CITYNUM, "   
lv_trip_schema  TYPE PTRV_HEAD-SCHEM. "   

  CALL FUNCTION 'BUILD_ITINERARY'  "
    EXPORTING
         EMPLOYEENUMBER = lv_employeenumber
         TRIPNUMBER = lv_tripnumber
         PLAN_REQUEST = lv_plan_request
         TRIP_SCHEMA = lv_trip_schema
    IMPORTING
         ES_ADDRESS = lv_es_address
         E_CITY_DISTRICTADR = lv_e_city_districtadr
         E_CITY_CODEADR = lv_e_city_codeadr
    TABLES
         ITINERARY = lt_itinerary
         ITINERARY_UTIL = lt_itinerary_util
    EXCEPTIONS
        NO_FURTHER_DESTINATION = 1
        NO_PLAN_REQUEST = 2
. " BUILD_ITINERARY




ABAP code using 7.40 inline data declarations to call FM BUILD_ITINERARY

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

 
 
"SELECT single PERNR FROM PTRV_HEAD INTO @DATA(ld_employeenumber).
 
 
"SELECT single REINR FROM PTRV_HEAD INTO @DATA(ld_tripnumber).
 
 
 
 
 
 
"SELECT single SCHEM FROM PTRV_HEAD INTO @DATA(ld_trip_schema).
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!