Report with highlighting position - on click
I have a Form with a Report page on which report part contains a large number of rows. This report is using standard template – 13. Now users would like to be able to click on a row an it should be either highlighted or changing color. This click is not for editing, rather just to place a cursor, or set focus. There is one template – 13 – Standard, alternating row colors. We want only one row to change color, on click. We are using Application Express version 3.2.1.00.12. Is something doable? If yes – how?
Thank you for your time.
DanielD
Edited by: danield_2 on Mar 3, 2011 2:27 PM
Edited by: danield_2 on Mar 3, 2011 2:28 PM
Hello Kartik,
Denes' demo page contains "Highlight Row" and it does "sort of" works in a way similar to that I need/want, but - I need to click on "Edit" button in order to have a row highlighted...
What I need is: to be able to click anywhere on the row - but NOT on the edit button - to have a row highlighted. Edit button should redirect me to a page where I will edit that row, but clicking on any other "column" of any row should highlight that row...
As a workaround, I could probably add another buttion - "Active". So I would have two buttons - Edit (to edit the row) and Active (To highlight the row). On Denes' page, the row is highlighted once I click on Edit. I don't see where is that highlight action tied to this button... How can I tie it up to a different button (Active) than Edit?
Thank you for your time.
Daniel
Similar Messages
-
Standard report with fixed position.
Hello,
I have a page where i want the first report to have a fixed position.
I have 3 regions with reports, the first will only display product name and number, the next report will display sales. The last report is very long so I have to scroll quite a bit. That's why i want the first report with names to have a fixed position so i can see which product i'm looking at.
I have tried to make a copy of the standard report template, and in the before rows i have this code
<table class="t3standard" summary="Report" style="position:fixed;">
this didn't work
Is this a way of making changes to the report template? Is it possible to make theese kind of changes in the report template or du I have to go inside the CSS file to add position:fixed somewhere?
AndersWhat browser(s) are you using? Win IE doesn't support fixed positioning :-(
How about setting a fixed height for the last report and making it scrollable using overflow: scroll? This would make the first 2 reports "fixed" by default... -
In my MacBook Pro(10.7.5), finder is crashing after logging in. It is showing crash report with Relaunch option, when i click on Relaunch option finder is working properly but i am unable to see Top bar(Apple logo, Date and Wifi etc... bar). Even in safari address bar, TextEdit not accepting any text means when type something not showing up and also i am unable operate any thing from keyboard. Plz help me…..
One thing that you can try is installing a 'fresh' version of OS X Lion. Boot into your Recovery partition (holding down the command and R keys whilst booting) and elect to install OS X from the Recovery screen. You need not erase your hard drive and you should not lose any of your data.
Oh, and just as a precaution, I would use Disk Utility, once you're in Recovery mode, to verify your hard drive before trying to install the OS again.
Clinton -
Report - Alert Message when Link with value 0 is clicked
Hi,
I have a report with many fields eg. Year , Count of High Priority Project , Count of Medium Priority Project , Count of Low Priority Project.
I have used Column Attributes to link the report data to page 22.
Now , some of the cells in the report have 0 . Is it possible that when user click on 0 the link does not take to page 22 , but show javascript alert window stating no data.
Any help will be highly appreaciated.
Regards,
ShijeshThanks Denes for the reply.
I'm sorry that i was not able to explain my question clearly.
Below is a bare minimum version of my report.
[http://www.geocities.com/shijeshkumar/Untitled.png]
I have a table say dummy_project with field Year , Priority ( it can have only any of these three value - High Medium and Low ) and Project_Status ( it can have only any of these three value - Red , Green and Yellow ) --- As you can see value of the field has been used as Column Lable ( eg. High , Low and Medium ) --
now when user click on first cell which has value 1 -- It pass the High Column Lable , Priority (High value is in priority field of dummy project table) , and Year to Page 22.
Since my original report contains 17 fields, it will be very difficult for me to include hyperlink in the query.
Is there any other way to make my hyperlink conditional , when it has 0 value there should be no hyperlink ...
If i use the method which is metioned in the link it will work as I want but the code will become to lenghty and hard to debug ( Condidering there are 17 column) and each column is derived using decode and case and other conditions....
Edited by: Shijesh Kumar on Jan 16, 2009 5:13 AM -
Issue with Report to get Position value for each Class ID.
Hello Experts,
m working on a report where I want Position values as on date.
for an entered date report should give position value(Amount for transaction) for each class Id.
I m trying using the exit variable but could not reach the output.
For date I created an exit variable which shoud return the latest position for each class Id.
Now this exit variable is "ready for Input" . when I debug my code it takes i_step =3 and i_vanm= " " after i_step = 1 and i_vnam = "<variablename>"
how do I go about to get the solution.
Guide me to come up with desired output.
Thanks in Adv.
Bhavna.Hello Experts,
m working on a report where I want Position values as on date.
for an entered date report should give position value(Amount for transaction) for each class Id.
I m trying using the exit variable but could not reach the output.
For date I created an exit variable which shoud return the latest position for each class Id.
Now this exit variable is "ready for Input" . when I debug my code it takes i_step =3 and i_vanm= " " after i_step = 1 and i_vnam = "<variablename>"
how do I go about to get the solution.
Guide me to come up with desired output.
Thanks in Adv.
Bhavna. -
Run Multiple report with one click
hi
I have 60 reports with me and i want to run all 60 reports with one click. Is it possible to fire next report at the end of previous using code?????
Any help would be appreciatedHi Swapnil,
Yes it can be done in many ways. But you will need to analyze what exactally is required and what kind of reports are to be executed in sequence. WHats the report supposed to do, do they need to send some file or some data to external world, does it need to display any output?
From within the program you can use the SUBMIT command to call each report program one after the other. Or schedule all the 60 reports in a background job such that each report is executed in each step.
There are many other ways but i am really not sure why there is such a request? This is something really out of the odd :-).
Hope this helps
Cheers
VJ -
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 a SSRS report with dynamic overlapping images
I have to create a report with the following requirement:
1: The first page has some hi-res images of 8 different geometric shapes with text in it. The location of the images on the page will be static, however the fill color of image can be either green or grey.E.g. one box can be green for one user , for other it
can be grey etc.
2: Export the report in excel,pdf and word
I am planning to use SSRS for this.
I am planning to create the report with superimposed images, e.g. green palette shape and grey palette shape superimposed on each other .Depending on the selection made by the user, I want to "Send to Back" or "Bring to Front." Can I change
the "Send to Back" or "Bring to Front" properties at runtime depending on parameters passed to the report?
Also, I want the image path to be configurable, so that when business wants to change the text or color of the image, I do not need to redeploy the code. I can just change the image.
how can I create the RDL such that the images are at the proper positions? DO I need to insert a tablix for proper positioning of the image?
Any suggestions?Hi RachanaD,
As far as I know, overlapping of item does not work in the soft-break renderers like HTML, Word and Excel. However, it is work in hard-break renderers like PDF or TIFF.
In your case, we can insert text box in rectangle to work around the issue. We can insert an image in rectangle and another image insert in a text box. Then, put the text box in the rectangle.
In SSRS, we cannot use parameter to control the location of image. However, we can use go to report action to work around the issue. Please refer to the steps below:
Create two similar report, the difference between two reports is the location of these image.
In the first report, add a text box fill with “Send to Back”.
Add action “go to report” of the text box go to the second report.
In the second report, add a text box fill with “Bring to Front”.
Add action “go to report” of the text box go to the first report.
Hope this helps.
Regards,
Alisa Tang
If you have any feedback on our support, please click
here.
Alisa Tang
TechNet Community Support -
ALV Reporting with drill down capabillities
I'm creating a abap custom report using the ALV. I want to drill down to CJ03 which is projects. I know how to do it in regular custom reporting, but I don't seem to be able to get it to work using the ALV. Can anyone help?
Thanks.
LindaHi Linda,
Take a look at this sample program. The logic to handle any interaction with the user is in my "PORCESS_USER_COMMANDS" routine.
This is defined in the "I_CALLBACK_USER_COMMAND" parameter in the ALV FM.
Hope this helps.
Cheers,
Pat.
[code]
Modification History
Date | Author | Chg Req # | Description
15.08.2001| Pat Yee | $TMP | Program Creation
This program is an example of how the ALV Display works.
It will display Customer Data.
This report will also show how to display an ALV report with different
colored lines and icons
REPORT zpat.
Include Programs
INCLUDE <icon>.
Database Tables
TABLES: kna1. "Customer Master
Types
TYPE-POOLS: kkblo.
Structures
Structure to hold the Color Information
DATA: BEGIN OF st_color,
color(3) TYPE c,
END OF st_color.
Structure to hold the Icon Information
DATA: BEGIN OF st_icon,
icon(4) TYPE c,
END OF st_icon.
ALV Field Catalog Structure
DATA: st_fieldcat TYPE slis_fieldcat_alv.
ALV Layout Structure
DATA: st_layout TYPE slis_layout_alv.
Internal Tables
Output Table
DATA: BEGIN OF tbl_kna1 OCCURS 0.
INCLUDE STRUCTURE st_icon. "Icon Structure
INCLUDE STRUCTURE kna1. "Customer Master Structure
INCLUDE STRUCTURE st_color. "Color Structure
DATA: END OF tbl_kna1.
ALV Field Catalog Table
DATA: tbl_fieldcat TYPE slis_t_fieldcat_alv.
Variables
DATA: fieldname(30) TYPE c,
g_repid LIKE sy-repid.
Start of Selection
START-OF-SELECTION.
g_repid = sy-repid.
PERFORM get_data.
End of Selection
END-OF-SELECTION.
PERFORM do_fancy_stuff.
PERFORM get_layout.
PERFORM get_fieldcat.
PERFORM create_report.
*& Form CREATE_REPORT
Learn to read the subroutine name!
FORM create_report.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_interface_check = ' '
i_callback_program = g_repid
i_callback_user_command = 'PROCESS_USER_COMMANDS'
it_fieldcat = tbl_fieldcat
i_default = 'X'
i_save = ' '
is_layout = st_layout
TABLES
t_outtab = tbl_kna1
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " CREATE_REPORT
*& Form GET_FIELDCAT
Build the Field Catalog
FORM get_fieldcat.
Here the field catalog is created. To display more fields simply
'uncomment' the additional lines and add the field name. Also note
that the field catalog is much more powerful than this. You can
intensify fields, change the colour, assign reference fields, etc.
Look at type slis_fieldcat_alv for more options.
PERFORM write_fieldcat USING 'ICON' 'TBL_KNA1' ' ' 'X' 1 '2' 'X'
PERFORM write_fieldcat USING 'KUNNR' 'TBL_KNA1' 'KNA1' 'X' 2 ' ' ' '
PERFORM write_fieldcat USING 'NAME1' 'TBL_KNA1' 'KNA1' ' ' 3 '10' ' '
'X'.
PERFORM write_fieldcat USING 'STRAS' 'TBL_KNA1' 'KNA1' ' ' 4 ' ' ' '
PERFORM write_fieldcat USING 'TELF1' 'TBL_KNA1' 'KNA1' ' ' 5 ' ' ' '
PERFORM write_fieldcat USING 'ORT01' 'TBL_KNA1' 'KNA1' ' ' 6 ' ' ' '
PERFORM write_fieldcat USING 'PSTLZ' 'TBL_KNA1' 'KNA1' ' ' 7 ' ' ' '
PERFORM write_fieldcat USING 'SORTL' 'TBL_KNA1' 'KNA1' ' ' 8 ' ' ' '
PERFORM write_fieldcat USING 'ERNAM' 'TBL_KNA1' 'KNA1' ' ' 9 ' ' ' '
PERFORM write_fieldcat USING 'SPRAS' 'TBL_KNA1' 'KNA1' ' ' 10 ' ' ' '
perform write_fieldcat using ' ' 'TBL_KNA1' 'KNA1' ' ' 10 ' '.
perform write_fieldcat using ' ' 'TBL_KNA1' 'KNA1' ' ' 11 ' '.
perform write_fieldcat using ' ' 'TBL_KNA1' 'KNA1' ' ' 12 ' '.
ENDFORM. " GET_FIELDCAT
*& Form WRITE_FIELDCAT
Write the Field Catalog data to the Field Catalog Table
-->name Field name
-->tab Table name
-->st Structure Name
-->key Is this field a Key?
-->pos Position Number
-->length Field Length
-->icon Display as Icon
-->hot Hotspot
FORM write_fieldcat USING name tab st key pos length icon hot.
st_fieldcat-fieldname = name.
st_fieldcat-tabname = tab.
st_fieldcat-ref_tabname = st.
st_fieldcat-key = key.
st_fieldcat-col_pos = pos.
st_fieldcat-outputlen = length.
st_fieldcat-icon = icon.
st_fieldcat-hotspot = hot.
APPEND st_fieldcat TO tbl_fieldcat.
CLEAR st_fieldcat.
ENDFORM. " WRITE_FIELDCAT
*& Form PROCESS_USER_COMMANDS
Interactive Reporting Commands
FORM process_user_commands USING syst-ucomm LIKE syst-ucomm
selfield TYPE slis_selfield.
This subroutine is called when there is user interaction in the output
In this case if the user double clicks the Customer Number then the
program will call transaction XD03 and display the Customer Master
Data
CASE syst-ucomm.
WHEN '&IC1'.
get cursor field fieldname.
READ TABLE tbl_kna1 INDEX selfield-tabindex.
SET PARAMETER ID 'KUN' FIELD tbl_kna1-kunnr.
CALL TRANSACTION 'XD03' AND SKIP FIRST SCREEN.
ENDCASE.
ENDFORM. " PROCESS_USER_COMMANDS
*& Form GET_LAYOUT
set the layout of the ALV.
add color to the row?
FORM get_layout.
st_layout-info_fieldname = 'COLOR'.
st_layout-colwidth_optimize = 'X'.
st_layout-get_selinfos = 'X'.
ENDFORM. " GET_LAYOUT
*& Form get_data
Get some data to play with
FORM get_data.
SELECT * FROM kna1 INTO CORRESPONDING FIELDS OF TABLE tbl_kna1
UP TO 30 ROWS.
ENDFORM. " get_data
*& Form do_fancy_stuff
Do some fancy pants stuff for example changing the color of
lines and adding icons
FORM do_fancy_stuff.
Here we will demonstrate changing the color of ALV Record lines as
well as displaying Icons
LOOP AT tbl_kna1.
All records where NAME1 begins with 'M', will be displayed in Bluish
Green
IF tbl_kna1-name1(1) EQ 'M'.
tbl_kna1-color = 'C41'. "Bluish Green
MODIFY tbl_kna1 TRANSPORTING color.
ENDIF.
All records with no TELF1 will be displayed in White and have a
Warning Icon
IF tbl_kna1-telf1 IS INITIAL.
tbl_kna1-color = 'C00'. "White
tbl_kna1-icon = '@AH@'. "Warning Icon
MODIFY tbl_kna1 TRANSPORTING icon color.
ENDIF.
ENDLOOP.
ENDFORM. " do_fancy_stuff[/code] -
Report with Dynamic tree control
I have a report with a TREE CONTROL.
<p>
A Tree is referenced to: CL_GUI_ALV_TREE_SIMPLE and is located on the left side of the screen.
<p>
See diagram below. The Tree has MULTI-LEVEL nodes and the user can click on any of the nodes which will
trigger a report (rellevant for that node) to appear in the REPORT container.
<p>
Everythign is working fine.
<p>
I now have a requirement to add a TREE ON/OFF functionality. I have added this by 'Freeing' TREE
container and by initializing when the user Turns ON the TREE. It is working fine, HOWEVER, when
it initilizes the TREE it is COLLAPSED and obviously does not point to the NODE that was clicked.
<p>
My goal is to retain the value of the NODE that was pressed and EXPAND the tree to that node and
highlight it... Please note that I have MULTI-LEVEL nodes and the user can double click on NODES
and ITEMS.
<p>
I tried using GET_SELECTED_NODES, but it only works if the user selects the LOWEST level node/item.
<p>
Any advise will be appreciated.
<p>
Also, as an alternative, I was thinking of resizing TREE container to WIDTH of 1 when the user PRESSES
TREE OFF and resizing back to width 200 when the user presses TREE ON. I could not find any methods
that would work with CL_GUI_DOCKING_CONTAINER.
Please help! Thank you in advance.
<br>
<br>
<img src="http://img237.imageshack.us/img237/6684/bdccz3.jpg" border="0"/></a>
<p>
<p>I have a report with a TREE CONTROL.
<p>
A Tree is referenced to: CL_GUI_ALV_TREE_SIMPLE and is located on the left side of the screen.
<p>
See diagram below. The Tree has MULTI-LEVEL nodes and the user can click on any of the nodes which will
trigger a report (rellevant for that node) to appear in the REPORT container.
<p>
Everythign is working fine.
<p>
I now have a requirement to add a TREE ON/OFF functionality. I have added this by 'Freeing' TREE
container and by initializing when the user Turns ON the TREE. It is working fine, HOWEVER, when
it initilizes the TREE it is COLLAPSED and obviously does not point to the NODE that was clicked.
<p>
My goal is to retain the value of the NODE that was pressed and EXPAND the tree to that node and
highlight it... Please note that I have MULTI-LEVEL nodes and the user can double click on NODES
and ITEMS.
<p>
I tried using GET_SELECTED_NODES, but it only works if the user selects the LOWEST level node/item.
<p>
Any advise will be appreciated.
<p>
Also, as an alternative, I was thinking of resizing TREE container to WIDTH of 1 when the user PRESSES
TREE OFF and resizing back to width 200 when the user presses TREE ON. I could not find any methods
that would work with CL_GUI_DOCKING_CONTAINER.
Please help! Thank you in advance.
<br>
<br>
<img src="http://img237.imageshack.us/img237/6684/bdccz3.jpg" border="0"/></a>
<p>
<p> -
I have a situation where I have a report with a subreport. The main report itself is 3 columns on a page layout 8.5 x 11. However, when I get to a certain data section of the report, it needs to switch to 2 columns for formatting purposes and then back to 3 columns. Is there a way to do this?
I've tried creating a main report with 3 sub reports but each subreport will be dependent on a subreport and you can't have a subreport within a subreport apparently.Hi John,
It's a lot of processing but using the formula on the position of the column may work for you... Right click on the field and select Size and Position and then click on the X2 button and then write a formula based on some logic that determines if and where the column is displayed.
If the second column is always there then just hide the 3rd column... but if the 3rd column needs to be moved to the second columns position then you have to determine if the value is true or false and if the second column does exist etc....
Sorry I don't have any samples but I'm sure someone out there does.... Or can provide details if you need them.
Thank you
Don -
Open report with "Save as" and "Open with" dialogue
Hi,
I'm using jasper reports within my application. I manage to open them in a new window but in that case the url containing JasperServer username and password is shown. I would like to open the report without showing the url.
I tryed using a database procedure (http://sqlcur.blogspot.com/2009/02/jasperreports-in-apex.html) but all I get is a alert window saying "file does not begin with ' pdf-'". Couldn't see what is the problem (I used the same procedure as Ino has in his example) so I thought of another way. Is it possible, when someone clicks a button to open a report, to open that report with a "Save as" and "Open with" pop up window?
The javascript function that I use:
<script language="JavaScript" type="text/javascript">
function openLAPopUpJasper(url){
w = open(url,"winLov","toolbar=false,menubar=false,location=false,resizable=yes, //scrollbars=yes,status=yes,fullscreen=true");
if (w.opener == null)
w.opener = self;
w.focus();
</script>
Thanks in advance!
Edited by: Josip on Oct 29, 2009 2:55 AMAnyone?
-
XML Publisher Report with PL/SQL
Hi
Like to know how to develop the XML Publisher Report with PL/SQL, i did the following
1. created a pkg like as below
CREATE OR REPLACE PACKAGE BODY APPS.TEST_XMLTAG_PKG AS
PROCEDURE main (errbuf OUT VARCHAR2,
retcode OUT NUMBER
) IS
BEGIN
DECLARE
ctx DBMS_XMLGEN.ctxHandle;
xml CLOB;
BEGIN
ctx := dbms_xmlgen.newcontext('select * from scott.emp');
dbms_xmlgen.setrowtag(ctx, 'MY-ROW-START-HERE');
xml := dbms_xmlgen.getxml(ctx);
dbms_output.put_line(xml);
Fnd_file.put_line (fnd_file.LOG, XML);
END;
END;
END TEST_XMLTAG_PKG;
this pkg produces the output with xml tag in the view log.
I have registered the conc program & xml rtf but it does not produce the output in PDF, , I am not able to get the xml tag when i click the Diagnostics --> View XML.
can you please let me know the next steps involved.
Regards
YramI think the problem is because there is no begin and end tag. save the xml from the logfile and open with xml editor or IE.. then you will see the problem.
add Begin and end tag...then you should be fine.. i.e
fnd_file.put_line(fnd_file.output,'<EMP_DATA>'); -- begin Tag
tx := dbms_xmlgen.newcontext('select * from scott.emp');
dbms_xmlgen.setrowtag(ctx, 'MY-ROW-START-HERE');
xml := dbms_xmlgen.getxml(ctx);
dbms_output.put_line(xml);
Fnd_file.put_line (fnd_file.LOG, XML);
fnd_file.put_line(fnd_file.output,'</EMP_DATA>'); -- End Tag
Hope this helps..>Good Luck
Ravi -
How to create a table report with alphabetic link at the top
Hello,
I have a db table of users, and have created a report based on this table, however I want to have each aphabet letter at the top of the report so that users can click on the letter and see all records where the username field starts with that letter.
How can I achieve this?
Thanks,Hello user11243298 (please tell us your name),
Your report query would look something like this (assuming page number is 1):
select some_column1, some_column2
from your_user_table
where username like :P1_INITIAL || '%'
For the letters at the top of the report, here's a couple options:
- If you want all letters to appear whether or not there are any rows, you can create a series of buttons or links, one for each letter, and specify the target URL to submit back to the report page, setting the item P1_INITIAL to each letter.
- If you want only letters that have rows, one way is to create a dynamic LOV based on a query like this:
select distinct upper(substr(username, 1, 1)) d, distinct upper(substr(username, 1, 1)) v
from your_user_table
order by upper(substr(username, 1, 1))
Then use that for a select list with submit, again targeting the report page and setting P1_INITIAL to the selected value.
Hope this helps (if it does, please reward it),
John -
Creation of report with the help of report painter
Dear Experts,
I need report painter material, if any body have pls farward to me.
my intension to create controlling report with the help of report painter.
I am ready to award full points.
Thanks in advance
Regards
avudaiappan
Moderator - Please read this:
/thread/931177 [original link is broken]
Thread lockedHello Chinasammy,
Report Painter allows you to create reports using data from SAP application components, which you can adapt to meet your individual requirements.
Many of your reporting requirements can already be met by using the standard reports provided by various SAP application components. If these SAP standard reports do not meet your reporting needs, Report Painter enables you to define your specific reports quickly and easily.
When executing a Report Painter report, it is displayed by the system in Report Writer format. You thus have access to the same functions as for Report Writer reports defined in the same way, and can combine Report Painter and Report Writer reports together in a report group.
Report Painter uses a graphical report structure, which forms the basis for your report definition and displays the rows and columns as they appear in the final report output.
To facilitate report definition, you can use many of the standard reporting objects provided by SAP (such as libraries, row/column models, and standard layouts) in your own specific reports. When you define a Report Painter report you can use groups (sets). You can also enter characteristic values directly.
Advantages of Report Painter include:
Flexible and simple report definition
Report definition without using sets
Direct layout control: The rows and columns are displayed in the report definition as they appear in the final report output, making test runs unnecessary.
=============================================
Below mentioned is the process for creating reports using Report Painter as a tool.
Selecting and maintaining a library for your report: As the transfer structure to Report Painter you use a report table, which is defaulted by SAP and can not be maintained. This table contains characteristics, key figures and predefined columns. In a library, you collect the characteristics, key figures, and predefined columns from the report table, which you need for your Report Painter reports.
When you define a Report Painter report, you assign it to a library. Reports assigned to one library can only use the characteristics, key figures, and predefined columns selected for that library.
When you create or maintain a library, the Position field determines the sequence in which the characteristics, key figures or (predefined) key figures appear in the Report Painter selection lists when you define a report. This allows you to position the objects that you use regularly in your reports at the beginning of the selection lists. If you do not make an entry in the Position field, you will not be able to use this object in Report Painter reports.
You can use either the standard SAP libraries for your reports or define your own.
(ii) Selecting or maintaining a standard layout for your report: Standard layouts determine report layout features and the format of your report data.If the SAP standard layouts do not meet your reporting requirements, you can create a new standard layout or change an existing one.
(iii) Defining row and column models: A model is a one-dimensional, predefined reporting structure that you can insert in either the rows or columns of your report.If you often use the same or similar row or column definitions in your reports, it is recommended that you create row or column models.
You must define the row and/or column models that you want to include in your report definition before you define the report.
You can also use the standard column models supplied by SAP.
(iv) Defining the report: Defining a Report Painter report involves the following steps.
(a) Define the report columns: You define the report columns using the characteristics, key figures, and predefined columns selected for the library that the report uses. Alternatively, you can use a column model for column definition. Column models are predefined column structures which you insert into your entire column definition, instead of defining each individual column.
(b) Define the report rows: You define the report rows using the characteristics selected for the library selected for the report.
Alternatively, you can use a row model for your row definition. Row models serve the same purpose as column models, but are used to define a report row.
Edit and format the report rows and columns in line with your requirements. (For example, you can hide rows or columns, define the column width or define colors for your report rows).
(iii)Define general data selection criteria for the selection of your report data: Selection criteria are the characteristics used to select data for the entire report. You cannot enter characteristics as data selection criteria if they are already being used in the report rows or columns.
(iv) Assigning the report to a report group: Once you have defined a report, you must assign it to a report group. A report group can contain one or more reports from the same library. However, reports that share the same data will select data more quickly and improve processing time.
Hopw this helps you. Please let me know if you need anything more and assign points.
Rgds
Manish
Maybe you are looking for
-
Error Code: -8155 I get this message even when logging on to THIS Apple Site. I even get it at times when accessing my bank or other institution where ID is required. How do I examine Certificates and determine acceptability of same - as opposed to o
-
Hi Sap Experts, I am not able to procure the asset by using special period Ex:13 T.CODE :F-90 Document Date : 01.04.2010 Posting Date : 01.04.2010 Period 13 Error Message: Period is not open for 2009. Thanks, Prabhakar
-
Any SVG file I try to open is empty. The file icon's thumbnail shows the image that should be in the file, but when the file is actually open in Illustrator, there's literally nothing except an empty layer. I've tried probably a dozen files from vari
-
Creating an Excel File in Background
Hi Guys, Is there a function or Bapi that allows the creation of an Excel file in a background process?, because the WS_EXCEL function doesn't allow it. Regards, Eric
-
Need emergency help for simple actionscript commands.
I havent touched flash for awhile and am now using flash professional to try and create a simple visual prop. I used to be able to have the movieclip stop on the first frame and then use the keyboard (anykey) to advance frame by frame in the timeline