‎2007 Jun 15 2:25 AM
Hi ,
CAN ANYONE TELL ME HOW TO DECLARE QUANTITY AND CURRENCY FIELDS IN ORDER PREVENT AN UNICODE ERROR
data: begin of itab,
BUKRS LIKE BKPF-BUKRS,
AUGDT LIKE BSEG-AUGDT,
WRBTR LIKE BSEG-WRBTR, " currency
end of itab.
this is the code in 4.6c
This is how iam declaring in ecc 6.0 system with unicode
data: begin of itab,
BUKRS LIKE BKPF-BUKRS,
AUGDT LIKE BSEG-AUGDT,
WRBTR(17) type c, " currency
end of itab.
is the right way declaration or should i declare the same as i did in 4.6c but when i did the same way
as in 4.6c i had issues with
DESCRIBE FIELD Itab LENGTH LEN IN CHARACTER MODE.
let me know which is the right way to declare in ecc 6.0 with unicode
‎2007 Jun 15 2:27 AM
‎2007 Jun 15 2:27 AM
‎2007 Jun 15 2:32 AM
‎2007 Jun 15 2:46 AM
Hi,
when you say the first way, you mean this
data: begin of itab,
BUKRS LIKE BKPF-BUKRS,
AUGDT LIKE BSEG-AUGDT,
WRBTR LIKE BSEG-WRBTR, " currency
end of itab.
or the other
data: begin of itab,
BUKRS LIKE BKPF-BUKRS,
AUGDT LIKE BSEG-AUGDT,
WRBTR(17) type c, " currency
end of itab.
.If i declare this way
data: begin of itab,
BUKRS LIKE BKPF-BUKRS,
AUGDT LIKE BSEG-AUGDT,
WRBTR LIKE BSEG-WRBTR, " currency
end of itab.
iam getting error in following code
DESCRIBE FIELD Itab LENGTH LEN IN CHARACTER MODE.
as
error : "ITAB" must be a character-type field (data type C, N, D, or T).
if i declare
data: begin of itab,
BUKRS LIKE BKPF-BUKRS,
AUGDT LIKE BSEG-AUGDT,
WRBTR(17) type c, " currency
end of itab.
can i get the data from the table directly in wrbtr
say
select single wrbtr from bseg into itab-wrbtr where -
does it gives any wrrors orthis statement is ok
let me know
thanks\
‎2007 Jun 15 2:54 AM
Hi Preeti,
the first way of declaration is correct, but you can't use this with DESCRIBE.
And the second way WRBTR(17) will not give you any error in the select statement.
So If you want to use DESCRIBE then define it as WRBTR(17) but it is not the proper way, instead you can move itab to any STRING type field and then use DESCRIBE.
Reward points if useful.
Regards,
Atish
‎2007 Jun 15 3:02 AM
‎2007 Jun 15 2:52 AM
Hello Preeti,
Declare like this - Calculation
data: begin of itab,
BUKRS LIKE BKPF-BUKRS,
AUGDT LIKE BSEG-AUGDT,
WRBTR LIKE BSEG-WRBTR, " currency
end of itab.
if you do not have any calculation
data: begin of itab,
BUKRS LIKE BKPF-BUKRS,
AUGDT LIKE BSEG-AUGDT,
WRBTR(17) type c, " currency
end of itab.