‎2005 Aug 16 7:27 AM
Hi all
I had activated the unicode checks in abap program.Now i am facing problem in program which have Read DATAset clause. In Unicode wherevr i know we can download the file from app. server in string type. Now when i am splitting the screen using offset its working perfect for the fields that are of char type.But for the database fields that are type P are throwing short dumps.For Ex:
t_itab-bdmeng = w+strng120(12).
bdmeng(type p field)
w+strng120(12). string that has fetch value from app. server of type p value.
At this point it gave short dump.And the Dump says that t_itab-bdmeng is type p and therefore not compatible.
So the main prblm is when i fetch the type p value from application server into string type and then pass the value to type p Database field this gaves error.
So can please anyone suggest the solution for this.
It will be great help.
‎2005 Aug 16 7:48 AM
Hi,
so "clean" w+strng120(12) (with replace or translate) with a help-field (type char)
before moving to p-field
Andreas
‎2005 Aug 16 8:16 AM
Hi,
Avoid accessing the structure using offset & length instead create a new structure of type char components and move data into it. now access it using component name.
Here is an example given by SAP.
*& Report TECHED_UNICODE_SOLUTION_3 *
REPORT teched_unicode_solution_3 .
Exercise 3: Accessing structures with offset or length
before Unicode enabling
types:
begin of PART1,
F1(10) type C,
F2(10) type C,
F3(10) type C,
F4(10) type C,
F5(10) type C,
end of PART1.
data: begin of STRUC1,
F0 type I.
include type PART1 as INCL1.
data: F6 type P,
end of STRUC1,
CF(50) type C,
begin of STRUC2,
F0 type I value 42,
F1 type I value 12,
F2 type I value 34,
F3 type I value 56,
F4 type I value 78,
F5 type I value 90,
end of STRUC2.
move-corresponding STRUC2 to STRUC1.
cf = struc1+4(50). " <-------- Unicode error !!!
CF = STRUC1-INCL1.
condense CF.
write: / CF.
‎2005 Aug 16 10:17 AM
hello
can anyone suggest some solution or this issue.
Its not clear from this examples.Can anyone please help on this...
thanks
anu
‎2005 Aug 16 11:13 AM
i just created a sample program and it works fine.(unicode system)
data: a type p decimals 2.
data: b type string .
move: '000123456.780' to b .
a = b+3(10) .
write:/ a .can you try this code in your system and let us know.
also give us the exact dump analysis details.
Regards
Raja
‎2005 Aug 16 11:33 AM
HI
i have differnet problem.i am downloading the data frm application server into string. And then using offset.And then the offset value to mo ve to type p variable.And the offset is of string type.
At this point it creates the prblm. so i need help on this..pplz help
‎2005 Aug 16 11:55 AM
Hi Anu,
Can you post the source & target structure definitions?
Best Regards,
Vijay
‎2005 Aug 16 12:13 PM
DATA:w_struct(1160) TYPE c.
tab_wa-matnr = w_struct+221(18).
tab_wa-crd = w_struct+239(8).
tab_wa-ffd = w_struct+247(8).
tab_wa-edatu = w_struct+255(8).
tab_wa-shpd = w_struct+263(8).
ASSIGN w_struct+297(13) to <f2> CASTING type P DECIMALS 2.
MOVE <f2> TO tab_wa-oqty.
x3 = w_struct+310(11).
ASSIGN w_struct+310(11) to <f1> CASTING type P DECIMALS 2.
MOVE <F1> TO tab_wa-netpr.
Now if i ran the report it gaves short dump..
1.Unable to interpret "IS000" as a number.
or
2.A calculation field is defined too small
plz suggest the solutions for this
‎2005 Aug 16 12:21 PM
Hi Anu,
Can u post the definition of the structure TAB_WA?
Rgds,
Vijay
‎2005 Aug 16 12:37 PM
HI
THE tab_wa TYPE zsr08_sodextr,
WHERE zsr08_sodextr IS LIKE ZSODEXTR.WHICH IS DATABASE TABLE
.