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

Export SAPSCRIPT



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP
View previous topic :: View next topic  
Author Message
den
Старший специалист
Старший специалист



Joined: 11 Oct 2007
Posts: 103

PostPosted: Fri Nov 26, 2010 6:10 pm    Post subject: Export SAPSCRIPT Reply with quote

Здравствуйте!
Задача, сделать выгрузку или предпросмотр из sapcript в Excel.
Можно ли прикрутить какую-нибудь кнопку в Toolbar или добавить новуй пункт к меню System - List - Save - As Excel или в любом другом месте меню, чтобы добавить собственную функциональность для экспорта в Эксель?

Печатная форма вызывается из vf31. Или к меню vf31 новую кнопку добавить - Просмотр в Excel. Вообщем хоть куда-нибудь Smile
Поделитесь опытом, пока ничего не могу найти.
Back to top
View user's profile Send private message
vga
Мастер
Мастер


Age: 70
Joined: 04 Oct 2007
Posts: 1218
Location: Санкт-Петербург

PostPosted: Wed Dec 01, 2010 1:00 pm    Post subject: Reply with quote

Ну я в подпрограмму
FORM entry USING return_code us_screen.
вставлял код, для выбора и запоминания значения перед открытием формы.

Code:
*--{ VGA ECDK936594:insert
  DATA : l_answer.
  DATA : lt_spopli TYPE spopli OCCURS 0 WITH HEADER LINE.

  DO 1 TIMES.
    CHECK nast-kschl EQ 'ZRU1' OR nast-kschl EQ 'ZRU2'.

    IMPORT l_answer = l_answer FROM MEMORY ID 'MEMID_ZERUSR_INVOICE_EXCEL'.
    CHECK NOT sy-subrc IS INITIAL.

    REFRESH lt_spopli.
    lt_spopli-selflag = 'X'.
    lt_spopli-varoption = 'Standart output'(100).
    APPEND lt_spopli.

    lt_spopli-selflag = space.
    lt_spopli-varoption = 'Output to Excel'(101).
    APPEND lt_spopli.

    CALL FUNCTION 'POPUP_TO_DECIDE_LIST'
      EXPORTING
        mark_flag          = ''
        mark_max           = 1
        start_col          = 15
        start_row          = 10
        textline1          = 'Choose output'(102)
        titel              = 'Output select'(103)
      IMPORTING
        answer             = l_answer
      TABLES
        t_spopli           = lt_spopli
      EXCEPTIONS
        not_enough_answers = 1
        too_much_answers   = 2
        too_much_marks     = 3
        OTHERS             = 4.

    CLEAR lt_spopli.
    IF NOT sy-subrc IS INITIAL.
      CLEAR l_answer.
    ELSE.
      EXPORT l_answer = l_answer TO MEMORY ID 'MEMID_ZERUSR_INVOICE_EXCEL'.
    ENDIF.
  ENDDO.
  IF l_answer = '2'.
    PERFORM excel_open.
  ELSE.
*--} VGA ECDK936594:end
    PERFORM form_open USING proc_screen vbdkr-land1.
  ENDIF.

_________________
Молитва - это запрос разработчику на изменение кода программы.
Back to top
View user's profile Send private message Blog Visit poster's website
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.