Ansicht
Dokumentation

/IPRO/INSERT_ELM - Check Elements

/IPRO/INSERT_ELM - Check Elements

RFUMSV00 - Advance Return for Tax on Sales/Purchases   ROGBILLS - Synchronize billing plans  
This documentation is copyright by SAP AG.
SAP E-Book

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.

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.

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.

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 ~ 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.

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.

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.






TXBHW - Original Tax Base Amount in Local Currency   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.

Length: 4198 Date: 20240424 Time: 000532     sap01-206 ( 76 ms )