we want to extract Data from multiple SAP-Host-Systems worldwide using an SAP-BAPI-Call.
Unfortunately it seems to be possible to parameterize Usernames, Passwords, Language and Client-Id on the SAP-BAPI-Stage, but not the DataStage Connection to SAP itself, namely the Application Server name and the System number.
This would mean: If we want to launch the same BAPI-Call on 6 different SAP-Hosts, we need 6 jobs to do this. Has anybody got a better idea?
"It is not the lucky ones are grateful.
There are the grateful those are happy." Francis Bacon
I found this topic while I was trying to do the same thing. I know this is old, but I found a solution and thought I'd share it to help the next guy.
We have DS 8.5 Enterprise and R/3 pack 6.5.1. We use ABAP RFC, but I believe it will work for other SAP stages.
--------
The SAP stage does allow you to set the connection via parameter, but it is not obvious on how to do it. There seems to be two types of connection values, one for design time and another for run-time. Parameters can only be used for run-time.
On the General tab, set the design time connection by using the "Select" option and choose one of the connections you defined using SAP Admin. This is for ALL designer function to SAP. (Validate Stage, Build, Generate Program, Load Program etc.)
Now add connection parameter by selecting "Use Job Parameter", this will bring up a dialog box with free-form text that defaults to "Connection". This value must be an existing parameter name, or you will be prompted to create it. We use parameter sets, so I used "SAP_ABAP.pSapConn", which is defined by us. When you click 'Ok' you will find the parameter name is in typical DS format enclosed in parenthesis, just to the right of your design-time connection value. In my case, BRD is our development connection, so I get "BRD (#SAP_ABAP.pSapConn#)"
The next step is to populate SAP Logon Fields with job parameters in the standard DS format. We use the same parameter set, so I have values #SAP_ABAP.pSapUser#, #SAP_ABAP.pSapClient# etc.
Compile then run the job. Enter the connection you wish to use (as defined in SAP Admin client), and the parameter should replace the design-time value.
Last edited by bashbal on Mon Feb 13, 2012 10:48 am, edited 1 time in total.