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

write statement

Former Member
0 Likes
753

(65) '(c) Interest due on Government securities',l_cv,(10)'257',l_cv,(20)' ',l_cv.

in the above statement if i want to replace length with variable what i have to do means i want below statement

data : lv_col1 value 65,

lv_col2 value 10,

lv_col3 value 20.

(lv_col1) '(c) Interest due on Government securities',l_cv,(lv_col2)'257',l_cv,(lv_col3)' ',l_cv.

but when i does this it gives me error that lv_col1 is not defined by data statement

Pls help.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
729

now it gives error

"statment concluding with "...L_CV" ended unexpectedly.

7 REPLIES 7
Read only

Former Member
0 Likes
729

Hi,

refering type is missing

data : lv_col1 type i value 65,

lv_col2 type i value 10,

lv_col3 type i value 20.

Plzz reward points if it helps.

Read only

Former Member
0 Likes
729

i have written following statement

DATA: lv_col1 type i value 20.

DATA: lv_col2 type i value 20.

DATA: lv_col3 type i value 20.

WRITE : /3 l_cv,

(lv_col1) 'Item Name',l_cv,(lv_col2) 'Item Code',l_cv,

(lv_col3) 'Amount',l_cv.

it gives error as "field lv_col1 is unknown"

Read only

0 Likes
729

write as follows

WRITE at:/ 3 l_cv,

(lv_col1) 'Item Name',

(lv_col2) l_cv,

(lv_col3) 'Item Code',

(lv_col4) l_cv,

(lv_col5) 'Amount'.

Read only

Former Member
0 Likes
730

now it gives error

"statment concluding with "...L_CV" ended unexpectedly.

Read only

0 Likes
729

write as follows ...

WRITE at:/3 l_cv,

(lv_col1) 'Item Name',

(lv_col2) l_cv,

(lv_col3) 'Item Code',

(lv_col4) l_cv,

(lv_col5) 'Amount'.

Read only

0 Likes
729

Hi,

check the comma, ' ' in the above statement and in that statement.

Read only

Former Member
0 Likes
729

check this...


DATA : l_cv(4) VALUE 'test'.

DATA : l_cv_len TYPE i VALUE 4,
       lv_col1 TYPE i VALUE 65,
       lv_col2 TYPE i VALUE 10,
       lv_col3 TYPE i VALUE 20.
*(65) '(c) Interest due on Government securities',l_cv,(10)'257',l_cv,(20)' ',l_cv.

WRITE AT:/(l_cv_len) l_cv,
(lv_col1) '(c) Interest due on Government securities',
(l_cv_len) l_cv,
(lv_col2) '257',
(l_cv_len) l_cv,
(lv_col3) ' ',
(l_cv_len) l_cv.