‎2008 Feb 20 9:23 AM
hi all ,
we get unicode syntax error for the statement
EXPORT d1200 TO MEMORY ID 2.
Error discription is -
-
2 must be a character-type field (data type C, N, D, or T) . "INTERFACE".
We get similar error in import statement as well.
Please refer this code ..........
DATA: BEGIN OF d1200,
form LIKE mard-matnr,
formbez LIKE makt-maktx,
labst(10),
zeichnr LIKE drad-doknr,
zeichnr1 LIKE drad-doknr,
produktion_brutto(08) TYPE p, " (16) type c
reparatur(08) TYPE p,
zaehlerstand(16),
maxprod(08) TYPE p,
kapazitaet(06) TYPE p DECIMALS 2,
hoehe(07),
gewicht(07),
netto-gesamt(07) TYPE p,
ausschuss-gesamt(07) TYPE p,
brutto-gesamt(07) TYPE p,
restmenge(07) TYPE p,
*mico20000430
*notwendig für korrekte Anzeige in Druckliste
restmenge(08) TYPE p,
datenuebernahme(16),
menge(08) TYPE p decimals 0 ,
maxprod2(08) TYPE p decimals 0,
umwertung(08) TYPE p decimals 0,
ohnefa(08) TYPE p decimals 0,
charge like mchb-charg,
fhmnr LIKE mara-matnr,
END OF d1200.
EXPORT d1200 TO MEMORY ID 2.
‎2008 Feb 20 9:31 AM
Hi
Write it in this way:
constants: gc_id(3) TYPE c VALUE '<replace with 3 digit id>'
example. gc_id(3) TYPE c VALUE 'ABC'.
EXPORT d1200 FROM d12001 TO MEMORY ID gc_id.
Thanks
Vijay
PLZ reward points if helpful
‎2008 Feb 20 9:38 AM
hi Kunal,
Memory id is just a name given to Memory Space. it can be of any length.
u just need to give the name in Quotes.
Eg - '123ABC'.
Hope it helps.
Reward points if useful.
Regards,
Preeti
‎2008 Feb 20 10:10 AM
Unicode systems have a problem in that you can't define stuff as type X. Structures also have to be properly "bounded". You can also no longer rely on code such as field1+7(9) .
You could define your structure as a STRING and delimit the fields with say a tab symbol ( use the attribute in cl_abap_utilities to get the tab char in a unicode system).
.
export the string to memory.
on the import end use the SPLIT command on the string to re-create your data elements.
You will then have to manage the decimal arithmetic yourself.
It's a pain - but that's largely the point of Unicode --everything is treated as TYPE C.
Structures containing anything other than type C data are also a real problem if you want to upload / download data. Handling Binary files is a nightmare.
There are some SAP supplied utilities / notes / documentations on converting to a Unicode system.
Cheers
jimbo