Sunday, October 7, 2007

Business Add-Ins: Import Procedure

Conflicts can occur at release upgrade or when transporting a Business Add-In within a system infrastructure containing multiple levels (country versions, industry solutions, partners, etc.). Possible collisions include:
Case 1 : Multiple active implementations exist for Business Add-Ins that have not been designed for multiple use (for the same filter value, if add-in is filter-dependent).
Case 2 : Identical interfaces were assigned during Business Add-In definition.
Case 3 : Identical function codes were assigned during Business Add-In definition.
Whenever such collisions occur, corresponding error messages and warnings are created in the transport log at import. Their long texts provide you with information on how to proceed.


If the collision described in case 1 occurs in your system, proceed as follows

1. 1.Choose Utilities ® Adjustment ® Multiple active implementations (in transaction SE18).
A list appears displaying your Business Add-Ins. A red traffic light indicates that multiple active implementations exist for that add-in.
2. 2. Deactivate these implementations using the appropriate pushbutton or double-click on the name of the implementation to branch to the corresponding transaction where you can then correct the problem

In cases 2 and 3, proceed as follows:

1. 1. Choose Utilities ® Adjustment ® Multiple assigned interfaces or Multiple function codes assigned.

Both of these menu options display an overview; the Add-Ins in question are marked with a red traffic light.
2. 2. The people responsible for those add-in definitions where identical interfaces and function codes occur must now decide how to proceed. To delete a function code or change an interface name, call the ABAP Workbench and use the appropriate pushbutton to call the tool you need. A new transport may be necessary.
Sorting BAdI Implementations

Use
The sequence for execution of BAdI implementations can be controlled for BAdIs used on a multiple basis by a sort mechanism.
Procedure
1. en ...
2. .
In the BAdI Builder (SE18), choose Utilities ® Sort.
Choose Standard Sort if sorting is to take place using numeric sort values. The numeric values are entered in the displayed field Layer Value when you create the implementations and stored in a table. The implementations are executed in accordance with the specified sequence.
Choose Special Sort if sorting is to take place using non-numeric sort values. In this case, you need to enter the name of the implementation that will be created in the following step.
Proceed as follows if you require special sorting:
18. 1. Create an implementation for the BAdI definition BADI_LAYER contained in the delivered product. Enter a BAdI definition as filter value in the Properties tab (the name will be used as a dummy value to begin with).
19. 2. Create a screen (in a function group or a module pool). The screen contains, for example, a text field with the name Sort Value and an input field.
20. 3. Choose the Subscreens tab of the BAdI implementation and enter the called program and the screen number.



21. 4. Choose the Interface tab. The IF_EX_BADI_LAYER interface contains the following methods:


In addition to methods for data transmission of the sort value and for changing the BAdI implementation, the interface also contains a sort method that sorts a table of values in any specified order.




A standard table is passed to this method as a changing parameter. The table contains values only; it does not contain any implementation names.
This table contains, for example, inputs for the Sort Value field when you create implementations. The user can maintain any fields as required and sort them according to any specified criteria at runtime.

22. 5. Program the method SORT_DATA. Here is an example of simple sorting of numeric values:



23 6. Program the methods for data transmission in the following form (see also Screen Enhancements).






24 7. Program the call for implementations from the application program. The IF_EX_BADI_LAYER interface contains a parameter-free method called TEST for test purpose.



The implementations are executed (for example, in numeric sequence).
Switching Off Sort Function

To switch off the sort for the execution of BAdI implementations, choose Utilities ® Sort and finally No Sort. The implementations will now run in an arbitrary sequence in this case. The edit field that was displayed using a subscreen during the execution of a BAdI implementation now disappears.
Sorting of BAdI implementations can be switched on again at any time. This does not count as a modification to the standard version. The BAdI definition is not changed. Switching off or making a change, on the other hand, counts as a modification.

No comments: