‎2006 Jan 19 8:23 AM
I am getting a syntax error when I define variables :
data: l_arbei type p.
constants: l_delim type x value '09'.
Message L_ARBEI must be a character-type field (data type C, N, D or T). an open control structure introduced by "INTERFACE"
Has anyone else experienced this problem. Why can I not define these variables.
‎2006 Jan 19 8:34 AM
Hi
where dpes this error occur?
I don't think in defination step: I don't get this message in my system.
Max
‎2006 Jan 19 8:34 AM
Hi
where dpes this error occur?
I don't think in defination step: I don't get this message in my system.
Max
‎2006 Jan 19 8:16 PM
data: l_arbei type p decimals 1,
l_ismnw type p decimals 1.
write w_ops-work_activity to l_arbei.
l_arbei = l_arbei - l_ismnw.
if l_arbei gt 0.
write l_arbei to w_ops-work_activity.
endif.
As mentioned same error message when defining the following:
constants: c_delim type x value '09'.
split i_input1-line at c_delim into
w_hdr-orderid
w_hdr-order_type.
I agree that there should be no problem with the definitions. However cannot understand why it does not like it. Thought there might be an additional requirement for Unicode systems.
‎2006 Jan 19 8:24 PM
Yes unicode system doesnot allow string based commands such as SPLIT to use hex characters as the delimiter. You can use the same command in non-unicode system successfully.
Srinivas
‎2006 Jan 19 8:52 PM
Thanks Srinivas. Is there an alternative for splitting a tab delimited file other than changing input file to use a different delimiter
‎2006 Jan 19 10:56 PM
Use this.
SPLIT i_input1-line AT cl_abap_char_utilities=>horizontal_tab
INTO w_hdr-orderid w_hdr-order_type.
‎2006 Jan 19 11:32 PM
Thanks so much Srinivas - Worked like a charm.
Hope I correctly rewarded you. Clicled on solved problem before I replied
‎2006 Jan 20 12:06 AM
‎2006 Jan 19 8:56 AM
Hi Jill,
are you trying to use the value l_arbei in any operations like
concatenation, substring, replace, translate etc?
For those operations, all the fields used must be of C, N, D, T types only.
Regards,
Ravi
‎2006 Jan 19 9:05 AM
Hi,
it is not because of definition, it is because of your opertaions on the l_arbei.
please check that...
regards
vijay
‎2006 Jan 19 8:49 PM
Thanks for your response. I looked at
move f1 to l_arbei instead of write f1 to l_arbei and that got rid of the error message
(f1 is a char field read from input file).
Still cannot understand the problem with
split f1 at c_delim into g1 g2.
when delim is defined as constant type x value '09' though. Obviously the problem occurs at this statement and not the original definition but not sure what the alternative is. I need to split my input file at the tabs.
‎2006 Jan 19 10:36 AM
where does this error occurs .. coz when i tried the same code in my system, it didnt give me any error...so i think that its not because of this defintion, u might have used this code somewhere else in ur prog. n its the effect of that operation that u got this error.
‎2006 Jan 19 2:07 PM
Your syntax error is coming from the fact that you declared 'l_arbei' as type p, whereas the system is expecting it to be of the specified types wherever it is being used.
Change it to one of the types(in all probability, it will be N unless you need decimals) mentioned and you will be ok.
Srinivas