SAP Function /DSD/BAPI_VL_CHANGEFROMDATA - Change Visit List

Parameter Reference Type Length Default Optional Text
SIMULATION BAPIFLAG-BAPIFLAG C 1 X Simulation Indicator
VISITLIST_ID /DSD/BAPI_VC_VL-VISITLIST_ID C 10 Visit List ID
VLHX /DSD/BAPI_VC_VLHX u 17 X Header Data (Change Parameter)
VLH_IN /DSD/BAPI_VC_VLH u 154 X Visit List: Header Data

Parameter Reference Type Length Text
VLH_OUT /DSD/BAPI_VC_VLHOUT u 173 Visit List: Header Data (Export)

Parameter Reference Length Optional Text
EXTENSIONIN BAPIPAREX 990 X Customer Enhancements for Visit Lists
RETURN BAPIRET2 548 X Error Messages
VLH_RX /DSD/BAPI_VC_VLH_RX 13 X Reference Documents at Header Level (Change Parameter)
VLH_R_IN /DSD/BAPI_VC_VLH_R 12 X Visit List: Reference Documents at Header Level (Import)
VLPX /DSD/BAPI_VC_VLPX 11 X Customer Data (Change Parameter)
VLP_IN /DSD/BAPI_VC_VLP 69 X Visit List: Customer Data (Import)
VLP_RX /DSD/BAPI_VC_VLP_RX 16 X Reference Documents at Item Level (Change Parameter)
VLP_R_IN /DSD/BAPI_VC_VLP_R 15 X Visit List: Reference Documents at Item Level (Import)
VLTEXT_IN /DSD/BAPI_VC_VL_TEXT 157 X Visit List: Texts (Import)

