Passing multiple lines to BAPI table parameter

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Suman
Participant
Posts: 53
Joined: Thu Oct 07, 2004 8:28 am

Passing multiple lines to BAPI table parameter

Post by Suman »

Hi,
I am using SAP R/3 stages for loading into SAP. For BAPI stage we have import,export and table parameter. I am able to pass one record at a time for each of these three parameters. I am looking for passing one record to import and export parameters and multiple records in table parameters at one shot so that BAPI will be called for multiple table records at one time. Is there any way I can achieve it in datastage.

Regards,
Suman
thebird
Participant
Posts: 254
Joined: Thu Jan 06, 2005 12:11 am
Location: India
Contact:

Post by thebird »

We havent been able to do that succeffully till now, and I am not sure if this is possible through DataStage.

When you call a BAPI in DataStage (to load a set of records) - for each of the input record the BAPI is called. This hits the performance very hard. Moreover - there is a time out period, which if exeeded by the BAPI process, will cause the job to abort.

The work around that we used for this - was to write the records to be loaded into a file. Call a trigger BAPI (custom) that will inturn call the required BAPI (to load) by giving it the required parameters. For the trigger BAPI - the file path and file name are the import parameters.

This approach has worked well for us.

Aneesh
Suman wrote:Hi,
I am looking for passing one record to import and export parameters and multiple records in table parameters at one shot so that BAPI will be called for multiple table records at one time. Is there any way I can achieve it in datastage.

Regards,
Suman
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

It is possible to send multiple lines in a parameter. It might be hard in a script to quote it correctly but in job control it is possible.
Mamu Kim
Suman
Participant
Posts: 53
Joined: Thu Oct 07, 2004 8:28 am

Post by Suman »

thebird wrote:We havent been able to do that succeffully till now, and I am not sure if this is possible through DataStage.

When you call a BAPI in DataStage (to load a set of records) - for each of the input record the BAPI is called. This hits the performance very hard. Moreover - there is a time out period, which if exeeded by the BAPI process, will cause the job to abort.

The work around that we used for this - was to write the records to be loaded into a file. Call a trigger BAPI (custom) that will inturn call the required BAPI (to load) by giving it the required parameters. For the trigger BAPI - the file path and file name are the import parameters.

This approach has worked well for us.

Aneesh
Suman wrote:Hi,
I am looking for passing one record to import and export parameters and multiple records in table parameters at one shot so that BAPI will be called for multiple table records at one time. Is there any way I can achieve it in datastage.

Regards,
Suman
Hi Aneesh,
In the custom BAPI how the actual BAPI name is passed i.e through import parameter or the custom BAPi was built only to call that BAPI.

Regards,
Suman
thebird
Participant
Posts: 254
Joined: Thu Jan 06, 2005 12:11 am
Location: India
Contact:

Post by thebird »

In the custom BAPI how the actual BAPI name is passed i.e through import parameter or the custom BAPi was built only to call that BAPI.

Not possible to create a generic trigger BAPI. A custom BAPI would have to be written each time you want to trigger a BAPI from DataStage.

Aneesh
Post Reply