Application toolbar list report
Hi,
How would I get a button on the application toolbar for an abap list report.
I could do it using a selection screen, but I want the button usuable when the list output is printed
to the screen. I have clickable icons on the list report. Be nice to have toolbar buttons.
thanks
Dylan.
Hi you are asking about selection-screen application tool bar buttons or output application tool bar buttons. If u want selection-screen application tool bar buttons then go with SCCRFIELDS structure. If u want output application tool bar buttons then go with Set pf-status.
Regards,
Kumar.
Similar Messages
-
How to disable the button in application toolbar in report pgm
Can anyone help with How to disable the button in application toolbar in report pgm
Hi,
You can use it_excluding to disable button on the tool bar.You have to find the function code for the required button and append that function code to the it_excluding .The optional IMPORTING parameter IT_EXCLUDING is an internal table. It is only needed if the caller uses the list tool standard interface but wants to deactivate interface functions which he or she does not need.You can have your defined pf-status using I_CALLBACK_PF_STATUS_SET.
SAMPLE PROGRAM
tables spfli.
type-pools: slis.
DATA W_FCODE TYPE SLIS_EXTAB-FCODE.
data: t_spfli TYPE SPFLI OCCURS 0 WITH HEADER LINE.
select * from spfli into table t_spfli.
data : t_excluding TYPE SLIS_T_EXTAB .
W_fcode = '&OUP'.
append w_fcode to t_excluding.
W_fcode = '&ODN'.
append w_fcode to t_excluding.
call function 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_STRUCTURE_NAME = 'SPFLI'
IS_LAYOUT =
IT_FIELDCAT =
IT_EXCLUDING = T_EXCLUDING
tables
t_outtab = T_SPFLI
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.
http://help.sap.com/saphelp_nw2004s/helpdata/en/99/49b844d61911d2b469006094192fe3/frameset.htm
Regards,
Priyanka. -
Create button to application toolbar in report
Hi,
May i know how to create new button name continue near the save button or print button at the application toolbar?
Any suggestion ???HI,
For creating a new button, write the name of the button on the tool bar for ex. &CONTI.
Double click on it, and choose the icon and function text ofr it.
Save and activate the menu.
Your button gets created in the menu.
Declare the variable in your program with the code for continue.
Here's an example,
form set_pf_status using rt_extab type slis_t_extab.
set pf-status 'ALV_MENU'.
endform.
form user_command using p_ucomm type sy-ucomm
data : vbeln type vbeln_va.
case p_ucomm.
when '&CONTI'.
ENDCASE.
Regards,
Pritha.
Reward if helpful. -
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 -
Using application toolbar push buttons in report
Hello folks,
I'm new to ABAP and so i'm facing some problems with my code.
I have copied a standard program to my Z program (ZXXXXX). I have added few push buttons to the application toolbar of the Z program (ZXXXXX) and now on click of the 1st button i need to call another standard program.
Where should I write the code for the action to be performed on click of the buttons? I am aware that it is generally written in the PAI module but I did not have this module, its a normal report program and not a module pool.
Need your help.
Thanks in advance.Welcome on SCN!
Please do not forget to read Welcome and Rules of Engagement
As for the question, you would need to clarify where this application toolbar option is placed:
- in selection screen?
- in list (output of program)?
If first applies, do as above suggested (using AT SELECTION-SCREEN event).
If second is what you need, use event AT USER-COMMAND .
In both cases variable sy-ucomm will hold function code of triggered function (i.e sy-ucomm = 'MY_BUTTON' ). If that condition is fulfilled simply use SUBMIT 'MY_PROGRAM' AND RETURN , or just SUBMIT 'MY_PROGRAM' if you don't want to get back to calling program.
Regards
Marcin -
Adding Button on application toolbar on ABAP List display screen....
Hello Gurus,
I copied SAP program 'RFBUEB00' into custom program. When I execute the custom report, I see the data lijne by line in ABAP list. I see a deafult 'Select' button on application toolbar.
If I want to add additional custom button on application toolbar on ABAP list display screen, how can I do it ? Please help.
Regards,
Jainam.
Edited by: Jainam Shah on Oct 27, 2009 5:44 PM>
Jainam Shah wrote:
> In my case it just rights the data in ABAP screen as follows. I can't use ALV grid and stuff because its on older version.
>
>
FORM LISTE_SCHREIBEN.
>
> check = '@T9@'.
>
> FORMAT COLOR COL_KEY INTENSIFIED OFF.
> WRITE: / SY-VLINE,
> check,
> BKPF-BUKRS,
> BKPF-BELNR,
> BKPF-GJAHR.
> FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
> WRITE: BKPF-BLART,
> (8) BKPF-BLDAT DD/MM/YY,
> (8) BKPF-BUDAT DD/MM/YY,
> BKPF-WAERS,
> BKPF-XBLNR,
> 80 SY-VLINE.
> XAUSGABE = 'X'.
> HIDE: BKPF-BUKRS, BKPF-BELNR, BKPF-GJAHR, BKPF-BSTAT, XAUSGABE.
> IF BKPF-BKTXT NE SPACE.
> FORMAT COLOR COL_KEY INTENSIFIED OFF.
> WRITE: / SY-VLINE, CHAR4 UNDER BKPF-GJAHR.
> FORMAT COLOR COL_NORMAL INTENSIFIED.
> WRITE: BKPF-BKTXT UNDER BKPF-BLART,
> 80 SY-VLINE.
> HIDE: BKPF-BUKRS, BKPF-BELNR, BKPF-GJAHR, BKPF-BSTAT, XAUSGABE.
> ENDIF.
> ENDFORM.
>
>
> I have to select multiple lines and proces them. For one line I know I can use AT-LINE-SELECTION but this is multiple lines...
What is your SAP system version?
It seems to be displayed only in ALV. Well, if you can make it to display in LIST ... you can go with set pf-status.
good luck -
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 -
How to call report by click application toolbar button?
I need to know the way to call a report by click a button in application toolbar?
BR,
Ali
Moderator message: next time, please (re)search yourself instead of asking basic questions.
Edited by: Thomas Zloch on Aug 31, 2010 11:44 AMHi Ali,
Selection-screen function key is used to add push buttons on application tool bar.
Syntax:
selection-screen functuin key<num>
Where num is ranging from 1 to 5.
whenever application toolbat components are added using above statement,tables are defined in the structure "SSCRFIELDS" as "Functxt_01","Functxt_02","Functxt_03","Functxt_04","Functxt_05" for the related function key numbers.
eg:
Tables SSCRFIELDS.
Selection-Screen pushbutton/10(10 lb1 user-command pb1.
Selectiong-Screen Function key1.
Selectiong-Screen Function key2.
Selectiong-Screen Function key3.
Selectiong-Screen Function key4.
Selectiong-Screen Function key5.
Initialization.
sscrfields-Functxt_01 = 'first".
sscrfields-Functxt_01 = 'fifth".
At Selection-Screen.
case sy-ucomm.
When 'first'.
Sumbit zreport.
endcase.
Hope it solves your problem.
Regards,
Amarnath S -
Pushbuttons on application toolbar of basic list 1
Hi all,
I want to do BDC for sales order creation but before that my user want to validate item data based on some conditions (customised in system using user exit : idea is to avoid occureence of user exit by validating it on internal table level )
So I will display the data in the list format and user will check it...and then execute BDC...for that I want some pushbuttons on application toolbar of basic list 1.....(not on selection screen)
I am thinking of set pf-status...but how and where to set it?
Any idea please........
Thanks....Hi,
You can place SET PF-STATUS just before the display list code.
Regards,
Sravanthi -
Print Layout Designer / Open Items List Report
When I open the Reports>Sales and Purchasing>Open Items List report - How can I associate a different Print Layout depending on which Document Type is then selected from the drop down list..
Eg. When I print a list of Open Purchase Orders I want to us a different print template than when I print a list of Open Sales Orders ?
Thanks for any pointers..
KarenHello ...
You must enter the LDP clicking the pencil icon that appears in the toolbar when the window is open open items list.
Once there, create 2 new text fields, one with the text "Orders" and another that says "Customer Orders". Both fields were identified as Field_XXX and Field_YYY (where XXX and YYY are numbers that appear in their fields)
There is a field of variable rate system, which is what lets you see the description of the type of document. (Orders, Customer Orders, etc.).. This field corresponds to variable 100 (check it that way), we assume that this field is the field F_ZZZ within the layout.
Create 2 fields of type formula, the formula to edit it (Field_XXX == Field_ZZZ) and (Field_YYY == Field_ZZZ) respectively.
Create 2 text fields (these are only to test the application, then to understand the functionality can not delete them or leave them visible). Set in one of these areas, the letter "A" in the second field and set the letter "B". both camps can put one over the other in the layout.
Now comes the application of the field ... "A" condicionelo one of the formula fields and country "B" condicionelo another formula field. The conditional mode is to set the formula field in the general tab LINK A. ..
Try then see a preview of both reports and can see that depending on the type of document you will see "A" or "B" as appropriate.
Apply the same logic as those fields that you will create and generate the difference between formats.
I hope this will be helpful
Best Regards, -
Module-Pool application toolbar
Respected SAP guru,
I like to know how Application Toolbar button should be disabled or enabled in Module-Pool Programming plz, explain with example.
Sincerly,
sandeepAs mentioned in the Thread, use the Syntax
SET Pf-STATUS 'STATUS' excluding itab
Example:
data: BEGIN OF MTAB_UCOMM_EXCLUDE OCCURS 0,
VALUE(4) TYPE C,
END OF MTAB_UCOMM.
AT USER-COMMAND.
PERFORM SET_PF_STATUS. ...
FORM SET_PF_STATUS *
Set up the menus/buttons for the report *
FORM SET_PF_STATUS.
CLEAR MTAB_UCOMM_EXCLUDE.
REFRESH MTAB_UCOMM_EXCLUDE.
CASE MI_CURRENT_PAGE.
WHEN 1.
*-- Do not want any pushbuttons that point to items to the right
*-- since the list is at its rightmost position
MTAB_UCOMM_EXCLUDE-UCOMM = 'FRST'.
APPEND MTAB_UCOMM_EXCLUDE.
MTAB_UCOMM_EXCLUDE-UCOMM = 'PREV'.
APPEND MTAB_UCOMM_EXCLUDE.
WHEN MI_TOTAL_PAGES.
*-- Do not want any pushbuttons that point to items to the left
*-- since the list is at its leftmost position
MTAB_UCOMM_EXCLUDE-UCOMM = 'LAST'.
APPEND MTAB_UCOMM_EXCLUDE.
MTAB_UCOMM_EXCLUDE-UCOMM = 'NEXT'.
APPEND MTAB_UCOMM_EXCLUDE.
WHEN OTHERS.
*-- Want all pushbuttons to appear on any other page
ENDCASE.
SET PF-STATUS 'MAIN' EXCLUDING MTAB_UCOMM_EXCLUDE.
ENDFORM. " SET_PF_STATUS
Hope this helps
Vinodh Balakrishnan -
Error when opening open item list report
Hi Experts,
I was trying to open inventory open item list but I'm getting error. The user is a "super user".
Thanks,
JaniceHi,
It is an application error. Check SAP note:
2008925 - You cannot run the Open Item List report for Purchase
Requests
Thanks & Regards,
Nagarajan -
How to perform a bottom of the application toolbar by codding?
Hi.
I tried to found info about this, it seems to be easy, but i couldn't found it.
I have a ALV Report (with funtion module not OO).
I copied a gui status from program saplkkbl status gui: standard_fullscreen.
In the ALV i have one column editable, i could refresh the info when i push the bottom that refers the function code &REFRESH
I add a buttom in the application toolbar, i would like to execute or perform the standard funtion '&Refresh', and after that do my own code.
how could i do it?
thanks!!!
Albio.-Hi.
Well... i'm doing my program like you told me:
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
rs_selfield-refresh = 'X'.
CASE r_ucomm.
WHEN 'CALC'. "buttom added by me
PERFORM recalcula_formula.
WHEN 'RUN'. "buttom added by me
PERFORM corre_batch_input.
endcase.
ENDFORM. "USER_COMMAND
I need to execute the standard funtion bottom '&REFRESH' before my perform 'recalcula_formula'. -
Buttons on ALV Application Toolbar
Hi,
I have added buttons on the Application Toolbar of the ALV (in the GUI status).
There are a lot of buttons and due to lack of space some of the buttons go out of the screen.
Need to know if there is a way to make these buttons scrolable or in a dorp down.
Thanks for the help.
KarenHi Karen,
I also faced the same issue but solved it using alternative solution.
1) Go to PF-STATUS and create a MENU BAR.
2) Give Appropriate NAME and inside it write FUNCTION CODE given for buttons under "Code"
3) Appropriate description under "Text"
4) Save and activate.
Now, execute the report and even if the buttons are going out of screen, you have option to select the button from MENU BAR.
This is the best solution for this problem as far as i know.
Also, if you re-size your window ; the you will get tabs with drop down.
I hope this will help you in solving your issue.
Regards,
Rahul Mahajan -
How to deactive a button in application toolbar
how to deactive a button in application toolbar?
Simple example
This example shows how to create a toolbar with a single Exit button, used to exit the program.
Steps:
Create a screen and add a custom container named TOOLBAR_CONTAINER
Code:
REPORT sapmz_hf_toolbar .
TYPE-POOLS: icon.
CLASS cls_event_handler DEFINITION DEFERRED.
G L O B A L D A T A
DATA:
ok_code LIKE sy-ucomm,
Reference for conatiner
go_toolbar_container TYPE REF TO cl_gui_custom_container,
Reference for SAP Toolbar
go_toolbar TYPE REF TO cl_gui_toolbar,
Event handler
go_event_handler TYPE REF TO cls_event_handler.
G L O B A L T A B L E S
DATA:
Table for registration of events. Note that a TYPE REF
to cls_event_handler must be created before you can
reference types cntl_simple_events and cntl_simple_event.
gi_events TYPE cntl_simple_events,
Workspace for table gi_events
g_event TYPE cntl_simple_event.
CLASS cls_event_handler DEFINITION
CLASS cls_event_handler DEFINITION.
PUBLIC SECTION.
METHODS:
on_function_selected
FOR EVENT function_selected OF cl_gui_toolbar
IMPORTING fcode,
on_dropdown_clicked
FOR EVENT dropdown_clicked OF cl_gui_toolbar
IMPORTING fcode posx posy.
ENDCLASS.
CLASS cls_event_handler IMPLEMENTATION
CLASS cls_event_handler IMPLEMENTATION.
METHOD on_function_selected.
CASE fcode.
WHEN 'EXIT'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMETHOD.
METHOD on_dropdown_clicked.
Not implented yet
ENDMETHOD.
ENDCLASS.
START-OF-SELECTION.
SET SCREEN '100'.
*& Module STATUS_0100 OUTPUT
text
MODULE status_0100 OUTPUT.
IF go_toolbar_container IS INITIAL.
Create container
CREATE OBJECT go_toolbar_container
EXPORTING
container_name = 'TOOLBAR_CONTAINER'.
Create toolbar
CREATE OBJECT go_toolbar
EXPORTING
parent = go_toolbar_container.
Add a button
CALL METHOD go_toolbar->add_button
EXPORTING fcode = 'EXIT' "Function Code
icon = icon_system_end "ICON name
is_disabled = ' ' "Disabled = X
butn_type = cntb_btype_button "Type of button
text = 'Exit' "Text on button
quickinfo = 'Exit program' "Quick info
is_checked = ' '. "Button selected
Create event table. The event ID must be found in the
documentation of the specific control
CLEAR g_event.
REFRESH gi_events.
g_event-eventid = go_toolbar->m_id_function_selected.
g_event-appl_event = 'X'. "This is an application event
APPEND g_event TO gi_events.
g_event-eventid = go_toolbar->m_id_dropdown_clicked.
g_event-appl_event = 'X'.
APPEND g_event TO gi_events.
Use the events table to register events for the control
CALL METHOD go_toolbar->set_registered_events
EXPORTING
events = gi_events.
Create event handlers
CREATE OBJECT go_event_handler.
SET HANDLER go_event_handler->on_function_selected
FOR go_toolbar.
SET HANDLER go_event_handler->on_dropdown_clicked
FOR go_toolbar.
ENDIF.
ENDMODULE. " STATUS_0100 OUTPUT
http://www.erpgenie.com/abap/controls/toolbar.htm#Simple%20example
http://help.sap.com/saphelp_nw04/helpdata/EN/42/d2ab343e416635e10000000a1553f6/content.htm
help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCITOOLBAR/BCCITOOLBAR.pdf
Regards,
Jagadish
Maybe you are looking for
-
Crystal report not shown after application idle time
i have a web page which uses around 10 session variables to store values on a button click.and after assign session values Response.Redirect("~/url",false); to a a page which contains crystal report viewer.and report should show those session values.
-
just bought my mac mini. loggin into my game center, and after accepting the user agreement, it then saves my options. After trying serveral times, my screen just shows my options are saving and does nothing past this point. even after waiting a v
-
I have begun to get a error message "failed to open PDF" when placing a pdf file into a ID document. This started suddenly so I assume some preference setting got changed, but I am at a loss of where to turn next. I am running IMAC G5 using OSX10.4.1
-
Auto forwarding option for a substitute
Hi , Can somebody help me the workflow automatic forwarding option works with substitutes. USER A is a substitute for for USER B and both users are setup for automatic forwarding to external outlook e-mail address. When a workitem sent to USE
-
Hi NG, I just installed j2sdk1.4.0_01 and Tomcat 4.0.4 on an WinXP machine. I did it like written in the running.txt file. the problem is they alwasy talk about something like $catalina_home But I don't know wh