2008 Nov 03 12:30 PM
hi experts,
pls check the follwing code and give me a solution.
REPORT zchandan.
TABLES: zchandan.
data: zc type zchandan.
select-options: emp_id for zc-zempid,
emp_nm for zc-zempnm.
data : itab2 like table of zchandan with header line.
data: itab1 like itab2.
itab2-zempid = emp_id.
itab2-zempnm = emp_nm.
append itab2.
move-corresponding itab2 to
itab1.
write : / itab2-zempid , itab2-zempnm.
write : / itab1-zempid , itab1-zempnm.
insert zchandan from table itab2.
i am getting error as follows:
"ITAB2-ZEMPID" and "EMP_ID" are not mutually convertible in a Unicode
pls reply me quickly
2008 Nov 03 12:42 PM
Hi..
Lets make some changes to the code and check:
REPORT zchandan.
TABLES: zchandan.
data: zc type zchandan-zempid. "First Change.
select-options: emp_id for zc,
emp_nm for zc-zempnm.
data : itab2 type standard table of zchandan with header line. "Second Change.
data: itab1 like. itab2.
itab2-zempid = emp_id.
itab2-zempnm = emp_nm.
append itab2.Please make the changes and revert back.
Regards,
Vishwa.
If you don't want to change the code go to the properties of the report and change the option Ctr. unicode active (is a checkbox).
2008 Nov 03 12:41 PM
Hi,
emp_id is a select-options.
use like this..
zitab2-empid = emp_id-low.
or define emp_id as a parameters.
Rgds,
2008 Nov 03 12:42 PM
Hi..
Lets make some changes to the code and check:
REPORT zchandan.
TABLES: zchandan.
data: zc type zchandan-zempid. "First Change.
select-options: emp_id for zc,
emp_nm for zc-zempnm.
data : itab2 type standard table of zchandan with header line. "Second Change.
data: itab1 like. itab2.
itab2-zempid = emp_id.
itab2-zempnm = emp_nm.
append itab2.Please make the changes and revert back.
Regards,
Vishwa.
2008 Nov 03 12:44 PM
>
> itab2-zempid = emp_id.
> itab2-zempnm = emp_nm.
> Regards,
>
> Vishwa.
Still SELECT-OPTIONS. So that won't work.
2008 Nov 03 12:52 PM
It should work. Just checked..maybe you would also like to check in ur system first...
I think the declarations...should be same...
Vishwa.
2008 Nov 03 1:09 PM
>
> It should work. Just checked..maybe you would also like to check in ur system first...
>
> I think the declarations...should be same...
>
> Vishwa.
So you guys work on the same system as you checked with custom table ZCHANDAN?
2008 Nov 03 1:11 PM
OK. I never said I checked the very same code. I said just checked, that means..a code similar to that.... Is that clear?
2008 Nov 03 1:27 PM
Clear enough. But still i'm not convinced it will work.
Last time i checked, a select-options always has the structure of SIGN/OPTION/LOW/HIGH
And with the assignment of FIELD1 = SELECT-OPTIONS (as you suggest) will force all values into that field.
So should you enter the value 10 in your select-options, the data will look like 'IEQ10'. And that's what you're passing to the single field.
But hey... just trying to help.
Good luck!
2008 Nov 03 1:35 PM
OK. Maen!!!! I am sorry...I just checked the syntax part. Sorry If I was rude.
You are absolutely right....It should be like this:
itab2-zempid = emp_id-low.
itab2-zempnm = emp_nm.Regards,
Vishwa.
2008 Nov 03 12:48 PM
Hi suresh,
try this code
REPORT zchandan.
TABLES: zchandan.
data: zc type zchandan.
select-options: emp_id for zc-zempid,
emp_nm for zc-zempnm.
data : itab2 like table of zchandan with header line.
data: itab1 like itab2.
field-symbols : <fs1> type any.
assign emp_id to <fs1>.
move <fs1> to itab2-zempid.
field-symbols : <fs2> type any.
assign emp_nm to <fs2>.
move <fs2> to itab2-zempnm.
move-corresponding itab2 to
itab1.
write : / itab2-zempid , itab2-zempnm.
write : / itab1-zempid , itab1-zempnm.
insert zchandan from table itab2.
2008 Nov 03 12:49 PM
>
>
> field-symbols : <fs1> type any.
> assign emp_id to <fs1>.
> move <fs1> to itab2-zempid.
>
> field-symbols : <fs2> type any.
> assign emp_nm to <fs2>.
> move <fs2> to itab2-zempnm.
Still SELECT-OPTIONS!!!!!! Even this won't work unless you start using LOW or HIGH of the select-options!!!
A select-options has the following fields:
LOW
HIGH
SIGN
OPTION
LOW and HIGH holds the values you enter in the selection screen.
Doing itab2-zempid = emp_id means you putting the all values to ZEMPID, e.g. IEQ10000.
2008 Nov 03 2:25 PM
If you don't want to change the code go to the properties of the report and change the option Ctr. unicode active (is a checkbox).
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |