Page 1 of 1

Passing multiple lines to BAPI table parameter

Posted: Tue Jul 03, 2007 2:56 pm
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

Posted: Wed Jul 04, 2007 12:18 am
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

Posted: Wed Jul 04, 2007 7:54 am
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.

Posted: Thu Jul 05, 2007 1:48 pm
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

Posted: Mon Jul 09, 2007 1:29 pm
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