on 12-31-2014 3:25 AM
Hi Expert,
I want to define a variable in fox formula. This variable not the type of any characteristic or key figure in Agg Level. But a Character which length 4.
I tried below:
DATA XXX TYPE STRING.
While that length is 2.
Is there any way to define the string length is 4?
Thanks!
Hi,
DATA XXX TYPE STRING.
where XXX is string variable any length.
but if you want to restrict a string to 4 characters, you can create an InfoObject (YYYY) in BW with CHAR of length 4.Then use it accordingly
DATA XXX TYPE YYYY.
Wish that helps..
Regards,
Bishwajit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I just realize that when I use:
DATA AST TYPE STRING.
Some time the length of AST is 2, some time the length is 3 because I saw another error message when I check another program, which use same type STRING, while the error message say:
Length of Parameter ASTYP(000004) and variable AST(000003) are inconsistent.
So I guess the type STRING is dynamic. I do not know which factor cause it think it should be 2 or 3...
Can anyone advice?
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
As I know type STRING doesn't have a lenght (only maximum 255, or more in the latest BW versions).
So you can't say STRING(4) in FOX.
Do you need exactly 4 characters lenght ?
For which purpose ? May be there is a workaround for it ...
BR,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Andrey,
The reason I need exactly 4 characters is because I will call a function in this fox formula and export a parameter which require length 4.
And at first I do not believe type String have any length as well, well when I use type string and check the formula, below error message pop up. ASTYP is the function interface, AST is the one I use STRING to define.
Thanks!
Dongkai
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.