‎2009 Dec 23 8:53 AM
HI All ,
I want to solve warning issue but i am not sure that I know how .
I have 3 fields type string which in need to split but i get warning
The VALUE specification is longer than the corresponding field. The
VALUE specification will only be passed to the field length! DATA:
lv_prefix TYPE string,
lv_domain TYPE string.
SPLIT iv_prefix AT lc_sperator INTO lv_prefix lv_domain.
iv_prefix is type string .
Any idea how can i avoid this warning?
Regards
Chris
‎2009 Dec 23 8:56 AM
I just tried this and got no warning:
CONSTANTS: lc_seperator TYPE c LENGTH 1 VALUE ';'.
DATA:
lv_prefix TYPE string,
lv_domain TYPE string,
iv_prefix TYPE string.
SPLIT iv_prefix AT lc_seperator INTO lv_prefix lv_domain.If I change it to: CONSTANTS: lc_seperator TYPE c LENGTH 1 VALUE 'abcd'. Then I do get the warning.
How is lc_seperator defined?
matt
‎2009 Dec 23 8:56 AM
I just tried this and got no warning:
CONSTANTS: lc_seperator TYPE c LENGTH 1 VALUE ';'.
DATA:
lv_prefix TYPE string,
lv_domain TYPE string,
iv_prefix TYPE string.
SPLIT iv_prefix AT lc_seperator INTO lv_prefix lv_domain.If I change it to: CONSTANTS: lc_seperator TYPE c LENGTH 1 VALUE 'abcd'. Then I do get the warning.
How is lc_seperator defined?
matt
‎2009 Dec 23 8:59 AM
The VALUE specification is longer than the corresponding field. The
VALUE specification will only be passed to the field length!
warning appers when you define some variablw with char and assign it some value and you are not assigning as many characters as the value required
please assign char4 if you are using value of 4 characters in lv_seperator.
‎2009 Dec 23 9:01 AM
Hi,
I did this as mentioned below :
DATA:
lv_prefix TYPE string,
lv_domain TYPE string.
Constants : lc_seprator value ','.
lv_prefix = 'This is a test, do it.'.
SPLIT lv_prefix AT lc_seprator INTO lv_prefix lv_domain.
But I did not get any warning.
Regds,
Lalit