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 Problem

Former Member
0 Likes
854

Hi friends,

1. i am moving structure offset ex: struct+9(33) to

character length.

ex: move struct+9(33) to char.

2. how to display ICON using write at command.

please help me. it is urgent.

thanks

shivakumar

HP-GDIC

8 REPLIES 8
Read only

Former Member
0 Likes
802

2.

report zreport.

include <icons>.

write '123' as icon.

check this..

vijay

please calrify the first one.

Read only

0 Likes
802

1.

data: x_mara like mara.

data: char(100).

move x_mara+9(33) to char.

Read only

0 Likes
802

Hi Vijay,

thanks for your reply. the problem is that we can not use write statement directly we need to use Write at only for characters. The problem is how to display the Icon in write at statement.

thanks

shivakumar

Read only

0 Likes
802

hi,

go to table ICON and check the ID's.

take them and just save it to char variable.

data: char(4) ;

char = 'ICONID'.

write char as icon.

this will do..

Regards

vijay

Read only

Former Member
0 Likes
802

Hi.

You can´t use the move or write statement for structures with the offset/length-option which are not character-like.

More exactly: You can do the move or write statement only for the most left character like part of the structure. To get this character like part you have to analyse each field of the structure from the left side and until the first not-character-like field (floating-Point, packed, ...) the statement will work. This is caused by the 1byte/2byte memory requirement in a Unicode system.

Hope this helps.

wbr

Michael

Read only

0 Likes
802
REPORT  ztest.

include <icons>.

data: x_vbap like vbap.
data: char(100).

select * from vbap
up to 1 rows into x_vbap.
endselect.
 move x_vbap+9(33) to char.
"first  
 write: char.
"second answer
 write '123' as icon.

just copy paste the above code and check...

Read only

0 Likes
802

Hi (once again me).

There is a method cl_abap_container_utilities=>fill_container_c

to fill a structure (also not-character-like) in a container (e.g. CHAR255).

data: container(255).

CALL METHOD cl_abap_container_utilities=>fill_container_c

EXPORTING

im_value = wa_mara

IMPORTING

ex_container = container

EXCEPTIONS

illegal_parameter_type = 1

OTHERS = 2.

IF sy-subrc <> 0.

RAISE error.

ENDIF.

write container+9(33). "this will work.

wbr Michael

Read only

Former Member
0 Likes
802

Hi,

thanks for ur reply.

here the problem is that i have to write a dynamic program all the tables. i having around 200 tables which are to be uploaded. i could not go for LSMW because of this problem.

the user has to enter the filename and the table name and the corresponding table has to be updated.

thanks

shiva