Call URL from procedure?
Hi
We have a Crystal Report Server which hosts Crystal Report and now we want to invoket report from PL/SQL procedure/function is it possible.
Means Is it possible to invoke report by calling report URL from procedure or function.
Thanks,
Kuldeep
You can certainly use UTL_HTTP to call a URL from a procedure. It's not obvious to me, though, whether that is all you need or whether you need to close the loop (i.e. respond to the results of the report) which may be more challenging.
Be aware, of course, that calls via UTL_HTTP are not transactional, so it is entirely possible that the transaction that initiated the call could be rolled back after the UTL_HTTP call was made. For that reason, folks will commonly have a separate job that calls UTL_HTTP asynchronously after the triggering transaction commits.
Justin
Similar Messages
-
Calling url from a form - err using ".value" method
I'm trying to call url from a form, which seems to be the subject of many of these Posts.
I have a form with a combo box/LOV and a button. The LOV will read a url into the combo box from a table of url's.
I used the following code in the "OnClick" Java Script Event Handler section, which I pieced together from other posts in this and other forums. (i.e. I'm a pl/sql programmer trying to use Java Scripts for the first time).
OnClick
var X = FORM_DRWING.DEFAULT.A_DRILLDOWN_PATH.value;
run_form(x);
When I attempt to run this form from the "manage" window, I get a run time error "FORM_DRWING is undefined" upon clicking the button. FORM_DRWING "IS" the name of the form!
The runform() function in the "before displying form" pl/sql code section is
htp.p('<script language="JavaScript1.3">
< !--
function runForm(v_link)
window.open(V_LINK);
//-->
</script>');
This code was from yet another Post.
Any help would be appreciated.
Thanks, Larry
nullHi Larry,
the problem could be that you need to preface your form with 'document.'.
i.e.
var X = document.FORM_DRWING.DEFAULT.A_DRILLDOWN_PATH.value;
Regards Michael -
How to call URL from BADDI??
Hi,
I have a requirement to call URL from BADI, i tried to use 'CALL BROWSER' function module,
it works when we are working in GUI, but for portal/PCUI it gives sy-subrc = 2 ( Front end Error)
How to call a pop up page or URL from poral??
Thanks,
Manoj
Edited by: Manoj Lakhanpal on Sep 27, 2010 10:27 AMHi!
I'm using this code for calling a browser, you might try out as well...
MOVE 'http://www.sap.com' TO command.
CONCATENATE 'url.dll,FileProtocolHandler'
command
INTO command
SEPARATED BY space.
MOVE 'rundll32' TO lv_application.
CALL METHOD cl_gui_frontend_services=>execute
EXPORTING
APPLICATION = lv_application
PARAMETER = command
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2
BAD_PARAMETER = 3
FILE_NOT_FOUND = 4
PATH_NOT_FOUND = 5
FILE_EXTENSION_UNKNOWN = 6
ERROR_EXECUTE_FAILED = 7
others = 8
Regards
Tamá -
Hi
Is possible call a RFC (R3 SAP) from procedure/package ?
TiaHi,
Yeah, it is possible to call a RFC from Oracle Procedures with the user
of proper supplied packages rfcsdk or by use of Java Connector. -
Hi friends,
Can we call a web URL from a ABAP program?
Is there anyway its possible ? if yes how?
Please provide the solution.
Thanks & Regards
kapilHi Kapil,
<b>Look at the below example program:-</b>
REPORT zget_mayors_for_cities.
DATA: it_citymayors TYPE TABLE OF zcitymayors,
wa_citymayors LIKE LINE OF it_citymayors,
mayor TYPE full_name,
trash TYPE string.
PARAMETERS: s_city TYPE s_city LOWER CASE.
SELECT * FROM zcitymayors INTO TABLE it_citymayors
WHERE city LIKE s_city.
* HTTP Client according to
* /people/thomas.jung3/blog/2005/07/01/bsp-create-a-weather-magnet-using-xml-feed-from-weathercom
DATA: client TYPE REF TO if_http_client,
<b>url TYPE string,</b>
xml TYPE xstring,
c_xml TYPE string,
city TYPE string.
* Converter
DATA: l_convin TYPE REF TO cl_abap_conv_in_ce.
LOOP AT it_citymayors INTO wa_citymayors.
* Use the Progress Indicator to show the user which City is processed
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
percentage = sy-index
text = wa_citymayors-city.
city = wa_citymayors-city.
* Spaces have to be replaced by _ in the URL
REPLACE FIRST OCCURRENCE OF space IN city WITH '_'.
<b> CONCATENATE
'http://de.wikipedia.org/wiki/Spezial:Export/' city
INTO url.</b>
****Create the HTTP client
TRY.
<b> CALL METHOD cl_http_client=>create_by_url
EXPORTING
url = url
IMPORTING
client = client
EXCEPTIONS
OTHERS = 1.</b>
client->send( ).
client->receive( ).
xml = client->response->get_data( ).
client->close( ).
CATCH cx_root.
WRITE: / 'HTTP Connection error: ', city.
ENDTRY.
* Wikipedia does not provide a encoding with the returned XML
* so we have to do the conversion manually
TRY.
CALL METHOD cl_abap_conv_in_ce=>create
EXPORTING
encoding = 'UTF-8'
input = xml
endian = 'L'
RECEIVING
conv = l_convin.
CALL METHOD l_convin->read
IMPORTING
data = c_xml.
CATCH cx_root.
WRITE: / 'Problem during Character conversion: ', city.
ENDTRY.
****Transform XML to ABAP Values
TRY.
CALL TRANSFORMATION zwikipedia_mayor_to_abap
SOURCE XML c_xml
RESULT mayor = mayor.
CATCH cx_root.
WRITE: / 'Data loss during transformation: ', city.
ENDTRY.
* Some Mayors already have pecial Pages
REPLACE FIRST OCCURRENCE OF '[[' IN mayor WITH ''.
REPLACE FIRST OCCURRENCE OF ']]' IN mayor WITH ''.
* Some Mayors are members of a Party
SPLIT mayor AT '(' INTO mayor trash.
wa_citymayors-mayor = mayor.
WRITE: / wa_citymayors-city.
* Update Database
IF NOT wa_citymayors-mayor IS INITIAL.
UPDATE zcitymayors FROM wa_citymayors.
WRITE: wa_citymayors-mayor.
ENDIF.
ENDLOOP.
Look at the below thread for more info:-
/people/gregor.wolf3/blog/2006/06/29/use-data-from-wikipedia
Regards
Sudheer -
SAP BW 7 - Call URL from Right Click Menu
Is it possible to make a http call from the right click menu? I know this was possible in 3.5, but the new code seems to have limited my ability to edit the options that appear when I right click on a field and I need to make a call out to another web server for some external data. Is this possible?
Any information that anyone has about a potential work around would be great!!
Thx.Kristine,
Have you tried using RRI (Transaction RSBBS)? You can call URL , pass values etc.
-Saket -
Hi All,
I have to call a URL from the Navigation bar of Web IC.
I have already created a navigation bar profile and links created. but how to call a particular URL either in the personalized or standard area of the Navbar!.
is there anything i have to do with transaction launcher?.
or else any method to attach the URL to the navbar link!.
please help!.
Thank you,
sudeep v d.Hi Johannes,
I got the problem solved. there is an option
'Define URLs and Parameters' in the Transaction Launcher.
( CRM version 4.0 ).
where you have to create an ID and define the corresponding URL.
as the next step you have to goto to transaction auncher wizard and input this ID + Navbar ID, class name etc.
Regards,
sudeep v d. -
I have several static Web pages calling a JSP page using IFrame src. Is there a way to get the full URL of calling Web pages within the JSP? Below is an example to illustrate what I have to do. I don't have to call JSP from IFrame src if there is another way to make this work.
JSP is called from:
http://somewhere.com/home/
JSP outputs:
http://somewhere.com/home/
JSP is called from:
http://somewhere.com/work/
JSP outputs:
http://somewhere.com/work/Each (i)frame spawns a new HTTP request. If you want to do it all in single request, use jsp:include instead of iframe.
-
Hi,
Is it possible to call report or url of report from a pl/sql procedure?
RegardsIs it possible to call report or url of report from a pl/sql procedure? I presume you mean "report" as in Oracle Reports. My Developer Suite experience is very rusty but I should think the sticking point is that Reports are not pure PL/SQL - they are executables run by Reports Server. So I think it is unlikely that the answer to your question is "Yes".
Depending on what particular business need lies behind your question there may be workarounds available to you. The best thing to do would be to ask your question (with more contextual detail) in Reports.
Cheers, APC
Blog : http://radiofreetooting.blogspot.com/ -
How to call url from abap in background
Hi,
I could open url but it opens browser window
i saw several threads on how to cal url in background but no good answer
kindly help
thanks
BHi,
Try the following (primitive) example, it calls an url and display the result on screen.
Hope this will help you.
<pre>
REPORT test.
CLASS lcx_http_client DEFINITION
Minimal Error Handling
CLASS lcx_http_client DEFINITION INHERITING FROM cx_static_check.
PUBLIC SECTION.
INTERFACES:
if_t100_message.
DATA:
mv_method TYPE string, "#EC NEEDED
mv_subrc TYPE i. "#EC NEEDED
METHODS:
constructor
IMPORTING iv_method TYPE string OPTIONAL
iv_subrc TYPE i OPTIONAL
iv_msgid TYPE symsgid DEFAULT '00'
iv_msgno TYPE i DEFAULT 162.
ENDCLASS. "lcx_http_client DEFINITION
CLASS lcx_http_client IMPLEMENTATION
CLASS lcx_http_client IMPLEMENTATION.
METHOD constructor.
super->constructor( ).
mv_method = iv_method.
mv_subrc = iv_subrc.
if_t100_message~t100key-msgid = iv_msgid.
if_t100_message~t100key-msgno = iv_msgno.
if_t100_message~t100key-attr1 = 'MV_METHOD'.
if_t100_message~t100key-attr2 = 'MV_SUBRC'.
ENDMETHOD. "constructor
ENDCLASS. "lcx_http_client IMPLEMENTATION
CLASS lcl_http_client DEFINITION
Facade for if_http_client
CLASS lcl_http_client DEFINITION.
PUBLIC SECTION.
CLASS-METHODS:
get_http_client_by_url
IMPORTING iv_url TYPE string
iv_proxy_host TYPE string OPTIONAL
iv_proxy_service TYPE string OPTIONAL
PREFERRED PARAMETER iv_url
RETURNING value(ro_http_client) TYPE REF TO lcl_http_client
RAISING lcx_http_client.
DATA:
mr_http_client TYPE REF TO if_http_client.
METHODS:
send
RAISING lcx_http_client,
receive
RAISING lcx_http_client,
close
RAISING lcx_http_client,
get_response_header_fields
RETURNING value(rt_fields) TYPE tihttpnvp,
get_response_cdata
RETURNING value(rv_data) TYPE string.
ENDCLASS. "lcl_http_client DEFINITION
CLASS lcl_http_client IMPLEMENTATION
CLASS lcl_http_client IMPLEMENTATION.
METHOD get_http_client_by_url.
DATA: lv_subrc TYPE sysubrc.
CREATE OBJECT ro_http_client.
cl_http_client=>create_by_url( EXPORTING url = iv_url
proxy_host = iv_proxy_host
proxy_service = iv_proxy_service
IMPORTING client = ro_http_client->mr_http_client
EXCEPTIONS argument_not_found = 1
plugin_not_active = 2
internal_error = 3
OTHERS = 999 ).
CHECK sy-subrc <> 0.
lv_subrc = sy-subrc.
RAISE EXCEPTION TYPE lcx_http_client EXPORTING iv_method = 'GET_HTTP_CLIENT_BY_URL' iv_subrc = lv_subrc.
ENDMETHOD. "get_http_client_by_url
METHOD send.
DATA: lv_subrc TYPE sysubrc.
mr_http_client->send( EXCEPTIONS http_communication_failure = 5
http_invalid_state = 6
http_processing_failed = 7
http_invalid_timeout = 8
OTHERS = 999 ).
CHECK sy-subrc <> 0.
lv_subrc = sy-subrc.
RAISE EXCEPTION TYPE lcx_http_client EXPORTING iv_method = 'SEND' iv_subrc = lv_subrc.
ENDMETHOD. "send
METHOD close.
DATA: lv_subrc TYPE sysubrc.
CALL METHOD mr_http_client->close
EXCEPTIONS
http_invalid_state = 10
OTHERS = 999.
CHECK sy-subrc <> 0.
lv_subrc = sy-subrc.
RAISE EXCEPTION TYPE lcx_http_client EXPORTING iv_method = 'CLOSE' iv_subrc = lv_subrc.
ENDMETHOD. "close
METHOD receive.
DATA: lv_subrc TYPE sysubrc.
mr_http_client->receive( EXCEPTIONS http_communication_failure = 9
http_invalid_state = 10
http_processing_failed = 11
OTHERS = 999 ).
CHECK sy-subrc <> 0.
lv_subrc = sy-subrc.
RAISE EXCEPTION TYPE lcx_http_client EXPORTING iv_method = 'RECEIVE' iv_subrc = lv_subrc.
ENDMETHOD. "receive
METHOD get_response_header_fields.
mr_http_client->response->get_header_fields( CHANGING fields = rt_fields ).
ENDMETHOD. "get_response_header_fields
METHOD get_response_cdata.
rv_data = mr_http_client->response->get_cdata( ).
ENDMETHOD. "get_response_cdata
ENDCLASS. "lcl_http_client IMPLEMENTATION
PARAMETERS: p_url TYPE string DEFAULT 'http://www.google.com' LOWER CASE,
p_phost TYPE string DEFAULT 'your_proxy_here' LOWER CASE,
p_pserv TYPE string DEFAULT '8080' LOWER CASE.
*===================================================================================
START-OF-SELECTION.
TRY .
DATA: gt_data TYPE string_table,
gv_data TYPE string,
gr_http_client TYPE REF TO lcl_http_client,
go_cx TYPE REF TO lcx_http_client.
"Initialize the http client
gr_http_client =
lcl_http_client=>get_http_client_by_url( iv_url = p_url
iv_proxy_host = p_phost
iv_proxy_service = p_pserv ).
"Call the specified URL and retrieve data from the response
gr_http_client->send( ).
gr_http_client->receive( ).
gv_data = gr_http_client->get_response_cdata( ).
"Its over....
gr_http_client->close( ).
"Display result
REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>cr_lf IN gv_data WITH cl_abap_char_utilities=>newline.
SPLIT gv_data AT cl_abap_char_utilities=>newline INTO TABLE gt_data.
LOOP AT gt_data INTO gv_data.
WRITE: / gv_data.
ENDLOOP.
CATCH lcx_http_client INTO go_cx.
MESSAGE go_cx TYPE 'S' DISPLAY LIKE 'E'.
ENDTRY.
</pre> -
Hi,
It appears that a URL can't be called from a menu using the Portal toolset because the get_menu_link function doesn't work in this release. You get an insufficient privilege error. This is now a bug, #1852576, which development is working on.
Does anyone know a workaround?
Thanks in advance,
LarryDo you mean you are coding the HTML yourself?
Firefox will interpret links that do not start with a protocol (e.g., http://) (or with //) as being on the same site displaying the page. For links to external sites, make sure to use the full URL starting with the protocol, or at least starting from the //.
Does that fix it? -
Calling function from procedure
Hi,
I have a function validate_address which returns 'Y' or 'N' to say if the address is valid or not.
I need to call this function from a procedure - saying 'select records where the function returns 'N' (as part of the where clause)'
Could you help me with how to achieve this, please. Thanks,
Message was edited by:
user6773Create Or Replace Procedure procedure0001 As
vAddress Varchar2(200) := '1 Tech Drive, Silicon Valley, CA 94109';
vFlag Varchar2(5);
Begin
vFlag := validate_address(vAddress);
If vFlag = 'N' Then
End If;
End;
or
Create Or Replace Procedure procedure0001 As
vAddress Varchar2(200) := '1 Tech Drive, Silicon Valley, CA 94109';
vFlag Varchar2(5);
Begin
Select validate_address(vAddress)
Into vFlag
From Dual
Where validate_address(vAddress) = 'N'
End;
/ -
Calling javascript from procedure
Hi folks
I am trying to call in a javascript from an onSubmit procedure after computations and validations. This process is conditional and fires on a button click.
Heres the procedure body :
begin
htp.p('<script language =javascript'>)functiondoSomeThing(1,2);</script>');
end;
This is not working. I tried removing the branch from the on click of that button as well but, then it says error no page to branch to. Any possible way in which I can see the effects of the above procedure ?
I want this javascript to be in procedure only, since this is supposed to act after computations and validations.
Thanks
ShantanuHi Shantanu,
Javascript is client-side code; computations, validations, processes and branches are server-side. In order for the javascript to run, therefore, it has to be on the rendered page - you can not call it after computations and validations without reloading the page with the javascript in it somewhere.
If the script should only be on the page after the user clicks a specific button, you should set the button to set a value for a hidden item and use this to conditionally display the javascript. I tend to put scripts into a region on their own and use Conditional Display appropriately.
What should the script do "after computations and validations" that can not be done by a page process?
Andy -
Hi ,
Is it Possible to Fire Exit Plug in WDINIT of WD Component to call a Different URL ?.
Requirement is to call a URL on the same page .
Thanks
Nikhil.Hi nikhilarya ,
Kindly try the below steps
1.create a WDA component (EG : ztest_exit_plg )
2. go to your WINDOW and create your EXIT plug with your URL paramenters
3. now go to your component controller ->Properties tab and create controller usage and select your component name ( i.e ztest_exit_plg )
4. now in your DOINIT method you can call your exit plug (i.e go to code wizard choose ->method call in used controller and give your component name ( i.e ztest_exit_plg ) in the method you can see the exit plug method .
eg code snippet
method WDDOINIT .
DATA lo_ZPC_WD_1 TYPE REF TO IG_ZPC_WD_1 .
lo_ZPC_WD_1 = wd_this->get_zpc_wd_1_ctr( ).
lo_zpc_wd_1->fire_test_exit_plg( url = 'www.sdn.sap.com' ).
endmethod.
Regards
Chinnaiya P -
Hi!
I am trying to find a solution to this scenario:
1) A cron job will call a servlet.
2) Servlet calls a URL on remote server.
3) Remote server returns an XML document.
4) Servlet processes/parses the XML document.
5) Servlet stores XML fields into DB.
6) Servlet response (entry to log file) indicates status of transaction.
I'm stuck @ #2. What mechanism can I use to make a call to remote URL? I do not want the returning XML document to display on the client's browser; I want to process it on the back-end.
Thx!http://java.sun.com/docs/books/tutorial/networking/urls/readingURL.html
Maybe you are looking for
-
Language support bug with iphone 2.0 software?
With 2G iPhone running with 2.0 software, I have noticed the following. When I have "Settings -> General -> International -> Language" set to English, the Chinese text sent in my emails becomes corrupted in the email body, and other non-iphone users
-
Resource bundle "rft_flexautomation" for locale "en_US
Hi, I have installed Flex Builder 3 and Rational Functional Tester 8.0.0 for automation of flex application. So i have executed following steps:- 1. Start Flex Builder. 2. Create a new Flex project. 3. Select the Flex project in the navigator. 4. Cli
-
Hi, My dropdown which i am using in a table , always selects the first value. Wen i click on other values , i am able to retrive the values and process them but again the first value of dropdown is selected and not the value which i selected. Thanks,
-
Some videos are not showing in my Apple TV playlists after upgrade to 6.0. They were there prior to upgrade and I can play on Macbook itunes and also using using airplay to Apple TV. Anybody else have this issue?
-
AE 3.1 File :: Can't open!
I need to open a 3.1 version AE file. What versions of After Effects, that run on an Intel PowerMac, can open a 3.1 AE file?