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

button in toolbar



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



Joined: 28 Nov 2012
Posts: 14

PostPosted: Wed Feb 27, 2013 11:21 am    Post subject: button in toolbar Reply with quote

Хочу добавить кнопку в алв, реализованный методом REUSE_ALV_GRID_DISPLAY, подскажите как мне это сделать? мой метод убирает существующие уже в алв кнопки, а они мне нужны тоже:
Code:

REPORT  zvenkat_notepad.
" Fieldcatalog creation manually

DATA: BEGIN OF i_mard OCCURS 0,
        matnr TYPE mard-matnr,
        werks TYPE mard-werks,
      END OF i_mard.
TYPE-POOLS:slis.
DATA:i_fieldcat TYPE slis_t_fieldcat_alv,
     w_fieldcat LIKE LINE OF i_fieldcat.

w_fieldcat-fieldname = 'MATNR'.
w_fieldcat-tabname = 'I_MARD'.
w_fieldcat-seltext_m = 'Material No'.
APPEND w_fieldcat TO i_fieldcat.
CLEAR w_fieldcat.
w_fieldcat-fieldname = 'WERKS'.
w_fieldcat-tabname = 'I_MARD'.
w_fieldcat-seltext_m = 'Plant'.
APPEND w_fieldcat TO i_fieldcat.
CLEAR w_fieldcat.

SELECT matnr werks FROM mard INTO CORRESPONDING FIELDS OF TABLE i_mard UP TO 100 ROWS.
DATA:l_program TYPE sy-repid VALUE sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
  EXPORTING
    i_callback_program = l_program
    it_fieldcat        = i_fieldcat
*     I_CALLBACK_PF_STATUS_SET       = 'MYSTATUS'
  TABLES
    t_outtab           = i_mard.
IF sy-subrc <> 0.
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.

*FORM SET_MYSTATUS USING RT_EXTAB TYPE SLIS_T_EXTAB.
*  SET PF-STATUS 'MYSTATUS'.
*ENDFORM.
Back to top
View user's profile Send private message
alezhu
Специалист
Специалист



Joined: 29 Apr 2012
Posts: 86
Location: Spb

PostPosted: Wed Feb 27, 2013 1:08 pm    Post subject: Reply with quote

Скопируй статус STANDARD_FULLSCREEN из группы функций, в которой лежит ФМ REUSE_ALV_GRID_DISPLAY, в свою прогу.
Потом добавь в него нужные команды.

При вызове ФМ I_CALLBACK_PF_STATUS_SET = 'SET_MYSTATUS'
В FORM SET_MYSTATUS пишешь SET PF-STATUS 'STANDARD_FULLSCREEN.'
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.