Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

help need with data declarations and there effects

Former Member
0 Likes
621

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
591

Hi Preeti,

The first way is the right way.

Regards,

Atish

6 REPLIES 6
Read only

Former Member
0 Likes
592

Hi Preeti,

The first way is the right way.

Regards,

Atish

Read only

Former Member
0 Likes
591

Looks like correct way

I hope you do not get any errors.

Read only

Former Member
0 Likes
591

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\

Read only

0 Likes
591

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

Read only

0 Likes
591

Hi ,

Thankyou guys

Read only

Former Member
0 Likes
591

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.