DBM Enhancement VehicleData
DBM Enhancement VehicleData
Table of Contents:
1 Introduction ....................................................................................................................4
1.1 Purpose of this Document .........................................................................................................................4
Page 2
Vehicles @ Dealer Dealer Business Management: Enhancements
Page 3
Vehicles @ Dealer Dealer Business Management: Enhancements
1 Introduction
1.2 Prerequisites
• Vehicle process using standard SAP setup with standard SAP settings is up and running. This
includes the VMS action matrix for the standard vehicle processes and the categories and
extensions for standard vehicle data structures
• Authorization objects COM_ASET, COM_HIER and COM_PRD are assigned to your user
• Read the complete document before starting to implement enhancements
DBM Vehicle
VMS Individual
Vehicle Object
Page 4
Vehicles @ Dealer Dealer Business Management: Enhancements
The VMS vehicle was introduced with the Vehicle Management System which is part of the Automotive
industry solution. DBM reuses the VMS vehicle. The VMS vehicle in DBM is mainly used to provide flexibility
and enhancement possibilities regarding vehicle-related process design.
The individual object, which first was provided as part of SAP’s CRM solution, is used in DBM to provide a
flexible concept with regard to vehicle-related data design. Most of a vehicle’s data is stored in the individual
object part the DBM vehicle.
In order to introduce new fields, tables and screens to the DBM vehicle, it is important to understand the
concept of individual objects. In order to introduce new process steps in the vehicle are, it is important to
understand the VMS action concept.
Integrate
your own
screens Define your own fields
Country and brand-specific attributes are not provided in the SAP Standard. This means that there must be
the option of adding your own additional fields and tables to describe a DBM vehicle and creating additional
subscreens to display this data. You can reach this goal by using the individual object, which provides
flexible enhancement possibilities, for data storage.
The fields and tables contained in SAP’s standard DBM vehicle are also mainly stored in the individual object
part of the vehicle.
There are two different types of enhancements that you can use to store additional vehicle data:
Page 5
Vehicles @ Dealer Dealer Business Management: Enhancements
• If there is just one record of a data type per vehicle, a so called single-line extension is used. In the
SAP standard, this is the case for the model data subscreen (/DBM/SAPLVM07 0700) and the
vehicle data subscreen (/DBM/SAPLVM07 0800). These are the subscreens containing just fields.
• If there are several records of a certain data type needed per vehicle, a multi-line extension is used.
In the SAP standard, this is the case, for example, for the registrations subscreen (/DBM/SAPLVM07
0500), the warranty subscreen (/DBM/SAPLVM07 0400), and the keys subscreen (/DBM/SAPLVM07
0600). These are the subscreens that usually contain an ALV grid.
Page 6
Vehicles @ Dealer Dealer Business Management: Enhancements
So, depending on the kind of data that you wish to integrate into DBM vehicles, you have to create either
single-line extensions or multi-line extensions.
You cannot change or enhance existing SAP individual object structures (single- and multi-line extensions).
Instead, you have to create new extensions.
The figure below shows how the different kinds of objects required to model vehicles using individual objects
are connected.
Page 7
Vehicles @ Dealer Dealer Business Management: Enhancements
Attribute 1
Attribute 2
Extension 1
Category 1 Attribute 3
Extension 2
Category 2 Extension 3
Attribute 5
...
Extension 4 Attribute 6
...
Attribute 7
Extension 5
Attribute 8
...
Attribute 9
...
• General documentation on the individual objects concept can be found in SAP’s Knowledge
Warehouse (SAP Library) documentation at the following address: http://help.sap.com/ Æ
Documentation Æ SAP for Industries Æ SAP for Automotive Æ SAP ECC DIMP 5.0 Æ English.
Choose Search Documentation, SAP for Industries, Application: SAP for Discrete Industries,
Release: 5.0, Language: EN, enter the search term individual object, choose Search and then, in the
hit list, choose the first entry entitled Basic Data.
http://help.sap.com/saphelp_dimp50/helpdata/en/75/461e400191f72ee10000000a1550b0/frameset.
htm
3.3 Limitations
The DBM vehicle does not support the full functionality provided by individual objects. These are the known
restrictions:
Page 8
Vehicles @ Dealer Dealer Business Management: Enhancements
• No organization-dependent data
• No interlinkages
• No reference product
• No alternative IDs
• No real multiple-use set types (only single-line extensions and multi-line extensions)
• Only one category per iObject (but >1 category for one object family possible)
• When modelling individual objects, the system is able to generate most of the required coding and
DDIC objects. DBM does not provide this kind of generator. Additional manual steps are therefore
required to use individual objects in DBM vehicles.
Page 9
Vehicles @ Dealer Dealer Business Management: Enhancements
Page 10
Vehicles @ Dealer Dealer Business Management: Enhancements
• Choose Create
• Enter text in the required languages (DE: Reifenhersteller, EN: Tire Manufacturer)
• Chose the attribute type and length (CAHR 20)
Page 11
Vehicles @ Dealer Dealer Business Management: Enhancements
Page 12
Vehicles @ Dealer Dealer Business Management: Enhancements
Page 13
Vehicles @ Dealer Dealer Business Management: Enhancements
• ZSTH_TY_LOCA … location
For the attribute location, you should create the following possible values:
• VL (DE: vorne links / EN: front left)
• VR (DE: vorne rechts / EN front right)
• HL (DE: hinten links / EN: back left)
• HR (DE: hinten rechts / EN: back right)
Page 14
Vehicles @ Dealer Dealer Business Management: Enhancements
A data element and a domain is generated for each of the attributes. Value ranges result in domain fixed
values. Another way to define a value range is to assign a check table to the attribute.
You cannot reuse existing data elements or domains when you create attributes.
Page 15
Vehicles @ Dealer Dealer Business Management: Enhancements
Page 16
Vehicles @ Dealer Dealer Business Management: Enhancements
Page 17
Vehicles @ Dealer Dealer Business Management: Enhancements
• Save extension ZSTH_TY_MAIN. The system now generates most of the required coding and DDIC
objects.
• In SE11, two new database tables are generated: ZSTH_TY_MAIN and ZSTH_TY_MAINH.
• In SE80, two new function groups are generated: ZOM_ZSTH_TY_MAIN and
ZOM_ZSTH_TY_MAIN_UI. Both are currently in the user’s local objects.
Examples of SAP standard single-line extensions are DBM_V_IMODEL and DBM_V_IVEHICLE.
Page 18
Vehicles @ Dealer Dealer Business Management: Enhancements
Page 19
Vehicles @ Dealer Dealer Business Management: Enhancements
Page 20
Vehicles @ Dealer Dealer Business Management: Enhancements
• Save extension ZSTH_TY_ITEM. The system now generates most of the required coding and DDIC
objects.
• In SE11, two new database tables are generated: ZSTH_TY_ITEM and ZSTH_TY_ ITEM H.
• In SE80, two new function groups are generated: ZOM_ZSTH_TY_ ITEM and ZOM_ZSTH_TY_
ITEM _UI. Both are currently in the user’s local objects.
Examples of SAP standard multi-line extensions are DBM_V_IREGHIST and DBM_V_IKEYS.
Page 21
Vehicles @ Dealer Dealer Business Management: Enhancements
Page 22
Vehicles @ Dealer Dealer Business Management: Enhancements
• On the SetTypes tab page, assign the standard SAP vehicle extensions as well as the two new
extensions to the category. When creating vehicles of category ZSTH_VEHICLE, data can be written
into the existing extensions as well as into the two new ones.
These are the extensions used in this example:
o SAP standard extensions
o DBM_V_IKEYS
o DBM_V_IMODEL
o DBM_V_IMODELT
o DBM_V_IOPTION
o DBM_V_IOPTIONT
o DBM_V_IPARTNER
o DBM_V_IREGHIST
o DBM_V_ISINT
o DBM_V_IVEHICLE
o DBM_V_IWTY
o Extensions specific to this example
o ZSTH_TY_ITEM
o ZSTH_TY_MAIN
Page 23
Vehicles @ Dealer Dealer Business Management: Enhancements
The View ID and Position column on the SetTypes tab page of transaction COMM_HIERARCHY are
not relevant.
Page 24
Vehicles @ Dealer Dealer Business Management: Enhancements
Page 25
Vehicles @ Dealer Dealer Business Management: Enhancements
Page 26
Vehicles @ Dealer Dealer Business Management: Enhancements
Page 27
Vehicles @ Dealer Dealer Business Management: Enhancements
• Make a note of the package name as you will need to provide it later
4.2.6.4 API Enhancements and Object Transport
• Transaction COMM_ATTRSET
• Menu: SetTypes/Attributes Æ Transport Æ Set Types
• Enter the names of your extensions (ZSTH_TY_MAIN, ZSTH_TYRE_ITEM) and set the indicator for
creating the API append.
Page 28
Vehicles @ Dealer Dealer Business Management: Enhancements
• Select your transport requests. Check if a customizing request or a workbench request is asked for.
Here is an example for a workbench request.
• Several similar dialog boxes that require similar values to be entered are displayed.
• If it is not possible to enhance the API structure automatically using the procedure described above,
you can do it manually. Note: this approach cannot be used if the enhancements are to be
transported to another system. It is only an option if the enhancement is used exclusively in the
system you work in (for example, for testing reasons).
• Check structure COMT_PROD_MAT_MAINTAIN_API to make sure that the required API structure
enhancements have been generated. For each of the two extensions, an append structure is added
to COMT_PROD_MAT_MAINTAIN_API.
• In transaction SE09, you can see that a lot of objects have been added to the transport requests.
Page 29
Vehicles @ Dealer Dealer Business Management: Enhancements
Page 30
Vehicles @ Dealer Dealer Business Management: Enhancements
• Enter the name of the table type (ZSTH_TY_ITEM_TXT_TAB) in the field Data type and choose
Create. Select Table type in the dialog box.
Page 31
Vehicles @ Dealer Dealer Business Management: Enhancements
Page 32
Vehicles @ Dealer Dealer Business Management: Enhancements
Page 33
Vehicles @ Dealer Dealer Business Management: Enhancements
Page 34
Vehicles @ Dealer Dealer Business Management: Enhancements
• This mapping is done in methods of BAdI /DBM/VEHICLE_API. Please first read the documentation
for BAdI /DBM/VEHICLE_API before implementing it.
• Note: this BAdI has a fairly large default implementation. When you create an implementation on
your own, you should make sure that you process the default code as well, since you probably do
not want to replace it completely. In this example, it will not be replaced at all, as only additional data
is handled. The handling of the existing extension has not changed. It is therefore recommended that
you copy the default implementation coding into your BAdI implementation.
Page 35
Vehicles @ Dealer Dealer Business Management: Enhancements
Page 36
Vehicles @ Dealer Dealer Business Management: Enhancements
is_iobj_data_multi_com-zsth_ty_item[].
This coding writes data contained in the external structure into the corresponding internal structure.
As the structures in this example are similar, the coding is simple.
• In this BAdI, additional functionality can of course be added as well. In this example, a few lines of
code are added that automatically add records to the multi-line extension for tires:
DATA: ls_tyre type ZSTH_TY_ITEM_DYNP_SV.
* Only for the test category ZSTH_VEHICLE, default
* values are added
IF ( cv_iobj_catid = 'ZSTH_VEHICLE' )
AND ( cs_iobj_data_multi-zsth_ty_item[] IS INITIAL ).
* Add four default records if the table is still empty
ls_tyre-zzk0010 = 'VL'.
APPEND ls_tyre TO cs_iobj_data_multi-zsth_ty_item[].
ls_tyre-zzk0010 = 'VR'.
APPEND ls_tyre TO cs_iobj_data_multi-zsth_ty_item[].
ls_tyre-zzk0010 = 'HL'.
APPEND ls_tyre TO cs_iobj_data_multi-zsth_ty_item[].
ls_tyre-zzk0010 = 'HR'.
APPEND ls_tyre TO cs_iobj_data_multi-zsth_ty_item[].
ENDIF.
Page 37
Vehicles @ Dealer Dealer Business Management: Enhancements
At this point, the enhancements of the DBM vehicle API layer (function modules of function group
/DBM/VM01) are completed. The creation of the screen and the Customizing setup is still missing.
• Some includes can be re-used to simplify the enhancement process. These need to be added to the
TOP include (LZSTH_VEHICLE_ENHANCETOP) of the function group. The following coding should
therefore be added to LZSTH_VEHICLE_ENHANCETOP:
*Constants definition
INCLUDE: /dbm/lvm08con.
*Init constants
INCLUDE: /dbm/lvm01ini.
*Type definition
Page 38
Vehicles @ Dealer Dealer Business Management: Enhancements
INCLUDE: /dbm/lvm08typ.
*Communication variables
INCLUDE: /dbm/lvm08var.
*Class definition/implementation for additional data table view
INCLUDE /dbm/lvm08cl1.
*Class definition/implementation for multi Iobject table
control
INCLUDE /dbm/lvm08cl2.
*Communication pbo/pai
INCLUDE /dbm/lvm08com.
• Create a subscreen (0100) for your data within function group ZSTH_VEHICLE_ENHANCE. The
easiest way to do this is to copy an existing screen from function group /DBM/VM07, which contains
SAP’s standard screens for /DBM/VM.
Page 39
Vehicles @ Dealer Dealer Business Management: Enhancements
• A good example of multi-line extension screen is subscreen 0600 (keys). A good example for single-
line extensions is screen 0800 (general vehicle data).
• The PBO of the subscreens process flow should look like this:
*======================================
*======================================
• The PBO of the subscreens process flow should look like this:
* Find out if all mandatory entry fields have been filled by the user
MODULE m_check_entry_fields_filled.
* Fill data back to the buffer using the data entered on the subscreen
MODULE m_transfer_data.
* User command
MODULE m_user_command.
*======================================
• If the subscreen is copied, the name of the first PBO module needs to be changed to
m_iobj_multi_register_tyres. The remaining PBO / PAI coding should already be correct.
• Make sure that “m_iobj_multi_register_tyres” is called prior to “m_prepare_data”.
• Module “m_iobj_multi_register_tyres” is the only one that does not exist yet, so you have to create it.
(Simply double-click on the name of the module in PBO).
Page 40
Vehicles @ Dealer Dealer Business Management: Enhancements
The purpose of form “f_register_settypes” is to activate the individual object’s generic text reading
functionality for the extension provided to the form only. Without this form being called, the
descriptive texts for values “HL”, “VR”, etc. wouldn’t be displayed in the ALV. This functionality
requires notes 932953 and 931126. See these notes for further details. Generic text reading for ind.
objects isn’t needed for single-line extensions.
Page 41
Vehicles @ Dealer Dealer Business Management: Enhancements
• Screen Layout:
o On the layout of the screen, you need to provide a custom control called
IOBJ_MULTI_ZSTH_TY_ITEM. It contains the ALV grid for the multi-line extension. The
name of the custom control has to be the same as in module m_iobj_multi_register_tyres.
If subscreen 0100 was copied from /DBM/VM07 0600, the custom control is already
available and simply has to be renamed.
o You have to manually add the fields from single-line extension ZSTH_TY_MAIN to the
screen. You can use the Screen Painter to do this. The screens element list should contain
fields ZSTH_TY_MAIN-ZZ0010, ZSTH_TY_MAIN-ZZ0011, ZSTH_TY_MAIN-ZZ0012, and
ZSTH_TY_MAIN-ZZ0013 for the fields of single-line extension ZSTH_TY_MAIN.
In the Screen Painter, the subscreen should look remotely like this now:
Page 42
Vehicles @ Dealer Dealer Business Management: Enhancements
The screen is now complete. You have to maintain some Customizing settings before the screen can be
used by transaction /DBM/VM.
• In Customizing for Dealer Business Management (DBM) Æ Vehicle Æ Navigation in Vehicle Master
Æ Define Nodes for Vehicle Master Navigation Tree
Page 43
Vehicles @ Dealer Dealer Business Management: Enhancements
• Create an entry for the tire screen. In this example, the node is called TYRE and the text is Tires.
The text maintained here is the one later on visible on the left side of /DBM/VM for subscreen
selection.
Page 44
Vehicles @ Dealer Dealer Business Management: Enhancements
• In Customizing for DBM Æ Vehicle Æ Navigation in Vehicle Master Æ Define Navigation Profile
Page 45
Vehicles @ Dealer Dealer Business Management: Enhancements
• A new navigation profile is defined. The technical name is ZSTH_ENH, the description is Vehicle
Enhancement
• In Customizing for Dealer Business Management (DBM) Æ Vehicle Æ Navigation in Vehicle Master
Æ Define Technical Settings for Naviation Tree
• Create entries for all the nodes which should be part of the new profile.
o In order to be able to re-use the SAP standard subscreens within your profile, you need to
create records like this:
Vehicle master navigation profile: ZSTH_ENH
Node: VM* (compare with standard profile)
Sequence: (compare with standard profile)
Page 46
Vehicles @ Dealer Dealer Business Management: Enhancements
• Now a new profile has been defined and the screens have been attached to the profile. We now
have to make sure that the new profile is used by the application.
Page 47
Vehicles @ Dealer Dealer Business Management: Enhancements
Page 48
Vehicles @ Dealer Dealer Business Management: Enhancements
Page 49
Vehicles @ Dealer Dealer Business Management: Enhancements
Page 50