How to pass Table Parameter to the BAPI stage?

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
gordonxiao
Participant
Posts: 18
Joined: Sun Sep 12, 2004 9:19 am

How to pass Table Parameter to the BAPI stage?

Post by gordonxiao »

I am using BAPI stage to load data from SAP.

I notice that there are three kinds of parameters for a remote function written on the SAP side. They are Import paramter, Table input parameter and Table output parameter.

I can pass import parameters to BAPI through the input text. However, I don't know how to pass table parameters to BAPI because DataStage will treat every row from the input text as a table parameter -- what we need is to pass the whole table not every single row.
timmr
Participant
Posts: 1
Joined: Thu Feb 19, 2004 7:31 am

Re: How to pass Table Parameter to the BAPI stage?

Post by timmr »

Did you get any feedback on this as I am having exactly the same problem.
ameyvaidya
Charter Member
Charter Member
Posts: 166
Joined: Wed Mar 16, 2005 6:52 am
Location: Mumbai, India

Post by ameyvaidya »

From what I recollect of the BAPI Stage,

A BAPI Stage takes the following parameters:

If the stage is used for Input:

All Import Non-table(Do not remember the SAP name for this) parameters can be directly read from an Import file as a comma seperated list of values. This should be created prior to the job that contains the BAPI stage.

All Export non-table parameters are written to another sequential file(Im a bit hazy about this point).

All Import AND Export Table parameters are read as through the comumn definitions. An entire table cannot be passed as a parameter to the BAPI Stage. DataStaqe Server reads and processes tables one row at a time. So the way to go is to map the output columns of the final output(To be loaded to SAP) directly to the BAPI stage.
:!: :!: :!: Also if the BAPI stage is used as an input all table parameters regardless of their definition in SAP( Import or Export) are treated as Import in DataStage. That means no "Return" Export table parameter(Dont know why it is that way.. but it is :? ).

If the stage is used for Output:

Everything else is the same except:

:!: :!: :!: All table parameters regardless of their definition in SAP( Import or Export) are treated as Export in DataStage.

There also a BAPi Sequence number that is to be used to seperate BAPI calls but i don't remember how that was to be used. The documentation was pretty clear on the use of this number though.

Its been a while since I've seen the BAPI stage so i might be wrong about some things but I do remember the :!: :!: :!:'ed parts quite clearly.
Amey Vaidya<i>
I am rarely happier than when spending an entire day programming my computer to perform automatically a task that it would otherwise take me a good ten seconds to do by hand.</i>
<i>- Douglas Adams</i>
Post Reply