Fonction SAP BAPI_VEHICLE_CREATE - Create a Single Vehicle

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
REQUESTEDTABLEX BAPIREQUESTEDTABLESX u 2 X VELO: List of Parameters to Be Displayed
VEHICLEACTION BAPIVEHIACTION-VEHICLEACTION C 4 'CRE1' BAPI Data Element for VMS BAPI

Paramètre Reférence Long. Facultatif Description
CONFIG_CHARSVALUES BAPICUVAL 276 Characteristic Values of Several Configurations
CONFIG_CONDKEY BAPICUVK 55 X
CONFIG_DATA BAPICUCFG 397 Configuration Data of Vehicle
CONFIG_INSTANCES BAPICUINS 233 Instances of Several Configurations
CREATED_CONFIG_CHARSVAL BAPICUVAL 276 X Characteristic Values of Several Configurations
CREATED_CONFIG_CONDKEY BAPICUVK 55 X
CREATED_CONFIG_DATA BAPICUCFG 397 X Configuration data
CREATED_CONFIG_INSTANCE BAPICUINS 233 X Instances of Several Configurations
CREATED_VEHICLE BAPIVEHICLE 1066 X Main Attributes of Created Vehicle
EXTENSIONIN BAPIPAREX 990 X Reference Structure for BAPI Parameters ExtensionIn / ExtensionOut
EXTENSIONOUT BAPIPAREX 990 X Reference Structure for BAPI Parameters ExtensionIn / ExtensionOut
RETURN BAPIRET2 548 X Return Parameter
VEHICLE BAPIVEHICLE 1066 Table Type for BAPIVEHICLE
VEHICLE_QUALIFIERS BAPIVEHICLEQUALIFIERS 132 X Structure for Creating/Changing Addnl Vehicle Attributes

Functionality
You use this method to create one or more vehicles with aconfiguration.
It is possible to return the configuration data from the successfullycreated vehicle. To do so, the parameter REQUESTEDTABLEX must beselected.
This BAPI does not make a database commit (like all BAPIs in the newRelease); to ensure that the update is saved in the database, you mustcall up the SAP standard BAPI BAPI_TRANSACTION_COMMIT after the currentBAPI call has been successfully completed.
The BAPI is a class method.
INCLUDE VMS_GENERAL OBJECT DOKU ID TX
INCLUDE VMS_REQUESTEDTABLEX OBJECT DOKU ID TX
INCLUDE VMS_ACTION OBJECT DOKU ID TX

Description
This table is to be filled with the characteristics and thecorresponding characteristic values. The characteristics must exist inthe classification for the vehicle that is to be created. Forperformance reasons, object dependencies are not checked, so thetransferred configuration must be consistent.

Value range

  • CONFIG_ID = 1

  • INST_ID = 1

  • CHARC = Characteristic

  • VALUE = Value
  • Description
    In a CREATE case, there is only one entry in this table (only onevehicle is created with exactly one configuration).

    Value range
    The CONFIG_ID and ROOT_ID fields must each have the value '1'.
    You must enter the name and version of the relevant Knowledge Base forthe material you are using in the KBNAME and KBVERSION fields.

    Description
    In a CREATE case, there is only one entry in this table.

    Value range
    The CONFIG_ID and INST_ID fields must each have the value '1'. TheOBJ_TYPE field has the value 'MARA', and you must enter '300' in theCLASS_TYPE field. 300 is the class type used in the VMS.
    In the OBJKEY field, enter the name of the material used, for example,KMAT, or vehicle model.

    Description
    Output parameter, see input parameter CONFIG_CHARSVALUES.

    Description
    Output parameter, see input parameter CONFIG_DATA.

    Description
    Output parameter, see input parameter CONFIG_INSTANCES.

    Description
    Output parameter, see input parameter VEHICLE.
    INCLUDE VMS_EXTENSIONIN OBJECT DOKU ID TX
    INCLUDE VMS_OUTPUT3 OBJECT DOKU ID TX
    INCLUDE VMS_RETURN OBJECT DOKU ID TX

    Description
    This input parameter contains the essential vehicle attributes withwhich a vehicle is to be created. Configuration attributes(characteristics and values) are not included in this parameter (seeCONF*).
    The parameter has the same structure as the CREATED_VEHICLE outputparameter. Caution: Many of the fields are calculated automatically bythe system.
    For CREATE BAPIs, this table has only one line.

    Value range
    You must make entries in the following fields:

    • MATERIALNUMBER (KMAT of the vehicle to be created)

    • PLANT

    • Entries in the following fields are optional:
      • VENDOR

      • VEHICLEAVAILABIL (can also be calculated with internal logic based on
      • Customizing, SAP internal abbreviation)
        • VEHICLEVISIBILIT

        • VEHICLELOCATION (can also be calculated with internal logic based on
        • Customizing, SAP internal abbreviation)
          • PLNNDDELIVERYDATE

          • PRODUCTIONDATE

          • CREATED_BY

          • ENDCUSTOMER

          • VEHICLEIDENTNUMB

          • VEHICLEUSAGE

          • SALESCAMPAIGN

          • MILEAGE

          • MILEAGEUNIT_SAP

          • MILEAGEUNIT_ISO

          • REGISTRATIONDATE

          • CONSTRUCTYEAR

          • CONSTRUCTMONTH

          • VEHICLEEXTERNNUM

          • VEHICLESEARCHAREA

          • VEHICLEORDERER

          • SHARINGLEVEL

          • MATERIALNUMBER_EXTERNAL

          • MATERIALNUMBER_GUID

          • MATERIALNUMBER_VERSION

          • INCLUDE VMS_QUALIFIER OBJECT DOKU ID TX

1047209VELO: Program termination, error UC_OBJECTS_NOT_CONVERTIBLE