Functionality
You can make the following changes to a visit list using this method:

  • You can change general data at header and item level. You cannot change
  • the visit plan type of the visit list in the header data.
    • You can add new customers or remove customers from the visit list using
    • the import structure VLP_IN. You can also change other customer data,such as the sequence of visits. You cannot change customer numbers.
      • You can assign new texts or remove texts.

      • You can assign new reference documents at header and item level, or
      • remove reference documents that have already been assigned.
        Changes you make to individual fields are only taken into account by thesystem if the following prerequisites are fulfilled:
        • You have specified in the update indicator for each item in the visit
        • list whether the values entered are new (I) or changed (U
          ), or if you want the existing values to be deleted (D).
          • In the relevant change parameter for the parameter, you have flagged all
          • fields that are change-relevant with an 'X'. If you want to changespecific fields in the header data (parameter VLH_IN), for example, youmust select these fields in parameter VLPX.
            You can use the SIMULATION parameter to specify that you only want thechanges to be simulated, and that the changed visit list data should notinitially be written to the database.
            Customer Enhancements
            To add customer fields to the tables for the visit list, you can use thefollowing BAPI Table Extensions:
            • Structure /DSD/BAPI_VC_TE_VLH for additional fields at header level

            • Structure /DSD/BAPI_VC_TE_VLHX to flag the new fields at header level

            • Structure /DSD/BAPI_VC_TE_VLH_R for additional fields for reference
            • documents at header level
              If customer fields are added to the reference documents table, thesefields must also be added to the structure /DSD/VC_DOC.
              • Structure /DSD/BAPI_VC_TE_VLH_RX to flag the new fields for reference
              • documents at header level
                • Structure /DSD/BAPI_VC_TE_VLP for additional fields at item level

                • If customer fields are added to the item data table, these fields mustalso be added to the structure /DSD/VC_VL_TREE.
                  • Structure /DSD/BAPI_VC_TE_VLPX to flag the new fields at item level

                  • Structure /DSD/BAPI_VC_TE_VLP_R for additional fields for reference
                  • documents at item level
                    If customer fields are added to the reference documents table, thesefields must also be added to the structure /DSD/VC_DOC.
                    Structure /DSD/BAPI_VC_TE_VLP_RX to flag the new fields for referencedocuments at item level
                    You can assign the relevant values to customer fields with theEXTENSIONIN table.
                    All data transferred to the BAPI is checked for consistency beforefurther processing. By implementing the BAdI methodVL_CHECK_CONSISTENCY, you can add your own checks or check theconsistency of customer fields in the visit list tables.
                    Return messages
                    Messages are returned in the RETURN parameter. See the parameterdocumentation for the return values and their meanings.

                    Notes
                    The following authorization object is checked with the activity 02(Change): /DSD/VC_VL.

                    Further information
                    For more information, see the parameter documentation.

                    Description
                    This export parameter outputs the changed visit list header data.
                    INCLUDE BAPI_DATAELEMENT OBJECT DOKU ID TX

                    Description
                    The parameter indicates whether or not a visit list should initially bechanged in simulation mode. If you set the indicator, the changed visitlist data is not written to the database.

                    Value range
                    Blank = changed document is saved.
                    x = changed document is not saved.

                    Description
                    The import parameter contains the ID of the visit list for which youwant to change data.

                    Description
                    You can use this import parameter to specify which parameter VLH_IN
                    fields are change-relevant. Changes are only copied from fields thathave an 'X' in the relevant checkbox.
                    Note
                    Since you cannot change the visit plan type, the system ignores newassignments of visit plan types in parameter VLH_IN, even if youhave flagged the visit plan type as change-relevant.

                    Description
                    You can use this import parameter to change visit list header data, suchas execution date and route. You cannot change the visit plan type of anexisting visit list.
                    INCLUDE BAPI_DATAELEMENT OBJECT DOKU ID TX

                    Description
                    The ExtensioIn table allows you to enhance the BAPI import parameterswithout making modifications.
                    If you have added your own fields to the header or item data of thevisit list, you can change the values of these fields using theExtensionIn table.

                    Description
                    INCLUDE BAPI_TABLE OBJECT DOKU ID TX

                    Value range
                    Type,, ID,, Number,, Message
                    E,, BAPI,, 100,, One or more errors occurred when the BAPI was called
                    Messages relating to the consistency checks are also displayed.

                    Description
                    You can use this import structure to determine which parameterVLH_R_IN fields are change-relevant. Changes are only copied fromfields that have an 'X' in the relevant checkbox.
                    If no customer fields have been added to the table of referencedocuments, you should only use the update indicator I (Insert) orD (Delete). All fields in the table are key fields and cannot bechanged.

                    Description
                    You can use this import structure to change data for reference documentsthat are assigned to the visit list at header level.

                    Description
                    You can use this import structure to specify which fields in importstructure VLP_IN are change-relevant. Changes are only copiedfrom fields that have an 'X' in the relevant checkbox.
                    Note
                    Since you cannot change the customer number, the system does not takeaccount of customer changes in import structure VLP_IN, even ifyou have flagged the CUSTOMER_VC field with an 'X'.

                    Description
                    You can use this import structure to change customer data in the visitlist, such as the sequence in which the customers are visited, or thetravel duration.
                    Note
                    You cannot change customer numbers with this parameter. You can removecustomers from an existing visit list, however, or add new customers.

                    Value range
                    If you add new customers to the visit list and want to assign texts orreference documents to the relevant items with the import structureVLTEXT_IN or VLP_R_IN, assign a temporary item number withthe value 800 or higher in the VISITLIST_POS field. Youthen assign the item number to the relevant text ID or referencedocument number in the import structure VLTEXT_IN or VLP_R_IN
                    . The temporary item numbers are only used to assign texts orreference document numbers to items. The item numbers are alwaysassigned by the system when new visit list items are created.
                    If you want to change the sequence in which the customers are visited,change the relevant value in the VISIT_SEQUENCE field. Toindicate that a customer should be the third customer visited on a tour,for example, assign the value 003 in the VISIT_SEQUENCEfield. The system adjusts the values of this field accordingly for thesubsequent items. If you add a new customer to the visit list and do notenter a value for the new item in the VISIT_SEQUENCE field, thenew customer is visited at the end of the tour.

                    Description
                    You can use this import structure to specifc which fields in importstructure VLP_R_IN are change-relevant. Change are only copiedfrom fields that have an 'X' in the relevant checkbox.
                    If no customer fields have been added to the table of referencedocuments, you should only use the update indicator I (Insert) orD (Delete). All fields in the table are key fields and cannot bechanged.

                    Description
                    You can use this import structure to change data for reference documentsthat are assigned to the visit list at item level.
                    If you want to add a new customer to the visit list and assign thecustomer a reference document, assign the item the reference documentand the temporary item number with a value of 800 or higher (thatyou allocated in the VISITLIST_POS field in import structureVLP_IN).

                    Description
                    You can use this import structure to change visit list texts at headeror item level.