Push Buttons in the custom Container
Hi
I have created one container using cl_gui_custom_container.
Now I have splitted the container into two parts as left and right using cl_gui_splitter_container.
Is there any way to create push buttons in the left container.
Regards
Vijay
Pushbutton is an example of classic control while custom container is an example of GUI control . You can't mix controls of first type with the latter meaning you can embed classic control in GUI container. You can have such control only outside any container (on screen canvas). This is very common that you have docking container on the left and classic controls on the right side of the screen (not container)
To be able to have a button inside container, you will have to use cl_gui_toolbar class adding your options there and handling them as normal OO event. This way you only combine GUI controls (toolbar + container). Otherwise it is not possible.
Regards
Marcin
Similar Messages
-
How to suppress the Push button in a custom screen
Hi,
Is there any procedure to suppress a Push button in a custom Screen based on a condition.
For eg: If Material is not initial.
then display the Continue button.
else not.
endif.Hi,
If the push button is not on the application toolbar, then follow the below procedure...
1. Assign the MODIF-ID for the button in the screen. Assume that MODIF-ID for the button is SC1.
2. In the PBO of the screen add the below code...
IF not MATERIAL is INITIAL.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'SC1'
SCREEN-OUTPUT = 1.
SCREEN-ACTIVE = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSE.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'SC1'
SCREEN-OUTPUT = 0.
SCREEN-ACTIVE = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
Regards,
Vara -
Push button on the SAP Application toor bar
Hi,
i need to add a push button on the stanadard screen(me41,me42,me43).If click that button it will calls a custom screen.How it's possible to add a push button on sap std screen...
Thanks in advance.....
Avinash MHave you heard of GuiXT. Check it out.
http://www.synactive.net/site/index.htm
Regards,
Rich Heilman -
Displaying a Push button in the application toolbar for an ALV report
Hello everyone,
Query:
Is it possible to display a custom push button in the application tool bar while displaying an ALV report(1st one)?
On pressing this custom push button will I be able to display another ALV report(2nd one) based on the selection made on the current ALV report(1st one)?Yes u can have pushbutton on application toolbar.
You just have to use the new pf status in your report program.
You should copy the 'STANDARD' GUI status from program SAPLKKBL using transaction SE90 >Programming SubObjects> Gui Status.
Execute this transaction to get to next screen. select status using checkbox. click on GUI Status --> Copy.
Enter your Z program name and the name you what for this status - you can keep it as 'STANDARD' to be simple.
Then you can edit the new status to add or delete buttons. This will also bring in the standard SAP ALV functionality.
Have a look at below code for using the new status.
TYPE-POOLS: slis.
DATA: i_qmel LIKE qmel OCCURS 0.
data v_repid type repid.
SELECT * FROM qmel INTO TABLE i_qmel.
v_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = v_repid
I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
i_structure_name = 'QMEL'
TABLES
t_outtab = i_qmel
EXCEPTIONS
program_error = 1
OTHERS = 2.
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_pf_status using rt_extab type slis_t_extab.
set pf-status 'TEST'.
endform.
FORM user_command USING ucomm LIKE sy-ucomm
selfield TYPE slis_selfield.
data lv_ucomm type sy-ucomm.
lv_ucomm
= sy-ucomm.
CASE lv_ucomm.
WHEN 'BUTTON'. "Double Click line Item
**Write ur functinality here
endcase.
endform.
Also have a look at below links.
http://www.sap-basis-abap.com/abap/add-button-to-alv-toolbar-with-reuse-alv-list-display.htm
ALV report
Best Regards,
Vibha
*Please mark all the helpful answers -
Display of push button in the application tool bar in an ALV report
Hello everyone,
Query:
Is it possible to display a custom push button in the application tool bar while displaying an ALV report(1st one)?
On pressing this custom push button will I be able to display another ALV report(2nd one) based on the selection made on the current ALV report(1st one)?Hiii..
I have written a sample code for You
<b>"Call the below FunctionModule For Displaying The List
" And see the bolded line in the Below FunctionModule
" STANDARD_02 and USER_COMMAND are the subroutine Names</b>
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
i_callback_program = sy-repid
<b>i_callback_pf_status_set = 'STANDARD_02'</b>
<b> i_callback_user_command = 'USER_COMMAND '</b>
i_structure_name = 'ZST_SCARR'
is_layout = is_layout
it_fieldcat = gt_fieldcat[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
is_sel_hide = is_sel_hide
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
it_events = e03_lt_events[]
IT_EVENT_EXIT =
is_print = t
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IR_SALV_LIST_ADAPTER =
IT_EXCEPT_QINFO =
I_SUPPRESS_EMPTY_DATA = ABAP_FALSE
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = it_scarr
EXCEPTIONS
program_error = 1
OTHERS = 2
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 PF_STATUS_SET
<b>" Here Set A Button In Application Toolbar Using PF- Status</b>
FORM standard_02 USING extab TYPE slis_t_extab.
SET PF-STATUS 'STANDA02' EXCLUDING extab.
ENDFORM. "STANDARD_02
*& Form USER_COMMAND
text
-->R_UCOMM text
-->RS_SELFIELDtext
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
CASE r_ucomm.
<b> "menubutton with functioncode GOTO's Action</b>
WHEN 'GOTO'.
READ TABLE it_scarr INDEX rs_selfield-tabindex. "cursorposit.
IF sy-subrc = 0.
WRITE:/ it_scarr-carrid,
/ it_scarr-carrname.
ENDCASE.
ENDFORM. "USER_COMMAND<b></b>
Hope it helps..
Regards,
Simy -
Prob with Push Buttons in the selection screen
Hi All,
1) I have 6 push buttons in the selection screen(Normal Report), 3 in a first row(P11, P12, P13) and 3 in the second row(P21, P22, P23). If I press one push button(for ex P11) the other two Push buttons(P12 P13) should grey out(Inactive mode). If I press P22, P21 & P23 shoul grey out.
2) I need color change for the Inactive push buttons.
Thanks
KrisCan you please post your selection screen definition? I don't understand what you want to achieve by greying out the other pushbuttons when one is pressed.
Does that mean pushing one button will do nothing except greying out the buttons?
Typically when you push a button, you want to continue to execute the required processing for that button not just grey out other pushbuttons and stay in the selection screen.
Anyway, you can achieve that using the following logic. I am not sure how and if you can achieve the color change.
TABLES: sscrfields.
DATA: v_button_pushed(5).
SELECTION-SCREEN PUSHBUTTON /1(10) p11 USER-COMMAND push1.
SELECTION-SCREEN PUSHBUTTON 12(10) p12 USER-COMMAND push2.
SELECTION-SCREEN PUSHBUTTON 23(10) p13 USER-COMMAND push3.
SELECTION-SCREEN PUSHBUTTON /1(10) p21 USER-COMMAND push4.
SELECTION-SCREEN PUSHBUTTON 12(10) p22 USER-COMMAND push5.
SELECTION-SCREEN PUSHBUTTON 23(10) p23 USER-COMMAND push6.
INITIALIZATION.
p11 = 'Push11'.
p12 = 'Push12'.
p13 = 'Push13'.
p21 = 'Push21'.
p22 = 'Push22'.
p23 = 'Push23'.
AT SELECTION-SCREEN OUTPUT.
CASE v_button_pushed.
WHEN 'PUSH1'.
LOOP AT SCREEN.
CHECK screen-name <> 'P11'.
screen-input = 0.
MODIFY SCREEN.
ENDLOOP.
WHEN 'PUSH2'.
WHEN 'PUSH3'.
WHEN 'PUSH4'.
WHEN 'PUSH5'.
WHEN 'PUSH6'.
WHEN OTHERS.
ENDCASE.
AT SELECTION-SCREEN.
v_button_pushed = sscrfields-ucomm. -
Can we disable the default push buttons on the ALV Grid
Hi,
Can we disable the default push buttons on the ALV
Grid Control...
If so, pls send me the procedure...
thanks and regards
raghuHi,
In the PBO:
PERFORM f9100_exclude_functions USING :
i_exclude[] '&CHECK',
i_exclude[] '&REFRESH',
i_exclude[] '&LOCAL&CUT' ,
i_exclude[] '&LOCAL©',
i_exclude[] '&LOCAL&PASTE',
i_exclude[] '&LOCAL&PASTE_NEW_ROW',
i_exclude[] '&LOCAL&UNDO' ,
i_exclude[] '&LOCAL&APPEND',
i_exclude[] '&LOCAL&INSERT_ROW',
i_exclude[] '&LOCAL&DELETE_ROW',
i_exclude[] '&SORT_ASC',
i_exclude[] '&SORT_DSC',
i_exclude[] '&FIND',
i_exclude[] '&SUMC',
i_exclude[] '&SUBTOT',
i_exclude[] '&MINIMUM',
i_exclude[] '&MAXIMUM' ,
i_exclude[] '&VGRID' ,
i_exclude[] '&VEXCEL' ,
i_exclude[] '&VCRYSTAL',
i_exclude[] '&HTML',
i_exclude[] '&MAINTAIN',
i_exclude[] '&SAVE',
i_exclude[] '&GRAPH',
i_exclude[] '&HELP',
i_exclude[] '&ALL' ,
i_exclude[] '&SAL' .
* i_exclude[] '&EXCLALLFC'.
*& Form f9100_exclude_functions
* This form exclude buttons from the toolbar.
* -->P_IEXCLUDE text
* -->P_1150 text
FORM f9100_exclude_functions USING pexclude LIKE i_exclude
value(pfunction).
DATA: l_exclude TYPE ui_func.
l_exclude = pfunction.
APPEND l_exclude TO pexclude.
ENDFORM. " f9100_exclude_functions
This will exculde the default push buttons.
Let us know if it works for you.
Regards,
Anjali -
How to add the push button on the apllication tollbar of IL02 tcode
Hi Friends,
I have to add the push button on the application tool bar of the IL02.when that push button is pressed then some operation to be performed.Could you please suggest how to add.Is there any screen exit if yes what is that.
With out screen exits if there is any way ?
Thanks and regards,
shylaHI Vicky ,
if u want an interactive ALV report , there are lot of forums already having the solution for that , but let me give u the solution anyway.
In the function module "REUSE_ALV_GRID_DISPLAY" , import parameters
I_CALLBACK_PF_STATUS_SET = 'FLIGHT'
I_CALLBACK_USER_COMMAND = 'BUTTON_CLICK'
has to be supplied to this function module . The PF status is where u hav created the two buttons , that PF status has to be given here .If the user clicks on the button then it is handled by the form routines . Inside the sub-routine based on the button the user has selected u could perform the action.
FORM FLIGHT USING RT_EXTAB TYPE SLIS_T_EXTAB.
SET PF-STATUS 'FLIGHT' EXCLUDING RT_EXTAB.
ENDFORM.
Here the "Flight" is the PF_status .
FORM BUTTON_CLICK USING UCOMM type SY-UCOMM
SELFIELD type SLIS_SELFIELD.
CASE UCOMM.
WHEN 'BUTTON!' .
write ur code for button 1.
WHEN "BUTTON"
*Write ur code for button2 .
end case.
endform.
for any queries reply back.
regards -
Problem With Push buttons on the selection screen
Hi All,
I've taken 3 push buttons on the selection-screen with the following syntax
SELECTION-SCREEN: FUNCTION KEY 1,
FUNCTION KEY 2,
FUNCTION KEY 3.
and have removed the F8 execute button using FM RS_SET_SELSCREEN_STATUS
Now, the problem is i'm able to perform validations using At selection screen but the code after the Start-of-selection is not being triggered.
I mean the processing is being terminated after the at selection-screen.could anyone please tell me how do i trigger some code after the event start-of-selection when a user presses a push button with sy-ucomm = FC01.Check the below sample program :
REPORT ZLPRWINSPC_TMP .
tables : mara,
sscrfields.
select-options s_matnr for mara-matnr.
initialization.
sscrfields-functxt_01 = 'Clear Selection'.
selection-screen function key 1.
AT SELECTION-SCREEN.
case sscrfields-ucomm.
when 'Clear Selection' or 'FC01'.
clear s_matnr.
refresh s_matnr.
endcase.
Thanks
Seshu -
How to print the Module pool screen using a push button in the screen
Hi Every one,
i have developed a module program , which have a selection screen and it display the output in a structured way.
output includes boxes, texts etc...
my problem is :---
How to print the Module pool screen using a push button in the screen.When the "Print" button is pressed:
leave to list-processing and return to screen 100. "(current screen)
Call a transaction that runs your print program.
Rob -
Dynamically change in size of the custom container using ALV GRID (OOPS)
Hi Gurus!!!!
I have an issue with the output of the report which is developed using ALV GRID (OOPS). I have used the custom container occupying full screen (Screen painter). When I execute the report using my PC the output displays report as expected in full screen. The problem is when we execute this report in 19 INCH monitor then there is always gap below the report.
As per my understanding we should have a code to change the size of custom container dynamically.
Please suggest some help on this.
Thanks,
Hemal ShahHi,
If you set the attributes, Resizing - Vertical and Horizontal for the customer container, than system will resize the size of the custome continer as per the resolution.
Hope it helps,
Sumana -
Push button on the alvgrid tool bar?
how can u place push button on the ALV GRID TOOL BAR?
Hi,
1. create the local class and implement the Toolbar event.
2. within the event to add the new button.
see the below example code.
CLASS LCL_EVENT_HANDLER DEFINITION.
PUBLIC SECTION.
METHODS:
HANDLER_TOOLBAR FOR EVENT TOOLBAR OF CL_GUI_ALV_GRID
IMPORTING E_OBJECT E_INTERACTIVE ,
HANDLER_USER_COMMAND FOR EVENT USER_COMMAND OF CL_GUI_ALV_GRID
IMPORTING E_UCOMM .
ENDCLASS. "lcl_event_handler DEFINITION
CLASS LCL_EVENT_HANDLER IMPLEMENTATION.
Toolbar -----Create 'Add Issue' button
METHOD HANDLER_TOOLBAR.
DATA: L_WA_TOOLBAR TYPE STB_BUTTON. " Toolbar
CLEAR: L_WA_TOOLBAR.
Button Type
L_WA_TOOLBAR-BUTN_TYPE = C_BUTTON_TYPE . " 3.
APPEND L_WA_TOOLBAR TO E_OBJECT->MT_TOOLBAR.
Add Issue Button.
CLEAR: L_WA_TOOLBAR.
L_WA_TOOLBAR-FUNCTION = 'ADD_MI' . " 'ADD_MI' .
L_WA_TOOLBAR-ICON = 'ICON_CREATE'.
L_WA_TOOLBAR-QUICKINFO = 'CREATE' . " 'Add Issue'.
L_WA_TOOLBAR-TEXT = 'CREATE' . " 'Add Issue'.
L_WA_TOOLBAR-DISABLED = ''.
APPEND L_WA_TOOLBAR TO E_OBJECT->MT_TOOLBAR.
CLEAR: L_WA_TOOLBAR.
ENDMETHOD. "handler_toolbar
User Actions Events-- Handle 'Add Issue' Button Click.
METHOD HANDLER_USER_COMMAND.
CASE E_UCOMM.
Add Issue Button.
WHEN C_ADD_MI.
IF NOT G_MATNR IS INITIAL.
FG_REFRESH = C_TRUE.
PERFORM F_ADD_MEDIAISSUE.
ENDIF.
ENDCASE.
Refresh Control
CALL METHOD CL_GUI_CFW=>FLUSH
EXCEPTIONS
CNTL_SYSTEM_ERROR = 1
CNTL_ERROR = 2
OTHERS = 3.
Handle Exceptions
IF SY-SUBRC <> 0.
CASE SY-SUBRC.
WHEN 1.
G_ERROR_TEXT = TEXT-026. " 'Control System Error'.
WHEN 2.
G_ERROR_TEXT = TEXT-027. " 'Control CL_GUI_CFW Has Raised Error'.
ENDCASE.
MESSAGE G_ERROR_TEXT TYPE 'E'.
ENDIF.
Refresh Alv Grid.
PERFORM F_REFRESH_GRID.
ENDMETHOD. "handler_user_command
ENDCLASS. "lcl_event_handler IMPLEMENTATION
Object Ref. Event Class.
DATA: OBJ_EVENT_HANDLER TYPE REF TO LCL_EVENT_HANDLER.
refer the sample program BCALV_GRID_05 in SE38
Reward if found helpful.
Regards,
Boobalan Suburaj -
Push button in the application tool bar in the standard LDB PNP
Hi ABAPERS,
I have a requirement that in the selction screen to use the standard LDB PNP beyond that I need to pass one push button in the selection screen 1000 ( in the application tool bar beside execute button) actually i passes the push button in the gui status but its not refelcting in the output and in the initilization event also i passed even then its noty working,
initialization.
move 'Cluster ID'(010) to sscrfields-functxt_01.
Thanks and Regards,
Deepthi.Pavan,
write code like this
TABLES: USR02, "Logon data
SSCRFIELDS. "FIELDS ON SELECTION SCREENS
STANDARD SELECTION SCREEN FOR SCROLLING LEFT AND RIGHT
SELECTION-SCREEN: FUNCTION KEY 1.
SELECTION-SCREEN begin of BLOCK b1.
PARAMETERs p1 type i.
SELECTION-SCREEN end of BLOCK b1.
INITIALIZATION.
SCREEN ICON LEFT AND RIGHT
SSCRFIELDS-FUNCTXT_01 = 'Button'.
start-OF-SELECTION.
Thanks
Bala Duvvuri -
WPS push button on the Linksys WRT610N router does not work. Please help.
Hi,
I am facing problems of the WPS Push Button on the Linksys WRT610N version 2.0 router which has stopped working. I don't see the Blue LED blinking. The WPS button no more works on the router. It was working before. I did a firmware upgrade. Could this be the cause?
Please help me in solving this issue at the earliest.
Leo.when you reset the router, did you notice that your network name changed?
also check the settings on the router if the wps is enabled.
with a computer wired to the router, are you able to go online?
follow the instructions in this page to setup wps
to connect another computer to the network, follow the instructions here -
Wan to add push button in the output of ALV Grid display.
Hi Friends,
I wan to add a Push button in the output of ALV GRID display with STANDARD ikons.
How to copy standard ikons of GRID output.
How to apply the copied status into my code.
Regards,
VijiHi,
Goto SE41, create a pf-status for your alv report program.
On the next screen, click menu EXTRAS --> click option ADJUST TEMPLATES and select radiobutton LIST VIEWER --> you will get all standard buttons of alv in the pf-status.
Delete the unwanted buttons and also you can add new buttons if reqd.
Activate pf-status --> and apply in alv program.
Now to apply this pf-status in your alv report follow code:-
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = v_rep_id " report id
i_callback_pf_status_set = 'PF' " for PF-STATUS
i_callback_user_command = 'USER_COMMAND' " for User-Command
is_layout = wa_layout " for layout
it_fieldcat = it_field " field catalog
it_sort = it_sort " sort info
TABLES
t_outtab = it_final " internal table
EXCEPTIONS
program_error = 1
OTHERS = 2.
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 pf
* SUB-ROUTINE PF IS USED TO SET THE PF-STATUS OF THE SCREEN
* ON WHICH THE ALV GRID IS DISPLAYED
* -->RT_EXTAB
FORM pf USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'ZTG_STAT'. "<--pass pf-status name here
ENDFORM. "pf
*& Form USER_COMMAND
* SUB-ROUTINE USER_COMMAND IS USED TO HANDLE THE USER ACTION
* AND EXECUTE THE APPROPIATE CODE
* -->LV_OKCODE used to capture the function code
* of the user-defined push-buttons
* -->L_SELFIELD text
FORM user_command USING lv_okcode LIKE sy-ucomm l_selfield TYPE slis_selfield.
* assign the function code to variable v_okcode
lv_okcode = sy-ucomm.
* handle the code execution based on the function code encountered
CASE lv_okcode.
WHEN '<function_code>'. "<--to handle user actions
ENDCASE.
ENDFORM. "USER_COMMAND
Hope this helps you.
Regards,
Tarun
Maybe you are looking for
-
Functions slowing down performance question
Hey there. I've got a query that really slogs. This query calls quite a few functions and there's no question that some of the work that needs to be done, simply takes time. However, someone has adamantly told me that using functions slow down the qu
-
SQL query doesn't work in VB program
Hi: The following SQL query doesn't work into a VB program, I'm using Oracle OLEDB to established connection to the DB, ... the query returns 0 rows ... When I run this same query from any SQL Plus, works well (returning me something like 119 rows) .
-
Errors with Resource Adapter with data source as "http header"
hi Team, The objective was to create a ResourceAdapter that will get accountid from http-header and automatically log me in. More like Siteminder, Tivoli Access Mgr. In the adapter's "prototype.xml", I added this line. "<AuthnProperty name='sauid' di
-
Am I able to transfer a podcast (m4b) to my mp3player?
I have purchased a podcast in m4b format, will it play on my sony mp3 player?
-
Final Cut Pro 5.1.4 crashes when using QuickTime conversion export
Our copy of Final Cut Pro 5.1.4 has started to crash when exporting using QuickTime Conversion. It gets about 66% complete, then dumps out. I have updated FCP using Software Update and QT to the latest version. Any ideas why this happening? Pro Kit 4