cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to use HTTP adapter?

former_member556603
Active Contributor
0 Kudos

Hi All,

interface will be trigged by ECC to run once a day. The purpose of this interface is to update ECC exchange rates with the exchange rates file provided by the Central Bank of Brazil.

The file is available in the web site: http://www. XXXX and its name changes depending on the date.

The format is YYYYMMDD.csv. Example: 20100419.csv

The scenario will be Abap proxy <-> PI <-> website (Http / soapu2026 whatever) (Syncronous as the date must be sent to build the correct filename).

My main question is: how can I pick up this csv file from the website? Is it possible to use HTTP adapter?

Thanks,

Satya Kumar

Accepted Solutions (1)

Accepted Solutions (1)

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi,

Yes it is possible to read the file from web site, give the location of file in HTTP Adapter,we can read the content,

i did similar requirement accesing XML data from Website.

Are you sending CSV data to Web site or you want retrieve?? what about response data?

Regards,

Raj

former_member556603
Active Contributor
0 Kudos

Hi raj,

I want to pick up csv file from the website?

Thanks,

Satya

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi ,

i am not sure about this,i wolukd prefer developing JAVA Proxy or File Adapter . try this code it read the data from website, try in you stand alone application,it is able to read or not.

you will face two problems,you have to convert CSC file to XML it is not possible in HTTP Adapter,

import java.lang.*;

import java.util.*;

import java.net.*;

import java.io.*;

class URL2AC

{

public static void main(String args[]) {

try {

URL url = new URL("http://www.XXXXXXX.com/raj.txt");

URLConnection uc = url.openConnection();

BufferedReader in = new BufferedReader(new InputStreamReader(uc.getInputStream()));

while (in.readLine()!=null)

System.out.println(in.readLine());

}

catch(Exception e) {

e.printStackTrace();

}

}

}

Regards,

Raj

Answers (2)

Answers (2)

former_member181985
Active Contributor
0 Kudos

it will better if bank pushes the exchange rate data to ECC throguh PI.

Bank Interface (webservice or HTTP or File)--> PI -->(ABAP Proxy) ECC

Former Member
0 Kudos

Hi,

if the data format is xml then the below blog will help you

/people/michal.krawczyk2/blog/2010/01/22/pixi-how-to-get-an-xml-file-from-a-web-page-without-own-development

HTH

Rajesh