‎2008 Feb 12 9:19 AM
(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.
‎2008 Feb 12 9:45 AM
now it gives error
"statment concluding with "...L_CV" ended unexpectedly.
‎2008 Feb 12 9:24 AM
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.
‎2008 Feb 12 9:27 AM
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"
‎2008 Feb 12 9:35 AM
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'.
‎2008 Feb 12 9:45 AM
now it gives error
"statment concluding with "...L_CV" ended unexpectedly.
‎2008 Feb 12 9:49 AM
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'.
‎2008 Feb 12 9:55 AM
Hi,
check the comma, ' ' in the above statement and in that statement.
‎2008 Feb 12 10:14 AM
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.