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

Как включать - выключать блок на селекционном экране?



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



Joined: 26 Dec 2007
Posts: 73

PostPosted: Fri Feb 22, 2008 9:56 am    Post subject: Как включать - выключать блок на селекционном экране? Reply with quote

Доброе утро!
Мне требуется создать на селекционном экране кнопку рядом к кнопкой пуска (F8 ), разворачивающую - сворачивающую целый блок с набором rabiobutton. Пожалуйста, подскажите, как это лучше сделать?
Back to top
View user's profile Send private message
vga
Мастер
Мастер


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

PostPosted: Fri Feb 22, 2008 10:31 am    Post subject: Reply with quote

Пример с управляющей кнопокй прямо над блоком.
Обратите внимание на атрибуты MODIF ID

Code:
INITIALIZATION.
* Начальное значение кнопки и блока: развернута - свернута
   MOVE icon_collapse TO bt_exru.
*   MOVE icon_expand   TO bt_exru.

AT SELECTION-SCREEN OUTPUT.
* показать скрыть
  LOOP AT SCREEN.
    CASE screen-group1.
      WHEN 'MRU'.
        IF bt_exru EQ icon_collapse.
          screen-active = 1.
        ELSE.
          screen-active = 0.
        ENDIF.
        MODIFY SCREEN.
    ENDCASE.
  ENDLOOP  .

AT SELECTION-SCREEN.
  CASE sy-ucomm.
    WHEN 'EXRU'.
      IF bt_exru EQ icon_expand.
        MOVE icon_collapse TO bt_exru.
      ELSE.
        MOVE icon_expand   TO bt_exru.
      ENDIF."..pp_tech
  ENDCASE.

* Описание селекционного экрана
SELECTION-SCREEN PUSHBUTTON /1(4)  BT_EXRU USER-COMMAND EXRU.

SELECTION-SCREEN BEGIN OF BLOCK B02 WITH FRAME TITLE TEXT-002.
  PARAMETERS rb_distr RADIOBUTTON GROUP form default 'X' MODIF ID MRU.

  PARAMETERS rb_icizh RADIOBUTTON GROUP form MODIF ID MRU.
  PARAMETERS rb_ickub RADIOBUTTON GROUP form MODIF ID MRU.

  PARAMETERS rb_expen RADIOBUTTON GROUP form MODIF ID MRU.
  PARAMETERS rb_expru RADIOBUTTON GROUP form MODIF ID MRU.
  PARAMETERS cb_quant AS CHECKBOX DEFAULT 'X' MODIF ID MRU.
SELECTION-SCREEN END OF BLOCK B02.



Если кнопку нужно разместить в меню, рядом с F8, используйте

Code:

TABLES: sscrfields.
SELECTION-SCREEN FUNCTION KEY 1. " FC01

INITIALIZATION.
  MOVE icon_table_settings TO sscrfields-functxt_01.
  WRITE 'Button Text'         TO sscrfields-functxt_01+4.

AT SELECTION-SCREEN.
  CASE sy-ucomm.
    WHEN 'FC01'.
* ... "Function Key processing

  ENDCASE.
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.