Extremely long build times using object oriented code
We have a LabVIEW application that we need to build an .exe for distrubution purposes. The application relies on several object-oriented classes for data handling and dynamic dispatch type casting and function selection. Currently it takes approximately 1.5 hours to build the application and it seems that most of the time is spent processing the object oriented files. Has anyone else seen this issue and are there any creative ways to improve the build times?
Hi again. We are still having issues using LVOOP due to extrmely long .exe build times as well as long labview loading times. I traced the source of this to one class hierarchy, shown below. This hierarchy also relies heavily on overriding top-level functions, declared as virtual VIs in the top level class, which I suspect contributes to this problem. While debugging another issue, I was trying to build a small piece of my main code into an .exe to verify its functionality and experienced the same extremely long build times. When I removed this class hierarchy from the VI, it built extremely fast. Also to be clear, I am using neither the mean function or Mean.vi anywhere in this set of code. To date we have been delighted with LVOOP and how it has made our code cleaner, mroe robust, and more maintanable. However, when creating new functionality in the code we often elect NOT to create new objects (even though they would be beneficial) because we are hesitant to introduce the extra time (load and build) required for LabVIEW to handle these classes. If our entire system was rewritten in LVOOP, I would suspect that it would become unmaintainable and unbuildable due to the LVOOP overhead. I was hoping that LV2009 would address some of these issues but, alas, it did not. Still looking for a way to improve this and thanks in advance for all of the replies.
Similar Messages
-
Extremely long "reading" times in media browser
We are running CC2014 on 3 edit systems with a shared 10Gbit 36TB Synology NAS. Each workstation has approximately 12TB of local raid storage as well. We shoot P2 primarily and I have a little over 17TB archived on the Synology. Lately, we have had extremely long "reading" times in Media Browser on all the machines. I don't quite understand how Premiere is indexing and displaying as sometimes the "reading" time is relatively quick, ie. under 10 seconds and then other times it can take 3-5 minutes to display clips within a directory.
My Directory Structure is:
Media
P2 footage
(P2 folders/ie. cards are all saved with their shoot dates here)
Our total archive of P2 footage is around 70 cards.
It appears that when Media Browser is pointed to a P2 Card folder it is indexing the entire "P2 footage directory, ie. all 70 cards", rather than just the individual folder containing 1 P2 card's footage. Ist this the case?
Would I get better read speeds in Media Browser if I organized my P2 footage into more directories, ie. by year and quarter or by year and month?
Really need to know how the indexing works. Does premiere cache preview files for each clip and if so, how long are these previews valid. It seems that when I media browse a new P2 Card/Folder, it has forgotten any previous preview files that have been made and cached.
Any explanation or help would be appreciated.
We have copied large numbers of cards/folders from the Synology to our local raids to see if the latency was due to the network but the results are the same when we media browse on the local raid copies.We are working on this issue. Could you open a support case and submit your
project so we can have support see if it is fixed in a later release?
br
William Wheeler wrote:
Is anyone experiencing long deploy times using Eclipse with the Portal/XML Beans facets...it takes approx 30 mins to deploy our ear file. The ear contains:
3 large schemas projects (using XML Bean Builder facets)
1 Control util project
1 Portal Web Project
1 Ear Project
3 Util projects
Is there some validation options that can be turned off or other actions to speed this up?
Bill Wheeler -
Mathscript and object oriented code m code
Hello,
I have some existing code written in Matlab with object-oriented programming that I would like to use with Mathscript RT nodes in LabVIEW.
Does NI have any plan to support object-oriented programming in mathscript RT nodes in the future?
In the mean time, is there any easy solution with minimum changes that would allow me to use my existing code?
ThanksHey L54,
Unfortunately, there have not been any public announcements regarding the support of object-oriented code for the MathScript RT nodes. Also, for tips on how to change your code to make it work, there really is no easy way to go about doing this.
Are you deploying to a RT target? Would it be possible for you to use the MATLAB Script Node? This is included with LabVIEW and actually connects to your MATLAB software and would most likely be able to run the object-oriented code.
Sorry about not supporting object-oriented code, but hopefully using the MATLAB Script Node help you achieve your desired functionality.
Joe S
Applications Engineer
National Instruments
MATLAB is a registered trademark of The MathWorks, Inc. -
How to capture index/row no of row in table using object oriented alv.
i have a table with many fields. i have an alv grid table displayed using object oriented alv. when i double click on a record, i call another screen. there i want to display the record number. eg, if i doubleclick on the third row, i will go to next screen and display 3 there.
please let me know how it is done as it is urgent.
thanks in advance.Hi,
Use the following code to get rowno.
CLASS lcl_grid_events DEFINITION DEFERRED.
DATA:
grid1_events TYPE REF TO lcl_grid_events.
CLASS lcl_grid_events DEFINITION.
PUBLIC SECTION.
METHODS:
dbclk
FOR EVENT double_click OF cl_gui_alv_grid
IMPORTING e_row
e_column
es_row_no.
ENDCLASS. "lcl_grid_events DEFINITION
CLASS lcl_grid_events IMPLEMENTATION.
METHOD dbclk.
*access e_row variable, which contains the record no.
ENDMETHOD. "dbclk
ENDCLASS. "lcl_grid
write the following code after method call of set_table_for_first_display
CREATE OBJECT grid1_events.
SET HANDLER grid1_events->dbclk
FOR grid1.
reward point if useful. -
Notes on using Object oriented concept in ABAP
Hi ,
I want somes notes on how to use Object oriented concept in ABAP.
Thanks in advance.
ChetanHi, this may help you
OOPs ABAP uses Classes and Interfaces which uses Methods and events.
If you have Java skills it is advantage for you.
There are Local classes as well as Global Classes.
Local classes we can work in SE38 straight away.
But mostly it is better to use the Global classes.
Global Classes or Interfaces are to be created in SE24.
SAP already given some predefined classes and Interfaces.
This OOPS concepts very useful for writing BADI's also.
So first create a class in SE 24.
Define attributes, Methods for that class.
Define parameters for that Method.
You can define event handlers also to handle the messages.
After creation in each method write the code.
Methods are similar to ABAP PERFORM -FORM statements.
After the creation of CLass and methods come to SE38 and create the program.
In the program create a object type ref to that class and with the help of that Object call the methods of that Class and display the data.
Example:
REPORT sapmz_hf_alv_grid .
Type pool for icons - used in the toolbar
TYPE-POOLS: icon.
TABLES: zsflight.
To allow the declaration of o_event_receiver before the
lcl_event_receiver class is defined, decale it as deferred in the
start of the program
CLASS lcl_event_receiver DEFINITION DEFERRED.
G L O B A L I N T E R N A L T A B L E S
*DATA: gi_sflight TYPE STANDARD TABLE OF sflight.
To include a traffic light and/or color a line the structure of the
table must include fields for the traffic light and/or the color
TYPES: BEGIN OF st_sflight.
INCLUDE STRUCTURE zsflight.
Field for traffic light
TYPES: traffic_light TYPE c.
Field for line color
types: line_color(4) type c.
TYPES: END OF st_sflight.
TYPES: tt_sflight TYPE STANDARD TABLE OF st_sflight.
DATA: gi_sflight TYPE tt_sflight.
G L O B A L D A T A
DATA: ok_code LIKE sy-ucomm,
Work area for internal table
g_wa_sflight TYPE st_sflight,
ALV control: Layout structure
gs_layout TYPE lvc_s_layo.
Declare reference variables to the ALV grid and the container
DATA:
go_grid TYPE REF TO cl_gui_alv_grid,
go_custom_container TYPE REF TO cl_gui_custom_container,
o_event_receiver TYPE REF TO lcl_event_receiver.
DATA:
Work area for screen 200
g_screen200 LIKE zsflight.
Data for storing information about selected rows in the grid
DATA:
Internal table
gi_index_rows TYPE lvc_t_row,
Information about 1 row
g_selected_row LIKE lvc_s_row.
C L A S S E S
CLASS lcl_event_receiver DEFINITION.
PUBLIC SECTION.
METHODS:
handle_toolbar FOR EVENT toolbar OF cl_gui_alv_grid
IMPORTING
e_object e_interactive,
handle_user_command FOR EVENT user_command OF cl_gui_alv_grid
IMPORTING e_ucomm.
ENDCLASS.
CLASS lcl_event_receiver IMPLEMENTATION
CLASS lcl_event_receiver IMPLEMENTATION.
METHOD handle_toolbar.
Event handler method for event toolbar.
CONSTANTS:
Constants for button type
c_button_normal TYPE i VALUE 0,
c_menu_and_default_button TYPE i VALUE 1,
c_menu TYPE i VALUE 2,
c_separator TYPE i VALUE 3,
c_radio_button TYPE i VALUE 4,
c_checkbox TYPE i VALUE 5,
c_menu_entry TYPE i VALUE 6.
DATA:
ls_toolbar TYPE stb_button.
Append seperator to the normal toolbar
CLEAR ls_toolbar.
MOVE c_separator TO ls_toolbar-butn_type..
APPEND ls_toolbar TO e_object->mt_toolbar.
Append a new button that to the toolbar. Use E_OBJECT of
event toolbar. E_OBJECT is of type CL_ALV_EVENT_TOOLBAR_SET.
This class has one attribute MT_TOOLBAR which is of table type
TTB_BUTTON. The structure is STB_BUTTON
CLEAR ls_toolbar.
MOVE 'CHANGE' TO ls_toolbar-function.
MOVE icon_change TO ls_toolbar-icon.
MOVE 'Change flight' TO ls_toolbar-quickinfo.
MOVE 'Change' TO ls_toolbar-text.
MOVE ' ' TO ls_toolbar-disabled.
APPEND ls_toolbar TO e_object->mt_toolbar.
ENDMETHOD.
METHOD handle_user_command.
Handle own functions defined in the toolbar
CASE e_ucomm.
WHEN 'CHANGE'.
PERFORM change_flight.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMETHOD.
ENDCLASS.
S T A R T - O F - S E L E C T I O N.
START-OF-SELECTION.
SET SCREEN '100'.
*& Module USER_COMMAND_0100 INPUT
MODULE user_command_0100 INPUT.
CASE ok_code.
WHEN 'EXIT'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Module STATUS_0100 OUTPUT
MODULE status_0100 OUTPUT.
DATA:
For parameter IS_VARIANT that is sued to set up options for storing
the grid layout as a variant in method set_table_for_first_display
l_layout TYPE disvariant,
Utillity field
l_lines TYPE i.
After returning from screen 200 the line that was selected before
going to screen 200, should be selected again. The table gi_index_rows
was the output table from the GET_SELECTED_ROWS method in form
CHANGE_FLIGHT
DESCRIBE TABLE gi_index_rows LINES l_lines.
IF l_lines > 0.
CALL METHOD go_grid->set_selected_rows
EXPORTING
it_index_rows = gi_index_rows.
CALL METHOD cl_gui_cfw=>flush.
REFRESH gi_index_rows.
ENDIF.
Read data and create objects
IF go_custom_container IS INITIAL.
Read data from datbase table
PERFORM get_data.
Create objects for container and ALV grid
CREATE OBJECT go_custom_container
EXPORTING container_name = 'ALV_CONTAINER'.
CREATE OBJECT go_grid
EXPORTING
i_parent = go_custom_container.
Create object for event_receiver class
and set handlers
CREATE OBJECT o_event_receiver.
SET HANDLER o_event_receiver->handle_user_command FOR go_grid.
SET HANDLER o_event_receiver->handle_toolbar FOR go_grid.
Layout (Variant) for ALV grid
l_layout-report = sy-repid. "Layout fo report
Setup the grid layout using a variable of structure lvc_s_layo
Set grid title
gs_layout-grid_title = 'Flights'.
Selection mode - Single row without buttons
(This is the default mode
gs_layout-sel_mode = 'B'.
Name of the exception field (Traffic light field) and the color
field + set the exception and color field of the table
gs_layout-excp_fname = 'TRAFFIC_LIGHT'.
gs_layout-info_fname = 'LINE_COLOR'.
LOOP AT gi_sflight INTO g_wa_sflight.
IF g_wa_sflight-paymentsum < 100000.
Value of traffic light field
g_wa_sflight-traffic_light = '1'.
Value of color field:
C = Color, 6=Color 1=Intesified on, 0: Inverse display off
g_wa_sflight-line_color = 'C610'.
ELSEIF g_wa_sflight-paymentsum => 100000 AND
g_wa_sflight-paymentsum < 1000000.
g_wa_sflight-traffic_light = '2'.
ELSE.
g_wa_sflight-traffic_light = '3'.
ENDIF.
MODIFY gi_sflight FROM g_wa_sflight.
ENDLOOP.
Grid setup for first display
CALL METHOD go_grid->set_table_for_first_display
EXPORTING i_structure_name = 'SFLIGHT'
is_variant = l_layout
i_save = 'A'
is_layout = gs_layout
CHANGING it_outtab = gi_sflight.
*-- End of grid setup -
Raise event toolbar to show the modified toolbar
CALL METHOD go_grid->set_toolbar_interactive.
Set focus to the grid. This is not necessary in this
example as there is only one control on the screen
CALL METHOD cl_gui_control=>set_focus EXPORTING control = go_grid.
ENDIF.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0200 INPUT
MODULE user_command_0200 INPUT.
CASE ok_code.
WHEN 'EXIT200'.
LEAVE TO SCREEN 100.
WHEN'SAVE'.
PERFORM save_changes.
ENDCASE.
ENDMODULE. " USER_COMMAND_0200 INPUT
*& Form get_data
FORM get_data.
Read data from table SFLIGHT
SELECT *
FROM zsflight
INTO TABLE gi_sflight.
ENDFORM. " load_data_into_grid
*& Form change_flight
Reads the contents of the selected row in the grid, ans transfers
the data to screen 200, where it can be changed and saved.
FORM change_flight.
DATA:l_lines TYPE i.
REFRESH gi_index_rows.
CLEAR g_selected_row.
Read index of selected rows
CALL METHOD go_grid->get_selected_rows
IMPORTING
et_index_rows = gi_index_rows.
Check if any row are selected at all. If not
table gi_index_rows will be empty
DESCRIBE TABLE gi_index_rows LINES l_lines.
IF l_lines = 0.
CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'
EXPORTING
textline1 = 'You must choose a line'.
EXIT.
ENDIF.
Read indexes of selected rows. In this example only one
row can be selected as we are using gs_layout-sel_mode = 'B',
so it is only ncessary to read the first entry in
table gi_index_rows
LOOP AT gi_index_rows INTO g_selected_row.
IF sy-tabix = 1.
READ TABLE gi_sflight INDEX g_selected_row-index INTO g_wa_sflight.
ENDIF.
ENDLOOP.
Transfer data from the selected row to screenm 200 and show
screen 200
CLEAR g_screen200.
MOVE-CORRESPONDING g_wa_sflight TO g_screen200.
LEAVE TO SCREEN '200'.
ENDFORM. " change_flight
*& Form save_changes
Changes made in screen 200 are written to the datbase table
zsflight, and to the grid table gi_sflight, and the grid is
updated with method refresh_table_display to display the changes
FORM save_changes.
DATA: l_traffic_light TYPE c.
Update traffic light field
Update database table
MODIFY zsflight FROM g_screen200.
Update grid table , traffic light field and color field.
Note that it is necessary to use structure g_wa_sflight
for the update, as the screen structure does not have a
traffic light field
MOVE-CORRESPONDING g_screen200 TO g_wa_sflight.
IF g_wa_sflight-paymentsum < 100000.
g_wa_sflight-traffic_light = '1'.
C = Color, 6=Color 1=Intesified on, 0: Inverse display off
g_wa_sflight-line_color = 'C610'.
ELSEIF g_wa_sflight-paymentsum => 100000 AND
g_wa_sflight-paymentsum < 1000000.
g_wa_sflight-traffic_light = '2'.
clear g_wa_sflight-line_color.
ELSE.
g_wa_sflight-traffic_light = '3'.
clear g_wa_sflight-line_color.
ENDIF.
MODIFY gi_sflight INDEX g_selected_row-index FROM g_wa_sflight.
Refresh grid
CALL METHOD go_grid->refresh_table_display.
CALL METHOD cl_gui_cfw=>flush.
LEAVE TO SCREEN '100'.
ENDFORM. " save_changes
chk this blog
/people/vijaybabu.dudla/blog/2006/07/21/topofpage-in-alv-using-clguialvgrid
Reward if helpfull.
Regards Madhu. -
Grid using Object Oriented View
Can anyone send me program for grid using object oriented view.
hi Sandeep,
please look at this code
REPORT Z_PICK_LIST .
TABLES: RESB.
SELECTION-SCREEN BEGIN OF BLOCK BL1 WITH FRAME TITLE TEXT-BL1.
SELECT-OPTIONS: S_WERKS FOR RESB-WERKS," Plant
S_AUFNR FOR RESB-AUFNR," Order number
S_BDTER FOR RESB-BDTER." Req. date
SELECTION-SCREEN END OF BLOCK BL1.
PARAMETERS: P_VARI LIKE DISVARIANT-VARIANT DEFAULT '/STANDARD'.
DATA: BEGIN OF OUT OCCURS 10,
AUFNR LIKE RESB-AUFNR, " Order number
MATNR LIKE RESB-MATNR, " Material
BDMNG LIKE RESB-BDMNG, " Requirements in UM
MEINS LIKE RESB-MEINS, " Unit of Measure (UM)
ERFMG LIKE RESB-ERFMG, " Requirements in UE
ERFME LIKE RESB-ERFME, " Unit of Entry (UE)
MAKTX LIKE MAKT-MAKTX, " Mat. description
END OF OUT.
INCLUDE Z_ALV_VARIABLES.
INITIALIZATION.
REPNAME = SY-REPID.
PERFORM INITIALIZE_FIELDCAT USING FIELDTAB[].
PERFORM BUILD_EVENTTAB USING EVENTS[].
PERFORM BUILD_COMMENT USING HEADING[].
PERFORM INITIALIZE_VARIANT.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_VARI.
PERFORM F4_FOR_VARIANT.
AT SELECTION-SCREEN.
PERFORM PAI_OF_SELECTION_SCREEN.
START-OF-SELECTION.
PERFORM GET_ORDERS.
PERFORM GET_MATERIAL_DESCRIPTION.
END-OF-SELECTION.
PERFORM BUILD_LAYOUT USING LAYOUT.
PERFORM BUILD_PRINT USING PRINTS.
PERFORM WRITE_USING_ALV.
FORM INITIALIZE_FIELDCAT *
--> P_TAB *
FORM INITIALIZE_FIELDCAT USING P_TAB TYPE SLIS_T_FIELDCAT_ALV.
DATA: CAT TYPE SLIS_FIELDCAT_ALV.
CLEAR CAT.
ENDFORM. " INITIALIZE_FIELDCAT
*& Form GET_ORDERS
text
FORM GET_ORDERS.
SELECT AUFNR MATNR BDMNG MEINS ERFMG ERFME
FROM RESB
APPENDING TABLE OUT
WHERE XLOEK EQ SPACE " deletion indicator
AND XWAOK EQ 'X' " goods movement indicator
AND WERKS IN S_WERKS " plant
AND BDTER IN S_BDTER " req. date
AND AUFNR IN S_AUFNR. " pr. order
ENDFORM. " GET_ORDERS
*& Form GET_MATERIAL_DESCRIPTION
text
FORM GET_MATERIAL_DESCRIPTION.
SORT OUT BY MATNR.
LOOP AT OUT.
SELECT SINGLE MAKTX
INTO OUT-MAKTX
FROM MAKT
WHERE MATNR EQ OUT-MATNR
AND SPRAS EQ 'EN'.
MODIFY OUT.
ENDLOOP.
SORT OUT BY AUFNR MATNR.
ENDFORM. " GET_MATERIAL_DESCRIPTION
FORM TOP_OF_PAGE *
FORM TOP_OF_PAGE.
DATA: L_POS TYPE P.
first line
WRITE:/ TEXT-001. " Plant:
IF S_WERKS-HIGH NE SPACE.
WRITE: S_WERKS-LOW, TEXT-TO1, S_WERKS-HIGH.
ELSEIF S_WERKS-LOW NE SPACE.
LOOP AT S_WERKS.
WRITE: S_WERKS-LOW.
ENDLOOP.
ELSEIF S_WERKS-LOW EQ SPACE.
WRITE: TEXT-ALL.
ENDIF.
L_POS = ( SY-LINSZ DIV 2 ) - ( STRLEN( TEXT-TIT ) DIV 2 ).
POSITION L_POS. WRITE: TEXT-TIT.
L_POS = SY-LINSZ - 20.
POSITION L_POS. WRITE: TEXT-011, SY-UNAME RIGHT-JUSTIFIED. " User:
second line
WRITE:/ TEXT-002. " Order:
IF S_AUFNR-HIGH NE SPACE.
WRITE: S_AUFNR-LOW, TEXT-TO1, S_AUFNR-HIGH.
ELSEIF S_AUFNR-LOW NE SPACE.
LOOP AT S_AUFNR.
WRITE: S_AUFNR-LOW.
ENDLOOP.
ELSEIF S_AUFNR-LOW EQ SPACE.
WRITE: TEXT-ALL.
ENDIF.
L_POS = SY-LINSZ - 20.
POSITION L_POS. WRITE: TEXT-012,SY-DATUM. " Date:
third line
WRITE:/ TEXT-003. " Req. Date:
IF S_BDTER-HIGH(1) NE '0'.
WRITE: S_BDTER-LOW, TEXT-TO1, S_BDTER-HIGH.
ELSEIF S_BDTER-LOW(1) NE '0'.
LOOP AT S_BDTER.
WRITE: S_BDTER-LOW.
ENDLOOP.
ELSEIF S_BDTER-LOW(1) EQ '0'.
WRITE: TEXT-ALL.
ENDIF.
L_POS = SY-LINSZ - 20.
POSITION L_POS. WRITE: TEXT-013, SY-PAGNO. " Page:
ENDFORM. " TOP_OF_PAGE
FORM END_OF_LIST *
FORM END_OF_LIST.
DATA: L_POS TYPE P.
ULINE.
WRITE:/ '|', TEXT-021. " Delivered by:
L_POS = SY-LINSZ DIV 2.
POSITION L_POS. WRITE: '|', TEXT-031. " Received by:
L_POS = SY-LINSZ.
POSITION L_POS. WRITE: '|'.
WRITE:/ '|'.
L_POS = SY-LINSZ DIV 2.
POSITION L_POS. WRITE: '|'.
L_POS = SY-LINSZ.
POSITION L_POS. WRITE: '|'.
ULINE.
WRITE:/ '|', TEXT-012. " Date:
L_POS = SY-LINSZ DIV 2.
POSITION L_POS. WRITE: '|', TEXT-012. " Date:
L_POS = SY-LINSZ.
POSITION L_POS. WRITE: '|'.
WRITE:/ '|'.
L_POS = SY-LINSZ DIV 2.
POSITION L_POS. WRITE: '|'.
L_POS = SY-LINSZ.
POSITION L_POS. WRITE: '|'.
ULINE.
ENDFORM. " END_OF_LIST
*& Form WRITE_USING_ALV
text
FORM WRITE_USING_ALV.
Look this code*****
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = REPNAME
I_INTERNAL_TABNAME = 'OUT'
I_INCLNAME = REPNAME
CHANGING
CT_FIELDCAT = FIELDTAB.
IF SY-SUBRC 0.
WRITE: 'SY-SUBRC: ', SY-SUBRC,
'REUSE_ALV_FIELDCATALOG_MERGE'.
ENDIF.
LOOk this code also.*********
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = REPNAME
i_callback_pf_status_set = 'PF_STATUS_SET'
i_callback_user_command = 'USER_COMMAND'
I_STRUCTURE_NAME = 'OUT'
IS_LAYOUT = LAYOUT
IT_FIELDCAT = FIELDTAB
I_DEFAULT = 'A'
I_SAVE = G_SAVE
IS_VARIANT = G_VARIANT
IT_EVENTS = EVENTS[]
IS_PRINT = PRINTS
TABLES
T_OUTTAB = OUT.
IF SY-SUBRC 0.
WRITE: 'SY-SUBRC: ', SY-SUBRC, 'REUSE_ALV_LIST_DISPLAY'.
ENDIF.
ENDFORM. " WRITE_USING_ALV
***************report over***************
HOPE THIS CODE HELPS U
Reward if its useful.............
thanks and regards
suma sailaja -
Adding color to a row in alv grid not using object oriented.
Hello Gurus.
I want to display a row in color in alv grid using normal alv, not by using object oriented programming.
I am having one of the field say spart ie division in internal table itab.
The spart has values like 12 , 45, 67, 68 ,88 ,99.
when ever spart is 12 i want to display that row in color format. Here this table is sorted by mblnr so if 1st record is 12 then may be 50 th record will be 12. so when where the record contains the value has 12 then that row should be displayed in color. So please tell me how to do it. Previously i posted the same question but i got is by using object oriented. so please tell me how to do it without using object oriented.
Thanks for all the replies.Check this example code.
report zrich_0004
no standard page heading.
type-pools slis.
data: fieldcat type slis_t_fieldcat_alv.
data: begin of imara occurs 0,
matnr type mara-matnr,
mtart type mara-mtart,
maktx type makt-maktx,
color_line(4) type c,
tcolor type slis_t_specialcol_alv, "cell
end of imara.
data: xcolor type slis_specialcol_alv.
start-of-selection.
perform get_data.
perform write_report.
* Get_Data
form get_data.
imara-matnr = 'ABC'.
imara-mtart = 'ZCFG'.
imara-maktx = 'This is description for ABC'.
append imara.
imara-matnr = 'DEF'.
imara-mtart = 'ZCFG'.
imara-maktx = 'This is description for DEF'.
append imara.
imara-matnr = 'GHI'.
imara-mtart = 'ZCFG'.
imara-maktx = 'This is description for GHI'.
append imara.
loop at imara.
if sy-tabix = 1.
imara-color_line = 'C410'. " color line
endif.
if sy-tabix = 2. "color CELL
clear xcolor.
xcolor-fieldname = 'MTART'.
xcolor-color-col = '3'.
xcolor-color-int = '1'. "Intensified on/off
xcolor-color-inv = '0'.
append xcolor to imara-tcolor.
endif.
modify imara.
endloop.
endform.
* WRITE_REPORT
form write_report.
data: layout type slis_layout_alv.
layout-coltab_fieldname = 'TCOLOR'.
layout-info_fieldname = 'COLOR_LINE'.
perform build_field_catalog.
* CALL ABAP LIST VIEWER (ALV)
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
is_layout = layout
it_fieldcat = fieldcat
tables
t_outtab = imara.
endform.
* BUILD_FIELD_CATALOG
form build_field_catalog.
data: fc_tmp type slis_t_fieldcat_alv with header line.
clear: fieldcat. refresh: fieldcat.
clear: fc_tmp.
fc_tmp-reptext_ddic = 'Material Number'.
fc_tmp-fieldname = 'MATNR'.
fc_tmp-tabname = 'IMARA'.
fc_tmp-outputlen = '18'.
append fc_tmp to fieldcat.
clear: fc_tmp.
fc_tmp-reptext_ddic = 'Material Type'.
fc_tmp-fieldname = 'MTART'.
fc_tmp-tabname = 'IMARA'.
fc_tmp-outputlen = '4'.
append fc_tmp to fieldcat.
clear: fc_tmp.
fc_tmp-reptext_ddic = 'Material'.
fc_tmp-fieldname = 'MAKTX'.
fc_tmp-tabname = 'IMARA'.
fc_tmp-outputlen = '40'.
fc_tmp-emphasize = 'C610'. " color column
append fc_tmp to fieldcat.
endform.
Regards,
Rich Heilman -
TOP-OF-PAGE using Object Oriented model
Hi all,
(1) I hve a doubt reg the top-of-page using Object oriented concept . While iam creating the top-of-page iam using a class called ' cl_dd_document' , wht is the purpose of that class ?
(2) I have displayed a text in the top-of-page container . I want to display another text in a new line in the same container below the first text . How can i do it . plz send me a sample code for it .
Vighnesh ,1. this class cl_dd_document is used to define the properties of the text used in top of page...to change the fonts of texts , to add space between texts, to add a new line and so on..
2. to add new line , use this
CALL METHOD document->new_line. -
Extremely long deploy times in Portal 9.2 in dev
Is anyone experiencing long deploy times using Eclipse with the Portal/XML Beans facets...it takes approx 30 mins to deploy our ear file. The ear contains:
3 large schemas projects (using XML Bean Builder facets)
1 Control util project
1 Portal Web Project
1 Ear Project
3 Util projects
Is there some validation options that can be turned off or other actions to speed this up?
Bill WheelerWe are working on this issue. Could you open a support case and submit your
project so we can have support see if it is fixed in a later release?
br
William Wheeler wrote:
Is anyone experiencing long deploy times using Eclipse with the Portal/XML Beans facets...it takes approx 30 mins to deploy our ear file. The ear contains:
3 large schemas projects (using XML Bean Builder facets)
1 Control util project
1 Portal Web Project
1 Ear Project
3 Util projects
Is there some validation options that can be turned off or other actions to speed this up?
Bill Wheeler -
How to display horizontal line in top-of-page by using object oriented ALV?
How to display horizontal line in top-of-page by using object oriented ALV.
I am created top-of-page in object oriented alv.
But not be successes in showing horizontal line in it.
Can any one pls give solution for this..
Thanks and regards..Hi
Try like this
data: gt_list_top_of_page type slis_t_listheader. " Top of page text.
Initialization.
perform comment_build using gt_list_top_of_page[].
form top_of_page.
* Note to self: the gif must be loaded into transaction OAOR with
* classname 'PICTURES' AND TYPE 'OT' to work with ALV GRID Functions.
* I Loaded NOVALOGO2 into system.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
* I_LOGO = 'NOVALOGO2'
* i_logo = 'ENJOYSAP_LOGO'
it_list_commentary = gt_list_top_of_page.
endform. " TOP_OF_PAGE
form comment_build using e04_lt_top_of_page type slis_t_listheader.
data: ls_line type slis_listheader.
clear ls_line.
ls_line-typ = 'A'.
ls_line-info = 'Special'(001).
fgrant = xgrant.
concatenate ls_line-info fgrant
'Stock Option Report to the board'(002)
into ls_line-info separated by space.
condense ls_line-info.
append ls_line to e04_lt_top_of_page.
endform. " COMMENT_BUILD
Use following syntex for footer print in alv:
* For End of Page
form END_OF_PAGE.
data: listwidth type i,
ld_pagepos(10) type c,
ld_page(10) type c.
write: sy-uline(50).
skip.
write:/40 'Page:', sy-pagno .
endform.
* For End of Report
form END_OF_LIST.
data: listwidth type i,
ld_pagepos(10) type c,
ld_page(10) type c.
skip.
write:/40 'Page:', sy-pagno .
endform.
check this link
http://abapprogramming.blogspot.com/
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5dc3e690-0201-0010-1ebf-b85b3bed962d
Changing width of a custom container dynamically
Display Page numbers in ALV
Insert picture in selection screen.
Logo in OO ALV Grid
Reward all helpfull answers
Regards
Pavan -
Extremely long display times for HTML in mail and Safari
Is anyone else experiencing similar lags in HTML rendering?
Since upgrading to Mountain Lion, I am experiencing extremely long render times for display HTML email messages in mail. I am also experiencing extremely long render times in Safari. I have Chrome installed on this same computer, if I goto the same website on Chrome and Safari, Chrome displays the page immediatly, Safari will take between 30sec and 1 minute.The only way it can get fixed is if you report it to Adobe. Posting it here may not be sufficient. There is an Acrobat feature request forum here and a bug report form here: https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform
-
Extremely long compression time
I am trying to compress a 6 minute video into a quicktime movie. It starts out saying it will only take 3 minutes to share. Then it quickly moves up to 17 minutes before coming to a halt.
Anybody have any ideas on what I am doing wrong or is this common? On previous videos this has never happened. I've tried doing a different video and it is also taking an extremely long time to compress.
Thanks for the helpI think possibly it could have something to do with my video settings. I don't know much about video settings.
We are producing these videos that range from 7-30min from a video camera. We don't need audio (already took that out) and we don't need the best of quality on the video. It obviously needs to be decent enough to see what is going on without straining, but beyond that I don't need much.
Does anybody have any suggestions on the type of video settings I could use in the expert settings? I believe iMovie is trying to compress much more information than I really need. Thanks for the help. -
Hi,
lately, I realized that Jubula needs extremely long for all the progresses...
For example, deleting TestResults or after execution of TestCases, the Progress "Collecting Information" and "Writing Report to Database" needs about 15-20 minutes!!
I use the embedded database and html toolkit and my project is not big at all!
I already had larger projects and never experienced that long progresses!
Any ideas/suggestions why Jubula is suddenly working that slow?
ThanksHi Nicole,
Thanks for your question! I think the problem is that the h2 database isn't designed for productive use - it doesn't scale well and will indeed get slower and slower with time (not necessarily size of the project, just time).
If you need to keep using it then you can do the following:
- stop Jubula
- perform an export all to export all of the projects
- you can also copy the database files (from your home directory under .jubula) to back them up
- delete the database files from your home directory
- connect to the database: this will recreate the database
- then you can import the projects you exported
Like I say, this isn't the preferred way of working, but the steps above should help with the current performance. Bear in mind that you should ensure that you have backups before you delete the database!
Hope that helps,
Alex -
Hi,
I got some big problems while exporting footage from AME and PP CC 2014. I mean – the time of exporting is extremely long. It take 4 hours to export 15 minutes of 1080p footage (with not best quality of render settings). There is no big difference in time while exporting with or without effect same as AME or PP.
I shoot my footage on SONY A7S in XAVC S and my export settings are H.264, VBR 1, 16/20.
My PC spec:
Intel Core i7 3770K 3.5 3.9 GHZ
32 GB DRR3,
HDD 2TB, SSD 128GB
GeForce GTX 770 2GB
WINDOWS 7 ULTIMATE 64 BIT
I will appreciate any help cos this problem make me sick alreadyI checked the log file and there are no errors in the file.
There are no ORA- xxxx error messages.
The last line in the log file is as follows:
"Processing object type schema_export/table/index/domain_index/index "
I just checked the export job run this morning and it is still on the same
index object "A685_IX1" . This is a spatial index. It has been sitting at
this same object according to the job status for at least 24 hours. -
Converting sample Procedural ABAP code in Object oriented code...
Hello Gurus,
I am learning object oriented ABAP. The best way to learn it is do it practically. If I want to change the following code in OO code , how can it be done ?
TABLES : gb01.
Data Declaration
DATA : BEGIN OF i_mid OCCURS 0,
mid(2),
text(10),
END OF i_mid.
DATA :v_tabix LIKE sy-tabix.
Selection Screen
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME
TITLE text-001.
PARAMETER : p_modif(1) DEFAULT 'U',
p_class LIKE gb01-boolclass DEFAULT '009',
p_cltyp LIKE gb01-classtype DEFAULT 'S',
p_table LIKE gb01-bcltab DEFAULT 'BSEG',
p_field LIKE gb01-bclfield DEFAULT 'HKONT',
p_excld LIKE gb01-bexclude DEFAULT ' '.
SELECTION-SCREEN END OF BLOCK b1.
Selection Screen F4 Help for Modif ID's
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_modif.
PERFORM get_modifid.
Start of Selection
START-OF-SELECTION.
CLEAR gb01.
CASE p_modif.
WHEN 'U'. "Update
UPDATE gb01
SET bexclude = p_excld
WHERE bcltab = p_table
AND bclfield = p_field
AND boolclass = p_class
AND classtype = p_cltyp.
IF sy-subrc NE 0.
WRITE : / 'UPDATE - KO'.
ELSE.
WRITE : / 'UPDATE - OK'.
ENDIF.
WHEN 'I'. "Insert
gb01-bcltab = p_table.
gb01-bclfield = p_field.
gb01-boolclass = p_class.
gb01-classtype = p_cltyp.
gb01-bexclude = p_excld.
INSERT INTO gb01 VALUES gb01.
IF sy-subrc NE 0.
WRITE : / 'INSERTION - KO'.
ELSE.
WRITE : / 'INSERTION - OK'.
ENDIF.
WHEN 'D'. "Delete
DELETE FROM gb01
WHERE bcltab = p_table
AND bclfield = p_field
AND boolclass = p_class
AND classtype = p_cltyp.
IF sy-subrc NE 0.
WRITE : / 'DELETE - KO'.
ELSE.
WRITE : / 'DELETE - OK'.
ENDIF.
ENDCASE.
*& Form get_modifid
F4 Help for modif id field
FORM get_modifid.
i_mid-mid = 'U'.
i_mid-text = 'Update'.
APPEND i_mid.
i_mid-mid = 'I'.
i_mid-text = 'Insert'.
APPEND i_mid.
i_mid-mid = 'D'.
i_mid-text = 'Delete'.
APPEND i_mid.
CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'
EXPORTING
endpos_col = '20'
endpos_row = '12'
startpos_col = '10'
startpos_row = '10'
titletext = 'Modification Ids'
IMPORTING
choise = v_tabix
TABLES
valuetab = i_mid
EXCEPTIONS
break_off = 1
OTHERS = 2.
IF sy-subrc NE 0.
EXIT.
ENDIF.
READ TABLE i_mid INDEX v_tabix.
IF sy-subrc EQ 0.
p_modif = i_mid-mid.
ENDIF.
REFRESH i_mid.
ENDFORM. " get_modifid
Regards,
Rajesh.Hi Rajesh,
Hey here are some of the links, please chek these links u have lot of examples
http://www.****************/Tutorials/OOPS/MainPage.htm
and also please check these threads
OOABAP
book for OOABAP?
Best regards,
raam
Maybe you are looking for
-
Is there any way of saving the laptop if some liquid was spilled over it?
I accidentally spilt some milk over my MacBook Air keyboard earlier today. I have dried it as best I can and no milk is dripping out from the keys now. I have put the laptop upside down like a tent so it can dry out. It doesn't look like any liquid w
-
SD credit memo with in corredt due date
Hello, When we create SD returns or credit memo it becomes due immediately in A/R side. Even though it has payment term as of net 30days. Even return created with reference to orginal sales order # still after billing doc, it beomes due immediately
-
Displaying Graphics on Parameter Form
Hi, Previously I have post one question regarding changing the displaying layout of the parameter form. I have try to put some graphics, comapany logo in the header of the parameter form by Editing its HTML code in the Before Parameter Form Value pro
-
Schedule pdp height is not increasing while adding tasks on pwa 2013
As per the customer requirement we have added custom styles to word wrap in schedule pdp and we have fixed the row height, to make the multil ine visible, but we are facing a challenge to enter and display the last task. Advanced thanks for the quick
-
Error in profit center for F-30
Hi, We are ECC 6.O, I am executing f-30 ie post with clearing. while simulating it picks up foreign exchange gain and losss account. Thats ok but encounters error that in that account that profit center B1000 does exist in this account. I agree that