Use with the Standardized BAPIs

This section describes the precautions that BAPI developers have to take to ensure that every standardized BAPI can be used for customer enhancements. Please note: this information is a recommendation, which can be altered in justified cases.

If the BAPI to enhance is not a standardized BAPI, you should follow the recommendations for the BAPI whose character is most similar to the one at hand.

GetList()

  • A GetList() BAPI should contain an ExtensionIn parameter to allow customers to extend the selection parameters.
  • An ExtensionOut parameter is required to allow additional values to be returned.
  • A BAPI table extension should be created for every database table that the BAPI developer thinks could be enhanced. Make sure to list all the table extensions used in the BAPI in the documentation of the extension parameters.
  • Supply both BAdIs, since data checks may be necessary and the ExtensionOut parameter can be filled.
  • Do not use MOVE CORRESPONDING to read the ExtensionIn parameter, because no data is written to extended tables.

GetDetail()

  • Create an ExtensionIn parameter to allow the definition of additional filter criteria that determine the scope of the details.
  • An ExtensionOut parameter is required to allow additional detail values to be returned.
  • A BAPI table extension should be created for every database table that the BAPI developer thinks could be enhanced. Make sure to list all the table extensions used in the BAPI in the documentation of the extension parameters.
  • Supply both BAdIs, since data checks may be necessary and the ExtensionOut parameter can be filled.
  • Do not use MOVE CORRESPONDING to read the ExtensionIn parameter, because no data is written to extended tables.

Create() and CreateFromData()

  • A Create() BAPI should have an ExtensionIn parameter to allow customers to define additional fields in the object to create.
  • An ExtensionOut parameter is only required if additional export parameters exist besides the generated keys and the return parameter. This is primarily the case when new tables are generated generically in the BAPI.
  • A BAPI table extension should be created for every database table that the BAPI developer thinks could be enhanced. Make sure to list all the table extensions used in the BAPI in the documentation of the extension parameters.
  • Both BAdIs must be supplied. On one hand, the customer must be capable of performing data checks; on the other hand, the customer might have defined or extended tables for the sub-object to create that were not supplied by SAP. These would have to be filled in the second BAdI.
  • You must use a MOVE CORRESPONDING to read the ExtensionIn parameter for each table that has been assigned to the object to create and for which a table extension has been defined.

Change()

  • A Change() BAPI should have an ExtensionIn parameter, since the customer might have defined additional fields in the object to create.
  • An ExtensionOut parameter is only required if additional export parameters exist besides the return parameter. Please note, however, that this should be the exception.
  • A BAPI table extension should be created for every database table that the BAPI developer thinks could be enhanced. Make sure to list all the table extensions used in the BAPI in the documentation of the extension parameters.
  • Both BAdIs must be supplied. On one hand, the customer must be capable of performing data checks; on the other hand, the customer might have defined or extended tables for the sub-object to create that were not supplied by SAP. These would have to be filled in the second BAdI.
  • Do not use MOVE CORRESPONDING to read the ExtensionIn parameter, because it makes no sense to overwrite the extended fields without further checks.

Cancel()

  • No ExtensionIn parameter is required, since usually only key fields of the objects are passed on to the BAPI.
  • If you want to return additional detail values, an ExtensionOut parameter will also be required. Please note, however, that this should be the exception.
  • A BAPI table extension should be created for every database table that the BAPI developer thinks could be enhanced. Make sure to list all the table extensions used in the BAPI in the documentation of the extension parameters.
  • Only provide the second BAdI (if any), to allow data to be deleted from customer tables and fill the ExtensionOut parameter.
  • Do not use MOVE CORRESPONDING to read the ExtensionIn parameter, because no data is written to extended tables.

Delete() and Undelete()

  • No ExtensionIn parameter is required, since usually only key fields of the objects are passed on to the BAPI.
  • If you want to return additional detail values, an ExtensionOut parameter will also be required. Please note, however, that this should be the exception.
  • A BAPI table extension should be created for every database table that the BAPI developer thinks could be enhanced. Make sure to list all the table extensions used in the BAPI in the documentation of the extension parameters.
  • Only provide the second BAdI (if any), to allow data to be deleted from customer tables and fill the ExtensionOut parameter.
  • Do not use MOVE CORRESPONDING to read the ExtensionIn parameter, because no data is written to extended tables.

Add<sub-object>()

  • An Add<sub-object>() BAPI should have an ExtensionIn parameter to allow customers to define additional fields in the sub-object to create.
  • An ExtensionOut parameter is only required if additional export parameters exist besides the generated keys and the return parameter. This is primarily the case when new tables are generated generically in the BAPI.
  • A BAPI table extension should be created for every database table that the BAPI developer thinks could be enhanced. Make sure to list all the table extensions used in the BAPI in the documentation of the extension parameters.
  • Both BAdIs must be supplied. On one hand, the customer must be capable of performing data checks; on the other hand, the customer might have defined or extended tables for the sub-object to create that were not supplied by SAP. These would have to be filled in the second BAdI.
  • You must use a MOVE CORRESPONDING to read the ExtensionIn parameter for each table that has been assigned to the sub-object to create and for which a table extension has been defined.

Remove<sub-object>()

  • No ExtensionIn parameter is required, since only the values that identify the sub-object are passed on to the BAPI.
  • If you want to return additional detail values, an ExtensionOut parameter will also be required. Please note, however, that this should be the exception.
  • A BAPI table extension should be created for every database table that the BAPI developer thinks could be enhanced. Make sure to list all the table extensions used in the BAPI in the documentation of the extension parameters.
  • Only provide the second BAdI (if any), to allow data to be deleted from customer tables and fill the ExtensionOut parameter.
  • Do not use MOVE CORRESPONDING to read the ExtensionIn parameter, because no data is written to extended tables.

Replicate()

  • A Replicate() BAPI should contain an ExtensionIn parameter to allow customers to extend the selection parameters.
  • An ExtensionOut parameter is required to allow additional values to be returned.
  • A BAPI table extension should be created for every database table that the BAPI developer thinks could be enhanced. Make sure to list all the table extensions used in the BAPI in the documentation of the extension parameters.
  • Supply both BAdIs, since data checks may be necessary and the ExtensionOut parameter can be filled.
  • Do not use MOVE CORRESPONDING to read the ExtensionIn parameter, because no data is written to extended tables.

SaveReplica()

  • A SaveReplica() BAPI should contain an ExtensionIn parameter to allow customers to replicate objects with additional fields.
  • An ExtensionOut parameter is only required if additional export parameters exist besides the generated keys and the return parameter. This is primarily the case when new tables are generated generically in the BAPI.
  • A BAPI table extension should be created for every database table that the BAPI developer thinks could be enhanced. Make sure to list all the table extensions used in the BAPI in the documentation of the extension parameters.
  • Both BAdIs must be supplied. On one hand, the customer must be capable of performing data checks; on the other hand, the customer might have defined or extended tables for the sub-object to create that were not supplied by SAP. These would have to be filled in the second BAdI.
  • Whether or not a MOVE CORRESPONDING is required to read the ExtensionIn parameter or not depends on the type of the involved SaveReplica() BAPI:
    • If you want to save the objects to replicate completely, without considering any existing data, then program the read for each table that has been assigned a BAPI table extension.
    • If you only want to transfer individual fields of the object to replicate, depending on specific conditions, then do not program the read.