‎2006 Jan 09 6:39 AM
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
‎2006 Jan 09 6:45 AM
2.
report zreport.
include <icons>.
write '123' as icon.
check this..
vijay
please calrify the first one.
‎2006 Jan 09 6:48 AM
1.
data: x_mara like mara.
data: char(100).
move x_mara+9(33) to char.
‎2006 Jan 09 7:01 AM
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
‎2006 Jan 09 7:12 AM
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
‎2006 Jan 09 6:52 AM
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
‎2006 Jan 09 6:57 AM
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...
‎2006 Jan 09 7:03 AM
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
‎2006 Jan 10 5:40 AM
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