Radio buttons on interactive report
Hello all,
I've added radio buttons to an interactive report. What would be the best way to submit the form when user selects the buttons?
Thanks.
Hi inka,
inka wrote:
Hello all,
I've added radio buttons to an interactive report. What would be the best way to submit the form when user selects the buttons?
Thanks.
one of the way to submit the form is use apex.submit
Check the example given below
1) Assuming you have used apex_item.radiogroup to create radio buttons.
sample sql query for interactive report
select EMPNO,
ENAME,
JOB,
MGR,
HIREDATE,
SAL,
COMM,
DEPTNO,
apex_item.radiogroup(1, EMPNO) r
from EMP
2) Go to Report Attributes -> Edit Radio button column
Under Column Definition
Display Type : Standard Report Column
Under Column link -> do the changes given below
Link Text : #R# // here R is my radio button column name, so select yours radio button column name.
Target : URL
URL : javascript:apex.submit({request:'TEST',set:{'P6_HIDDEN':#EMPNO#}});
// here P6_HIDDEN is item where i am setting EMPNO to that column, if you want to set any value to any item that you want to use in process then create Hidden item with protected value no.
or if you want to show confirm message before submitting the page then use apex.confirm in place of apex.submit .
Hope this helps you,
Regards,
Jitendra
Similar Messages
-
Hi Friends,
I want to add Button in Interactive report for each row. Is it possible to add a button.Please help me.You should add a dummy column in your report query. Make dummy column as a link and change the column attribute 'Column Link' to and image. For instance the Edit column in the following query is a button on my report.
select
'Edit',
"CUST_NO",
"CUST_FIRST_NAME",
"CUST_LAST_NAME",
"CUST_ADDRESS",
"CUST_CONTACT_PHONE_NO"
from "CUSTOMER" -
Hi experts,
I am using radio buttons in alv report by using screen painter but error occurs in alv that screen doesn't exist in module.
plz help me.Hi Ankita,
check this program.
*& Report ZALVGRID_WITH_RADIOBUTTONS
*& This program shows how to realize radiobuttons in ALV grid lists
*& using event HOTSPOT_CLICK.
*& Screen 100:
*& - Flow logic
*& PROCESS BEFORE OUTPUT.
*& MODULE PBO.
*& PROCESS AFTER INPUT.
*& MODULE PAI.
*& - Screen elements: none
*& - ok-code field -> gd_okcode
*& GUI Status MAIN100:
*& - F3 = 'BACK', Shift+F3 = 'EXIT', F12 = 'CANC'
PROGRAM zalvgrid_with_radiobuttons.
TYPE-POOLS: abap, icon. " INCLUDE . for releases < 6.20
TYPES: BEGIN OF ty_s_sflight.
INCLUDE TYPE sflight.
TYPES: button1 TYPE iconname.
TYPES: button2 TYPE iconname.
TYPES: button3 TYPE iconname.
TYPES: button4 TYPE iconname.
TYPES: END OF ty_s_sflight.
DATA:
gt_sflight TYPE STANDARD TABLE OF ty_s_sflight,
gs_layout TYPE lvc_s_layo,
gt_fcat TYPE lvc_t_fcat.
DATA:
gd_okcode TYPE ui_func,
go_docking TYPE REF TO cl_gui_docking_container,
go_grid TYPE REF TO cl_gui_alv_grid.
CLASS lcl_eventhandler DEFINITION
CLASS lcl_eventhandler DEFINITION.
PUBLIC SECTION.
CLASS-METHODS:
handle_hotspot_click FOR EVENT hotspot_click OF cl_gui_alv_grid
IMPORTING
e_row_id
e_column_id
es_row_no
sender.
ENDCLASS. "lcl_eventhandler DEFINITION
CLASS lcl_eventhandler IMPLEMENTATION
CLASS lcl_eventhandler IMPLEMENTATION.
METHOD handle_hotspot_click.
define local data
FIELD-SYMBOLS:
IS ASSIGNED ).
Set all radio buttons "unselected"
IS ASSIGNED ).
Set selected radio button "selected".
= icon_wd_radio_button.
ENDIF.
Force PAI followed by refresh of table display in PBO
CALL METHOD cl_gui_cfw=>set_new_ok_code
EXPORTING
new_code = 'REFRESH'
IMPORTING
RC =
ENDMETHOD. "handle_hotspot_click
ENDCLASS. "lcl_eventhandler IMPLEMENTATION
MAIN *
START-OF-SELECTION.
PERFORM select_data.
PERFORM init_controls.
PERFORM build_fieldcatalog.
PERFORM set_layout.
CALL METHOD go_grid->set_table_for_first_display
EXPORTING
i_structure_name = 'SFLIGHT'
is_layout = gs_layout
CHANGING
it_fieldcatalog = gt_fcat
it_outtab = gt_sflight.
Link docking container to dynpro
CALL METHOD go_docking->link
EXPORTING
repid = syst-repid
dynnr = '0100'
CONTAINER =
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
lifetime_dynpro_dynpro_link = 3
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.
CALL SCREEN 100.
END-OF-SELECTION.
MODULE PBO OUTPUT *
MODULE pbo OUTPUT.
SET PF-STATUS 'MAIN100'.
SET TITLEBAR 'MAIN100'.
ENDMODULE. "PBO OUTPUT
MODULE PAI INPUT *
MODULE pai INPUT.
Leave report
CASE gd_okcode.
WHEN 'BACK' OR
'EXIT' OR
'CANC'.
SET SCREEN 0. LEAVE SCREEN.
Refresh table display
WHEN 'REFRESH'.
PERFORM refresh_display.
WHEN OTHERS.
do nothing
ENDCASE.
CLEAR gd_okcode.
ENDMODULE. "PAI INPUT
*& Form BUILD_FIELDCATALOG
text
--> p1 text
<-- p2 text
FORM build_fieldcatalog .
ALV List with Radio Buttons
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2007 SAP AG 7
define local data
DATA:
ls_fcat TYPE lvc_s_fcat.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
I_BUFFER_ACTIVE =
i_structure_name = 'ICON'
I_CLIENT_NEVER_DISPLAY = 'X'
I_BYPASSING_BUFFER =
I_INTERNAL_TABNAME =
CHANGING
ct_fieldcat = gt_fcat
EXCEPTIONS
inconsistent_interface = 1
program_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.
DELETE gt_fcat WHERE ( fieldname <> 'NAME' ).
NOTE: field ICON-NAME has data element ICONNAME.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
I_BUFFER_ACTIVE =
i_structure_name = 'SFLIGHT'
I_CLIENT_NEVER_DISPLAY = 'X'
I_BYPASSING_BUFFER =
I_INTERNAL_TABNAME =
CHANGING
ct_fieldcat = gt_fcat
EXCEPTIONS
inconsistent_interface = 1
program_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.
READ TABLE gt_fcat INTO ls_fcat
WITH KEY fieldname = 'NAME'.
IF ( syst-subrc = 0 ).
DELETE gt_fcat INDEX syst-tabix.
ENDIF.
ls_fcat-fieldname = 'BUTTON4'.
ls_fcat-coltext = ls_fcat-fieldname.
ls_fcat-icon = 'X'.
ls_fcat-hotspot = 'X'.
INSERT ls_fcat INTO gt_fcat INDEX 5.
ls_fcat-fieldname = 'BUTTON3'.
ls_fcat-coltext = ls_fcat-fieldname.
INSERT ls_fcat INTO gt_fcat INDEX 5.
ls_fcat-fieldname = 'BUTTON2'.
ls_fcat-coltext = ls_fcat-fieldname.
INSERT ls_fcat INTO gt_fcat INDEX 5.
ls_fcat-fieldname = 'BUTTON1'.
ls_fcat-coltext = ls_fcat-fieldname.
INSERT ls_fcat INTO gt_fcat INDEX 5.
Renumbering of the columns
LOOP AT gt_fcat INTO ls_fcat.
ls_fcat-col_pos = syst-tabix.
MODIFY gt_fcat FROM ls_fcat INDEX syst-tabix.
ENDLOOP.
ENDFORM. " BUILD_FIELDCATALOG
*& Form SELECT_DATA
text
--> p1 text
<-- p2 text
FORM select_data .
define local data
DATA:
ls_sflight TYPE ty_s_sflight.
SELECT * FROM sflight INTO CORRESPONDING FIELDS OF TABLE gt_sflight.
ls_sflight-button1 = icon_wd_radio_button. " selected radiobutton
ls_sflight-button2 = icon_wd_radio_button_empty.
ls_sflight-button3 = icon_wd_radio_button_empty.
ls_sflight-button4 = icon_wd_radio_button_empty.
Alternatively: create icons using function module 'ICON_CREATE'
on SAP releases where these icons are not available.
MODIFY gt_sflight FROM ls_sflight
TRANSPORTING button1 button2 button3 button4
WHERE ( carrid IS NOT INITIAL ).
ENDFORM. " SELECT_DATA
*& Form INIT_CONTROLS
text
--> p1 text
<-- p2 text
FORM init_controls .
CHECK ( go_docking IS NOT BOUND ).
ALV List with Radio Buttons
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2007 SAP AG 9
Create docking container
CREATE OBJECT go_docking
EXPORTING
parent = cl_gui_container=>screen0
REPID =
DYNNR =
SIDE = DOCK_AT_LEFT
EXTENSION = 50
STYLE =
LIFETIME = lifetime_default
CAPTION =
METRIC = 0
ratio = 90
NO_AUTODEF_PROGID_DYNNR =
NAME =
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
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.
Size of container = full screen size
CALL METHOD go_docking->set_extension
EXPORTING
extension = 99999
EXCEPTIONS
cntl_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.
Create ALV grid instance
CREATE OBJECT go_grid
EXPORTING
I_SHELLSTYLE = 0
I_LIFETIME =
i_parent = go_docking
I_APPL_EVENTS = space
I_PARENTDBG =
I_APPLOGPARENT =
I_GRAPHICSPARENT =
I_NAME =
I_FCAT_COMPLETE = SPACE
EXCEPTIONS
error_cntl_create = 1
error_cntl_init = 2
error_cntl_link = 3
error_dp_create = 4
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 for event HOTSPOT_CLICK
SET HANDLER:
lcl_eventhandler=>handle_hotspot_click FOR go_grid.
ENDFORM. " INIT_CONTROLS
*& Form REFRESH_DISPLAY
Refresh table display after switching the radiobuttons
--> p1 text
<-- p2 text
FORM refresh_display .
define local data
DATA:
ls_stable TYPE lvc_s_stbl.
ls_stable-row = abap_true.
ls_stable-col = abap_true.
CALL METHOD go_grid->refresh_table_display
EXPORTING
is_stable = ls_stable
I_SOFT_REFRESH =
EXCEPTIONS
finished = 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. " REFRESH_DISPLAY
*& Form SET_LAYOUT
Set layout for ALV list
--> p1 text
<-- p2 text
FORM set_layout .
CLEAR: gs_layout.
gs_layout-cwidth_opt = abap_true. " optimize column width
gs_layout-zebra = abap_true.
ENDFORM. " SET_LAYOUT
Regards,
Prasanth
Reward if helpful -
How to create a radio button in ALV Reports
Hi all,
Best wishes to all..
Kindly reply me to this question... that is "How to create a radio button in ALV Report"
Thanks and Regards
AnjaliHI
here is an example :
PROGRAM ZUS_SDN_BCALV_GRID_DEMO_2.
Based on: BCALV_GRID_DEMO.
TYPE-POOLS: icon.
TYPES: BEGIN OF ty_s_sflight.
INCLUDE TYPE sflight.
TYPES: button1 TYPE lvc_emphsz.
TYPES: button2 TYPE lvc_emphsz.
TYPES: button3 TYPE lvc_emphsz.
TYPES: button4 TYPE lvc_emphsz.
TYPES: END OF ty_s_sflight.
DATA:
gt_sflight TYPE STANDARD TABLE OF ty_s_sflight,
gt_fcat TYPE lvc_t_fcat.
DATA: ok_code LIKE sy-ucomm,
gt_sflight TYPE TABLE OF sflight,
g_container TYPE scrfname VALUE 'BCALV_GRID_DEMO_0100_CONT1',
grid1 TYPE REF TO cl_gui_alv_grid,
g_custom_container TYPE REF TO cl_gui_custom_container.
CLASS lcl_eventhandler DEFINITION
CLASS lcl_eventhandler DEFINITION.
PUBLIC SECTION.
CLASS-DATA:
md_cnt TYPE i.
CLASS-METHODS:
handle_hotspot_click FOR EVENT hotspot_click OF cl_gui_alv_grid
IMPORTING
e_row_id
e_column_id
es_row_no
sender.
ENDCLASS. "lcl_eventhandler DEFINITION
CLASS lcl_eventhandler IMPLEMENTATION
CLASS lcl_eventhandler IMPLEMENTATION.
METHOD handle_hotspot_click.
define local data
FIELD-SYMBOLS:
<ls_entry> TYPE ty_s_sflight,
<ld_fld> TYPE ANY.
READ TABLE gt_sflight ASSIGNING <ls_entry> INDEX es_row_no-row_id.
CHECK ( <ls_entry> IS ASSIGNED ).
Set all radio buttons "unselected"
<ls_entry>-button1 = icon_wd_radio_button_empty.
<ls_entry>-button2 = icon_wd_radio_button_empty.
<ls_entry>-button3 = icon_wd_radio_button_empty.
<ls_entry>-button4 = icon_wd_radio_button_empty.
ASSIGN COMPONENT e_column_id-fieldname OF STRUCTURE <ls_entry>
TO <ld_fld>.
IF ( <ld_fld> IS ASSIGNED ).
Set selected radio button "selected".
<ld_fld> = icon_wd_radio_button.
ENDIF.
Force PAI followed by refresh of table display in PBO
CALL METHOD cl_gui_cfw=>set_new_ok_code
EXPORTING
new_code = 'DUMMY'
IMPORTING
RC =
ENDMETHOD. "handle_hotspot_click
ENDCLASS. "lcl_eventhandler IMPLEMENTATION
START-OF-SELECTION.
MAIN *
PERFORM select_data.
CALL SCREEN 100.
MODULE PBO OUTPUT *
MODULE pbo OUTPUT.
SET PF-STATUS 'MAIN100'.
IF g_custom_container IS INITIAL.
CREATE OBJECT g_custom_container
EXPORTING container_name = g_container.
CREATE OBJECT grid1
EXPORTING i_parent = g_custom_container.
PERFORM build_fieldcatalog.
CALL METHOD grid1->set_table_for_first_display
EXPORTING
i_structure_name = 'SFLIGHT'
CHANGING
it_fieldcatalog = gt_fcat
it_outtab = gt_sflight.
Set event handler for event TOOLBAR
SET HANDLER:
lcl_eventhandler=>handle_hotspot_click FOR grid1.
else.
CALL METHOD grid1->refresh_table_display
EXPORTING
IS_STABLE =
I_SOFT_REFRESH =
EXCEPTIONS
FINISHED = 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.
ENDIF.
ENDMODULE. "PBO OUTPUT
MODULE PAI INPUT *
MODULE pai INPUT.
to react on oi_custom_events:
CALL METHOD cl_gui_cfw=>dispatch.
CASE ok_code.
WHEN 'EXIT'.
PERFORM exit_program.
WHEN OTHERS.
do nothing
ENDCASE.
CLEAR ok_code.
ENDMODULE. "PAI INPUT
FORM EXIT_PROGRAM *
FORM exit_program.
CALL METHOD G_CUSTOM_CONTAINER->FREE.
CALL METHOD CL_GUI_CFW=>FLUSH.
LEAVE PROGRAM.
ENDFORM. "EXIT_PROGRAM
*& Form BUILD_FIELDCATALOG
text
--> p1 text
<-- p2 text
FORM build_fieldcatalog .
define local data
DATA:
ls_fcat TYPE lvc_s_fcat,
ls_hype TYPE lvc_s_hype.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
I_BUFFER_ACTIVE =
i_structure_name = 'LVC_S_FCAT'
I_CLIENT_NEVER_DISPLAY = 'X'
I_BYPASSING_BUFFER =
I_INTERNAL_TABNAME =
CHANGING
ct_fieldcat = gt_fcat
EXCEPTIONS
inconsistent_interface = 1
program_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.
DELETE gt_fcat WHERE ( fieldname <> 'EMPHASIZE' ).
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
I_BUFFER_ACTIVE =
i_structure_name = 'SFLIGHT'
I_CLIENT_NEVER_DISPLAY = 'X'
I_BYPASSING_BUFFER =
I_INTERNAL_TABNAME =
CHANGING
ct_fieldcat = gt_fcat
EXCEPTIONS
inconsistent_interface = 1
program_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.
READ TABLE gt_fcat INTO ls_fcat
WITH KEY fieldname = 'EMPHASIZE'.
IF ( syst-subrc = 0 ).
DELETE gt_fcat INDEX syst-tabix.
ENDIF.
ls_fcat-fieldname = 'BUTTON4'.
ls_fcat-icon = 'X'.
ls_fcat-hotspot = 'X'.
INSERT ls_fcat INTO gt_fcat INDEX 4.
ls_fcat-fieldname = 'BUTTON3'.
INSERT ls_fcat INTO gt_fcat INDEX 4.
ls_fcat-fieldname = 'BUTTON2'.
INSERT ls_fcat INTO gt_fcat INDEX 4.
ls_fcat-fieldname = 'BUTTON1'.
INSERT ls_fcat INTO gt_fcat INDEX 4.
LOOP AT gt_fcat INTO ls_fcat.
ls_fcat-col_pos = syst-tabix.
MODIFY gt_fcat FROM ls_fcat INDEX syst-tabix.
ENDLOOP.
ENDFORM. " BUILD_FIELDCATALOG
*& Form SELECT_DATA
text
--> p1 text
<-- p2 text
FORM select_data .
define local data
DATA:
ls_sflight TYPE ty_s_sflight.
SELECT * FROM sflight INTO CORRESPONDING FIELDS OF TABLE gt_sflight.
ls_sflight-button1 = icon_wd_radio_button.
ls_sflight-button2 = icon_wd_radio_button_empty.
ls_sflight-button3 = icon_wd_radio_button_empty.
ls_sflight-button4 = icon_wd_radio_button_empty.
MODIFY gt_sflight FROM ls_sflight
TRANSPORTING button1 button2 button3 button4
WHERE ( carrid IS NOT INITIAL ).
ENDFORM. " SELECT_DATA
Regards,
Prasanth
Reward all helpful answers -
Want to create F1 Help for radio button in my report
Hi All,
I want to create F1 Help for radio button in my report program. Which function module should i call in <b>at selection screen on help-request</b>
Also do I need to define the texts somewhere or I can pass it directly to the function module.Try DYN_FIELD_F1_HELP,
~Suresh
that is only for Dic fields..
Pl take alook at this<a href="http://help.sap.com/saphelp_erp2005vp/helpdata/en/79/34a243d9b511d1950e0000e8353423/frameset.htm">SAP Help</a>
~Suresh
Message was edited by: Suresh Datti -
Control the *GO* button in interactive report
How to control the GO button in interactive report using dynamic action?
i have to press the GO button automatically using dynamic action when page item get focused.
Is it possible?
thanks and regard,
skud.Hi skud,
Your dynamic action can capture the "Get Focus" event of your page item and then you could try creating a true action to submit the page with a specific request. Create a branch to a URL with the condition of request being equal to the one you specified before, and as target select URL and make use of the filtering of an IR by URL when linking. This is just an idea, hope you can get the result you need.
Regards,
Sergio -
How to set the a graphic ( 3 radio buttons ) in the report ?
Hi Exports,
1. How to set the a graphic ( 3 radio buttons ) in the report ?
Acutely I want to fetch the record from MCHB-CLABS and MCHB-CSPEM , if the data read from MCHB-CLABS will show the green light otherwise if read from MCHB-CSPEM, it will show red light.
(e.g : if syntax error in report it is showing red light signal , like that how to set in report program)
Thanking you.
SubashHi,
In your internal table declaration, include yet another field for lights..
DATA: begin of itab,
lights type light,
end of itab.
DATA: GV_LAYOUT TYPE SLIS_LAYOUT_ALV.
GV_LAYOUT-LIGHTS_FIELDNAME = 'LIGHTS'.
Use the GV_LAYOUT in your FM to display the ALV.
IS_LAYOUT = GV_LAYOUT
If itab-lights = 1 => Error
itab-lights = 3 => Success
itab-lights =2 => Warning -
I have created an interactive report. At the end of each line of the report I want to create a button. When pressed a process would be run updating a table with the product code that is displayed on that line of the report.
How do I go about creating buttons for each line on the report?Hello,
We don't like "cannot be done in Apex"... ?:|
So here is the (a) solution:
select "DEMO_CUSTOMERS"."CUSTOMER_ID" as "CUSTOMER_ID",
"DEMO_CUSTOMERS"."CUST_FIRST_NAME" as "CUST_FIRST_NAME",
"DEMO_CUSTOMERS"."CUST_LAST_NAME" as "CUST_LAST_NAME",
'<a id="P16_DOIT" href="javascript:doSubmit(''Go'')"><img alt="Go" src="/i/go.gif"/></a>' as "Go"
from "DEMO_CUSTOMERS" "DEMO_CUSTOMERS"And set 'Display Text as' of the last column to 'Standard Report Column'.
Of course the javascript can also call any other function - with any other parameter - you like...
Greetings,
Roel
[http://roelhartman.blogspot.com/]
You can reward this reply by marking it as either Helpful or Correct ;-) -
Button on Interactive Report to fire a process using JavaScript
I have a requirement to trigger a process from a button on an interactive report. One of the report columns has the triggering data allowed to make the process fire. The requirement is that the button says different things based on the value from another column in report.
My button is an html button that when the process is allowed to run, is enabled and fires a javascript function. When the process is not allowed to run for the row where the button is placed, the button changes text, color and is disabled.
The switching of the HTML button is working properly. The problem is that I am not able to grab the column value from the report to submit with the onclick() event.
As best I can tell, there is not unique id tag on the report columns and the best that I am able to do is to apply one class to the button and another class to the column that contains the value that needs to be submitted on my onclick() event.
I have considered using a link column that does a submit to a URL passing in the desired value but I would lose control of the appearance of my button.
Does anyone have a suggestion?
ThanksIn debugging while clicking on back button for first time, I found that after 'Leave to screen 0' statement debugger goes to double click event of screen 100 and start processing from a statment written immediately after 'Call screen 200' statement.
Yes, that's right. The processing will be continued from next stamtement after CALL SCREEN 200. But after the PAI will finish it shoud go to NEXT SCREEN which is 0.
If that doens't work you can try leaving the screen 100 explicitly as well.
CALL SCREEN 200.
LEAVE TO SCREEN 0. "the processing will terminate screen 100 as well
Try it out.
Regards
Marcin -
Help on print button for interactive report
Hi,
I have created an interactive report and have also added a print button on the button of the report (unfortunately forgot how I did it). Say my column on the reports was Col_No, Col_First_name, Col_Last_name and a print button when I pressed a would get to choose open or save a pdf file, if I opened or saved it, I would had the same info on my pdf report as above.
Since I have changed the column order meaning I have Col_No, Col_Last_name, Col_Start_Date, Col_First_name and that is working fine but when I click on the print button I will get the pervious columns.
I noticed I have created a branches to print the report, basically after processing, when button was pressed an action with f?p=&APP_ID.:0:&SESSION.:PRINT_REPORT=6259824360775969936:&DEBUG.::: is present.
I need help to fix this and I do very much appreciate any help or suggestions
-regards
ahmadiiFound the answer, thanks.
-
Adding print button to interactive report
For now I have the downloaded to PDF option checked so the user can print an interactive report via the widget.
I would like to have a print button on the report also.
Has anyone got any of the java script stuff working off of a button?Hi willjamu ,
All you should have to do is call the 'PDF' request to download the same report the drop down will create.
f?p=355:14:3381437251536222:PDF::::
I hope I was able to answer your question let me know.
Mike -
How to use Checkbox and radio buttons in BI Reporting
Hi BW Experts,
My Client has given a report in ABAP format and the report has to be develop in BI.It contains Check boxes and the radio buttons. I dont know how to use Checkboxes and radio buttons in Bex.For using this option, do we need to write a code in ABAP.Please help on this issue.
Thanks,
RamHi..
Catalog item characteristic
- Data element
- Characteristic type
Entry type
List of catalog characteristics
Designer
Format (character)
Standard characteristic
Alternative: Master characteristic
(used for automatic product
assignment)
Simple entry field
Alternatives:
Dropdown listbox or radio button
list -
Issues with the Radio Group and interactive report
Hi,
I have an interactive report that shows customer names and associated revenues... I want my users to be able to filter customer list by Province and by City in a way that when the user select a province then only associated cities show up (driven by a table)... for the filtration I am using 2 Radio Group items (one for Provinces and the other one for Cities)
Everything is working fine, except for the fact that when I select a province (let's say Prov A) and then select a city (let's say City A1) and again when I select another Province (let's say Prov B) I get the list of all cities associated to Prov B + city A1... Not sure why my previous selection of City is showing up with the list of new cities when I change the province... I SHOULD BE ABLE TO REST ALL CITIES WHEN A NEW PROVINCE IS SELECTED
here is the code
For interactive report
select CUSTOMER_NAME,
SUM(YTD) AS YTD
from T_TABLEA
where
(PROVINCE=
CASE
when :P2_PROV = 'All' THEN PROVINCE
ELSE :P2_PROV
END
and
(CITY=
CASE
when :P2_CITY = 'All' THEN CITY
ELSE :P2_CITY
END
GROUP BY CUSTOMER_NAME
For Province Radio Group I am using a static list:
STATIC2:All;All,Alberta;AB,Ontario;ON,Quebec;PQ,British Columbia;BC
For City, I am using a dynamic list using following code:
select 'All', 'All' return from dual
union
select distinct INITCAP(CITY) display_value, CITY return_value
from T_TABLEA
where
Province = :P2_PROV
order by 1
ThanksCheck the session state of items P2_PROV and *:P2_CITY* when the issue occurs and run the LOV query separately with the session state values.
If that too fetches it wrongly, then you would need to change your query. -
APEX 5: Problem displaying breadcrum (Create) button on interactive report
Hello There
I am trying to build a small app in APEX 5. I am taking the default 'Sample Database Application' (SDA) as an example for design.
In SDA the interactive report of Customer a breadcrumb 'Create which is displayed on the top right corner. I am trying to replicate the same in my interactive report, but in vain.
I have attached the printscreen for your reference. Could you please guide and advise me on how to get the same functionality of breadcrumb create button,etc same as in displayed in SDA into my custom app in APEX 5?
Thanks a lot for helping me out
Regards
Donhi ,
i had used like this .. it is working...
*& Form USER_COMMAND
FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
R_SELFIELD TYPE SLIS_SELFIELD.
clear : v_flag.
CASE R_UCOMM.
WHEN 'DATA'.
LOOP AT IT_TEMP.
if it_temp-checkbox = 'X'.
v_flag = 'X'.
v_pernr1 = IT_TEMP-PERNR.
*--Get compensation data and populate final internal table
refresh it_fin.
CALL FUNCTION 'Z_HR_COMP_STATEMENT'
EXPORTING
PERNR = v_pernr1
BEGDA = s_date-low
ENDDA = s_date-high
TABLES
FINAL = it_fin.
if not it_fin[] is initial.
delete adjacent duplicates from it_fin comparing pernr.
read table it_fin index 1.
move-corresponding it_fin to it_final.
append it_final.
clear it_final.
endif.
endif.
enddo.
ENDLOOP.
if not v_flag is initial.
*------ display final data
PERFORM final_display.
else.
message s000 with 'Select atleast one pernr'.
endif.
endcase.
ENDFORM. "USER_COMMAND
regards,
venkat. -
Buttons in Interactive Reports
Hi,
I have created a IR with columns x,y,z where y and z should retrieve the sysdate time. I have created y and z columns with HTML expression
<input type="submit" value="Start"/> and <input type="submit" value="Stop"/>.
I try to do the following when the user clicks start(i.e y) column in the report the system date should get updated/inserted in the table same way to the stop (i.e z)column.
The following trigger can retrieve the system date value
CREATE OR REPLACE TRIGGER "START_TIME"
before insert
on SESSION_STEP
for each row
begin
:new.start_time := sysdate;
end;
Whether i need to work some where on column link on column attributes?
I haven't done this before so just got stucked.
Any help is appreciated.
apex - 3.2
database - oracle 10g express edition
browser: FirefoxFound another post on the forum (using google...) and it seems to be a bug. Is this already fixed in APEX 3.2?
Re: Apex Import/Export - Losing search button template of interactive report
Regards,
Jacob
Maybe you are looking for
-
Greetings, I did a bit of searching on this and other forums, but found very little on this subject. When saving Ultrabeat presets, sometimes the sample OSC has none loaded and sometimes, it loads a completely different drum (Taiko for example). Has
-
Best Practices for Text That Changes During Sequence?
I have been using creating videos like the one here, in which text shows up every so often over the scene: Making The Walking Dead Pinball Machine - YouTube Thus far, I've been creating a title, duplicating it for each time the text changes, and load
-
Any OMNIS subscribers had success with iWeb '08?
I followed the instructions from iWeb and spoke to OMNIS and got instructions from them. I've successfully changed the DN to CNAME web.mac.com. I wasn't sure what information to put in the "Content" window. I've tried a few different things. I made t
-
Installed 10.4.8 and now only white start-up screen
Hi, I used the software updater and installed the new 10.4.8 update and when it restarted, the computer is stuck on the white screen. Has this happened to anyone else? Can anyone tell me what I need to do to get into the computer? thanks!
-
Help! Crashing JVM while doing SELECT statement through JDBC-ODBC bridge
Hi everyone, Help please. I am working on a project on my own computer using the jdk version 1.5.0_04. The project involves running a select on a Microsoft Access 2003 database via the JDBC-ODBC bridge. The database is registered in the ODBC database