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

REUSE_ALV_GRID_DISPLAY_LVC и заголовок



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP
View previous topic :: View next topic  
Author Message
Tomatos
Участник
Участник


Age: 38
Joined: 20 Sep 2010
Posts: 24

PostPosted: Mon Aug 20, 2012 2:04 pm    Post subject: REUSE_ALV_GRID_DISPLAY_LVC и заголовок Reply with quote

Добрый день!

Необходимо вверху отчета, выводимом посредством REUSE_ALV_GRID_DISPLAY_LVC вывести название отчета + дата.
При этом данная информация должна попадать в распечатку.

Можно это реализовать?
Back to top
View user's profile Send private message
alezhu
Специалист
Специалист



Joined: 29 Apr 2012
Posts: 86
Location: Spb

PostPosted: Mon Aug 20, 2012 2:20 pm    Post subject: Reply with quote

Название можно вывести через статус (SET PF-STATUS), либо в событии TOP_OF_PAGE. Насчет попадания в распечатку - не в курсе.
Back to top
View user's profile Send private message
Tomatos
Участник
Участник


Age: 38
Joined: 20 Sep 2010
Posts: 24

PostPosted: Mon Aug 20, 2012 3:46 pm    Post subject: Reply with quote

Можно как нибудь передать переменную в i_grid_title ?
Back to top
View user's profile Send private message
Shvetz
Специалист
Специалист



Joined: 05 Oct 2007
Posts: 53

PostPosted: Tue Aug 21, 2012 12:53 pm    Post subject: Reply with quote

i_grid_title должен попадать в распечатку, можно посмотреть в пункте меню Список->Просмотр перед печатью.
В эту переменную можно и дату вогнать вместе с текстом.
Back to top
View user's profile Send private message
Tomatos
Участник
Участник


Age: 38
Joined: 20 Sep 2010
Posts: 24

PostPosted: Tue Aug 21, 2012 1:11 pm    Post subject: Reply with quote

Shvetz wrote:
i_grid_title должен попадать в распечатку, можно посмотреть в пункте меню Список->Просмотр перед печатью.
В эту переменную можно и дату вогнать вместе с текстом.


i_grid_title попадает в распечатку, но как в эту переменную вогнать дату с текстом?

Если указывать переменную (i_grid_title = text ), то система выпадает в ABAP ошибку.
Back to top
View user's profile Send private message
Shvetz
Специалист
Специалист



Joined: 05 Oct 2007
Posts: 53

PostPosted: Tue Aug 21, 2012 1:16 pm    Post subject: Reply with quote

Наверное вы тип переменной не тот используете. Переменная должна быть типа LVC_TITLE для параметра i_grid_title. Дампа 100% от этого в этом случае не будет.

Дату вогнать легко, надо сначала использовать WRITE date TO date_text. Потом CONCATENATE some_text date_text INTO some_lvc_title. Условно так.
Back to top
View user's profile Send private message
firacat
Специалист
Специалист



Joined: 20 Apr 2011
Posts: 80
Location: Ukraine

PostPosted: Tue Aug 21, 2012 1:29 pm    Post subject: Reply with quote

Tomatos, Shvetz прав Вы наверно тип неправильно прописали попробуйте ниже пример Smile


Code:


DATA:
          gs_saplane TYPE saplane,
          gt_saplane TYPE TABLE OF saplane.



SELECT * FROM saplane INTO TABLE gt_saplane.

TYPE-POOLS slis.

DATA:
  gt_fieldcat TYPE slis_t_fieldcat_alv,
  gv_title TYPE lvc_title.


CONCATENATE  'SAP Table SAPLANE contents - '  sy-datum INTO gv_title.

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
  i_program_name = SY-REPID
  i_structure_name = 'SAPLANE'
CHANGING
  ct_fieldcat = gt_fieldcat.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
  it_fieldcat = gt_fieldcat
  i_grid_title = gv_title
TABLES
  t_outtab = gt_saplane.

Back to top
View user's profile Send private message
Tomatos
Участник
Участник


Age: 38
Joined: 20 Sep 2010
Posts: 24

PostPosted: Tue Aug 21, 2012 2:04 pm    Post subject: Reply with quote

Спасибо! Работает!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP 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.