SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

WRITE .... AS ICON



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Bugs | Ошибки и особенности разных версий
View previous topic :: View next topic  
Author Message
Armann
Модератор
Модератор



Joined: 01 Jan 2008
Posts: 422
Location: Moscow

PostPosted: Tue Mar 31, 2009 11:17 am    Post subject: WRITE .... AS ICON Reply with quote

Небольшие грабли Smile
Как вы думаете, что выведет вот такой код?
Code:
REPORT  NO STANDARD PAGE HEADING.
INCLUDE <ICON>.

DATA: MY_ICON LIKE ICONS-L2.

 DO 5 TIMES.
   WRITE:/ SY-INDEX, (10) MY_ICON AS ICON.
 ENDDO.

Вот что:
Code:
 1   
 2  ##
 3  ;#
 4  ;#
 5  ;#


Если печати пустой MY_ICON с опцией AS ICON и при явном указании размера поля больше чем описано в словаре - первая строчка выводится как и предполагается - пустой, и в тот же момент значение MY_ICON портится непонятным мусором.
Актуально как минимум для версии 4.0b
Back to top
View user's profile Send private message Blog
mrand
Участник
Участник


Age: 48
Joined: 15 Apr 2008
Posts: 10
Location: москва

PostPosted: Tue Mar 31, 2009 11:52 am    Post subject: Reply with quote

Ошибка в версии 4.6D, WRITE ... AS ICON NO-GAP,
если печатать несколько одинаковых иконок рядом, выводит только первую, вместо остальных пробелы.
Ошибка проявляется только в среднем блоке примера.
Code:
REPORT.

INCLUDE <icon>.

new-line.
write: ICON_LOCKED as icon.
write: ICON_LOCKED as icon.
write: ICON_LOCKED as icon.
write: ICON_LOCKED as icon.
write: ICON_LOCKED as icon.
write: ICON_LOCKED as icon, 'eol'.

new-line.
write: ICON_LOCKED as icon no-gap.
write: ICON_LOCKED as icon no-gap.
write: ICON_LOCKED as icon no-gap.
write: ICON_LOCKED as icon no-gap.
write: ICON_LOCKED as icon no-gap.
write: ICON_LOCKED as icon no-gap, 'eol'.

new-line.
write: ICON_LOCKED   as icon no-gap.
write: ICON_POSITIVE as icon no-gap.
write: ICON_LOCKED   as icon no-gap.
write: ICON_POSITIVE as icon no-gap.
write: ICON_LOCKED   as icon no-gap.
write: ICON_POSITIVE as icon no-gap, 'eol'.
Back to top
View user's profile Send private message Blog
Armann
Модератор
Модератор



Joined: 01 Jan 2008
Posts: 422
Location: Moscow

PostPosted: Tue Mar 31, 2009 12:07 pm    Post subject: Reply with quote

mrand, в 4.0 аналогично.
Видимо WRITE не всегда может корректно определить выводимый размер значка, помогает если явно указать:
Code:
WRITE: (3) ICON_LOCKED AS ICON NO-GAP.
WRITE: (3) ICON_LOCKED AS ICON NO-GAP.
WRITE: (3) ICON_LOCKED AS ICON NO-GAP.
WRITE: (3) ICON_LOCKED AS ICON NO-GAP.
WRITE: (3) ICON_LOCKED AS ICON NO-GAP.
WRITE: (3) ICON_LOCKED AS ICON NO-GAP, 'eol'.
Back to top
View user's profile Send private message Blog
mrand
Участник
Участник


Age: 48
Joined: 15 Apr 2008
Posts: 10
Location: москва

PostPosted: Tue Mar 31, 2009 12:52 pm    Post subject: Reply with quote

Не помогает. Если указать (3), то исчезнет эффект NO-GAP, и будет пробел между иконками.
Back to top
View user's profile Send private message Blog
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Bugs | Ошибки и особенности разных версий All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.