on 09-11-2013 11:27 AM
Hi ,
I am confusing to use in which case i have to use local and in which case i have to use global variables and also what is the use of parameters in
workflow and dataflow,can any body give a scenario please.
Regards,
prudhvi
Hi Prudhvi,
First of all need to understand the scope for use of the local and global variables...
its similar to what we know in C language:
Global Variables can be acesssed anywhere but local variables have a defined scope in the function or entity where you declare it.
If there is a conflict with same name of global and local variable the it depends upon the the level..if a local variable is declared at that level it will override the value of global variable and its value will be accessed and outside the value of global variable will be accessed.
In BODS scope of these variables are as in table-
Object | Variable / Parameter, which can be created for the Object | Scope of use |
Job | Local variables Global variables | A script or conditional in the job Any object in the job |
Work flow | Local variables Parameters | This work flow or passed down to other work flows or data flows using a parameter. Parent objects to pass local
|
Data Flow | Parameters | A WHERE clause, column mapping, or a function in the data flow. Data flows cannot return output values. |
As for parameters if you want to return any values form a function in script then you can use output parameters and input parameters are used to pass values into the function.
Its better to define variables according to scope and use.
see the below link why global variables should not be used everywhere.
http://www.gulland.com/wp/?p=727
Regards,
Rishabh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prudhvi,
if you want to use same value of the variable in every component of job then you can use global .
If different values are to be used in different components like in workflows then you can use local variable.
Regards,
Ankit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
SAP DS reference guide gives detailed information on local and global variables.
Check this for some info - http://www.dwbiconcepts.com/business-intelligence-forum/how-to-define-local-global-variables-at-job-...
Arun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.