SAP Function /DSD/BAPI_VP_GETDETAIL - Get Visit Plan Details

Parameter Reference Type Length Default Optional Text
VISITPLAN_ID /DSD/BAPI_VC_VP-VISITPLAN_ID C 10 Visit Plan ID
XDESCRIPTION BAPIFLAG-BAPIFLAG C 1 X 'X' = Detailed Information at Header Level
XDISTANCE BAPIFLAG-BAPIFLAG C 1 X 'X' = Determination of Distance
XPLUS BAPIFLAG-BAPIFLAG C 1 X 'X' = Detailed Information at Item Level
XTEXT BAPIFLAG-BAPIFLAG C 1 X 'X' = Additional Texts

Parameter Reference Type Length Text
VPH_DESCRIPTION /DSD/BAPI_VC_DESCRIPTION u 410 Detailed Information at Header Level (Export)
VPH_OUT /DSD/BAPI_VC_VPHOUT u 184 Visit Plan: Header Data (Export)

Parameter Reference Length Optional Text
DISTANCE /DSD/BAPI_VC_DISTANCE 16 X Distances Determined
EXTENSIONOUT BAPIPAREX 990 X Customer Enhancements for Visit Plans
RETURN BAPIRET2 548 X Error Messages
TEXT_HEADER /DSD/BAPI_VC_VP_STXH 382 X Header Data for Texts (Export)
TEXT_LINES BAPITEXTLI 232 X Additional Texts
VPP_OUT /DSD/BAPI_VC_VPPOUT 71 X Visit Plan: Customer Data (Export)
VPP_PLUS /DSD/BAPI_VC_VPP_PLUS 564 X Detailed Information at Item Level (Export)

Functionality
You can use this method to display additional detailed information abouta specific visit plan. The system displays header and customer data forthe selected visit plan, and provides additional information that isdisplayed for you to view but is not saved in the relevant visit plan.
There are indicators for you to specify which additional data you wantthe system to display. You can display additional data at header level(import parameter XDESCRIPTION) or item level (import parameter XPLUS).You can determine the distance between customers (import parameterXDISTANCE) or view additional texts at header and item level (importparameter XTEXT).
Confirmations
Messages are returned in the RETURN parameter. See the parameterdocumentation for the return values and their meanings.

Further information
For more information, see the parameter documentation.

Description
If you have set the indicator in the XDESCRIPTION importparameter, the system outputs additional detailed information about thevisit plan in this export parameter. This includes, for example, thename of the driver and co-driver or a more exact description of thevehicle and route.

Description
This export parameter contains the header data of the visit plan forwhich you want to call up additional detailed information.
INCLUDE BAPI_DATAELEMENT OBJECT DOKU ID TX

Description
This import parameter contains the visit plan ID of the visit plan forwhich you want to call up additional detailed information.

Description
If you set the indicator in this import parameter, the system outputsadditional detailed information about the visit plan in theVPH_DESCRIPTION export parameter. This includes, for example, thename of the driver and co-driver or a more exact description of thevehicle and route.

Value range
blank = no additional detailed information is output at header level
x = additional detailed information is output at header level

Description
If you set the indicator in this import parameter, the system determinesthe distance to the next customer at item level and outputs it in theDISTANCE export table.

Value range
blank = the distance between the customers is not determined
x = the distance between the customers is determined

Description
If you set the indicator in this import parameter, the system outputsadditional detailed information about individual customers in theVPP_PLUS export table. This includes, for example, the contactperson's name, address, telephone number and fax number, or the visittimes and goods receiving hours.

Value range
blank = no additional detailed information is output at item level
x = additional detailed information is output at item level

Description
If you set the indicator in this import parameter, the system outputsadditional texts for the visit plan at header and item level in theTEXT_HEADER and TEXT_LINES export tables.

Value range
blank = no additional texts are output for the visit plan
x = additional texts are output for the visit plan

Description
If you have set the XDISTANCE indicator in the import parameter,the system determines the distance to the next customer at item leveland outputs it in this export table.

Description
You can use the ExtensionOut table to enhance the BAPI export parameterswithout making modifications.
This parameter is a change parameter of the VP_GETDETAIL_EXPORT methodof the /DSD/BADI_VC_BAPI Business Add-in (BAdI). This enables you toexport values from customer-specific fields.
INCLUDE BAPI_TABLE OBJECT DOKU ID TX

Value range
Type,, ID,, Number,, Message
E,, /DSD/VC_MESSAGE,, 013,, You are not authorized to perform this
,, ,, ,, action
E,, /DSD/VC_MESSAGE,, 108,, Visit plan &1 was not found in /DSD/VC_VPH

Description
If you have set the indicator in the XTEXT import parameter, thesystem outputs the header data for the texts, such as the text ID andlanguage key, in this export table. The TEXT_LINES export tablecontains the text lines.

Description
If you have set the indicator in the XTEXT import parameter, thesystem outputs the text lines in this export table. The TEXT_HEADER
export table contains the header data for the texts.

Description
This export structure outputs the customer data of the visit plan. Thecustomer list includes not only the customer numbers but also thesequence in which the customers are to be visited, the travel duration,waiting time, unloading point, and the "inactive" indicator for therespective customers.

Description
If you have set the indicator in the XPLUS import parameter, thesystem outputs additional detailed information about individualcustomers in this export table. This includes, for example, the contactperson's name, address, telephone number and fax number, or the visittimes and goods receiving hours.