Hierarchy

⤷

⤷

IMG Activity
ID | /IPRO/INSERT_ELM | Check Elements |
Transaction Code | /IPRO/67000057 | (empty) |
Created on | 20050107 | |
Customizing Attributes | /IPRO/INSERT_ELM | Check Elements |
Customizing Activity | /IPRO/INSERT_ELM | Check Elements |
Document
Document Class | SIMG | Hypertext: Object Class - Class to which a document belongs. |
Document Name | /IPRO/INSERT_ELEMENT |
Use
Implement this Business Add-In to determine whether or not an element should be inserted into a document.
The Business Add-In consists of the method described below. This method can be used instead of the standard algorithm, which allows a SAP Document Builder user on the user interface layer to insert any element into the document s long as that element is not already included in the document.
INSERT_ELEMENT
The following import parameters are provided:
- IO_DOCUMENT
Reference to the interface /IPRO/IF_DOCUMENT containing methods that allow you to retrieve all the elements and variables contained in a document instance. The GET_ELEMENT_LIST method of this interface returns a reference to the interface /IPRO/IF_DOCB_SECTION, which contains the document's element tree. The LOOKUP method of this interface allows you to find any element contained in the document via the element's name. - IO_ELEMENT
Reference to the interface /IPRO/IF_DOCB_ELEMENT, which contains a reference to the element that is under consideration for insertion This interface contains a set of methods that allow you to query all the attributes associated with the element.
The following return parameter is provided:
- RV_VALID
Boolean value used to determine whether the element will be inserted into the document or not.
Requirements
Standard settings
Recommendation
You can use the method GET_ELEMENT_LIST of the /IPRO/IF_DOCUMENT interface to retrieve a reference to the document's element tree. The GET_CHILDREN method of the /IPRO/IF_DOCB_SECTION interface can then be used to retrieve all the IPRO/IF_DOCB_ELEMENT references for all the elements in the document. You are then able to determine whether the element under consideration for insertion should be allowed based on which elements are already included in the document.
Activities
After calling up the IMG activity, a dialog box appears, in which you can enter a name for the implementation.
If you have already made other implementations for this BAdI, another dialog box appears, in which the existing implementations are displayed. In this case, choose Create, and proceed as follows:
1. In the dialog box, enter a name for the BAdI implementation in the Implementation field, and choose Create.
The screen for creating BAdI implementations is now displayed.
2. Enter a short text for the implementation in the Short text for implementation field.
3. From the tab index, choose Interface.
The Name of implemented class field is already filled on the tab page, as a class name was automatically assigned to the implementation when you named it.
4. Save your entries, and assign the implementation to a development class.
5. Place the cursor on the method, and double-click to enter method processing.
6. Enter the coding for the implementation between the statements method <Interface name> ~ <Name of method> and endmethod.
7. Save and implement your coding. Return to the Edit Implementation screen.
8. Save the entries on the Edit Implementation screen.
Note: You can also create an implementation, and then activate it at a later time. In such a case, end the processing stage at this point.
9. Choose Activate.
The coding you stored in the methods will be run when the application program is executed.
Example
A user should not be able to insert a standard element into a document if the standard element was previously inserted into the document and then converted to a custom element.
Additional Hints
For more information on using Business Add-Ins, see the SAP Library under Basis Components -> ABAP Workbench (BC-DWB) -> Changing the SAP Standard (BC) - > Business Add-Ins.
Business Attributes
ASAP Roadmap ID | 257 | Create User Exits |
Mandatory / Optional | 2 | Optional activity |
Critical / Non-Critical | 2 | Non-critical |
Country-Dependency | A | Valid for all countries |
Maintenance Objects
Maintenance object type | E | Business Add-In - Definition |
History
Last changed by/on | SAP | 20050119 |
SAP Release Created in | 200 |