cancel
Showing results for 
Search instead for 
Did you mean: 

Read file from FTP Server in SAP C4C

former_member273875
Participant
0 Kudos

Dear experts,

I want to do a background job to read an xml file from FTP server in C4C, but I don't find any example code. The idea here is I read the file by ABSL script and populate data in to Lean Lead business object. I read in SAP Cloud Studio 1802.pdf but I didn't find any clues. Could you please give me your advice?

Accepted Solutions (1)

Accepted Solutions (1)

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Quang,

I am sorry but this is not possible. 😞

Sorry,
. Horst

former_member273875
Participant
0 Kudos

Hi horst.schaude,

Thanks for your feedback. Can we use follow steps to do this task

1. Build a custom adapter in HCI to read xml file from FTP server and extract data from that file.

2. After that we populate those data to another xml structure(Mapping task)

3. Put new XML file with data we have just extracted to Web Dav folder.

4. In C4C, we will have a schedule to read file from Web Dav folder and populate it to custom BO (use XML Input file service integration)

Please help me with your advice! Thanks a lot for your support

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Quang,

That sounds like a plan. 🙂

Bye,
. Horst

former_member273875
Participant
0 Kudos

Hi @Horst Schaude,

With your experience, do you think it's a possible plan?

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Quang,

That's what I want to say: Yes, that plan sounds good. 🙂

Bye,
. Horst

former_member273875
Participant
0 Kudos

Dear Horst Schaude,

Need your help again! Current, the SFTP can read file and I can do the mapping task, but I get stuck at step but file to Web DAV folder in C4C. I used Http adapter with Get method. The integration flow is running without error, the file input in C4C can handle the file without error also but I don't see any new records updated in my Custom BO. For setup file input in C4C, I followed your topic

https://blogs.sap.com/2014/02/05/how-to-upload-mass-data-via-xml-file-input/

Regards.

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Quang,

Any input in the Job Log?

Is the "Creation Date" set to a correct value?
If I remember correctly, this was an issue when I was playing around with that stuff.

HTH,
. Horst

former_member273875
Participant
0 Kudos

Hi Horst Schaude,

Thanks for replying my question.

1. Is the "Creation Date" set to a correct value? => Yes, it's set to correct value. I used the same file for upload to File Input in C4C and SFTP.

2. We don't get any error in the Job log of C4C. The file which we send from HCI can import in C4C, the queue deleted that file after it's imported but no data updated

Do you think HTTP adapter modified the data of xml file structure by put more xml tag before it sends that file to Web DAV C4C?

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Quang,

If there is no error in the job log and the file is removed from the queue the XML upload works fine.

Maybe your custom BO has an issue?

Bye,
. Horst

former_member273875
Participant
0 Kudos

Hi Horst Schaude,

I'm sure my BO doesn't have any issue. Because I used the File Input and upload the xml file, after that new data can show on my OWL BO. I also tried to upload file directly from Window Explorer and this file can be handled in C4C and new data also appear in OWL. So my doubt is about HTTP adapter, when I use get method I can upload file, but if I change it to put/post I got 405 error. Maybe with Get method, the HTTP adapter modified the data that make it cannot import to C4C BO

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Quang,

Now I am lost.
You have those steps:

  • Read xml file from FTP server
  • Populate those data to another xml structure
  • Put new XML file to Web Dav folder
  • Use XML File Input to populate custom BO

If I understand each single step works.
If you manually put an XML file to Web Dav it works
If you manually put the generated XML file to Web Dav it works

Only in the process sequence it fails?
With the GET, PUT, or POST command?

Bye,
. Horst

former_member273875
Participant
0 Kudos

Hi Horst,

We get issue at step put new XML file to Web DAV folder with HTTP Adapter.

With PUT/POST command we get status code 405 error as the image above

With GET, we can put a file to WEB DAV folder but the data cannot be imported to C4C. The job runs in C4C without error.

I try to replace HTTP Adapter by SFTP to check that our iFlow can work or not and it can put a file with full data to a folder in SFTP(not Web Dav folder).

So to put a file in Web DAV folder of C4C, what Adapter we should to use and how to configure that adapter?

Regards,

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Quang,

I am sorry, but that is the wrong kind of technology for me 😞

Just one guess: Can you access direct the file from the GET command and analyze the content, format, code page, ...

Just my 2 cents,
. Horst

former_member273875
Participant
0 Kudos

Hi Horst,

Could you please reference your colleague about this case? I'm very appreciate your help!

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Quang,

I've forwared your question to other colleagues referencing this link.
Hope you will get an answer.

Bye,
. Horst

former_member273875
Participant
0 Kudos

Hi Horst,

Thanks a lot for your helps!

Regards,

Answers (1)

Answers (1)

former_member273875
Participant
0 Kudos

Dear horst.schaude

Could you please help me about this question?