How i can acces to web ( with login) from abap program?
Hello.
I need to acces to web that have user/password from abap program. Is there any function to do this?
And, is it possible, to do this in background process?
Regards.
Antonio.
Hi Antonio,
Yes this is possible. Check out class cl_http_client, particularly method IF_HTTP_CLIENT~AUTHENTICATE in which you can provide the user credentials. Here's some example code:
DATA: client TYPE REF TO if_http_client,
l_url TYPE string,
l_content TYPE string.
CALL METHOD cl_http_client=>create_by_url
EXPORTING
url = l_url
IMPORTING
client = client
EXCEPTIONS
OTHERS = 1.
client->request->set_header_field( name = '~request_method'
value = 'GET' ). "#EC *
CALL METHOD client->authenticate
EXPORTING
* proxy_authentication = ' '
* client =
username = 'user'
password = 'password'
* language =
****Make the call
client->send( ).
****Receive the Response Object
CALL METHOD client->receive
EXCEPTIONS
http_communication_failure = 1
http_invalid_state = 2
http_processing_failed = 3
OTHERS = 4.
****Get the response content in Character format
l_content = client->response->get_cdata( ).
Hope this helps you!
Cheers, Roel
Similar Messages
-
How to (can I?) debug EJB called from ABAP?
I have developed a small bean that I am calling remotely from ABAP. I have done the development work in the WebAS 6.40 Sneak Preview NetWeaver Dev. Studio. I cannot figure how (or even if it's possible) to debug this bean.
I have followed the instructions on debugging referred to elsewhere in this forum, but I'm hung up at the point where I'm to create a debug configuration. E.g., what kind of configuration should I specify? (EJB is not one of the choices.) If I try any of those that <i>are </i> available, I always get to a point where it says that it can't connect to the JVM. Well, that's not what I'm trying to do, is it?
Has anybody successfully done such debugging? If so, can you get me past this sticking point?
Thanks...Hi David,
prerequisite to use debugging is, that the server you want to connect to runs in debug mode:
Open "Window->Show View->Other->J2EE->J2EE Engine". The configurated J2EE engine is displayed. Use the context menu of the "server0" entry to "Enable debugging of process". The server restarts then. If it's (already) running in Debug Mode, this is visible on the right side "Debug Mode = ON".
I suggest to define a "Remote Java Application" configuration like this:
Name: Whatever you like
Project: The project containing the classes to debug.
Connection Type: Standard
Host: Hostname or IP of J2EE server host
Port: 50021
Choose "Apply" and "Debug".
Set breakpoints for example by double-clicking on the frame on the left side of the Java editor (or using the context menu -> Add Breakpoint there). There's a very good documentation about debugger usage in the NWDS online help.
Trigger the remote call from the ABAP system. As soon as a line with a breakpoint is hit, the debugger displays the line and stops the active thread.
Hope that helps.
Regards
Stefan
PS: As soon as you don't need debugging any longer, disable debug mode of the engine, since it slows down everything. -
How can i print data in smartforms from ABAP program.
Dear gurus:
in my abap program i process require data, and saved in a internal table.
how can l print the data in smartforms.?
who can give me a code sample is better:)
reward all helpful advise.Try this....
1) Tcode --> SmartForms
2) Form name --> Z_SF_TEST Create
3) Under Global settings
a) Form Interface
Table Tab
ITAB LIKE EKPO
b) GLOBAL Definitions
WA_NETPR LIKE EKPO-NETPR
In smart forms if we want to display quantity and currency fields. We can't directly display currency field and quantity fields
For that we have to create an extra variable in global definitions
Ex: netpr FIELD of EKPO
CREATE program lines and specify WA_NETWR = itab-netpr.
4) RT CLick on main Window
CREATE --> TABLE
Click Table painter
DEFAULT %LTYPE will be Created
a) If you want more like Header footer etc add by rt click on %LTYPE1
Table (Tab)
%LTYPE Radio(SELECT) 5 CM 5 CM 6 CM
CLICK on DATA (Tab)
INTERNAL TABLE ITAB LIKE ITAB
5)RT click on table control and create --> program lines
General attribute (Tab)
INPUT PARAMETER OUTPUT PARAMETER
itab WA_NETPR
Code Area
WA_NETWR = ITAB-NETPR.
6) RT CLcick on table ctl and create 3 text to display the fields
a) % text1 +button(insert field)
FIELD name &itab-ebeln&
Output options (tab)
Check New line LINETYPE %Ltype1
check new cell
b) % text2
& itab-ebelp&
output options
check new cell
c) % text2
& wa_netpr&
output options
check new cell
<b>Report ac
Tables ekpo.
Data: itab1 like ekpo occurs 0 with header line.
select * into table itab1 from ekpo.
Call function module --> smart form function module and pass your internal table</b>
Regards,
SaiRam -
How to find the Web AS Port from ABAP program
Hi
I have an ABAP program which passes an URL for a BSP page to the Alert Framework. While creating the URL I need to find out the Hostname and port number for the Web service for that server. Hostname comes from sy-host but I am not able to find the port number.
Please help...
Thanks in advanceHi,
consider this little code snippet:
data: l_urls type tihttpurls2.
call method cl_http_server=>get_extension_info
EXPORTING
extension_class = 'cl_http_ext_bsp'
IMPORTING
urls = l_urls.
l_urls contains a table of configured ports. maybe that helps.
regards, Ulli -
I have family plan of 5 iphones and all them have the same apple id, the q. is how I can set each one with their own apple id? please advise...
See How to Stop Sharing an Apple ID.
(Note that I am affiliated with that site, and some pages contain ads). -
Good afternoon ... I would like to know how I can do to communicate with Verizone company to see if I can unlock my iPhone 5 which acquired in NY last year, buy it because you sold me released but is totally false ... I welcome your comments ...
Krawly11 wrote:
That's what they told me at the time of purchase and that's why the team acquired ...
But when I get to Venezuela and introduce NANO-Sim in a line to use the phone here just does not respond to the network ... None of the 3 phone lines we handle here ...
It is a 64G IPhone 5 ...
Regardless, it is not a matter of carrier locking. Verizon iPhone 5 phones were never GSM sim-locked to begin with. Every iPhone Verizon has sold since the introduction of the iPhone 5 has been sold with an unlocked GSM slot, as required in the USA by their agreement with the FCC. They have not been allowed to sell any iPhone 5, iPhone 5c nor iPhone 5s devices with GSM carrier locking in place.
Your connection problems are from some other cause - it is NOT a carrier locking issue. -
I am trying to send an email to myself and bcc everyone in my address book, but have forgotten how. Can anyone help me with this? Thanks.
http://chrisramsden.vfast.co.uk/7_How_do_I_send_to_everyone.html
-
Details: Numbers not translating an Excel document with column headings where the text is rotated counter clockwise 90 degrees with-in the cell. Can you tell me how I can rotate the contents with-in a cell?
Numbers does not have rotated text within cells. You can place a text box over the cell that has rotated text but you cannot rotate text within a cell.
-
I have an old iphone 3 32gb and don't use it to make calls as I have a 4s but would like to use the 3 for music any suggestions as to how I can sync two phones with I tunes
Plug the device into the computer.
Select the content desired to sync.
Sync. -
How I can combine pdf file with other pdf file
How I can combine pdf file with other pdf file ?
Or from Adobe Reader via https://createpdf.acrobat.com/
-
there are 43 available apps' update which couldn't be made with my current account. How i can find the account with which i bought them in order to update them
Use get info in iTunes on your Mac.
-
How i can Create Master Repository with MySQL Database?
How i can Create Master Repository with MySQL Database? i need to using MySQL Database to Master & Work Repository.
I try to add mysql libary jar file to drivers . But , can't display MySQL Technology in Database List for Create Master Repository ?
Please..
Edited by: MadoatZ on Feb 19, 2011 1:47 AMCreation of ODI master repository is limited to few relational databases only. Check certification matrix for ODI 11g
Oracle 10.2.0.4+
Oracle 11.1.0.7+
Oracle 11.2.0.1+
Microsoft SQL Server 2005
Microsoft SQL Server 2008
IBM DB2/UDB 9.7 and later FixPaks
IBM DB2/400 (V5R4+)
Hypersonic SQL 1.7.3+
Sybase AS Enterprise 15.0.x
thanks -
How I can use bluetooth devices with my Satellite L650D-14L?
Please can someone help me on how I can use bluetooth devices with my Satellite L650D-14L?
I can't see a bluetooth icon to help manange bluetooth connections.
Thanks for your help.
RegardsHi
You cannot connect any BT device to this notebook because this has not been equipped with any BT module.
So BT is not available for this unit. -
How i can integrate RUEI interface with AM pack for Siebel
how i can integrate RUEI interface with AM pack for Siebel for end to end monitoring
You may want to check the Configuration > General > Advanced Settings > Clickout Settings in order to configure clickouts from RUEI to EM AMP for Siebel. Once setup you can use the Siebel Diagnostics cube to initiate clickouts with the Right mouse button.
Please check the latest documentation for your RUEI version on http://www.oracle.com/technetwork/documentation/realuserei-091455.html?ssSourceSiteId=otncn
Kind regards,
Stefan Thieme
Consultant - System Application Management
Oracle Germany BV & Co KG
DACH Tech Consulting
Data Management -
i lost my phone.i have only the serial number .how i can get imei number with it???
Call your carrier, they have a record of your IMEI number. Or, read here:
http://support.apple.com/kb/ht4061
Maybe you are looking for
-
When iMessage is turned on, it greys out my phone number (used to be stuck at "Verifying..." but now it just says "Phone"). Only my Email is clickable but it won't let me remove it. When I go to my Message app, only Text Message-ing is an option (sho
-
I have a Macbook Pro and I recently updated to Firefox 4. Once I updated, I noticed that my pinch open & close doesn't work anymore. If I open Safari browser, pinch open & close works fine.
-
ITunes Match problem with accessing all my songs on all my IOS devises
Why are some of my iTunes purchased songs not able to be synced with iTunes match? I can access the songs on my iMac but not on my iPhone. I'm not happy about this and I'm thinking I made a terrible mistake buying iTunes Match
-
Can I email a project I created in ps touch?
Can I email a project I created in ps touch?
-
Well they took my information at 11:30 today and when I try to make a call they say I have to verified my numbers and that there is not enough money in my account and when I try to get a hold of a supervisor they where rude and I have been out of wor