ALE 6

Filtering BAPI Parameters

The BAPI parameter filtering can also take into account a hierarchical dependency between BAPI table parameters.You must specify any hierarchical dependencies before you generate the BAPI-ALE interface of the BAPI.The specified hierarchy is evaluated when the interface is generated and incorporated in the interface coding.The BAPI-ALE interface must be regenerated following all subsequent changes made to the hierarchy.Once the generated IDoc type has been released, the specified hierarchy of the asynchronous BAPI cannot subsequently be changed because of compatibility problems.

Defining Hierarchies Between BAPI Parameters

If you are developing your own ALE business processes, you may have to define dependencies between BAPI table parameters with regard to filtering parameters for data selection.These dependencies are defined by the field references between the table parameters of BAPIs.You can filter parameters to determine the dataset and to define dependencies only for the distribution of master data via BAPIs that are called synchronously.

A BAPI for material master data contains the tables for plant data and associated storage data.The table containing plant data has a reference to the table containing storage data via the key field PLANTS.There is a hierarchical dependency between the plant and storage data.If plant 001 of a material is not to be replicated due to parameter filtering, then none of the storage data for plant 001 will be replicated.

You use BAPI parameter filtering to manage the size of the dataset in the BAPI interface.

Procedure

You can define these hierarchical dependencies in ALE Development under BAPI → Maintain hierarchy of table parameters.Enter the object type and the method of the BAPI. You can display existing BOR object types and their associated methods using the input help (F4).The following processing options are available under the menu Hierarchy :
• Create
• Change
• Display
• Delete


Create Hierarchy

This checks whether a hierarchy for the BAPI already exists. Then it checks whether an ALE IDoc interface has already been generated and whether the associated IDoc has been released.If the IDoc has already been released, then the generated interface has already been delivered to customers and no hierarchy can be created or changed for an existing BAPI because of compatibility problems.In this case you have to create a new BAPI. A corresponding error message is displayed. If the ALE interface already exists, but the IDoc has not yet been released, then the system will inform you that it needs to be regenerated.A hierarchy tree is displayed on the next screen. For details see Editing the Hierarchy Display further below.

Change Hierarchy

The same checks are made as when you create a hierarchy. On the next screen the same processing options are provided as when you create a hierarchy.

Display Hierarchy

The same checks are made as when you create a hierarchy. On the next screen you cannot make any changes to the hierarchy.

To display the field references between the tables, double-click on the parent table. The parent table is automatically copied to the next dialog box.Select one of the child tables from the input help. Select Field references to display the field references.

Delete Hierarchy

The same checks are made as when you create a hierarchy. Once you have confirmed you want to delete the BAPI hierarchy, it is deleted.

Editing the Hierarchy Display

The root node in the hierarchy display corresponds to the function module of the BAPI. The root node is used only for display and is not saved. Also, it cannot be changed. You can edit the hierarchy display as follows:

• Insert table parameters
• Delete table parameters
• Define field references between parent and child tables
• Save hierarchy Parent tables inserted directly under the root node that do not have child tables are not saved.

If only this type of table is created, there is no hierarchy and therefore a hierarchy cannot be saved.

Insert table parameters

Place the cursor on a hierarchy node and choose Edit → Insert table parameters. If you place the cursor on a root node, you can select a parent table of the highest level via the input help. If a table exists above the marked node, this is copied to the next dialog box and you can add a child table to this table.In principle a table can only exist once in the hierarchy. You can display the available tables via the input help.In the dialog box you can display the common fields of the parent and child of the table in which the field references can be defined by selecting Field references. You can mark the fields for which a field reference is to be defined.

If no field references between the two tables exist, an error message is displayed. Delete table parameters To delete a table, place the cursor on the relevant node of the hierarchy with the table names of the child table.

Confirm the deletion. All other child tables of the deleted table will also be deleted.
Define field references between parent and child tables
Place the cursor on the node of a child table and choose Edit → Table parameters → Change field references or select the pushbutton Field reference with the change icon. The next dialog box contains the parent parameters and provided that a reference exists, the child parameters too.

When you create table parameter, you can select the associated child table via the input help. You can display common fields by selecting Field references.Only field references are displayed that have the same names in the parent and child tables. You can define the references between the fields by marking the appropriate references. Field references already defined are marked already.

Save hierarchy
To save a hierarchy, choose Hierarchy → Save.
A transport request is generated to send the associated Customizing table to the correction and transport system.
The hierarchy is not saved if an error occurs when accessing the database. A corresponding error message is displayed.

Maintaining BAPI-ALE Interfaces

The standard R/3 System contains a large quantity of business objects and BAPIs. These include BAPI-ALE interfaces that are generated from BAPIs and enable asynchronous BAPI calls in ALE business processes.

You can develop your own BAPIs in the customer namespace and generate the associated BAPI-ALE interface. The following objects are generated for a BAPI: • Message type • IDoc type including segments

• Function module called in the outbound processing side. (It creates and sends the IDoc from the BAPI data).
• Function module that calls the BAPI with the IDoc data on the inbound processing side The difference to manually maintained message types is that the function module that processes the change pointers does not create an IDoc.
Instead it fills the corresponding BAPI structures, determines the receivers and calls the generated ALE function module. The message types, IDoc types and function modules that have been generated can also be used to distribute master data using the SMD tool.

Prerequisites

The essential prerequisite is that a BAPI exists:
• You have developed your own BAPI in the customer namespace. • You have modified a BAPI from the standard system.The BAPI-ALE interface is then created in the customer namespace for the new sub-type and a method assigned to it.

Regardless of whether SAP delivers a BAPI-ALE interface for a BAPI with the new Release, any interface you have generated will continue to function in the same as in the earlier Release.You can regenerate the old interface to adapt newly added parameters, provided that SAP has not delivered a new interface in the new Release.

If SAP delivers a BAPI-ALE interface for a BAPI for which you have already generated an interface, you should use the new interface and delete the interface you generated. You can still use the old interface in the earlier Release.

If you regenerate the old interface, some generated objects, such as segments of SAP objects could be overwritten, if the interface in your BAPI function module references BAPI structures but belongs to SAP.If you want to take into account hierarchical dependencies between BAPI table parameters, then another prerequisite is that you define the hierarchy before generating the BAPI-ALE interface

The specified hierarchy is evaluated when the interface is generated and incorporated in the interface coding.The BAPI-ALE interface must be regenerated following all subsequent changes made to the hierarchy.Once the generated IDoc type has been released, the specified hierarchy of the asynchronous BAPI cannot subsequently be changed because of compatibility problems.

RELATED LINKS

No comments :

Post a Comment