‎2007 Jun 14 6:54 PM
Hi all,
This is an uniicode error
can anyone tell me how to fix this
data: begin of itab,
BUKRS LIKE BKPF-BUKRS,
AUGDT LIKE BSEG-AUGDT,
WRBTR LIKE BSEG-WRBTR,
end of itab.
CLEAR Itab WITH '/'.
error : "ITAB" must be a character-type data object (data type C, N, D, T or STRING).
‎2007 Jun 14 7:03 PM
Change it to
data: begin of itab,
BUKRS LIKE BKPF-BUKRS,
AUGDT LIKE BSEG-AUGDT,
WRBTR LIKE BSEG-WRBTR,
end of itab.
CLEAR: Itab-bukrs WITH '/',Itab-augdt WITH '/',Itab-wrbtr.~Suresh
‎2007 Jun 14 7:03 PM
Change it to
data: begin of itab,
BUKRS LIKE BKPF-BUKRS,
AUGDT LIKE BSEG-AUGDT,
WRBTR LIKE BSEG-WRBTR,
end of itab.
CLEAR: Itab-bukrs WITH '/',Itab-augdt WITH '/',Itab-wrbtr.~Suresh
‎2007 Jun 14 7:03 PM
Hi,
Instead of WRBTR you need to take TYPE C with the Lenght 17
Regards
Sudheer
‎2007 Jun 14 7:10 PM
hi,
so all the currency, quantity fields has to be declarred as character i,.e type c.
Ashok, is there a particular reason who choose to declare
WRBTR you need to take TYPE C with the Lenght 17
,im thinking its always better to a have an extra length than its actual otlength which in this case 16 so you choose 17 .Thats the reason behind it let me know if iam wrong
and one more thing which approach is better i.e decllaring as type c or clearing all fields individually
let me know thanksagain
‎2007 Jun 14 7:21 PM
I would say that <i>clearing all fields individually</i> is the way to go, there is not reason to translate the currency fields to character, simply so you can save some lines of code to clear the value. Just clear them individually. You are gonna have to start getting used to this in unicode environments.
Regards,
Rich HEilman
‎2007 Jun 14 7:31 PM
Hi Rich,
even when i try to do
CLEAR: Itab-bukrs WITH '/',Itab-augdt WITH '/',Itab-wrbtr WITH '/'.
i gives me an error mess saying
"ITAB-WRBTR" must be a character-type data object (data type C, N, D, T
or STRING).
let me know is there a way to over come this
with changing to character type
‎2007 Jun 14 7:33 PM
Hi,
in 4.6c
after
clear : Itab-wrbtr WITH '/'.
itab-wrbtr has a value like this 7<7<7<7<7<7.<7 instead of //////..
let me know
‎2007 Jun 14 7:37 PM
What is the use of using the WITH clause for this field? / of course can not be a value of a currency field. This is basic ABAP.
If you want to initialize a currency field it must have a numeric value such as 0.
There is no need for the WITH extension in this case.
clear itab-wrbtr.Regards,
Rich Heilman
‎2007 Jun 14 7:38 PM
‎2007 Jun 14 7:49 PM
Hi Rich,
i decided to tojust go with
clear :itab-WRBTR .
now i have a statement
DESCRIBE FIELD Itab LENGTH LEN IN CHARACTER MODE.
data: begin of itab,
BUKRS LIKE BKPF-BUKRS,
AUGDT LIKE BSEG-AUGDT, " CLEARING DATE
WRBTR LIKE BSEG-WRBTR,
end of itab.
error :
"ITAB" must be a character-type field (data type C, N, D, or T).
Rich , ifi change to char would be there anyother issues while the program is being executed
and i should declare a charcter more than its output length if i want to change it to character field.
let me know
‎2007 Jun 14 7:52 PM
‎2007 Jun 14 8:06 PM
HI Rich,
it doesn't give me the error .
The length which we get in byte mode will be different from the length we get in 4.6c version right
Let me know
thanks