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

Unicode conversion - Structure has TYPE X field - Conversion problem

Former Member
0 Kudos
574

Hi,

we are working on unicode conversion .

A structure has a field Type x value '22'.

data : begin of retc,

nuhn type c,

hjhj type x value '22',

end of retc.

How to convert this in to unicode compatible as it Dumps ?

Thanks!

Richard A

5 REPLIES 5
Read only

Former Member
0 Kudos
451

Hi Richard,

You need to use the CL_ABAP_CHAR_UTILITIES class to correct these errors. Unicode Systems do not accept type x values. Hence you need to use CHAR here. You can check more regarding Unicode Conversions in ABAPDOCU. Please let me know if you need further info.

Thanks,

Sai

Read only

0 Kudos
451

TYPES: BEGIN OF t_out_mara,

*>> MARA data

matnr(18) TYPE c,

ersda(8) TYPE c, "creation date

ernam(12) TYPE c, "creation by

laeda(8) TYPE c, "date of last change

aenam(12) TYPE c, "name of user who change record

lvorm(1) TYPE c, "deletion flag for all material data (cen)

mtart(4) TYPE c, "material type

matkl(9) TYPE c, "material group

bismt(18) TYPE c, "old material number

meins(3) TYPE c, "base unit of measure

bstme(3) TYPE c, "order unit

wrkst(14) TYPE c, "basic material (basic constituent of mat)

normt(18) TYPE c, "description according to indus. std

labor(3) TYPE c, "lab/office

ekwsl(4) TYPE c, "purchasing value key

brgew(14) TYPE c, "gross weight

ntgew(14) TYPE c, "net weight

gewei(3) TYPE c, "unit of weight

volum(14) TYPE c, "volume

voleh(3) TYPE c, "volume unit

tragr(4) TYPE c, "transportation group

spart(2) TYPE c, "division

wesch(14) TYPE c, "number of GR slips

prdha(18) TYPE c, "product hierarchy

qmpur(1) TYPE c, "QM in procurement

vabme(1) TYPE c, "variable order unit active

kzkfg(1) TYPE c, "indicator: configurable material

xchpf(1) TYPE c, "batch management

mhdhb(6) TYPE c, "total shelf life

mhdlp(5) TYPE c, "storage percentage

kosch(18) TYPE c, "product allocation

mandt(3) TYPE c,

bwvor(1) TYPE c, "Procurement rule

bwscl(1) TYPE c, "Source of supply

*Replacing the hexadecimal(x) type with numeric(n),because

*the default value for hex(x) is equal to 00(found during debuging).

*Hence to replicate the same, type n of length 2 is given which is

*equal to 00.

  • marker(1) TYPE x, "record end marker

marker(1) TYPE c, "record end marker

END OF t_out_mara.

the code like above , what has to be changed ?

Read only

0 Kudos
451

Hi Richard,

[Have a look at this I hope this helps.|http://help.sap.com/saphelp_nw2004s/helpdata/en/79/c554d9b3dc11d5993800508b6b8b11/frameset.htm]

If not let me know.

Thanks,

Sai

Read only

0 Kudos
451

If i use MINCHAR it is coming # in debugging.

Richard A

Read only

0 Kudos
451

it will take null values no need to worry about it.