Bulk Import API Use

This chapter describes Bulk Import APIs. The provided information includes: PL/SQL record structure and procedure, Java inner class and method, and parameter descriptions and validations.

This chapter covers the following topics:

Bulk Import APIs

PL/SQL Package Name: HZ_IMP_BATCH_SUMMARY_V2PUB

Description

The Bulk Import APIs are needed for using the feature Bulk Import. The two APIs in the package allow users to create an import batch and activate an import batch for processing in Bulk Import.

Create Import Batch API

Description

Use this API to create an import batch. Before processing any data through the Bulk Import process, you must call this API to create a batch and get a batch id. The API creates a record in the HZ_IMP_BATCH_SUMMARY table. The API returns a batch id to use for populating data for that batch in all the TCA interface tables.

To turn off events for D&B bulk import, you must set the HZ_Execute_API_Callouts profile option to All Events Disabled or Only Business Object Events Enabled. After import is complete you must run the Synchronize WF Local Tables concurrent program for the HZ_Party original system to gather all events.

PL/SQL Procedure

PROCEDURE create_import_batch (
      p_init_msg_list                    IN             VARCHAR2  := FND_API.G_FALSE,
      p_batch_name                       IN             VARCHAR2,
      p_description                      IN             VARCHAR2,
      p_original_system                  IN             VARCHAR2,
      p_load_type                        IN             VARCHAR2  := NULL,
      p_est_no_of_records                IN             NUMBER    := NULL,
      x_batch_id                         OUT NOCOPY     NUMBER,
      x_return_status                    OUT NOCOPY     VARCHAR2,
      x_msg_count                        OUT NOCOPY     NUMBER,
      x_msg_data                         OUT NOCOPY     VARCHAR2
  )

Parameter Description and Validation

The following table lists information about the parameters in the Create Import Batch API. The table includes the parameter names, the type of each parameter, the data type of each parameter, the necessity of the parameter, and other information about the parameter such as validation, defaults, and other comments.

Parameter Name Type Data Type Required Validation, Default, Comment
p_init_msg_list IN VARCHAR2 No Default : FND_API.G_FALSE
p_batch_name IN VARCHAR2 Yes  
p_description IN VARCHAR2 No  
p_original_system IN VARCHAR2 Yes Validation: Foreign key to HZ_ORIG_SYSTEMS_B.orig_system.
p_load_type IN VARCHAR2 No  
p_est_no_of_records IN NUMBER No  
p_no_of_records IN NUMBER No Comment: Number of records to be returned. Maximum is 100.
Default: 100
x_batch_id OUT NUMBER Yes Comment: Returns the system generated batch id
x_return_status OUT VARCHAR2 Yes Comment: API return status
x_msg_count OUT NUMBER Yes Comment: Number of messages in stack
x_msg_data OUT VARCHAR2 Yes Comment: Message text if the x_msg_count = 1

Activate Import Batch API

Description

Use this API to activate an import batch. Before requesting processing of a batch by Bulk Import concurrent program, you must call this API to activate a batch for processing. The API updates the batch status column to ACTIVE for the batch record in the HZ_IMP_BATCH_SUMMARY table. After you complete loading data in TCA interface tables and are ready to process the data, call this API to activate the batch and make it available in the Batch id list of values for the Bulk Import concurrent program.

PL/SQL Procedure

PROCEDURE activate_batch (
      p_init_msg_list                    IN             VARCHAR2:= FND_API.G_FALSE,
      p_batch_id                         IN             NUMBER,
      x_return_status                    OUT NOCOPY     VARCHAR2,
      x_msg_count                        OUT NOCOPY     NUMBER,
      x_msg_data                         OUT NOCOPY     VARCHAR2
  )

Parameter Description and Validation

The following table lists information about the parameters in the Activate Import Batch API. The table includes the parameter names, the type of each parameter, the data type of each parameter, the necessity of the parameter, and other information about the parameter such as validation, defaults, and other comments.

Parameter Name Type Data Type Required Validation, Default, Comment
p_init_msg_list IN VARCHAR2 No Comment : Indicates whether message stack should initialized
Default : FND_API.G_FALSE
p_batch_id IN NUMBER Yes Comment : Batch id of the batch you want to activate
x_return_status OUT VARCHAR2 Yes Comment : API return status
x_msg_count OUT NUMBER Yes Comment : Number of messages in stack
x_msg_data OUT VARCHAR2 Yes Comment : Message text if x_msg_count = 1