Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Calling HTTP from ABAP

Former Member
0 Likes
554

Hi ,

I want to call HTTP link from ABAP. On initial research , I found that I can do the task in 2 ways:---

1. by using class cl_http_client,

2. by using program RSHTTP20 .

Is it the correct information I got.

Out of the 2 methods, which method can I prefer and what are d pros and cons of the above methods?

Please help.

Thanks,

Shivaa...

4 REPLIES 4
Read only

Former Member
0 Likes
513

Hi Shiva ,

you can use the function module HTMLCNTL_SHOW_URL.

Regards,

Harpreet

Read only

athavanraja
Active Contributor
0 Likes
513

go with cl_http_client, this provides much more control that the HTTP_GET functions

Read only

0 Likes
513

Hi All,

I have a problem to pass a file.txt in a parameter of a web service.

Iam using CL_HTTP_CLIENT and I am passing the parameters (user, password and file):

clear wa_form.

wa_form-name = 'user'.

wa_form-value = '33333333333'.

append wa_form to it_form.

clear wa_form.

wa_form-name = 'password'.

wa_form-value = '11111111'.

append wa_form to it_form.

clear wa_form.

wa_form-name = 'file'.

wa_form-value = data. ---> "data" is a type string with the data of the file.txt.

append wa_form to it_form.

r_client->request->set_form_fields( fields = it_form ).

I have not problem with the user and password parameters.

Thank.

Read only

0 Likes
513

you have to upload the file and pass the files content to that string