Performance of reports with subquery
I am experiencing a performance issue for those reports with subquery. Is there anything I could do to get a better performance in terms of fine tuning my report. such as capturing result (client list) in a filter first instead of using a subquery.
I'm open to any suggestions.
Thanks,
Ted
Thank you for your suggestion.
Is there anything I could do on OBIEE side? such as run the subquery first and get it cached before running the main report?
Subquery would return around 5,000 clients. I use it to subset clients which are not in the subquery.
Thanks,
Ted
Similar Messages
-
Slow performance of report with Cal year
Experts,
Hope all is OK . We have BW appraisal reports, one of which is Appraisal markings by grade report having Calendar year as selection variable.
If I run this report with calendar year as selection parameter , this reports is taking very very long time and is not doing any thing .
If I remove Calendar year in the report, then the report is executing in a reasonable amount of time.
But we need calendar year as a variable in the report. Please help me why with this variable taking very long time ?
I appreciate any advice.
ThanksHello Manoj,
Take into consideration creating a aggregate on Calyear.
Your problem is because of variable usage, your problem is data selection of calyear. If you create and aggregation on this cube by Calyear, selection will be very fast.
Sarhan. -
Slow performance refreshing report with multiple subreports in main report
I am using multiple subreports in my main report that appear to be slowing down the performance of the report considerably. Is there something I can do to increase performance with subreports.
Hi Brian,
Subreports are a known performance hog.
I would suggest going back to the drawing board and rethinking on the layout of the report. The best thing, of course, would be to completely get rid of the subreports by creating a single SQL statement that takes care of all the report's requirements.
Sometimes it is imperative to have subreports, in which case, you should try to make sure any selection filters from both the Main Report and the Subreport are passed back to the database.
Also, avoid using Page N of M for better performance - with or without Subreports.
-Abhilash -
BO Edge 3.1 run Crystal Report with sub query or Union
I have some reports with subquery and union SQL Command and put them in SAP BO Edge 3.1 server. The results are very disappointed. I scheduled 3 instances of the same report to run at 5:30 a.m. . When I used the Crystal Report 2008 to run the report, it took only 3 minutes. One instance took several minutes but other two never came back. When I came back to the office at 8:30 a.m., they were still running. What is the problem with SAP BO Edge? Any solution? the reports are very important and I have to get up at 5:30 a.m. to check to see the result and re run as needed. Any suggestion?
Thanks.Look at the errors in each instance to help determine the cause
-
Performance issues ..with apex in reports version 3.1
Hello All,
I am using apex 3.1 oracle 10g.
I am facing with performance issues with apex . I am generating iteractive reports with apex and the number of records are huge - running in 30 to 40 thousands of records and the reports is taking almost 30 minutes.
How I can improve the performance of this kind of report. I am using apex collections.
How apex works in terms of retrieving the records -?
Please let me know .
Thanks/kumar
Edited by: kumar73 on Jun 18, 2010 10:21 AMHello Tony ,
The following are the sequence of steps to run the test case.
Note:- All the schemas , tables and variables are populated from database.
From Schema and Relations tab choose the following:
1) Select P3I2008Q4 as schema.
2) Choose Relation as query path.
3) Select ECLA, ECLB, MTAB as relations.
From Variables choose the following:
4) Choose the variables AGE_SEXA,CLODESCA,ALCNO from ECLA relation.
5) Choose the variables AGE_SEXB, ALCNO, CLODESCB from ECLB relation.
6) Choose the variables EXPNAME, ALCNO, COST_, COST from MTAB relation.
From Conditions: Click the Run Report button this generated standard report ( Total no of records in report – 30150 )
Click on Interactive report button –to generate an interactive report. ( Error occurred )
We are using return sql statement in generationg the standard report and collections for interactive report.
thanks/kumar -
Low Performance in the report with cell defition
Hi all,
In one of our queries (3.5), we had to use lots of cell definition. And after execution of the report, it stays in "Formatting Result Area" and "Retrieving Result from BW Server" for a very long time (about 30 minutes).
There is already aggregate on the infoprovider and report uses it.
Is there any way to increase reporting performance of a report with lots of cell definitions ?
Thanks
SPArun,
Can you please explain what is precalculation and how to use it in Bex?
Thanks in advance.
SP -
Performance: How to manage large reports with high data volume
Hi everybody,
we actually make some tests on our BO server system, to define limitations and oppertunities. Among other things we constructed a large report with a high data volume (about 250.000 data records).
When executing the query in SAP Query Designer it takes about 10 minutes to display it. In Crystal Reports we rebult the row and column structure of the query. The data retrieval in Crystal Reports Designer last about 9 minutes - even faster as in the query.
Unfortunately in BO InfoView the report is not displayed. After 30 minutes of loading time we get a timeout error RCIRAS0244.
com.crystaldecisions.sdk.occa.managedreports.ras.internal.ManagedRASException:
Cannot open report document. ---
The request timed out because there has been no reply from the server for 600.000 milliseconds.
Also a refresh of an report with saved data is not possible.
Now we are asking us some questions:
1. Where can we set the timeout for InfoView to a value larger than 30 minutes?
2. Why is InfoView so slow compared to Crystal Designer? Where is the bottleneck?
3. Whats the impact of SAP single sign-on compared to Enterprise logon on the performance?
Thanks for any helps and comments!
SebastianHi Ingo,
thank you for your reply.
I will check the servers and maybe change the time limits.
Unfortunately we have a quite slow server system that probably cause this timeout. In CR Designer we have no problems, its really quick. Is it to expect that CR Designer and InfoView have almost the same performance?
Another nice point: When we execute the query in SAP BEx Query Designer it takes about 10 minutes to open it, in Crystal Designer it needs just about 5-6 minutes. We integrated exactly the same fields in the report, which exist in die SAP BEx query.
What may cause the difference?
- Exceptions and conditions in the query?
- Free characteristics in the query?
- anything else?
Best regards,
Sebastian -
Discoverer Viewer Report with Page Items Slow Performance
I created a report in Discoverer User that has page items and parameters and runs fine (under 3 minutes) in Discoverer User, but when I try and run it in Discoverer Viewer it takes a long time. It took over 70 minutes before manually terminating it. I made a copy of the report and removed the page items and tried to run it again in Discoverer Viewer and now the report runs in under 3 minutes. Any idea why a report with page items would run in Discoverer user fine, but not discoverer viewer?
I am using Oracle Business Intelligence Plus 10g (10.1.2.55.26)As long as you can access the middle-tier server where Discoverer Viewer is running, you should be able to run and view Discoverer worksheets.
While it is difficult to even start guessing what the problem might be, if the machine you installed Discoverer on has DHCP addressing, you will run into problems.
Thanks
Abhinav
Oracle Business Intelligence Product Management
BI on Oracle: http://www.oracle.com/bi/
BI on OTN : http://www.oracle.com/technology/products/bi/
Discoverer : http://www.oracle.com/technology/products/discoverer/
BI Software : http://www.oracle.com/technology/software/products/ias/devuse.html
Documentation: http://www.oracle.com/technology/documentation/appserver1012.html
BI Samples : http://www.oracle.com/technology/products/bi/samples/
Blog : http://oraclebi.blogspot.com/ -
Report with multiplying columns and WITH clause
Hello
I saw sth strange in my report. I assume that it could happens very often.
I have report with few columns which two of them ar most complicated (many joins subqueries aggreagations on joined values etc.) These two columns (i.e C3,C4) should be multiplied (C3*C4).
When i do pure report without multiplying only columns C1,C2,C3,C4 everything is ok - duration about 15 sec. but... when I put next column on report which multiply these columns (in Answers C5=C3*C4)
I wait 3-4 minutes and my database hungs :(. After investigation I saw that in first case to databese goes pure "SELECT" statement it means:
"Select ... as C1, ... as C2, max(...) as C3, sum(xxx)... C4 from yyy,sss,ttt WHERE aaa"
but in second case BI uses WITH clause it means:
WITH SAWITH0 AS
( Select ... as C1, ... as C2, max(...) as C3, sum(xxx)... C4 from yyy,sss,ttt WHERE aaa )
SELECT SAWITH0.C1 as C1,
SAWITH0.C2 as C2,
SAWITH0.C3 as C3,
SAWITH0.C4 as C4,
SAWITH0.C3*SAWITH0.C4 as C5 FROM SSS
and this statement is long runninq query and kills my database :(.
I checked that SQL like this:
Select ... as C1, ... as C2, max(...) as C3, sum(xxx)... C4, max(...)*sum(xxx)... As C5 from yyy,sss,ttt WHERE aaa" -
runs few times faster than that above
I know that I can do this multiply in business model layer but sometimes users can multiply(or other operations) on columns in reports without my knowledge and it kills my db :(. Where is bug? Why SQLs with WITH clause takes so much db time?
Thank you for each kind of helpWITH clause or Subquery Factoring allows the set of data to be reused multiple times within the SQL. Oracle will usually materialize the data into a temporary table (you will see it if you take an explain plan of the SQL).
I would be surprised if it was the actual WITH clause that was causing the performance issue, however you can test this by turning the WITH clause feature off. Go to the Physical model, right mouse click on your Database > Properties > Features Tab, scroll down to WITH_CLAUSE_SUPPORTED and switch it off.
I'd be interested to know if you do see actual improvement.
Good Luck. -
WITH Subquery Factoring OR "Scalar SubqueriesRun Another Query per row
Hi Experts
Please suggest
which one query is better
Involved table p is of size 2GB and c1/c2 of size 800M.
And we have to run a report on p which will do FTS (no where clause on p)
So FTS on 2 GB table and then running Another Query per row .. so results job very slow
1) Select p.id,
(select sum(q1) from c1 where c1.id = p.id) c1_sum1,
(select sum(q2) from c2 where c2.id = p.id) c2_sum2
from p
2)
WITH Subquery Factoring
with c1_vw as
(select id, sum(q1) c1_sum1
from c1
group by id),
c2_vw as
(select id, sum(q2) c2_sum2
from c2
group by id),
c1_c2 as
(select c1.id, c1.c1_sum1, c2.c2_sum2
from c1_vw c1, c2_vw c2
where c1.id = c2.id )
select p.id, c1_sum1, c2_sum2
from p, c1_c2
where p.id = c1_c2.id
/ 10.2..0.4
AIX 5.3
Thanks In Advance
ivwivw wrote:
which one query is betterThe better query IMHO is the one that returns the the correct results in the shortest amount of time using the least system resources (the last two items usually happen at the same time). Maintainability is an issue too. Which one do you like best?
Its hard to say which query will run best without running both, getting execution plans, and run-time statistics. At a pure guess I would think all things being equal they would have similar performance but do not really know. -
Vendor report with expense G/L account
Hi,
My client needs a vendor balance report with expense G/L account. I mean against what expense account they made a payment to the vendor. There are no such standard reports available in SAP. So can some one suggest me how to get this report done.
Appreciate your response in advance.
Regards,
Sunny.HI,
Though there is no Std. report for your requirement, you can add field of GL ACcount to reflect the expense accountin the line item display. However this will not be a total solultion for your requirement. But for a particular vendor analysis will become easy.
Path:
Financial Accounting> Accounts Receivable and Accounts Payable> Vendor Accounts> Line Items> Display Line Items> Define Additional Fields for Line Item Display
<b>Pl. Note: Consider whether you really need to enhance the line item display. Note that this enhancement can reduce performance, since the system has to read more table entries.</b>
Thanks
Vijay -
Report with 5 ALV grids on 1 screen
I am trying to build a screen/report with 5 ALV grids which are interactive. One grid will display all sales order. When I click on a Sales order Hotspot, the items of the sales order would appear in the ALV grid box below.
When i click on an sales order item hotspot, i want the delivery information in another alv grid in the same screen.
There should be 2 more grids - one displaying the customer information -name,address, in one grid and one grid for open items if any. Any advice is welcome . Should I be creating a split container/docking container or multiple containers ? Sample code is welcome.
Edited by: Shareen Hegde on Apr 2, 2008 9:25 PMHello Shareen
Below I have added my sample report ZUS_SDN_THREE_ALV_GRIDS showing three interactive ALV grids. Perhaps it might be useful to you. I would prefer one or multiple splitter containers over multiple "stand-alone" containers.
*& Report ZUS_SDN_THREE_ALV_GRIDS
*& Display Customer data in three ALV lists:
*& 1st ALV: Customers
*& 2nd ALV: Sales order of selected customer (double-click)
*& 3rd ALV: Positions of selected sales order (double-click)
*& Double-click on material -> display material (MM02)
*& NOTE: dynpro does not contain any elements (ok_code -> GD_OKCODE)
*& Flow logic of dynpro '0100':
*&PROCESS BEFORE OUTPUT.
*& MODULE STATUS_0100.
*&PROCESS AFTER INPUT.
*& MODULE USER_COMMAND_0100.
REPORT zus_sdn_three_alv_grids.
DATA:
gd_okcode TYPE ui_func,
go_docking TYPE REF TO cl_gui_docking_container,
go_splitter TYPE REF TO cl_gui_splitter_container,
go_splitter_2 TYPE REF TO cl_gui_splitter_container,
go_cell_top TYPE REF TO cl_gui_container,
go_cell_bottom TYPE REF TO cl_gui_container,
go_cell_left TYPE REF TO cl_gui_container,
go_cell_right TYPE REF TO cl_gui_container,
go_grid1 TYPE REF TO cl_gui_alv_grid,
go_grid2 TYPE REF TO cl_gui_alv_grid,
go_grid3 TYPE REF TO cl_gui_alv_grid.
DATA:
gt_knb1 TYPE STANDARD TABLE OF knb1,
gt_vbak TYPE STANDARD TABLE OF vbak,
gt_vbap TYPE STANDARD TABLE OF vbap.
PARAMETERS:
p_bukrs TYPE bukrs DEFAULT '1000'.
* CLASS lcl_eventhandler DEFINITION
CLASS lcl_eventhandler DEFINITION.
PUBLIC SECTION.
CLASS-METHODS:
handle_double_click FOR EVENT double_click OF cl_gui_alv_grid
IMPORTING
e_row
e_column
es_row_no
sender. " sending control, i.e. ALV grid that raised event
ENDCLASS. "lcl_eventhandler DEFINITION
* CLASS lcl_eventhandler IMPLEMENTATION
CLASS lcl_eventhandler IMPLEMENTATION.
METHOD handle_double_click.
* define local data
DATA:
ls_knb1 TYPE knb1,
ls_vbak TYPE vbak,
ls_vbap TYPE vbap.
* Distinguish according to sending grid instance
CASE sender.
WHEN go_grid1.
READ TABLE gt_knb1 INTO ls_knb1 INDEX e_row-index.
CHECK ( ls_knb1-kunnr IS NOT INITIAL ).
CALL METHOD go_grid1->set_current_cell_via_id
EXPORTING
* IS_ROW_ID =
* IS_COLUMN_ID =
is_row_no = es_row_no.
* Triggers PAI of the dynpro with the specified ok-code
CALL METHOD cl_gui_cfw=>set_new_ok_code( 'ORDERS' ).
WHEN go_grid2.
READ TABLE gt_vbak INTO ls_vbak INDEX e_row-index.
CHECK ( ls_vbak-vbeln IS NOT INITIAL ).
CALL METHOD go_grid1->set_current_cell_via_id
EXPORTING
* IS_ROW_ID =
* IS_COLUMN_ID =
is_row_no = es_row_no.
* Triggers PAI of the dynpro with the specified ok-code
CALL METHOD cl_gui_cfw=>set_new_ok_code( 'ORDER_DETAILS' ).
WHEN go_grid3.
READ TABLE gt_vbap INTO ls_vbap INDEX e_row-index.
CHECK ( ls_vbap-matnr IS NOT INITIAL ).
SET PARAMETER ID 'MAT' FIELD ls_vbap-matnr.
CALL TRANSACTION 'MM02' AND SKIP FIRST SCREEN.
WHEN OTHERS.
RETURN.
ENDCASE.
ENDMETHOD. "handle_double_click
ENDCLASS. "lcl_eventhandler IMPLEMENTATION
START-OF-SELECTION.
SELECT * FROM knb1 INTO TABLE gt_knb1
WHERE bukrs = p_bukrs.
* Create docking container
CREATE OBJECT go_docking
EXPORTING
parent = cl_gui_container=>screen0
ratio = 90
EXCEPTIONS
OTHERS = 6.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Create splitter container
CREATE OBJECT go_splitter
EXPORTING
parent = go_docking
rows = 1
columns = 2
* NO_AUTODEF_PROGID_DYNNR =
* NAME =
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Get cell container
CALL METHOD go_splitter->get_container
EXPORTING
row = 1
column = 1
RECEIVING
container = go_cell_left.
CALL METHOD go_splitter->get_container
EXPORTING
row = 1
column = 2
RECEIVING
container = go_cell_right.
* Create 2nd splitter container
CREATE OBJECT go_splitter_2
EXPORTING
parent = go_cell_left
rows = 2
columns = 1
* NO_AUTODEF_PROGID_DYNNR =
* NAME =
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Get cell container
CALL METHOD go_splitter_2->get_container
EXPORTING
row = 1
column = 1
RECEIVING
container = go_cell_top.
CALL METHOD go_splitter_2->get_container
EXPORTING
row = 2
column = 1
RECEIVING
container = go_cell_bottom.
* Create ALV grids
CREATE OBJECT go_grid1
EXPORTING
i_parent = go_cell_top
EXCEPTIONS
OTHERS = 5.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CREATE OBJECT go_grid2
EXPORTING
i_parent = go_cell_bottom
EXCEPTIONS
OTHERS = 5.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CREATE OBJECT go_grid3
EXPORTING
i_parent = go_cell_right
EXCEPTIONS
OTHERS = 5.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Set event handler
SET HANDLER: lcl_eventhandler=>handle_double_click FOR go_grid1.
SET HANDLER: lcl_eventhandler=>handle_double_click FOR go_grid2.
SET HANDLER: lcl_eventhandler=>handle_double_click FOR go_grid3.
* Display data
CALL METHOD go_grid1->set_table_for_first_display
EXPORTING
i_structure_name = 'KNB1'
CHANGING
it_outtab = gt_knb1
EXCEPTIONS
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
REFRESH: gt_vbak.
CALL METHOD go_grid2->set_table_for_first_display
EXPORTING
i_structure_name = 'VBAK'
CHANGING
it_outtab = gt_vbak " empty !!!
EXCEPTIONS
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
REFRESH: gt_vbap.
CALL METHOD go_grid3->set_table_for_first_display
EXPORTING
i_structure_name = 'VBAP'
CHANGING
it_outtab = gt_vbap " empty !!!
EXCEPTIONS
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Link the docking container to the target dynpro
CALL METHOD go_docking->link
EXPORTING
repid = syst-repid
dynnr = '0100'
* CONTAINER =
EXCEPTIONS
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* NOTE: dynpro does not contain any elements (ok_code -> GD_OKCODE)
CALL SCREEN '0100'.
* Flow logic of dynpro:
*PROCESS BEFORE OUTPUT.
* MODULE STATUS_0100.
*PROCESS AFTER INPUT.
* MODULE USER_COMMAND_0100.
END-OF-SELECTION.
*& Module STATUS_0100 OUTPUT
* text
MODULE status_0100 OUTPUT.
SET PF-STATUS 'STATUS_0100'. " contains push button "ORDERS"
* SET TITLEBAR 'xxx'.
* Refresh display of detail ALV list
CALL METHOD go_grid2->refresh_table_display
* EXPORTING
* IS_STABLE =
* I_SOFT_REFRESH =
EXCEPTIONS
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.
* Refresh display of detail ALV list
CALL METHOD go_grid3->refresh_table_display
* EXPORTING
* IS_STABLE =
* I_SOFT_REFRESH =
EXCEPTIONS
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.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
* text
MODULE user_command_0100 INPUT.
CASE gd_okcode.
WHEN 'BACK' OR
'END' OR
'CANC'.
SET SCREEN 0. LEAVE SCREEN.
* User has pushed button "Display Orders"
WHEN 'ORDERS'.
PERFORM customer_show_orders.
WHEN 'ORDER_DETAILS'.
PERFORM order_show_details.
WHEN OTHERS.
ENDCASE.
CLEAR: gd_okcode.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form CUSTOMER_SHOW_ORDERS
* text
* --> p1 text
* <-- p2 text
FORM customer_show_orders .
* define local data
DATA:
ld_row TYPE i,
ls_knb1 TYPE knb1.
CALL METHOD go_grid1->get_current_cell
IMPORTING
e_row = ld_row.
READ TABLE gt_knb1 INTO ls_knb1 INDEX ld_row.
CHECK ( syst-subrc = 0 ).
SELECT * FROM vbak INTO TABLE gt_vbak
WHERE kunnr = ls_knb1-kunnr.
REFRESH: gt_vbap.
ENDFORM. " CUSTOMER_SHOW_ORDERS
*& Form ORDER_SHOW_DETAILS
* text
* --> p1 text
* <-- p2 text
FORM order_show_details .
* define local data
DATA:
ld_row TYPE i,
ls_vbak TYPE vbak.
CALL METHOD go_grid1->get_current_cell
IMPORTING
e_row = ld_row.
READ TABLE gt_vbak INTO ls_vbak INDEX ld_row.
CHECK ( syst-subrc = 0 ).
SELECT * FROM vbap INTO TABLE gt_vbap
WHERE vbeln = ls_vbak-vbeln.
ENDFORM. " ORDER_SHOW_DETAILS
Regards
Uwe -
Creating TREE REPORT with CHECKBOX against each row
Hi Friends,
I need to create a <b>TREE REPORT with CHECK BOX</b> against each row. when the user selects a row and clicks on a custom button then those should get populated into an internal table. <b>This is HIGH priority</b> one and I have tried my best but couldnt find any solution. Please advise me some sol.
thanks in advance for your valuable time and help.
Regards
srithan
Message edited by me for easyness
ReddyHi
Following code is to add checkboxes in ALV tree:
FORM add_root_request USING pls_data_ TYPE csg_gs_outtab_p_key__l_is_sub_node_ TYPE c
CHANGING pl_carrid_key._node = nodes->add_node( related_node = p_key
relationship = cl_gui_column_tree=>relat_last_child ).
... §0.2 if information should be displayed at
the hierarchy column set the carrid as text for this node
text = p_ls_data-object.
node->set_text( text ).
... §0.3 set the data for the nes node
node->set_data_row( p_ls_data ).
item = node->get_hierarchy_item( ).
item = node->get_item( 'FCHECKBOX' ). "FCHECKBOX is my radio button field in internal table which I am using to populate the ALV
item->set_type( if_salv_c_item_type=>checkbox ).
pl_carrid_key = node->get_key( )._
CATCH cx_salv_msg.
ENDFORM_._Following code is for handling checbox_change event
PERFORM application_action_events.
FORM application_action_events .
data: lr_events type ref to cl_salv_events_tree.
*data gr_events type ref to lcl_handle_events.
lr_events = gr_tree->get_event( ).
create object gr_events.
set handler gr_events->check for lr_events.
set handler gr_events->on_link_click for lr_events.
set handler gr_events->on_before_user_command for lr_events.
set handler gr_events->on_after_user_command for lr_events.
set handler gr_events->on_keypress for lr_events.
endform. " application_action_events----
CLASS lcl_handle_events DEFINITION.
PUBLIC SECTION.
METHODS:
check FOR EVENT checkbox_change OF cl_salv_events_tree IMPORTING node_key columnname checked. "Here node_key is the row number
ENDCLASS. "lcl_handle_events DEFINITION
CLASS lcl_handle_events IMPLEMENTATION
§4.2 implement the events for handling the events of cl_salv_table
CLASS lcl_handle_events IMPLEMENTATION_._
METHOD check_._
WRITE 'hello'_._
DATA lwa_modify_check_ TYPE REF TO csg_gs_outtab.
node_key = node_key - 1_._
READ TABLE csg_gt_list INDEX node_key REFERENCE INTO lwa_modify_check._
if columnname = 'FCHECKBOX'_._
IF checked = 'X'_._
If the value in internal table is set to X, then it is deselct
lwa_modify_check->fcheckbox =_ ' '_._
ELSE_._
lwa_modify_check->fcheckbox =_ 'X'_._
ENDIF_._
ENDIF_._
if columnname = 'CHECKBOX_READ'_._
IF checked = 'X'_._
If the value in internal table is set to X, then it is deselct
lwa_modify_check->checkbox_read =_ ' '_._
ELSE_._
lwa_modify_check->checkbox_read =_ 'X'_._
ENDIF_._
ENDIF_._
*MODIFY TABLE csg_gt_list from l_wa_modify_check.
flag_test = flag_test + 1_._
ENDMETHOD_._ "check
ENDCLASS_._ "lcl_handle_events IMPLEMENTATION
Please give me reward points -
Create a Procedural ALV Report with editable fields and save the changes
Hi,
I am new to ABAP. I have created a Procedural ALV Report with 3 fields. I want to make 2 fields editable. When executed, if the fields are modified, I want to save the changes. All this I want to do without using OO concepts. Please help . Also, I checked out the forum and also the examples
BCALV_TEST_GRID_EDIT_01
BCALV_TEST_GRID_EDIT_02
BCALV_TEST_GRID_EDIT_04_FORMS
BCALV_TEST_GRID_EDITABLE
BCALV_EDIT_01
BCALV_EDIT_02
BCALV_EDIT_03
BCALV_EDIT_04
BCALV_EDIT_05
BCALV_EDIT_06
BCALV_EDIT_07
BCALV_EDIT_08
BCALV_FULLSCREEN_GRID_EDIT
But all these are using OO Concepts.
Please help.
Regards,
SmruthiTABLES: ekko.
TYPE-POOLS: slis. "ALV Declarations
*Data Declaration
TYPES: BEGIN OF t_ekko,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
statu TYPE ekpo-statu,
aedat TYPE ekpo-aedat,
matnr TYPE ekpo-matnr,
menge TYPE ekpo-menge,
meins TYPE ekpo-meins,
netpr TYPE ekpo-netpr,
peinh TYPE ekpo-peinh,
line_color(4) TYPE c, "Used to store row color attributes
END OF t_ekko.
DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_ekko TYPE t_ekko.
*ALV data declarations
DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
gd_tab_group TYPE slis_t_sp_group_alv,
gd_layout TYPE slis_layout_alv,
gd_repid LIKE sy-repid.
START-OF-SELECTION.
PERFORM data_retrieval.
PERFORM build_fieldcatalog.
PERFORM build_layout.
PERFORM display_alv_report.
*& Form BUILD_FIELDCATALOG
Build Fieldcatalog for ALV Report
FORM build_fieldcatalog.
fieldcatalog-fieldname = 'EBELN'.
fieldcatalog-seltext_m = 'Purchase Order'.
fieldcatalog-col_pos = 0.
fieldcatalog-outputlen = 10.
fieldcatalog-emphasize = 'X'.
fieldcatalog-key = 'X'.
fieldcatalog-do_sum = 'X'.
fieldcatalog-no_zero = 'X'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'EBELP'.
fieldcatalog-seltext_m = 'PO Item'.
fieldcatalog-col_pos = 1.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'STATU'.
fieldcatalog-seltext_m = 'Status'.
fieldcatalog-col_pos = 2.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'AEDAT'.
fieldcatalog-seltext_m = 'Item change date'.
fieldcatalog-col_pos = 3.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'MATNR'.
fieldcatalog-seltext_m = 'Material Number'.
fieldcatalog-col_pos = 4.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'MENGE'.
fieldcatalog-seltext_m = 'PO quantity'.
fieldcatalog-edit = 'X'
fieldcatalog-col_pos = 5.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'MEINS'.
fieldcatalog-seltext_m = 'Order Unit'.
fieldcatalog-col_pos = 6.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'NETPR'.
fieldcatalog-seltext_m = 'Net Price'.
fieldcatalog-col_pos = 7.
fieldcatalog-outputlen = 15.
fieldcatalog-datatype = 'CURR'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'PEINH'.
fieldcatalog-seltext_m = 'Price Unit'.
fieldcatalog-col_pos = 8.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
ENDFORM. " BUILD_FIELDCATALOG
*& Form BUILD_LAYOUT
Build layout for ALV grid report
FORM build_layout.
gd_layout-no_input = 'X'.
gd_layout-colwidth_optimize = 'X'.
gd_layout-totals_text = 'Totals'(201).
gd_layout-info_fieldname = 'LINE_COLOR'.
ENDFORM. " BUILD_LAYOUT
*& Form DISPLAY_ALV_REPORT
Display report using ALV grid
FORM display_alv_report.
gd_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = gd_repid
i_callback_pf_status_set = 'STATUS'
i_callback_top_of_page = 'TOP-OF-PAGE'
i_callback_user_command = 'USER_COMMAND'
i_grid_title = outtext
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
it_special_groups = gd_tabgroup
IT_EVENTS = GT_XEVENTS
i_save = 'X'
is_variant = z_template
TABLES
t_outtab = it_ekko
EXCEPTIONS
program_error = 1
OTHERS = 2.
ENDFORM. " DISPLAY_ALV_REPORT
*& Form DATA_RETRIEVAL
Retrieve data form EKPO table and populate itab it_ekko
FORM data_retrieval.
DATA: ld_color(1) TYPE c.
SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
UP TO 10 ROWS
FROM ekpo
INTO TABLE it_ekko.
LOOP AT it_ekko INTO wa_ekko.
ld_color = ld_color + 1.
IF ld_color = 8.
ld_color = 1.
ENDIF.
CONCATENATE 'C' ld_color '10' INTO wa_ekko-line_color.
MODIFY it_ekko FROM wa_ekko.
ENDLOOP.
ENDFORM. " DATA_RETRIEVAL
FORM top-of-page *
FORM top-of-page.
WRITE:/ 'This is First Line of the Page'.
ENDFORM.
FORM status *
FORM status USING rt_extab TYPE slis_t_extab. .
SET PF-STATUS 'ALV'.
ENDFORM.
FORM USER_COMMAND *
--> RF_UCOMM *
--> RS *
FORM user_command USING rf_ucomm LIKE sy-ucomm
rs TYPE slis_selfield.
DATA ref1 TYPE REF TO cl_gui_alv_grid.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = ref1.
CALL METHOD ref1->check_changed_data.
CASE rf_ucomm.
when 'SAVE'.
get all the modified entries and store them in an internal table and udpate them in to the required transaction or your custom table.
endcase.
endform.
ENDFORM.
here u need to 2 performs for PF status and USER_COMMAND in the ALV parameters.
create a custom PF status and create push buttons and assign your ok codes in your PF status.
if the field has to be edited in the ALV then pass EDIT = 'X' for that field in the fieldcatlog preparation.
Hope this will help you.
Regards,
phani. -
Crystal report with prompts takes very long time to open in infoview BOXI3.
Crystal report with prompts takes very long time to open in infoview BOXI3.1?
Is there any way to increase the performance.Ramsudhakar,
There are several items that could cause these slow down problems. Without knowing more about the way your environment is setup, I could cause more problems, by giving out performance tips. You would need to be more specific in your post.
What we know. BOXI3.1
What we don't know.
O/S
App. Server
Hardware Spec's
ETC.
I see that this post has been out here for some time. So if this is still a problem for you I'll try and help, if you provide more information.
Thanks
Bill
Maybe you are looking for
-
SQL Area Usage, Performance Problem
Hi, I'm a software engineer, not a DBA, with a lot of doubts about our production environment, but I think that I have found a problem at our production Database. At our development database when I execute the same SQL statement over than onces, I ca
-
Payment Method in Document Line Item
Hello Friends, I have assigned the Payment Method in the vendor master, but when I post an invoice In FB60 or MIRO, that payment method is not flowing in the document. I need to have the payment method in the document, so that I can generate the docu
-
My i phone is black and if I try a reset with I Tunes, it says: "failure 1600. Can anybody help me?
-
Hi All I want to create a Adobe Reader that when it startup will auto open a file. so I add this file to SYSDrive and modify startup command....I add a command line like @SYSDRIVE\test.pdf ,\Files\@SYSDRIVE\test.pdf or c:\test.pdf.... but all testing
-
Hi, can any one help me out in detail About SD REPORTS. Thanks Edited by: samaahmed on Feb 17, 2010 4:32 PM