Creating push button on Selection screen application toolbar
Hi Friends,
this is a HR-ABAP report. I have to create a push button on Selection screen. when user clicks on that push button 'MODAL DIALOG BOX' has to be displayed containing some data.
plz kindly give some sample code to do this.
Regards,
Radhika Dasharatha.
Hi,
1)Use SELECTION-SCREEN PUSHBUTTON /10(20) PUSH USER-
COMMAND 'ABC'. in selection screen.
2) Give the static name to button in INITIALIZATION event like PUSH = 'PRESS'.
3) At selection screen.
if sy-ucomm eq 'ABC'.
call FM HR_BE_GE_MODAL_DIALOG
endif.
Thanks
Sandeep
Reward if useful
Similar Messages
-
Error during creation of push button on selection screen
Hi,
I wanted to create push buttons on selection screen,
Code:
DATA DB1 TYPE VBAP-WERKS.
DATA DB2 TYPE MARA-MATNR.
SELECT-OPTIONS : SPLANT FOR DB1,
SCLASS FOR DB2.
SELECTION-SCREEN: FUNCTION KEY 1,
FUNCTION KEY 2,
FUNCTION KEY 3.
INITIALIZATION.
DATA FUNCTXT TYPE SMP_DYNTXT.
CLEAR FUNCTXT.
DATA: FUNCTXT_01 TYPE SSCRFIELDS-FUNCTXT_01.
FUNCTXT-TEXT = 'DEL'.
SSCRFIELDS-FUNCTXT_01 = FUNCTXT.
CLEAR FUNCTXT.
FUNCTXT-TEXT = 'EDIT'.
SSCRFIELDS-FUNCTXT_02 = FUNCTXT.
CLEAR FUNCTXT.
FUNCTXT-TEXT = 'CRE'.
SSCRFIELDS-FUNCTXT_03 = FUNCTXT.
But during activating, I'm getting the error as : Field "SSCRFIELDS-FUNCTXT_01" is unknown. It is neither in one of the specified tables nor defined by "DATA" statement.
Please suggest solutions to overcome this error.
Regards
Darshan MSHi,
trans. for examples of selection screen : BIBS
regards
Fred -
How to Add Push Button On Selection Screen
Hi Experts,
How to add Push button on Selection Screen.
Points will b rewarded for useful help.
Bohra.Hi,
To create a pushbutton on the selection screen, you use:
SELECTION SCREEN PUSHBUTTON [/]<pos(len)> <push>
USER-COMMAND <ucom> [MODIF ID <key>].
The [/]<pos(len)> parameters and the MODIF IF addition have the same function as for the formatting options for underlines and comments.
<push> determines the pushbutton text. For <push>, you can specify a text symbol or a field name with a maximum length of eight characters. This character field must not be declared with the DATA statement, but is generated automatically with length <len>. The field must be filled before the selection screen is called.
For <ucom>, you must specify a code of up to four characters. When the user clicks the pushbutton on the selection screen, <ucom> is entered in the UCOMM of the SSCRFIELDS interface work area. You must use the TABLES statement to declare the SSCRFIELDS structure. The contents of the SSCRFIELDS-UCOMM field can be processed during the AT SELECTION-SCREENevent.
Ex.
REPORT DEMO.
TABLES SSCRFIELDS.
DATA FLAG.
SELECTION-SCREEN:
BEGIN OF SCREEN 500 AS WINDOW TITLE TIT,
BEGIN OF LINE,
PUSHBUTTON 2(10) BUT1 USER-COMMAND CLI1,
PUSHBUTTON 12(10) TEXT-020 USER-COMMAND CLI2,
END OF LINE,
BEGIN OF LINE,
PUSHBUTTON 2(10) BUT3 USER-COMMAND CLI3,
PUSHBUTTON 12(10) TEXT-040 USER-COMMAND CLI4,
END OF LINE,
END OF SCREEN 500.
AT SELECTION-SCREEN.
CASE SSCRFIELDS.
WHEN 'CLI1'.
FLAG = '1'.
WHEN 'CLI2'.
FLAG = '2'.
WHEN 'CLI3'.
FLAG = '3'.
WHEN 'CLI4'.
FLAG = '4'.
ENDCASE.
START-OF-SELECTION.
TIT = 'Four Buttons'.
BUT1 = 'Button 1'.
BUT3 = 'Button 3'.
CALL SELECTION-SCREEN 500 STARTING AT 10 10.
CASE FLAG.
WHEN '1'.
WRITE / 'Button 1 was clicked'.
WHEN '2'.
WRITE / 'Button 2 was clicked'.
WHEN '3'.
WRITE / 'Button 3 was clicked'.
WHEN '4'.
WRITE / 'Button 4 was clicked'.
WHEN OTHERS.
WRITE / 'No Button was clicked'.
ENDCASE.
This example defines four pushbuttons on a selection screen that is displayed as a
dialog box. The selection screen is defined in a statement chain for keyword
SELECTION-SCREEN.
If the text symbols TEXT-020 and TEXT-040 are defined as 'Button 2' and 'Button 4',
the four pushbuttons appear as follows on the selection screen displayed as a dialog box.
Regards,
Bhaskar -
Command Button on selection screen application tool bar
Hi All,
I want to add command Button on selection screen application bar.
it is my z progarm .
please suggest one sample code .
regards,
Ajay reddyGoto SE41, create a Status and the call it in your app.
SET PF-STATUS 'TEST'.
Greetings,
Blag. -
Push button on selection screen
Hi,
I have provided push button on selection screen after input fields I mean just below to input fields by using the syntax selection screen pushbutton .. And it is appearing on the selection screen. As per the requirement I need to enter material number on the selection screen and if I press corresponding push button I need to call one transaction using bdc program. I wrote case sy-comm and corresponding user command ( whatever is there in the selection screen syntax) in when condition under start of selection event.
But the control is not going to that place after I press push button. If I put that code inside of at selection screen it is going. But I can not write all the bdc program and select queries inside of at selection screen event if so please suggest me how I can proceed.
I will give the points.
Thanks a lot in advance.Hi,
SELECTION-SCREEN BEGIN OF BLOCK b_2 WITH FRAME TITLE text-018.
SELECT-OPTIONS s_fields FOR qpmk-mkmnr NO-DISPLAY.
SELECTION-SCREEN PUSHBUTTON /1(24) name USER-COMMAND flds.
SELECTION-SCREEN END OF BLOCK b_2.
AT SELECTION-SCREEN.
IF sscrfields-ucomm = 'FLDS'.
PERFORM display_fields.
ENDIF. -
Selection screen (application toolbar)
Hi,
Here I have following scenario:
Execute Selection screen 1(1000) -> Calls selection screen2(500) -> Calls and execute smart form
Flow is like this :
in start-of-selection.
initial coding for second screen.
Call Selection-screen 500.
Then call function 'SSF_FUNCTION_MODULE_NAME'.
Now if i click back button in smart form its going to selection screen 1which is quite acceptable, but if we are clicking BACK or CANCEL or EXIT button in selection screen 2(500) instead of going to Selection screen 1(1000) its calling the smart form. If i click debug and click back button in selection screen2 (500) the pointer is coming directly to following statement in start-of selection:
Call Selection-screen 500.
and in this time after F5 if i check sy-dynnr it comes 1000 and sy-ucomm it comes blank
Can you please tell me what code should I need to write to handle BACK, CANCEL,EXIT for second selection screen 2(500) and at which point and at which event. Please suggest.
I will definetly .............Hi,
Write LEAVE TO SCREEN 0 in the PAI of screen 500.
MODULE user_command_0500 INPUT.
CASE g_ok_code.
WHEN 'BACK' OR 'EXIT'.
Goto Selection screen
LEAVE TO SCREEN 0.
WHEN 'CANC' .
LEAVE PROGRAM.
WHEN OTHERS.
Do Nothing
ENDCASE.
CLEAR : g_ok_code.
ENDMODULE. -
Button on report selection screen application toolbar
Hi,
I want to place Button (application tool bar)on report(executable program) selection screen.
Need your valuable suggestions.
Thanks,
Sreedevihii
1. create GUI status with "Status" name and "Short text"
2. Now a screen will appear with the following,
a. Menu Bar
b. Application tool bar
c. Function keys
3. Click the down arrow near the application toolbar
4. Enter the function code like SAVE, EXIT, etc., You
can also give ur own meaningful naming convention .
For example ( ZTEST)
5. Now press enter, it will ask for "Static text" or "Dynamic Text". Choose Static text and press enter
6. Now it will ask for function text and Icon name. Specify some function text ( what it does ) and Icon name u want to attach.
7. Press enter. It will ask for function keys. Specify a function key and press enter.
8. Now u can handle this function code (ZTEST) either in PBO/PAI like IF FUNCTION = ZTEST ...ENDIF
Note:
Don't forget to set the GUI status u have created in PBO event.
Example code to set PF status.
PROCESS BEFORE OUTPUT.
MODULE liste_initialisieren.
MODULE setstatus_0100.
LOOP AT extract WITH CONTROL
tctrl_ztufi_league CURSOR nextline.
MODULE liste_show_liste.
ENDLOOP.
In the above MODULE setstatus_0100 do the following,
SET PF-STATUS 'ZGUI'. ( The GUI status u have created).
Check this:
<b>http://www.sapdevelopment.co.uk/reporting/selscr/but_appbut.htm</b>
<b>http://www.sap-basis-abap.com/abap/add-button-to-alv-toolbar-with-reuse-alv-list-display.htm
Re: How to add push buttons in out put screen of ALV
http://www.planetsap.com/Tips_and_Tricks.htm</b>
Regards
Naresh -
Disable selection screen application toolbar button
Hi All,
Could you please let me know how to hide or disable application toolbar pushbuttons in the selection screen default screen 1000??
Thanks & regards,
SanthoshHi,
Try this way.
"Create table for function codes
DATA: it_exclude TYPE TABLE OF sy-ucomm.
PARAMETERS: r1 RADIOBUTTON GROUP gr1 USER-COMMAND uco1,
r2 RADIOBUTTON GROUP gr1.
INITIALIZATION.
"Create two buttons with function codes FCODE1 and FCODE2.
SET PF-STATUS 'MY_GUI'.
AT SELECTION-SCREEN OUTPUT.
IF r1 = 'X'.
APPEND 'FCODE1' TO it_exclude.
CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
EXPORTING
p_status = 'MY_GUI'
TABLES
p_exclude = it_exclude.
ELSE.
REFRESH it_exclude.
ENDIF.
Thanks
Venkat.O -
ADD push button in selection-screen
Hi Guys,
I have a requirement.
In the selection screen on the report, I need a push button "Click".
When i "Click" First Time this it should display all the selection screen Blocks B1,B2,B3 from my selection screen.
For second "Click" it should Hide the Blocks B1,B2,B3.
I am doing the following code in my report:
But for first Click it is displaying the Blocks.And for the Second click it is not Hiding.
Please suggest on this.....
initialization.
if screen-group1 = 'A1' .
screen-active = 0.
modify screen.
endif.
endloop.
loop at screen.
if screen-group1 = 'A2' .
screen-active = 0.
modify screen.
endif.
endloop.
loop at screen.
if screen-group1 = 'A3' .
screen-active = 0.
modify screen.
endif.
endloop.
I am using " At selection screen:
at selection-screen.
if gv_flag = space.
loop at screen.
if screen-group1 = 'A1' .
screen-active = 1.
modify screen.
endif.
endloop.
loop at screen.
if screen-group1 = 'A2' .
screen-active = 1.
modify screen.
endif.
endloop.
loop at screen.
if screen-group1 = 'A3' .
screen-active = 1.
modify screen.
endif.
endloop.
gv_flag = 'X'.
elseif gv_flag = 'X'.
loop at screen.
if screen-group1 = 'A1' .
screen-active = 0.
modify screen.
endif.
endloop.
loop at screen.
if screen-group1 = 'A2' .
screen-active = 0.
modify screen.
endif.
endloop.
loop at screen.
if screen-group1 = 'A3' .
screen-active = 0.
modify screen.
endif.
endloop.
gv_flag = space.
endif.You are hiding it in INITIALIZATION block which means it hides only once before PBO. If you want to show/hide it in turn simply place all your code in PAI, not just part of it.
Regards
Marcin
Sorry didn't notice part of the code in the bottom
The logic should go like
at selection-screen.
if gv_flag = space.
loop at screen.
case screen-group1.
when 'A1' or 'A2' or 'A3'
screen-active = 1.
modify screen.
when others.
endcase.
endloop.
gv_flag = 'X'.
elseif gv_flag = 'X'.
loop at screen.
case screen-group1.
when 'A1' or 'A2' or 'A3'.
screen-active = 0.
modify screen.
when others.
endcase.
endloop.
gv_flag = space.
endif.
Regards
Marcin
Edited by: Marcin Pciak on Apr 1, 2011 12:33 PM -
Display output list by pressing a push button on selection screen.
Hi All,
Is there any possibility of displaying the output list by pressing a push button on the selection screen.
Thanks,
Neslin.Hi,
Just write the code like this
Case sy-ucomm.
when 'PRE'.
Here write the output list
" leave to list-processing. Write this statement
endcase.
Regards
Sarves -
Radio button in selection screen and push button
Hi experts,
I want to give radio button in selection screen side by side.
how we can do this on slection screen.
secondly i want to resize push button on selection screen.
please provide me the exact solution.
thanks
babbalHi babbal,
For Your Requriment yo can go to tcode se51 & then give ur program name & give screen number as 1000 because 1000 is default screen for all the programs and in se51 Press Layout button & then you can make changes to the Selection screen according to your requriment
Hope it will be Helpfull.......!!
Thanks & Regards,
Bhushan -
Hello Gurus ,
I want to insert data from selection screen into my ztable , I have activated save button in menu bar , with function text SAVE and function type , E , S , null , H , P all I have tesated , but it is not working , with case sy-ucomm , when 'SAVE' .
In same way Print is working but not save .I am not getting the prob .
Is there any problem , plz help me , I m in hurry .
I am waiting for all of your valuable reply .
Regards,
Joy .Hi Joy,
Check out the below related threads for placing the push buttons ... Frame logic accordingly as per your requirement ..
push button in selecion screen
Push button on selection screen
push button on selection screen\
PUSH Button in Selection Screen -
How many push buttons can u place on selection screen application tool bard
hi
how many push buttons can u place on selection screen application tool bar
and what is default function code for that buttons.Hi Chaitanya,
You can place maximum 5 push buttons on Application Toolbar.
please award the points incase if you are able to get the solution.
Thanks
Sivaram -
How to create button in selection screen
hi
experts can u help me plzzzzzzzzzzz
for thisHi,
You can create Push Buttons in the Slection Screen by assigning a User commnand to it.
Below is the stynax
SELECTION-SCREEN BEGIN OF SCREEN 1000.
SELECTION-SCREEN PUSHBUTTON 15(25) PUBU
USER-COMMAND CODE1.
SELECT-OPTIONS SEL2 FOR SPFLI_WA-CONNID.
PARAMETERS PAR2 TYPE I.
SELECTION-SCREEN END OF SCREEN 1000.
then you need to write the code for the User command ( here CODE1) at the Selection screen event.
You can also check the Program demo_sel_screen_pushbutton in any Sap Server. this is a demo program.
Let me know incase you need any further info,
Thanks and Regards
Message was edited by:
Pallavi S -
Custom button at selection screen toolbar
Hi All,
I have a requirement to add button at selection screen toolbar. Once this button was hit another program should be called.
Do you have any idea on how to do this. Appreciate your help.
Thanks in advance.Hi,
To add custom Button to your selection screen see the below example-
TABLES: SSCRFIELDS.
TYPE-POOLS ICON.
PARAMETERS: p_bukrs TYPE bukrs.
INITIALIZATION:
V_FUNCTXT-ICON_ID = ICON_XXX. " Add Icon to button if you want.
V_FUNCTXT-QUICKINFO = 'xxxx'. " Text to be displayed when you hover mouse over the button
V_FUNCTXT-ICON_TEXT = 'yyyy'. " Text to be dsipalyed on button.
SSCRFIELDS-FUNCTXT_01 = V_FUNCTXT.
AT SELECTION-SCREEN.
CASE SSCRFIELDS-UCOMM.
WHEN 'FC01'. " Handle the click on button. By default this function code will be
to your
"Your logic
ENDCASE.
Maybe you are looking for
-
Ipod not recognized by any MAC computer
I have a 20gb IPOD 2nd generation which has worked fine until recent itunes and tiger software upgrade. Now Finder nor utilities (ipod updater) nor itunes will recognize the ipod when connected with firewire-- even in disc mode. Ipod is not recognize
-
Hi, I just got a new Intel iMac and I have been having problems printing from it. I have an iMac G3 that I use to store music and do backups using retrospect. There is a HP Photosmart 8200 series printer that is attached to the G3. I have set the G3
-
hi, I am trying to find out a bit more about creative cloud... I currently use PS5 extended... I have it on my desk top at home but travel often and use a pc. which does not have PS5 because it is licensed to mac... So i am now thinking of using
-
Premiere Pro CC とのDirect Linkが重い
Premiere Pro CC からDirect Linkした時に非常に重くなります. 再生はモニターパフォーマンスインジケーター(モニタのアイコン)が赤くなり.1/2くらいの再生速度になります. 操作のパフォーマンスも落ちます. 同じシーケンスをEDLで書き出してSpeedGradeで取り込んだ場合は問題なく再生されます. 使用したムービーはProRes 422とMedia Encoderで出力したDNxHD 145です. 2台のPCで検証しましたが.Mercury Playbac Engin
-
How attend error in forms menu like pragma exception_init ?
hello, I have problem with error in my menu. I created menu and I put code to my buttons in menu:for example execute_trigger('test'); I have some forms and if I am in another forms and call my button with execute_trigger('test'); I get error FRM-4070