Fonction SAP /DSD/BAPI_VP_GETLIST - Select Visit Plan

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
DATEFROM /DSD/BAPI_VC_VPH-DATEFROM_VP D 8 SY-DATUM X Valid from Date
DATETO /DSD/BAPI_VC_VPH-DATETO_VP D 8 SY-DATUM X End of Validity Period
DIST_CHANNEL /DSD/BAPI_VC_VPH-DIST_CHANNEL C 2 X Distribution Channel
DIVISION /DSD/BAPI_VC_VPH-DIVISION C 2 X Division
MAXROWS /DSD/BAPI_VC_AUX-MAXROW I 4 '50' X Maximum Number of Hits
SALES_ORG /DSD/BAPI_VC_VPH-SALES_ORG C 4 X Sales Organization
WEEKDAY_VC /DSD/BAPI_VC_AUX-WEEKDAY_VC N 1 X Weekday

Paramètre Reférence Long. Facultatif Description
CUSTOMER_SEL /DSD/BAPI_VC_RA_KUNNR 23 X Customer Number Value Range
DRIVER_SEL /DSD/BAPI_VC_RA_DRIVER1 23 X Driver Value Range
EXTENSIONIN BAPIPAREX 990 X Customer Enhancements for Visit Plan
EXTENSIONOUT BAPIPAREX 990 X Customer Enhancements for Visit Plan
RETURN BAPIRET2 548 X Error Messages
ROUTE_SEL /DSD/BAPI_VC_RA_ROUTE 15 X Route Value Range
VEHICLE_SEL /DSD/BAPI_VC_RA_TRUCK 39 X Vehicle Value Range
VISITGROUP_SEL /DSD/BAPI_VC_RA_AUTH 23 X Visit Plan Group Value Range
VISITPLANTYPE_SEL /DSD/BAPI_VC_RA_VPTYP 9 X Visit Plan Types Value Range
VISITPLAN_ID_SEL /DSD/BAPI_VC_RA_VPID 23 X Visit Plan IDs Value Range
VISITPLAN_SELECTED /DSD/BAPI_VC_VP 194 X Table with Selected Visit Plans

Functionality
You can use this method to list visit plans so that you can view orprocess them. There are various import parameters for specifying theselection criteria for visit plan selection.
For example, you can group visit plans that are valid during a specifictime period or those whose Date Rule - Header contains a specific weekday. You can also use tables to enter value ranges for your selection(such as visit plan types, drivers, routes, or customer numbers).
Return Messages
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
This import parameter contains the valid from date as a selectioncriterion for your selection.
If you enter a date here, the system uses it and the date in theIF_DATE_TO parameter to determine the validity period as aselection criterion. If no value is entered in the IF_DATE_TO parameter,the system uses 31.12.9999 (December 31, 9999) as the date. The systemonly selects the visit plans that are valid for at least part of thespecified time period.

Description
This import parameter contains the valid to date as a selectioncriterion for your selection.
If a date is entered, the system only selects visit plans whose validfrom dates are before or on this date.
If the IF_DATE_FROM parameter also contains a date, the systemonly selects visit plans that are valid for at least part of thespecified validity period.

Value range
If you do not enter a date here, the system sets the date to 31.12.9999(December 31, 9999).

Description
This import parameter contains the distribution channel as a selectioncriterion for your selection.
If a distribution channel is entered, only the visit plans that areassigned the corresponding distribution channel are included in theselection.
For more information about distribution channels, see the data elementdocumentation: Distribution Channel.

Description
This import parameter contains the division as a selection criterion foryour selection.
If a division is entered, only the visit plans that are assigned thecorresponding division are included in the selection.
For more information about distribution channels, see the data elementdocumentation:Division.

Description
This import parameter controls the maximum number of visit plans thatcan be output, in accordance with your selection criteria. If you do notmake an entry, the hit list displays up to 50 visit plans.

Description
This import parameter contains the sales organization as a selectioncriterion for your selection.
If a sales organization is entered, only the visit plans that areassigned the corresponding sales organization are included in theselection.
For more information about sales organizations, see the data elementdocumentation:Sales Organization.

Description
This import parameter contains the weekday on which the customer is tobe visited or is to receive a delivery, as a selection criterion foryour selection.
If a weekday is entered, only the visit plans that are assigned thecorresponding weekday for delivery are included in the selection.
Note
You can use this criterion to select only those visit plans whoseDate Rule - Header contains one or more fixed weekdays for thevisit (such as every week on Mondays and Wednesdays). The system doesnot take visit plans into account for this selection if their date ruleshave a different type of time data (such as every 1st of the month).

Description
This table contains a value range of customer numbers as a selectioncriterion for your selection.
If a value range is entered, only the visit plans that are assigned thecorresponding customer numbers are included in the selection.

Description
This table contains a value range of drivers as a selection criterionfor your selection.
If a value range is entered, only the visit plans that are assigned thecorresponding drivers are included in the selection.

Description
You can use the ExtensionIn table to enhance the BAPI import parameterswithout making modifications.
Note
This parameter is an import parameter of the VP_GETLIST_SELECT method ofthe /DSD/BADI_VC_BAPI Business Add-in (BAdI). This enables you to useadditional fields to further restrict the result of the selection.

Description
You can use the ExtensionOut table to enhance the BAPI export parameterswithout making modifications.
This parameter is a change parameter of the VP_GETLIST_SELECT method ofthe /DSD/BADI_VC_BAPI Business Add-in (BAdI). This enables you to exportthe values of customer-specific fields that are not contained in theVISITPLAN_SELECTED export structure.
INCLUDE BAPI_TABLE OBJECT DOKU ID TX
Error messages are only issued if the selection criteria have not beenfulfilled.

Value range
Type,,ID,, Number,, Message
E,, S&,, 026,, Value & in field SIGN can only be I, E
E,, S&,, 027,, Value & in field OPTION is invalid
,, ,, ,, (EQ,NE,GT,GE,LE,LT,BT,NB,CP,NP)

Description
This table contains a value range ofroutes as a selectioncriterion for your selection.
If a value range is entered, only the visit plans that are assigned thecorresponding routes are included in the selection.

Description
This table contains a value range of vehicles as a selection criterionfor your selection.
If a value range is entered, only the visit plans that are assigned thecorresponding vehicles are included in the selection. The system doesnot take the trailers into account.

Description
This table contains a value range of visit plan groups as a selectioncriterion for your selection.
If a value range is entered, only the visit plans that are assigned thecorresponding visit plan groups are included in the selection.

Description
This table contains a value range ofvisit plan types as aselection criterion for your selection.
If a value range is entered, only the visit plans that are assigned thecorresponding visit plan types are included in the selection.

Description
This table contains a value range of visit plan IDs as a selectioncriterion for your selection.
If a value range is entered, only the visit plans whose IDs are in thecorresponding value range are included in the selection.

Description
After the criteria have been defined and the selection has been carriedout, this table returns the list of selected visit plans.
INCLUDE BAPI_DATAELEMENT OBJECT DOKU ID TX