‎2008 Jan 30 11:38 PM
How many application buttons we can put on single selection screen?
‎2008 Jan 31 1:08 AM
HI
In My opinion its upto 5 buttons..
Check code
TABLES sscrfields.
PARAMETERS: p_carrid TYPE s_carr_id,
p_cityfr TYPE s_from_cit.
SELECTION-SCREEN: FUNCTION KEY 1,
FUNCTION KEY 2.
INITIALIZATION.
sscrfields-functxt_01 = 'LH'.
sscrfields-functxt_02 = 'UA'.
AT SELECTION-SCREEN.
CASE sscrfields-ucomm.
WHEN'FC01'.
p_carrid = 'LH'.
p_cityfr = 'Frankfurt'.
WHEN 'FC02'.
p_carrid = 'UA'.
p_cityfr = 'Chicago'.
ENDCASE.
START-OF-SELECTION.
WRITE / 'START-OF-SELECTION'.
It will put two buttons on Selection Screen..
Check sscrfields structure u can use upto 5 upto 5 buttons..
Hope it helps.
Praveen
‎2008 Jan 31 4:15 AM
No Praveen Your answer contradicts
It have nothing to do with sscrfields structure
you can have more than 5 push buttons.
‎2008 Jan 31 4:25 AM
Hi sandeep
the no of push buttons depend upon the size of each button
and the maximum offset you can use it the syntax
PUSHBUTTON 68(10) but7 USER-COMMAND cli7,
here 68 is an ofset and maximum value of it can be 83.
i have added in my program 8 buttons of each size 10
SELECTION-SCREEN:
BEGIN OF SCREEN 500 AS WINDOW TITLE title,
PUSHBUTTON 2(10) but1 USER-COMMAND cli1,
PUSHBUTTON 13(10) but3 USER-COMMAND cli3,
PUSHBUTTON 24(10) but4 USER-COMMAND cli4,
PUSHBUTTON 35(10) but5 USER-COMMAND cli5,
PUSHBUTTON 46(10) but6 USER-COMMAND cli6,
PUSHBUTTON 57(10) but2 USER-COMMAND cli2,
PUSHBUTTON 68(10) but7 USER-COMMAND cli7,
PUSHBUTTON 83(10) but8 USER-COMMAND cli8,
END OF SCREEN 500.
but as soon as i add the statment below to the above code it shows me an error
PUSHBUTTON 94(10) but9 USER-COMMAND cli9
‎2008 Jan 31 4:28 AM
You can include up to 35 pushbuttons in the application toolbar.
check this link
http://help.sap.com/saphelp_erp2004/helpdata/en/d1/801d91454211d189710000e8322d00/content.htm
‎2008 Jan 31 4:33 AM
Hi sandeep,
you use maximum of 83 buttons of size 1 each
only restriction is that offset you can use can be 83 only
run the below code
REPORT ZUPLOAD line-size 900.
TABLES sscrfields.
TYPE-POOLS icon.
SELECTION-SCREEN:
BEGIN OF SCREEN 500 AS WINDOW TITLE title,
PUSHBUTTON 2(2) but1 USER-COMMAND cli1,
PUSHBUTTON 4(2) but3 USER-COMMAND cli3,
PUSHBUTTON 6(2) but4 USER-COMMAND cli4,
PUSHBUTTON 8(2) but5 USER-COMMAND cli5,
PUSHBUTTON 10(2) but6 USER-COMMAND cli6,
PUSHBUTTON 12(2) but2 USER-COMMAND cli2,
PUSHBUTTON 14(2) but9 USER-COMMAND cli9,
PUSHBUTTON 16(2) but10 USER-COMMAND cli10,
PUSHBUTTON 18(2) but11 USER-COMMAND cli11,
PUSHBUTTON 20(2) but12 USER-COMMAND cli13,
PUSHBUTTON 22(2) but13 USER-COMMAND cli14,
PUSHBUTTON 24(2) but14 USER-COMMAND cli15,
PUSHBUTTON 26(2) but15 USER-COMMAND cli16,
PUSHBUTTON 28(2) but16 USER-COMMAND cli12,
PUSHBUTTON 30(2) but7 USER-COMMAND cli7,
PUSHBUTTON 83(2) but8 USER-COMMAND cli8,
PUSHBUTTON 85(2) but9 USER-COMMAND cli9,
END OF SCREEN 500.
AT SELECTION-SCREEN.
break-point.
CASE sscrfields.
WHEN 'CLI1'.
...
WHEN 'CLI2'.
...
ENDCASE.
START-OF-SELECTION.
title = 'Push button'.
but1 = 'Button 1'.
but3 = 'Button 1'.
but3 = 'Button 1'.
but4 = 'Button 1'.
but5 = 'Button 1'.
but6 = 'Button 1'.
CALL FUNCTION 'ICON_CREATE'
EXPORTING
name = icon_information
text = 'Button 2'
info = 'My Quickinfo'
IMPORTING
RESULT = but2
EXCEPTIONS
OTHERS = 0.
CALL SELECTION-SCREEN '0500' STARTING AT 10 10.
at debugger check the value of sscrfields here you can view every time a button is pressed you get respective values.
now think you must have got the point
reward points if info useful