Should Standard Toolbar FIND work on an ALV within a custom container ?
I have an ALV in a custom container on a screen.
The FIND and FIND NEXT of the ALV toolbar work fine against the grid.
Should the FIND and FIND NEXT of the standard toolbar also work against the ALV if they are "activate" in the GUI status?
If so, what do I call/execute in response to the "FIND" ok-code?
I've tried calling the function ALV_POPUP_TO_SEARCH2 and the popup comes up, but it doesn't do anything.
Please advise at your earliest convenience.
Thanks
djh
Hi Rich,
Absolutely. Especially as they can paint the picture, and then blame the techies when their fiction is exposed.
Similarly, we had a situation where the Expense Report WD was failing, and the functional person ensured that everyone knew it was a technical problem and therefore my fault (with SAP as the popular co-conspirator).
Sadly the message above the Java stack messages was "No entry in table T706Z for argument ' '". Had the functional check their config and all was well. No one apologised though......
Last week at a different site the same thing happened (this time with TA20C) but the funky took one look at it and reviewed their config to solve - so they're not ALL the same.
Cheers
Gareth
Similar Messages
-
Handling the Standard Toolbar Button click of an ALV
Hi Experts,
I have created an ALV grid output using CL_GUI_ALV_GRID with standard buttons(default) on the toolbar. When I click on any of these standard buttons, say '+' button to insert records, my custom program is not hit.
I know there is a protected event 'TOOLBAR_BUTTON_CLICK' which I tried to handle in my program but it did not work. However, I am able to handle the public event 'DOUBLE_CLICK' of the same class 'CL_GUI_ALV_GRID'.
So..can anyone tell how to handle this protected event OR how to handle the STANDARD buttons on ALV toolbar so that they hit my custome code.
Thanks very much.
Regards,
RudreshHello Rudresh
The point is to "re-define" the standard ok-codes of toolbar buttons:
" Make toolbar interactive
CALL METHO go_grid->set_toolbar_interactive( ). " raises event TOOLBAR
" Event handler method
METHOD handle_toolbar.
* define local data
DATA: ls_button TYPE stb_button.
" Redefine function code
LOOP AT e_object->mt_toolbar INTO ls_button
WHERE ( function = cl_gui_alv_grid=>MC_FC_LOC_INSERT_ROW ).
ls_button-function = 'MY_FCODE'. " triggers USER_COMMAND
MODIFY e_object->mt_toolbar FROM ls_button INDEX syst-tabix.
ENDLOOP.
ENDMETHOD.
Regards
Uwe -
How to insert the new toolbar icons to a ALV report in custom container
Hi,
I found the exporting parameter for excluding the toolbar icons in the method "set_table_for_first_display" but I didn't find any parameter for including the new toolbar icons. I do not want to include the toolbar icons through the PF-Status, but want to include them with the method. Please tell me is there any option of including toolbar icons with using the above method.
Thanks,
Srinivas.Hi Srinivas,
Refer to the link
Adding buttons to standard alv toolbar in OOALV
Thanks -
Finding A Piece Of Text Within A Text?
Hi.
I am trying to create a program to find a piece of text within a file (containing text). I know that my life could be made much easier if I had the util.java.regex package but it doesn't seem to import.
I am working on a Windows XP Platform.
I have tried the Hello World program which works fine but it is just trying to import this package...I am trying to work through this slowly so that I can understand each stage... so where I have come upto now is why does the following code not compile. I am just interested in taking a .txt file at the standard input which is used to serach against an Actor's name that I specify in the next (argument?) line?
Thanks for all the help
My Code so far...
import java.io.*;
// This line always has to be put in
public class MyFirstFileReadingAppTwo
// Main method
public static void main (String args[])
// Stream to read file
System.out.print("Enter your filename: ");
BufferedReader br = new BufferedReader(new FileInputStream (System.in));
String userName = null;
try
// Open the input stream
String file = br.readLine();
BufferedReader reader2 = new BufferedReader(new FileReader(file));
// Read a line of text
System.out.println(new
ln(new (fin).readLine() );
// Close our input stream
fin.close();
// Catches any error conditions
catch (IOException e)
System.err.println ("Unable to read from file");
System.exit(-1);
} -
Can not find "Work Folder" in windows server standard edition
Guys, I have a testing lab and all is working with the exception of the fact that I can not find "work Folder" to install it. I'm using windows server 2012 standard evaluation copy edition. Normally work folder should be under >file
and storage service>file and iSCSI services. However, it is not there. Can someone help please
staphiscoHi,
From the overview, Work Folder is not supported in Windows Server 2012 (only Windows Server 2012 R2).
Work Folders Overview
http://technet.microsoft.com/en-us/library/dn265974.aspx
Software requirements
Work Folders has the following software requirements for file servers and your network infrastructure:
A server running Windows Server 2012 R2 for hosting sync shares with user files
If you have any feedback on our support, please send to [email protected] -
Custom Button in ALV Grid standard toolbar
Hello Experts,
I am working on the program in which i have to add custom button to standard toolbar in ALV. I have created the button using the method as below
data: lr_functions type ref to cl_salv_functions_list.
lr_functions = gr_table->get_functions( ).
lr_functions->set_default( abap_true ).
data: l_text type string,
l_icon type string.
* l_text = text-b01.
l_icon = icon_complete.
try.
lr_functions->add_function(
name = 'Update Equipment Cost'
icon = l_icon
text = l_text
tooltip = 'Update Equipment Cost'
position = if_salv_c_function_position=>right_of_salv_functions ).
catch cx_salv_existing cx_salv_wrong_call.
endtry.
I don't understand how to add functionality to this button. I want to design the functionality as when user press button then corresponding values on the screen will be automatically get updated in the table.
Thanks,
AvadhutHi Avadhut,
When you want to add a custom button on ALV - better copy the GUI Status of the standard ALV to your program. So all the function codes are copied , now you can go to the GUI_STATUS which is copied and you can mention your own function code or you can let the standard function codes as it is. You can copy the GUI of standard ALV from SE80 transaction. Let me know if you need any assistance in doing it.
Now, if you want to write the code for any of the button on ALV - then you need to handle it is the class.
I used CL_SALV_TABLE - if you are using same then the below code gives you an idea of it.
1. Create a local class in your program
* CLASS lcl_alv_events DEFINITION
CLASS lcl_alv_events DEFINITION FINAL.
PUBLIC SECTION.
METHODS: on_user_command FOR EVENT added_function OF cl_salv_events
IMPORTING e_salv_function.
ENDCLASS. "lcl_alv_events DEFINITION
DATA: gv_event_handler TYPE REF TO lcl_alv_events.
CREATE OBJECT gv_event_handler.
* Header object
CREATE OBJECT gr_header.
2. Class Implementation
CLASS lcl_alv_events IMPLEMENTATION.
METHOD on_user_command.
CASE e_salv_function.
**When PROCESS Button is selected
WHEN '&PROC'. ***> In my program I added Process button and fcode for it - &PROC
***********Write your code here ******************
ENDCASE.
ENDMETHOD.
ENDCLASS. "lcl_alv_events IMPLEMENTATION
3. Calling events
data: gr_events TYPE REF TO cl_salv_events_table,
gr_alv TYPE REF TO cl_salv_table.
TRY.
CALL METHOD cl_salv_table=>factory
IMPORTING
r_salv_table = gr_alv
CHANGING
t_table = p_in_tab[]. ***This is my internal table data.
gr_events = gr_alv->get_event( ).
SET HANDLER gv_event_handler->on_user_command FOR gr_events.
CATCH cx_salv_msg INTO lv_msg. "#EC NO_HANDLER
CATCH cx_salv_not_found INTO lv_excep. "#EC NO_HANDLER
CATCH cx_salv_data_error. "#EC NO_HANDLER
ENDTRY.
Regards,
Rafi -
I need the older version 3.6.16 for my at home based job for ChaCha. Their toolbar only works with this version and they say it is more compatible with this. And I have not been able to find a secure link to download this older version. Can you give me a secure link or is it possible to download this older version securely?
If you only need Firefox 3.6 for just one thing then you may be better off using a portable version of Firefox as it will not impact your Firefox 6.0.2 install. You can install it on hard disk or on a usb flash drive. Firefox 3.6.22 is the current security update as 3.6.16 is old.
http://portableapps.com/apps/internet/firefox_portable/localization#legacy36 -
Add Button with ALV Standard Toolbar.
Hi,
Can any one tell me how to add user-defined button with ALV
Standard toolbar? When I add Pf-status for alv output , standard alv toolbar is not displayed.
Plz do needful.On the toolbar event of your alv grid, all the button as shown in the code below.
FORM handle_toolbar USING i_object TYPE REF TO cl_alv_event_toolbar_set .
DATA: ls_toolbar TYPE stb_button.
CLEAR ls_toolbar.
MOVE 'EXCH' TO ls_toolbar-function. "#EC NOTEXT
MOVE 2 TO ls_toolbar-butn_type.
MOVE icon_calculation TO ls_toolbar-icon.
MOVE 'Payment in Other Currencies'(202) TO ls_toolbar-quickinfo.
MOVE ' ' TO ls_toolbar-text.
MOVE ' ' TO ls_toolbar-disabled. "#EC NOTEXT
APPEND ls_toolbar TO i_object->mt_toolbar.
ENDFORM
CLASS lcl_event_handler DEFINITION .
PUBLIC SECTION .
METHODS:
*To add new functional buttons to the ALV toolbar
handle_toolbar FOR EVENT toolbar OF cl_gui_alv_grid
IMPORTING e_object e_interactive ,
ENDCLASS.
CLASS lcl_event_handler IMPLEMENTATION .
*Handle Toolbar
METHOD handle_toolbar.
PERFORM handle_toolbar USING e_object e_interactive .
ENDMETHOD .
ENDCLASS.
DATA gr_event_handler TYPE REF TO lcl_event_handler .
*--Creating an instance for the event handler
CREATE OBJECT gr_event_handler .
*--Registering handler methods to handle ALV Grid events
SET HANDLER gr_event_handler->handle_toolbar FOR gr_alvgrid .
Hope this helps.
Thanks,
Balaji -
Standard toolbar in an ALV output report
hey guys,
can i manipulate the standard toolbar (BACK, CANCEL, EXIT) of an ALV output report as in a screen?
I want to put some codes when the user ticks on the particular button.
Thanks a lot!
Regards,
Markin SE41
copy Program SAPLKKBL
Status STANDARD
to ur Program ZPROGRAM
Status ZSTANDARD
in ur Z program
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = repid
i_callback_pf_status_set = 'SET_PF_STATUS'
i_callback_user_command = 'USER_COMMAND'
below of ur program write these 2FOMS...
FORM set_pf_status USING rt_extab TYPE slis_t_extab.
*PF status of program 'SAPLKKBL' is 'STANDARD' is copied for standard
*options(buttons)
SET PF-STATUS 'ZLSTANDARD'.
ENDFORM. "set_pf_status
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
CASE sy-ucomm.
WHEN 'SAVE'.
*write ur code here
WHEN 'BACK'.
*write ur code here
WHEN 'EXIT'.
*write ur code here
ENDCASE.
ENDFORM. "user_command
Regatds,
Ramesh. -
How to display standard toolbar buttons in ALV which are not displayed in REUSE_ALV_GRID_DISPLAY
HI
GOOD
GO THROUGH THIS REPORT
TYPE-POOLS: SLIS.
DATA: FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
FIELDCAT_LN LIKE LINE OF FIELDCAT,
SORTCAT TYPE SLIS_T_SORTINFO_ALV,
SORTCAT_LN LIKE LINE OF SORTCAT,
EVENTCAT TYPE SLIS_T_EVENT,
EVENTCAT_LN LIKE LINE OF EVENTCAT,
LAYOUT TYPE SLIS_LAYOUT_ALV,
C_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE 'TOP_OF_PAGE',
W_LIST_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER.
DATA: COL_POS TYPE I,
P_LIGNAM TYPE SLIS_FIELDNAME VALUE 'STATUS'.
******Declare Data Areas for List Viewer (End)**************
Other Variables
DATA: W_DATUM(10) TYPE C. "Convert system Date for Output
******Declare Internal Table to Store Selected Data (Begin)*
DATA: BEGIN OF IREPO OCCURS 0,
EQUNR LIKE EQUI-EQUNR,
EQKTX LIKE EQKT-EQKTX, "description
ERDAT LIKE EQUI-ERDAT,
ERNAM LIKE EQUI-ERNAM,
AEDAT LIKE EQUI-AEDAT,
AENAM LIKE EQUI-AENAM,
EQART LIKE EQUI-EQART,
INBDT LIKE EQUI-INBDT,
ZZ_DESPATCH LIKE EQUI-ZZ_DESPATCH,
( ten million other Z fields)
VKBUR LIKE ILOA-VKBUR, "Sales Office
SWERK LIKE ILOA-SWERK, "Base Plant
KOSTL LIKE ILOA-KOSTL, "Cost Centre
ANLNR LIKE ITOB-ANLNR, "Asset Number
NAME1 LIKE LFA1-NAME1, "Haulier name
STATUS TYPE C, "Is it flagged for deletion?
END OF IREPO.
Table for descriptions
DATA: BEGIN OF IEQKT OCCURS 0,
EQUNR LIKE EQKT-EQUNR,
EQKTX LIKE EQKT-EQKTX,
END OF IEQKT.
LOD Names - Internal Buffering
DATA: BEGIN OF VENDLIST OCCURS 0,
LIFNR LIKE LFA1-LIFNR, "Vendor Number
NAME1 LIKE LFA1-NAME1, "Vendor Name
END OF VENDLIST.
******Declare Internal Table to Store Selected Data (End)**
TABLES: EQUI,ILOA.
*******Selection Screen
SELECTION-SCREEN BEGIN OF BLOCK BLK1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS: P_EQUNR FOR EQUI-EQUNR, "Fleet Number
P_PLATE FOR EQUI-ZZ_PLATE_NO, "Registration
P_EQART FOR EQUI-EQART. "Truck Type
PARAMETER: EXCLUDE AS CHECKBOX. "Exclude Deleted Trucks
SELECTION-SCREEN END OF BLOCK BLK1.
SELECTION-SCREEN BEGIN OF BLOCK BLK2 WITH FRAME TITLE TEXT-002.
SELECT-OPTIONS: P_DESPG FOR EQUI-ZZ_DESPATCH, "Dgroup
P_VKBUR FOR ILOA-VKBUR, "Sales Office
P_SWERK FOR ILOA-SWERK. "Plant
SELECTION-SCREEN END OF BLOCK BLK2.
SELECTION-SCREEN BEGIN OF BLOCK BLK3 WITH FRAME TITLE TEXT-003.
SELECT-OPTIONS: P_HAULER FOR EQUI-ZZ_HAULER. "Haulier Vendor
SELECTION-SCREEN END OF BLOCK BLK3.
*******Select Data into Internal Table (Begin) ***************
START-OF-SELECTION.
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
TEXT = 'Reading Truck Master Table' .
SELECT EQUIEQUNR EQUIEQART EQUIERNAM EQUIERDAT EQUI~AENAM
EQUIAEDAT EQUIINBDT
EQUI~ZZ_DESPATCH
( ten million custom Z fields )
EQUI~ZZ_TIMEZONE
ILOAVKBUR ILOASWERK ILOA~KOSTL
INTO CORRESPONDING FIELDS OF TABLE IREPO
FROM ( EQUI INNER JOIN EQUZ ON
EQUIEQUNR = EQUZEQUNR )
INNER JOIN ILOA ON
EQUZILOAN = ILOAILOAN
WHERE EQUI~EQUNR IN P_EQUNR "Fleet Number
AND EQUI~EQART IN P_EQART "Truck Type
AND EQUI~ZZ_PLATE_NO IN P_PLATE "Registration
AND EQUI~ZZ_DESPATCH IN P_DESPG "Despatch Group
AND EQUI~ZZ_HAULER IN P_HAULER"Vendor
AND ILOA~SWERK IN P_SWERK "Plant
AND ILOA~VKBUR IN P_VKBUR."Sales Office
If successful go and get the descriptions
IF SY-SUBRC EQ 0.
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
TEXT = 'Reading Descriptions' .
SELECT EQUNR EQKTX FROM EQKT
INTO CORRESPONDING FIELDS OF TABLE IEQKT
FOR ALL ENTRIES IN IREPO
WHERE EQUNR = IREPO-EQUNR
AND SPRAS = 'EN'.
SORT IEQKT BY EQUNR.
ENDIF.
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
TEXT = 'Check For Deletion Flags' .
DATA: L_EQUNR LIKE EQUI-EQUNR,
L_OBJNR LIKE JEST-OBJNR.
LOOP AT IREPO.
CONCATENATE 'IE' IREPO-EQUNR INTO L_OBJNR.
Start off by saying that the Truck is OK
IREPO-STATUS = '3'.
Now see if the Truck has been flagged as Inactive e.g. under repair
PERFORM STATUS_CHECK USING L_OBJNR 'I0320'.
IF SY-SUBRC EQ 0.
IREPO-STATUS = '2'. "It's inactive
ENDIF.
Now see if the Truck has been flagged for deletion.
PERFORM STATUS_CHECK USING L_OBJNR 'I0076'.
IF SY-SUBRC EQ 0.
IREPO-STATUS = '1'. "It's deleted
ENDIF.
MODIFY IREPO.
CLEAR IREPO.
ENDLOOP.
If exclude is chosen lose deleted items
IF EXCLUDE = 'X'.
DELETE IREPO WHERE STATUS = '1'.
ENDIF.
Final processing
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
TEXT = 'Prepare Data for Display' .
SORT IREPO BY EQUNR.
LOOP AT IREPO.
Get Description of Truck
READ TABLE IEQKT WITH KEY EQUNR = IREPO-EQUNR BINARY SEARCH.
IF SY-SUBRC EQ 0.
IREPO-EQKTX = IEQKT-EQKTX.
ELSE.
IREPO-EQKTX = 'No Description in Truck Master'.
ENDIF.
Get Name of Owner
READ TABLE VENDLIST WITH KEY LIFNR = IREPO-ZZ_HAULER BINARY SEARCH.
IF SY-SUBRC NE 0.
SELECT SINGLE NAME1 FROM LFA1 INTO IREPO-NAME1
WHERE LIFNR = IREPO-ZZ_HAULER.
VENDLIST-LIFNR = IREPO-ZZ_HAULER.
VENDLIST-NAME1 = IREPO-NAME1.
APPEND VENDLIST.
SORT VENDLIST BY LIFNR.
ELSE.
IREPO-NAME1 = VENDLIST-NAME1.
ENDIF.
MODIFY IREPO.
CLEAR IREPO.
ENDLOOP.
END-OF-SELECTION.
Select Data into Internal Table (End) ****************
Build Field Catalogs (Begin)**************************
Fields with Standard Names
PERFORM RESETVALUES.
PERFORM ADDFIELD USING '1' 'EQUI' 'STATUS'. "Traffic Lights
FIELDCAT_LN-HOTSPOT = 'X'.
FIELDCAT_LN-KEY = 'X'.
PERFORM ADDFIELD USING '2' 'EQUI' 'EQUNR'. "Fleet Number
PERFORM ADDFIELD USING '3' 'EQKT' 'EQKTX'. "Description
PERFORM ADDFIELD USING '4' 'EQUI' 'ZZ_PLATE_NO'.
PERFORM ADDFIELD USING '5' 'EQUI' 'EQART'.
PERFORM ADDFIELD USING '6' 'ILOA' 'SWERK'.
PERFORM ADDFIELD USING '8' 'ILOA' 'KOSTL'.
PERFORM ADDFIELD USING '9' 'EQUI' 'ZZ_MINLOADSIZE'.
PERFORM HIDFIELD USING '10' 'EQUI' 'ERNAM'.
PERFORM HIDFIELD USING '11' 'EQUI' 'AEDAT'.
PERFORM HIDFIELD USING '12' 'EQUI' 'AENAM'.
PERFORM HIDFIELD USING '13' 'EQUI' 'INBDT'.
( ten million custom Z fields )
PERFORM HIDFIELD USING '56' 'EQUI' 'ZZ_TIMEZONE'.
PERFORM HIDFIELD USING '57' 'ILOA' 'VKBUR'.
PERFORM HIDFIELD USING '58' 'EQUI' 'ZZ_HAULER'.
PERFORM HIDFIELD USING '59' 'EQUI' 'ERDAT'.
Fields with Custom Names
PERFORM NEWNAME USING 'Haulier Name'.
FIELDCAT_LN-OUTPUTLEN = '20'.
PERFORM ADDFIELD USING '7' 'LFA1' 'NAME1'. "Haulier Vendor Name
PERFORM NEWNAME USING 'Tare Time'.
PERFORM HIDFIELD USING '54' 'EQUI' 'ZZ_TARE_TIME'.
PERFORM NEWNAME USING 'Trailer 1'.
PERFORM HIDFIELD USING '19' 'EQUI' 'ZZ_TRAILER1'.
PERFORM NEWNAME USING 'Trailer 2'.
PERFORM HIDFIELD USING '20' 'EQUI' 'ZZ_TRAILER2'.
PERFORM NEWNAME USING 'Trailer 3'.
PERFORM HIDFIELD USING '21' 'EQUI' 'ZZ_TRAILER3'.
Sort Criteria
PERFORM BUILD_SORTCAT.
******Build Event Catalog (Begin)****************************
PERFORM BUILD_EVENTCAT.
Magic box for selection criteria & traffic lights for truck status
PERFORM BUILD_LAYOUT.
********Add a header at the top of the report *******
PERFORM SET_REPORT_HEADER USING W_LIST_TOP_OF_PAGE[].
********Start List Viewer
PERFORM START_LIST_VIEWER.
******Start List Viewer (End)********************************
********FORM ROUTINES (Begin)********************************
Start Values for ALV Field Catalouge
FORM RESETVALUES.
FIELDCAT_LN-KEY = SPACE.
FIELDCAT_LN-DO_SUM = SPACE.
FIELDCAT_LN-NO_OUT = SPACE.
FIELDCAT_LN-QFIELDNAME = SPACE.
FIELDCAT_LN-HOTSPOT = SPACE.
FIELDCAT_LN-OUTPUTLEN = '0'.
CLEAR: fieldcat_ln-seltext_l, fieldcat_ln-seltext_m,
fieldcat_ln-seltext_s, fieldcat_ln-reptext_ddic.
ENDFORM.
Change key values for additional fields
FORM ADDFIELD USING POSITION TABLE_VALUE FIELD_VALUE.
FIELDCAT_LN-REF_TABNAME = TABLE_VALUE .
FIELDCAT_LN-FIELDNAME = FIELD_VALUE.
FIELDCAT_LN-COL_POS = POSITION.
APPEND FIELDCAT_LN TO FIELDCAT.
PERFORM RESETVALUES.
ENDFORM.
FORM HIDFIELD USING POSITION TABLE_VALUE FIELD_VALUE.
FIELDCAT_LN-NO_OUT = 'X'.
FIELDCAT_LN-REF_TABNAME = TABLE_VALUE .
FIELDCAT_LN-FIELDNAME = FIELD_VALUE.
FIELDCAT_LN-COL_POS = POSITION.
APPEND FIELDCAT_LN TO FIELDCAT.
PERFORM RESETVALUES.
ENDFORM.
FORM NEWNAME USING NAME.
FIELDCAT_LN-SELTEXT_L = NAME..
FIELDCAT_LN-SELTEXT_M = NAME.
FIELDCAT_LN-SELTEXT_S = NAME.
FIELDCAT_LN-REPTEXT_DDIC = NAME.
FIELDCAT_LN-OUTPUTLEN = '10'.
ENDFORM.
Sort Criteria
FORM BUILD_SORTCAT.
SORTCAT_LN-SPOS = '1'.
SORTCAT_LN-FIELDNAME = 'EQUNR'. "Truck Number
SORTCAT_LN-UP = 'X'.
SORTCAT_LN-DOWN = SPACE.
SORTCAT_LN-SUBTOT = SPACE.
APPEND SORTCAT_LN TO SORTCAT.
ENDFORM.
FORM BUILD_EVENTCAT.
EVENTCAT_LN-NAME = C_TOP_OF_PAGE.
EVENTCAT_LN-FORM = C_TOP_OF_PAGE.
APPEND EVENTCAT_LN TO EVENTCAT.
ENDFORM. " BUILD_EVENTCAT
Add an extra button to get an extra button the user can press to
see what selection criteria they entered
This info will then appear when the report is printed
FORM BUILD_LAYOUT.
LAYOUT-GET_SELINFOS = 'X'.
Now we want a traffic light to say if the Truck is deleted
the variable p_lignam contains the name in IREPO which stores the
value for the traffic light
LAYOUT-LIGHTS_FIELDNAME = P_LIGNAM.
LAYOUT-LIGHTS_CONDENSE = 'X'.
ENDFORM.
Invoke a custom status (toolbar) in case we want to add any extra
icons at a later date
FORM SET_PF_STATUS USING EXTAB TYPE SLIS_T_EXTAB.
SET PF-STATUS 'STAND' EXCLUDING EXTAB.
ENDFORM.
FORM START_LIST_VIEWER.
DATA: PGM LIKE SY-REPID.
PGM = SY-REPID.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = PGM
I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
IS_LAYOUT = LAYOUT
IT_FIELDCAT = FIELDCAT
IT_SORT = SORTCAT
I_SAVE = 'A'
IT_EVENTS = EVENTCAT[]
TABLES
T_OUTTAB = IREPO
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
ENDFORM.
*******Process Call Back Events (Begin)**************************
FORM USER_COMMAND USING UCOMM LIKE SY-UCOMM
SELFIELD TYPE SLIS_SELFIELD.
READ TABLE IREPO INDEX SELFIELD-TABINDEX.
CHECK SY-SUBRC = 0.
CASE UCOMM.
WHEN '&IC1'.
CASE SELFIELD-SEL_TAB_FIELD.
WHEN 'IREPO-EQUNR'.
Set Parameter ID and call ZTM3
Custom transaction to view Trucks
SET PARAMETER ID 'EQN' FIELD IREPO-EQUNR.
CALL TRANSACTION 'ZTM3' AND SKIP FIRST SCREEN.
ENDCASE.
ENDCASE.
ENDFORM.
*******Process Call Back Events (End)*****************************
Routine to print out user at the top
FORM SET_REPORT_HEADER USING LT_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER.
DATA: LS_LINE TYPE SLIS_LISTHEADER.
PERFORM CONVERT_DATE.
CLEAR LS_LINE.
LS_LINE-TYP = 'H'.
LS_LINE-INFO = 'ZT01 : Truck Master Data Report'.
APPEND LS_LINE TO LT_TOP_OF_PAGE.
CLEAR LS_LINE.
LS_LINE-TYP = 'S'.
LS_LINE-KEY = 'Run On :'.
LS_LINE-INFO = W_DATUM.
APPEND LS_LINE TO LT_TOP_OF_PAGE.
LS_LINE-KEY = 'User Name :'.
LS_LINE-INFO = SY-UNAME.
APPEND LS_LINE TO LT_TOP_OF_PAGE.
ENDFORM. " SET_REPORT_HEADER
FORM CONVERT_DATE.
CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL'
EXPORTING
DATE_INTERNAL = SY-DATUM
IMPORTING
DATE_EXTERNAL = W_DATUM.
ENDFORM. " CONVERT_DATE
FORM TOP_OF_PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = W_LIST_TOP_OF_PAGE.
ENDFORM. "TOP_OF_PAGE
FORM STATUS_CHECK USING OBJNR
STATUS.
This uses reverse logic i.e. subrc = 0 means the status being
checked (delete / inactive) is active.
e.g checking for I0076 and subrc = 0 means it's been flagged for
deletion
CALL FUNCTION 'STATUS_CHECK'
EXPORTING
BYPASS_BUFFER = 'X'
OBJNR = OBJNR
STATUS = STATUS
EXCEPTIONS
OBJECT_NOT_FOUND = 1
STATUS_NOT_ACTIVE = 2
OTHERS = 3.
ENDFORM. " STATUS_CHECK
**********FORM ROUTINES (END)*************************************
The other thing to note is that below I include a FORM to call a custom
status (toolbar). I define this in the repositry browser by copying the
STANDARD status from another ALV report, but you do not need to do this
unless you want to add some more buttons to the standard toolbar. I now do
this as a matter of course, as my users tend to want extra buttons e.g.
'REFRESH'.
How to add an extra button:-
Create a new status using the repository browser by copying an existing
one from an ALV program. Call it something like ZSTANDARD. Then change it by
adding a new button to the toolbar - give it an icon and a four digit name
like '&TMP' so the program knows what button the user has pressed.
(ii) Within your program include a FORM called something like SET_PF_STATUS
as in my example program below. Make sure the name of this FORM is included
in the call to the ALV function module, again as in the example below.
(iii) In the USER_COMMAND form, insert code to deal with the user pressing
the new button e.g.
Example of how to deal with users pressing new buttons
*******Process Call Back Events (Begin)**************************
FORM user_command USING ucomm LIKE sy-ucomm
selfield TYPE slis_selfield.
CASE ucomm.
WHEN '&IC1'.
READ TABLE irepo INDEX selfield-tabindex.
CHECK sy-subrc = 0.
CASE selfield-sel_tab_field.
WHEN 'IREPO-VBELN'.
SET PARAMETER ID 'VL' FIELD irepo-vbeln.
CALL TRANSACTION 'VL03' AND SKIP FIRST SCREEN. "Outbound
WHEN '&TMP'.
We are going to refresh the display so tell the ALV this
selfield-refresh = 'X'.
Isn't that clever!
PERFORM refresh. "Subroutine to refresh the screen (for example)
ENDCASE.
ENDFORM.
********Process Call Back Events (End) ****************************
THANKS
MRUTYUN -
Zoom Control not appearing in Standard Toolbar (CR2008 - SP1)
In Crystal XI (and prior versions), the Zoom control would appear in the standard toolbar. I was able to either select (from the drop down list) or type in the level of zoom. Now this control is no longer showing on the toolbar. Is there a setting somewhere I need to set?
I checked help, and this is what it says under 'using the zoom feature' (so it sounds like the zoom control should still be on the standard toolbar).:
You can easily zoom in on a report. You can choose any magnification from 25% to 400%. This feature is active in both the Design and Preview tabs.
To zoom the report in or out, set the zoom level in the Zoom Control box found on the Standard toolbar.
It is helpful to view reports at low magnifications in order to get an overall picture of the layout of your report. Views at higher magnifications focus attention on the details of the report.Yes, but I don't want to have to go into a menu every time...that's extra work.
Needless to say, I did find it. It is in the lower right corner of the screen (to the
right of the status bar).
You can zoom there, so you do not have to go into a menu pick.
I could not find in the documentation where the zoom had moved to. -
Dreamweaver CS5 toolbar not working correctly
This is crazy.
1. Sometimes my undo works, but sometimes it doesn't. The undo arrow stays in the active state (not greyed out) and I can click it over and over again even though nothing on the page changes. When I try to redo the redo arrow is greyed out even though it should not be after changes.
2. I use the 'standard' toolbar option (right click on tool bar and check 'standard'. When I edit a file and go to save the save icon is grey, but the 'save all' is available. So I have to use the save all.
I have the latest patch installed and trashed my configuration file. I might add that I have the software installed on two computers and both have this issue!
I'm not sure what's going on or what to try next but hopefully there is a solution.
ThanksWhat OS are we talking about first off?
1 & 2. Are you switching between related files even though you are working in one document? In this case I have sometimes encountered the problem you describe in OSX. It's not all the time, but I find the most reliable way is to just use keyboard shortcuts (cmd/ctrl + s).
Best advice I can give is that it is a bug report and you are able to reproduce it consistently then you should file a bug report that is as detailed as possible (down to the keystroke and click).
Adobe - Feature Request/Bug Report Form -
Create standard sap "SAVE" button along with ALV grid buttons
I need to create a standard SAP "Save" button in my ALV GRID display in the application tool bard
I copied the PF-Status 'standard' from a SAP program and assinged it here.
When i try to add the SAP save buttion by using this standard pf-status , its not getting displayed in the application tool bar.
But in STandard TOOl bar (in menu painter ) , when i assign save its displayed in the screen .
I need this to be displayed in the application tool ba
Please suggest me how to do this.
Thanks in advance.Hello,
Application of ALV means the place where the buttons(standard for ALV) like sort,add,delete,copy etc are dipslayed.IF u need need to add a save button on the same toolbar/same place u need to copy the standard GUI status of standard ALV program .For that go to SE80 , give the program name as SAPLSLVC_FULLSCREEN
In the GUI status u'll find the status named as STANDARD_FULLSCREEN ....Right click on it and give the "TO Program " as your program.Now once u activate ur program u'll find the same status there.
add ur save button in the status by edidting it. Now u need to write the FORM ENDFORM for user command and assign the form name in caps to the USER_COMMAND parameter in the func module REUSE_ALV_GRID_DISPLAY.
Hope this help.
Regards,
Neeraj -
How to handle events on standard toolbar
hi, the following code i worte is to load a form and fill data from db table ..but i'm getting only one record and the buttons on standard toolbar like next, previous, first and last are not enabled and not working...what should i do? plz give me the code....
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim SboGuiApi As SAPbouiCOM.SboGuiApi
Dim sConnectionString As String
Dim SBO_Application As SAPbouiCOM.Application
Dim oDICompany As SAPbobsCOM.Company
Dim ret As Long
SboGuiApi = New SAPbouiCOM.SboGuiApi
sConnectionString = Environment.GetCommandLineArgs.GetValue(1)
sConnectionString = Command()
SboGuiApi.Connect(sConnectionString)
SBO_Application = SboGuiApi.GetApplication
oDICompany = New SAPbobsCOM.Company
Dim sCookie As String
sCookie = oDICompany.GetContextCookie()
Dim conStr As String
conStr = SBO_Application.Company.GetConnectionContext(sCookie)
ret = oDICompany.SetSboLoginContext(conStr)
If Not ret = 0 Then
Exit Sub 'the operation has failed.
End If
ret = oDICompany.Connect()
If ret <> 0 Then
SBO_Application.MessageBox("Failed")
Else
SBO_Application.MessageBox("Connected to Database")
End If
' loading(Form)
Dim oForm As SAPbouiCOM.Form
Dim creationPackage As SAPbouiCOM.FormCreationParams
Dim oxmldoc As New Xml.XmlDocument 'u2026when using .netu2019s system.xml
'create the formcreationparams object
creationPackage = SBO_Application.CreateObject( _
SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams)
'please note: these parameters override corresponding data in the xml
creationPackage.UniqueID = "Sales 111"
creationPackage.FormType = "Sales Order"
creationPackage.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Sizable
'just a sample for an xml string describing a formu2026 same as used for loadbatchactions
oxmldoc.Load("c:program filessapsap business oneSales Order.srf")
creationPackage.XmlData = oxmldoc.InnerXml
'add the form to the sbo application
oForm = SBO_Application.Forms.AddEx(creationPackage)
'set the form title and set it visible!
oForm.Visible = True
''''''''''''''''''''''''''''''Data Binding
'''''''''''binding data from DBDataSource to form items
Dim oDBDataSource As SAPbouiCOM.DBDataSource
Dim oItem As SAPbouiCOM.Item
Dim oEdit As SAPbouiCOM.EditText
'''''1st edit box
oItem = oForm.Items.Item("4")
oEdit = oItem.Specific
oForm.DataSources.DBDataSources.Add("AACT")
oEdit.DataBind.SetBound(True, "AACT", "AcctCode")
' getting the data sources bound to the form
oDBDataSource = oForm.DataSources.DBDataSources.Item("AACT")
oDBDataSource.Query()
'''''2nd edit box
oItem = oForm.Items.Item("5")
oEdit = oItem.Specific
oForm.DataSources.DBDataSources.Add("AACT")
oEdit.DataBind.SetBound(True, "AACT", "AcctName")
' getting the data sources bound to the form
oDBDataSource = oForm.DataSources.DBDataSources.Item("AACT")
oDBDataSource.Query()
''''3rd edit box
oItem = oForm.Items.Item("6")
oEdit = oItem.Specific
oForm.DataSources.DBDataSources.Add("AACT")
oEdit.DataBind.SetBound(True, "AACT", "CurrTotal")
' getting the data sources bound to the form
oDBDataSource = oForm.DataSources.DBDataSources.Item("AACT")
oDBDataSource.Query()
End SubYou have to enable the menus on toolbar as
form.EnableMenu(1288, True)
form.EnableMenu(1289, True)
form.EnableMenu(1290, True)
form.EnableMenu(1291, True)
If zou have the datas as UDO, use
form.DataBrowser.BrowseBy = "code" - specifies the logic for getting next, previous,... record
dont forget to take
ObjectType="your udo name"
to the form for specify from which UDO will be the datas.
If you dont have udo, you need enable themenus in toolbar and in menuevent catch the events and create own logic for this. -
How to access standard toolbar of IE
Hi
Can anyone have some idea about accessing standard toolbar of IE just like we can now access sys tray of Windows.
I want the functionality of Yahoo IM so that when any user install my application an icon(shortcut) for that should be added to IE toolbar
If this is possible in java only or with JNI
Please guide me
ThanksMicrosoft uses ODE and DDE. What you want to use is OLE, and as such, I believe you are going to have to do some JNI programming to get Java to work with that interface the way you intend.
Maybe you are looking for
-
How can I easily be sure I don't already have a magazine subscription or a single issue in Newsstand (or Zinio) when confronted with a purchase option. Is there an App or faster way to determine this information? Both Newsstand and Zenio have seen f
-
How to Maintain two different prices for same material in different qty?
Dear all, How to maintain two different prices for same material in different batch quantities in purchase order(ie.,info record)? (Vendor is supplying quantities in 2 different batches & also in different prices) Expecting valuable reply. Jeyakantha
-
Just to be on the safe side: if I want to delete one site from my MobileMe, then I have to delete the site from my iWeb AND delete it from my iDisk, right? Anything else to think of so this won't endanger any existing remaining sites?
-
How to get pst from Exchange 2007 server
Hi, How to get pst from exchange server 2007 & 2010. Regards Anil
-
Connect from SAP gateway to RFC server failed - Java StandAlone app X SAP RAC System
Dears, I'm developing a Java application (RFC SERVER) with JCo3 and I need to connect to SAP RAC system. I have configured the TCP/IP connection via transaction SM59, but when I try to start my server I face the error below (dev_jco_rfc.trc): =======