Posted: Fri Feb 22, 2008 9:56 am Post subject: Как включать - выключать блок на селекционном экране?
Доброе утро!
Мне требуется создать на селекционном экране кнопку рядом к кнопкой пуска (F8 ), разворачивающую - сворачивающую целый блок с набором rabiobutton. Пожалуйста, подскажите, как это лучше сделать?
Age: 170 Joined: 04 Oct 2007 Posts: 1218 Location: Санкт-Петербург
Posted: Fri Feb 22, 2008 10:31 am Post subject:
Пример с управляющей кнопокй прямо над блоком.
Обратите внимание на атрибуты 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
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.