Hierarchy
⤷ EHS (Application Component) Environment, Health and Safety
⤷ /TDAG/CP (Package) Compliance for products
IMG Activity
ID | /TDAG/CP_BADI_004 | BAdI: Enhancement of the Viewer for XML Data Files |
Transaction Code | /TDAG/80000084 | IMG activity: /TDAG/CP_BADI_004 |
Created on | 20071005 | |
Customizing Attributes | /TDAG/CP_BADI_004 | BAdI: Enhancement of the Viewer for XML Data Files |
Customizing Activity | /TDAG/CP_BADI_004 | BAdI: Enhancement of the Viewer for XML Data Files |
Document
Document Class | SIMG | Hypertext: Object Class - Class to which a document belongs. |
Document Name | /TDAG/CP_BADI_004 |
Use
This Business Add-In (BAdI) is used in the SAP Product and REACH Compliance component. This BAdI enables you to enhance a viewer application for XML files and to enhance the process of parsing and transforming XML files.
This BAdI provides the following methods:
- INITIALIZATION
You can use this method after the XML view controller has been initialized. The method receives input in the form of a reference to the XML view controller that can be used to register event handlers. - CLEANUP
You can use this method to free up resources that have been allocated during initialization of the XML viewer controller. - GET_CSS_PATH
You can control which CSS file from where is used to format the HTML file so that the output adheres, for example, to the customer-specific corporate identity. By default, all resources are stored in the SAP Web repository, but you can use the method to specify the CSS file and its location. For more information about possible repository paths, see the constants of the class /TDAG/CPCL_C_XML (XSL_LOC_FILESYSTEM, XSL_LOC_URL, XSL_LOC_WEBREP, XSL_LOC_XSLPROG). - GET_XSL_PATH
You can use this method to adjust or create your own XSL files that transform the XML into a readable format representation, such as HTML. You can also use this method to get the path and location of an XSL program for a given object type. - PARSE_PROD_DETAIL
You can use this method to parse the product details (XML element<ProductDetail>
). - PARSE_SUBUNIT
You can use this method to extract the data of sub units that are to be displayed as attributes in the product structure tree. This method can be used to parse the XML element<ProductComponents>/<SubUnit>
. - PARSE_MATERIAL
You can use this method to parse and extract the data of basic materials that are to be displayed in the product structure tree of the XML viewer. This method can be used to parse the XML element<ProductComponents>/<Material>
. - PARSE_SUBSTANCE
You can use this method to extract the data of pure substances or substance groups that are to be displayed as attributes in the product structure tree. activity Specify Material Category and Specification Type. This method can be used to parse the XML Element<ProductComponents>/<Substance>
. - PARSE_UNKNOWN
You can use this method as a fallback to extract the data of unknown or new objects that are to be displayed in the product structure tree. This method can be used to parse XML element<ProductComponents/>
.
Note: You can use the parse methods to add and fill additional columns in the product structure tree of the XML viewer.
Standard settings
In the standard system, the BAdI is not activated. The default implementation is executed as long as you do not activate a customer-specific BAdI Implementation.
The BAdI is filter-dependent. As filter criteria, you can specify the ID of the viewer application. This allows you to create different BAdI implementation for the viewer applications defined in the filter criteria.
Note: That you have to specify a filter criteria in order to activate an own BAdI Implementation.
BAdI Implementations
- /TDAG/CL_DEF_IM_CP_BADI_004 (default implementation)
- /TDAG/CL_EXM_IM_CP_BADI_004 (example implementation)
The example implementation uses the class /TDAG/CPCL_XML_VWR_EXTENSION.
Requirements
In the Customizing activity Specify Viewer for Generated Documents, you have specified a viewer application that is used to display XML data files.
Activities
After you call the IMG activity, the system displays a dialog box where you enter a name for the implementation.
If implementations of this Business Add-In have already been created, the system displays them in a dialog box. You then choose one of them by choosing Create, and continue as follows:
- In the dialog box, enter a name for the implementation of the Add-In and choose Create.
The system displays the initial screen for creating Business Add-In implementations. - On this screen, enter a short description for your implementation in the Implementation Short Text field.
- If you choose the Interface tab, you will notice that the system has populated the Name of the Implementing Class field automatically, by assigning a class name based on the name of your implementation.
- Save your entries and assign the Add-In to a package.
- To edit a method, double-click its name.
- Enter your implementation code between the
method <Interface Name>~<Name of Method>.
andendmethod.
statements. - Save and activate your code. Navigate back to the Change Implementation screen.
Note: You can also create an implementation for an Add-In and not activate it until later. If you want to do this, do not perform the following step: - Choose Activate.
When the application program is executed, the code you created is run through.
See also
Interfaces:
Enhance Viewer for XML Data Files
For more information about configuring viewer applications, see the Customizing activity Specify Viewer for Generated Documents.
Business Attributes
ASAP Roadmap ID | 204 | Establish Functions and Processes |
Mandatory / Optional | 2 | Optional activity |
Critical / Non-Critical | 2 | Non-critical |
Country-Dependency | A | Valid for all countries |
Assigned Application Components
Documentation Object Class | Documentation Object Name | Current line number | Application Component | Application Component Name |
---|---|---|---|---|
SIMG | /TDAG/CP_BADI_004 | 0 | HLA0100681 | Product Safety |
Maintenance Objects
Maintenance object type | E | Business Add-In - Definition |
History
Last changed by/on | FLEISCHER | 20091013 |
SAP Release Created in | 222_46C |