Execute procedure in report
hello all,
i create a procedure in oracle database 9i now i want call this procedure in oracle report 6i in "after parameter form"
kindly guide me how can i do this......!
thanks to all
Create an After-Parameter-Form-trigger and sinmply write the name of the procedure in it (if the procedure has parameters, you have to give values for them). Make sure that you are connected to the database in reports-builder.
Similar Messages
-
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. -
HTTP Error: 401 unauthorized when executing a costcenter report.
Hi.
I get this HTTP error when executing an costcenter report.
The steps I do is following.
Call upp the report Y_D02_77000xxx
Under the "kostenstellen:Selection I Fill in this values.
Controlling area
Fiscal Year
From Period
To Period
Plan version
and finally i enter the "Cost Center group"
Then i press "execute" and get the result for differrent Cost Element, i get 2 lines "*Total" and
"**Over/underabsorption"
Now i doubleclick Over/underabsorption and select report "Cost Centers: Actual Line Items"
Now i Should get a new window woth results but instead i get a blank screen with the errormessage:
"HTTP error: 401 unauthorized"
This procedure worked fine until a couple of weeks ago.
Anyone have any ideas about what could be the problem?
Regards JohanYou might want to check all of your connections in SM59. When you get the 401 error, this is sometimes due to a connection failure (bad password and so on) in the RFC connections (this can also happen if you are using the Content Manager).
Hope that helps.
J. Haynes -
Error ORA-03113 when execute procedure via OEM
Hi All,
I got error messages
ORA-03113: end-of-file on communication channel
ERROR at line 1:
ORA-03114: not connected to ORACLE
when execute procedure via Oracle Enterprise Manager
Who do you know what 's the problem and how can I resolves ?
Thanks,
MckaSolution Description:
=====================
The ORA-3113 error is a general error reported by Oracle client tools,
which signifies that they cannot communicate with the oracle shadow
process. As it is such a general error more information must be collected
to help determine what has happened.
This short article describes what information to collect for an
ORA-3113 error when the Oracle server is on a Unix platform.
General Issues:
===============
1) Is it only one tool that encounters the error or
do you get an ORA-3113 from any tool doing a similar operation?
If the problem reproduces in SQL*Plus, use this in all tests
below.
2) Check if the problem is just restricted to:
[ ] One particular UNIX user,
[ ] Any UNIX user
or [ ] Any UNIX user EXCEPT as the Oracle user.
3) Check if the problem is just restricted to:
[ ] One particular ORACLE logon
or [ ] Any ORACLE logon that has access to the
relevant tables.
4) If you have a client-server configuration does this occur from:
[ ] Any client
[ ] Just one particular client
or [ ] Just one group of clients ?
If so what do these clients have in common ?
Eg: Software release .
5) Do you have a second server or database version where the
same operation works correctly? -
URL error while executing a web report in WAD
Hi,
When I execute a web report through the Web Application Designer, I get the following error:
The requested URL could not be retrieved
While trying to retrieve the URL: http://abcd.efghi.es:8000/sap/bw/BEx?
The following error was encountered:
Unable to determine IP address from host name for abcd.efghi.es
The dnsserver returned:
Name Error: The domain name does not exist.
This means that:
The cache was not able to resolve the hostname presented in the URL.
Check if the address is correct.
But when I execute the web report with the IP of the machine http://123.456.7.893:8000/sap/bw/BEx?...........
I can execute my web report correctly.
I didn't find any options in the menu web template in order to modify the url generation.
Please help me to solve this problem.
Regards,
RocioYou are not alone - Looks like SAP is also looking into this.
Web Application Designer Appearing in Unicode (UTF-8) -
How to execute procedure in toad software
hiii guy's i run my procedure on sql prompt and it run properly
but when i tried this on toad i got an problem
after compiling my procedure on toad
when i write
execute procedure_name(parameter1,parameter2);
then i get an error i.e
ORA-00900: invalid SQL statement
can someone tell me how to execute procedure on toad
thanks in adv...........how to execute procedure in toad softwareIn TOAD's schema browser you can go to the procedures tab - right click on the procedure in question and choose execute procedure - a window should pop up, where you can give optional parameters - the rest should be almost self explanatory ;)
-
How to execute procedure in SQL Worksheet ?
Hi, anybody know, how I can execute procedure here?
I try EXEC sec_roles, EXEC security_admin.sec_roles, EXECUTE - there is a SQL statement error. When I use CALL - there is no such procedure (I have execute previleges).
Although in SQLPlus EXEC works, but there are problems with standard SQL commands (all of them returns "2" no matter what content is).
Any ideas?
Regards
Krzysztofexec procedure(parameters) is a sql plus (and a few others) shortcut for
BEGIN
procedure(parameters);
END;So try that then pressing/clicking whatever it is in sql worksheet that makes a statement run.
Note that if your procedure has parameters defined as OUT or IN OUT, you will need to supply a variable to accept the returned value(s).
John -
Execute procedure error (Native SQL)
Hi experts,
I create a procedure
EXEC SQL.
create or replace procedure update_zsmadiprinc
is begin
( p_codigo in number(5),
p_ano in varchar2(4),
p_doc_vlr_princ in varchar2(10)
p_subrc out number ) is begin
update T_INTERF_RESSARC_FORNEC_R3
set ano_doc = p_ano,
NUM_DOC_VALOR_PRINC = p_doc_vlr_princ,
where cod_interf_ressarc_fornec_r3 = p_codigo;
if sql%found then
p_subrc := 0;
else
p_subrc := 4;
end if;
end;
ENDEXEC.
and execute it
EXEC SQL.
execute procedure update_zsmadiprinc
(in :wa-cod_interf,
in :wa-ano_doc,
in :wa-num_doc_valor_princ,
out :vg_subrc)
ENDEXEC.
But when i execute the procedure, shows dump error:
Database error text........: "ORA-06550: line 1, column 7:#PLS-00905: object
UPDATE_ZSMADIPRINC is invalid#ORA-06550: line 1, column 7:#PL/SQL:
Statement ignored#"
Triggering SQL statement...: "CLOSE "
Internal call code.........: "[DBDS/NEW DSQL]"
Please check the entries in the system log (Transaction SM21).
I comment all source, and the error is the same.
When i create the procedure, no erros are show.
I changed the name of the procedure, the type of parameters, and now i comment all and the error always is the same!!!! Can you help me!!! I need to finish this urgently!
Thanks in advance
Message was edited by:
RPIt is not possible to create a procedure, then, i just execute sql direct.
thanks -
I try to execute procedure on ORACLE(8i) but get err SQLException ..
but for SELECT UPDATE INSERT statements all is OK!!
for SELECT, UPDATE, INSERT I wrote such code:
Statement stmt = conn.createStatement();
String strExec="SELECT ...."
stmt.executeQuery(strExec); (OR stmt.executeUpdate(strExec);)for proceure I wrote
strExec = " my_proc() ";
stmt.execute(strExec);what is wrong here??Try like this,
CallableStatement cstm = con.prepareCall("{ call my_proc }");
cstm.executeUpdate();
Sudha -
How to change header value dynamiclly in procedural alv report?
Hi experts,
I develop one report (using procedural alv ).I gave 3 input check boxes (ex : in 1st checkbox 10days in 2nd check box 20 days
in 3rd check box 30 days they entered like this in the input checkboxes in days 10,20,30.In o/p report 3 columns i maintained like this . Column1 column2 column 3
from 0 to 10 days from 11 to 20 days from 21 to 30 days.
I want to display alv report o/p like this in the respective columns.
For example they enter 15 25 35 (i/p)
o//p in alv report
Column1 column2 column 3
from 0 to 15 days from 16 to 25 days from 26 to 35 days.
i want to change days dynamically in alv header .Pls give me the code using procedural alv report.
If u want i will give u detail.pls help me in this.I assume the main issue is chaniging ALV header dynamically, isn't it? For this you need to use field seltext_m of fieldcatalog for particular column. So you can contruct header dynamically by string concatenation like
parameters: pa_1st(2) type n, "i.e. 15
pa_2nd(2) type n, "i.e 25
pa_3rd(2) type n. "i.e. 35
"first field
concatenate '0' 'to' pa_1st into it_fieldcatalog-seltext_m.
"next field
add 1 to pa_1st.
concatenate pa_1st 'to' pa_2nd into it_fieldcatalog-seltext_m.
"last field
add 1 to pa_2nd.
concatenate pa_2nd 'to' pa_3rd into it_fieldcatalog-seltext_m.
Refer [Sample ALV: Heading in ALV|http://www.sap-img.com/abap/sample-alv-heading-in-alv.htm] for more information.
Regards
Marcin -
Hi Gurus,
When I executed a Web Report, I got the following Exception
CX_SY_RANGE_OUT_OF_BOUNDS
when it is filtered for September month report is working fine, but when filtered for October month got the following message
Messages:
An exception with the type CX_SY_RANGE_OUT_OF_BOUNDS occurred, but was neither handled locally, nor declared in a RAISING
Part-field access (offset = 4, length = 2) to a data object of the size 3 exceeds valid boundaries.
Could anyone please tell me how to solve this issue.
Thanks in advance.
MadhusudhanGood afternoon,
The following SAP Notes may be helpful for you ...
1240222 Filter value from compound characteristic is not displayed
1266170 Exception CX_SY_RANGE_OUT_OF_BOUNDS
1100955 RS_EXCEPTION000 in parallel query execution
Regards,
Karen -
Getting a dump while executing the standard report BUSCHDOC
Hi,
I am getting a dump while executing the standard report BUSCHDOC.
I am specifying the following values:-
Application Object : BUPA
Business partner:<some business partner>
Changed on: <some date>
Changed by:<some userid>
Below are the dump details
Short text
CREATE DATA: The specified type "BUSSRCH_401BUPAT" is no valid data type.
Any suggestions to avoid the dump are welcome.
Thanks,
RavindraHi Ravindra,
Can you execute report BUP_BUSSRCHGF_REPAIR and try again ?
Also, go to transaction BUS10, click the button Geneate Selection. On next screen, give Application object = BUPA, Max no. of tables per view = 1.
Regards,
Rishu. -
Calling a stored procedure from Reports
I am trying to call a stored procedure using oracle reports in the afterparameter code. My code is:
v_ain := sp_get_ain(:P_session_id);
Can someone help me out by telling what is wrong. I keep getting an error stating that sp_get_ain needs to be declared.?!I am creating a function and a stored procedure and calling them
in afterparameter report trigger.
-------------------Create function ----------------
create or replace function get_name( emp_id number) return varchar2 is
v_name varchar2(20);
begin
select name into v_name
from sample_table
where employ_id = emp_id ;
return(v_name); ---------This is the way to return value from function.
exception
when no_data_found then
return('Name not found.');
when others then
return('Other error found.');
end ;
==================================================================================
------------------------Create procedure ------------------------------------
create or replace procedure get_name( emp_id number, return_name out varchar2) is
v_name varchar2(20);
begin
select name into v_name
from sample_table
where employ_id = emp_id ;
return_name := v_name ; --Assign out parameter value from procedure.
exception
when no_data_found then
return_name := 'Name not found.';
when others then
return_name := 'Other error found.';
end ;
============================================================================
-----------------Call function and procedure from report ---------------------
In formula column or any report trigger you can use this code.
v_function_return_name varchar2(20);
v_procedure_return_name varchar2(20);
v_employ_id number(10);
begin
v_employ_id := 101 ;
v_function_return_name := get_name(v_employ_id ); --- call function
get_name(v_employ_id , v_procedure_return_name ); -- call procedure
end;
Here v_function_return_name has same value as v_procedure_return_name,
these are the values returned from function and procedure.
--Anita -
Error while executing the test report
Hello
i tried to execute the test report for adobe forms
FP_EXAMPLE_01 but it gave following error
SOAP Framework error: SOAP Runtime Exception: CSoapExceptionTransport : HTTP response contains unexpected content-type(100,101).
is it due to improper configuration of ADS? we checked the ADS connection from SM59 which is ok and also the service /sap/bc/fp through internet which is also ok.
Thanks in advance.
Regards
Rajeevhello
i guess there was the problem of ADSUSER. Now i corrected that and the report FP_PDF_TEST_00 gives proper version of ADS.
But when i execute test report FP_TEST_00 it asks me about printer and when i clicked Print Preview it gave following error
"ADS: Request start time: Mon Jan 14 06:16:01 EST 2008(200101)".
when debugged the code i found error in the class "CL_FP_PDF_OBJECT->execute_internal()" method which is getting called from the FM FPCOMP_CREATE_PDX with error code as "l_errcode = cpdfe_pdf_exe_print_adserror"
but couldn't make anything from that. any clues?
Regards
Rajeev -
Time Our Error while executing a BW reports.
Hello BW experts ,
We are getting the 'Time Our Error while executing some BW reports.'
Could anyone help us to solve the above issue.
regards,
Amol.Hi,
previous answer is necessary, always check the shortdumps ... it can tell you alot about your problem
(ST22)..
what also could help is the following ... go to the infopackage, go to <u>scheduler</u> in the upper taskbar and there you can also set the time out parameters ..
But first, get your problem solved by the things you can read in the shortdump analysis report
also clever, is doing an extract test before you start loading ... rsa3
hope this helps ...
best regards,
Davy
Maybe you are looking for
-
Error when installing jam pack/audio content on new imac
Keep trying to install the audio/jam pack cd´s that came with my Logic Studio bundle on my new Imac/Leopard. When i´m almost done installing, it asks for the "logic" cd and then after a while i´m getting an error "installation failed"- disk corrupted
-
I connect my i-pad mini to my wireless router and it says im connected but it wont let me do anything anybody know why ?
-
All, in a workflow, we use a multiline container element (LIST) with references to an BOR object type. With a container operation, the values of multiline attribute OBJECTLIST are moved to this container element. The case is now, that 3x the values a
-
I can't play videos on youtube when I'm signed into my account
This problem just started today, prior to this I've had no problems with youtube. Earlier today, I tried to reload a video I had watched earlier and got the message "An error has occurred." I tried everything on youtube troubleshooting page, to no av
-
"adl" not available , Leopard
Ok, here's a really basic installation question I suppose, but I get a: WARNING: "adl" not available message after running the config script, and the tip: To correct this warning, install the Flex SDK 3.2+ and add /path/to/FlexSDK/bin to your path. M