cancel
Showing results for 
Search instead for 
Did you mean: 

Data dump from C4C system

former_member192561
Participant
0 Kudos

Hi Experts,

We would like to extract data from C4C system to a file in a XML format.  i.e. data dump of all customers, prospects, Leads , opportunities etc from C4C to a file in XML format.

We use PI as the middle ware and I know there are Standard C4C API available to fetch the records , I have the following questions:

1. We cannot use Odata Services from C4C system as we don't yet have an Odata Adapter in our PI system. Our PI system is on 7.4 SP0 and to my knowledgde Odata adapter is available when you install an add-on ? 

2.  Say, If I get the Odata Adapter running on PI and can consume Odata services from C4C. For the scenario of writing Odata to XML, how can I configure the trigger in PI. Since the target is a File system and C4C cannot push data, how could I trigger the interface in PI to consume Odata service and write it to file in XML ?

3. As other alternative, I could use SOAP Queries on C4C to fetch data. However, since I use a file system as target . How could I trigger the interface such that it calls SOAP query on C4C and fetch results in to file as XML ??

Appreciate any suggestions.

-Amber

Accepted Solutions (1)

Accepted Solutions (1)

former_member186851
Active Contributor
0 Kudos

Hello Amber.

I guess Odata adapter is available from SP 7,4,Refer the below link for downloading

http://scn.sap.com/community/pi-and-soa-middleware/blog/2014/06/30/odata-adapter-and-sfsf-adapter-ex...

and if you wish to use SOAP adapter go with AXIS were you can pull data from webservice.

Below links should be helpful

former_member192561
Participant
0 Kudos

Hi Raghu,

I have gone through the above blogs already. However what I miss in the above blogs are, how do I pass the SOAP request parameters ?

former_member186851
Active Contributor
0 Kudos

Hello Amber,

You can give in the URL.

are you looking for dynamic URL?

former_member192561
Participant
0 Kudos

Hi Raghu,

Appreciate your response. I tried using the parameters in the Url using an Mozilla REST Client , However could not get the response.

Original End point of the URL is as follows which returns results in SOAP UI

https://myxxxxxx.crm.ondemand.com/sap/bc/srt/scs/sap/querycustomerin1?sap-vhost=myxxxx.crm.ondemand....

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">

   <soapenv:Header/>

   <soapenv:Body>

      <glob:CustomerByElementsQuery_sync>

         <CustomerSelectionByElements>

            <SelectionByBusinessPartnerName>

               <InclusionExclusionCode>I</InclusionExclusionCode>

               <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode>

               <LowerBoundaryBusinessPartnerName>*V B Luu*</LowerBoundaryBusinessPartnerName>

            </SelectionByBusinessPartnerName>

         </CustomerSelectionByElements>

         <!--Optional:-->

         <ProcessingConditions>

            <QueryHitsUnlimitedIndicator>true</QueryHitsUnlimitedIndicator>

         </ProcessingConditions>

      </glob:CustomerByElementsQuery_sync>

   </soapenv:Body>

</soapenv:Envelope>

Operation in WSDL:

  <wsdl:operation name="FindByElements">

         <wsoap12:operation soapAction="http://sap.com/xi/A1S/Global/QueryCustomerIn/FindByElementsRequest" style="document"/>

         <wsdl:input>

            <wsoap12:body use="literal"/>

         </wsdl:input>

         <wsdl:output>

            <wsoap12:body use="literal"/>

         </wsdl:output>

         <wsdl:fault name="StandardFaultMessage">

            <wsoap12:fault name="StandardFaultMessage" use="literal"/>

         </wsdl:fault>

      </wsdl:operation>

When I give the following parameters in URL , I don't get any response. How should I construct the Parameters in URL ?

https://myxxxxxx.crm.ondemand.com/sap/bc/srt/scs/sap/QueryCustomerIn/FindByElementsRequest?sap-vhost...

former_member186851
Active Contributor
0 Kudos

Hello Amber,

little bit confusing.

Your using the same URL in both Mozilla client and SOAP UI and its not working in Mozilla client?

former_member192561
Participant
0 Kudos

Hi Raghu,

I'll try to be clear.

When I use SOAP ui , I get the response, when I post the following request body to endpoint

https://myxxxxx.crm.ondemand.com/sap/bc/srt/scs/sap/querycustomerin1?sap-vhost=myxxxx.crm.ondemand.c...

However, since I have to pass the parameters in URL for AXIS adapter. I wan to try this testing using Mozilla Rest Client .  So I have used mozilla REST Client to test the URL.

I use method POST and the following url

//myxxxxx.crm.ondemand.com/sap/bc/srt/scs/sap/querycustomerin1?sap-vhost=myxxxxx.crm.ondemand.com&InclusionExclusionCode=I&IntervalBoundaryTypeCode=1&LowerBoundaryBusinessPartnerName=Amber

1. Using Mozilla , I don't results. I'm wondering if the parameters in URL are correct ? I have attached WSDL.

2. task class in AXIS adapter says com.sap.aii.axis.transport.http.HHTPGetter ==> does this also work for post message ??

i.e. do we have a similar class for POST as well ?

former_member186851
Active Contributor
0 Kudos

Hello Amber,

I guess your confused with SOAP(AXIS) and rest.

In SOAP(AXIS)the same one which you use for fetching Data in SOAP UI can be used.

And also you can try the suggestions mentioned by Nirmad as well.

former_member192561
Participant
0 Kudos

Hi Raghu,

Thanks for your inputs so far.  Unfortunately yes. I'm confused.

You say initially that we could pass the request parameters in the end point of SOAP URL.

Now you say we could use the payload of the Request message with parameters filled ( as in SOAP UI ).

How could I send the Request payload, if I don't have a message/operation mapping ??

Appreciate your suggestions.

former_member186851
Active Contributor
0 Kudos

Hello Amber,

That is the polling mechanism , No need to send any request WSDL.

It will poll from the URL.

engswee
Active Contributor
0 Kudos

Hi Amber

Going off on a tangent, I'm just curious why the responses have been marked as helpful when they have only led to confuse you Refer to my comment in the following thread on appreciating someone for taking time to answer your query but the response was not helpful to the situation.

Re: Success factors - PI SFTP Public Keys For Private Key Based Authentication


IMHO, you don't need to mark every single response to your threads as a helpful answer. It is better that you just mark the responses that really helped you in your particular issue. Doing so will also help others who encounter the same issue in the future and come across your thread to zoom in on the really useful responses. Marking everything as helpful (especially when they are not) will confuse others in the future, plus it might encourage others to just simply reply to your threads with irrelevant answers in hopes of getting points. You will end up wasting your time and effort in going through all these answers which might be of no use to you. If you want to appreciate someone for taking time to answer your query, but the response was not relevant to it, you can just hit the Like button.

Anyway back to your issue, IMHO, I don't think you should be spending your time on the SOAP-Axis polling method. It only allows for static definition of input parameters.

However from your screenshots it looks like your intention is to pass parameter values dynamically. If that is really the case, it's better for you to go for the Proxy to OData/SOAP approach with the async-sync bridge. And since there is an existing SOAP webservice available and you do not currently have the OData adapter, why not just go for the SOAP based approach.

Regards

Eng Swee

former_member186851
Active Contributor
0 Kudos

Hello Amber,

Now I understood your requirement.

Your URL is static but your passing query parameters in WSDL Input correct?

Since you don't have ODATA adapter and whatever Engg has suggested is valid. Axis is for polling from webservice without any request for static URLS.

So try as per the bridge mechanism, should work.

In case struck somewhere let us know.

former_member192561
Participant
0 Kudos

Roger That Engg

What does a static URL in AXIS . Can I provide some hard coded parameters in the URL ? like the system ID which is always the constant ?

Raghu,

Will be starting on the interface tomorrow with probably File(Dummy for polling) =>SOAP=>File(XML) using sync and async bridge. 

former_member186851
Active Contributor
0 Kudos

Hello Amber,

Static URL is the one which doesn;t have any changing paramters.You can check the link shared,It will be same all the time.In those cases you can use SOAP(AXIS)adapter.

Good Amber,If you get stuck somewhere let us know.

former_member192561
Participant
0 Kudos

Hi Guys,

For getting data out for C4C, I was able to achieve this using the following scenarios :

1. SOAP using File(AXIS) protocol to file

and

2. File - SOAP - file

The payload of the soap response is huge and some times not manageable. So started implementing Secenrio to download data using Odata Reciver adapter.

I have done a test with Nothwind services unsing Odata Reciver adapter  and it works fine. What I need is catch the response of Odata and pass it on to File.

So how do I write the response from Odata Reciver to File. I tried using sync-async bride , however I have an all kinds of errors.

So I'm wondering what should I use in the modules to catch the response from Odata and send it to a file?

Odata Reciver adapter comes with a standard EXIT module. Should I remove/ replace this module??

engswee
Active Contributor
0 Kudos

Hi Amber

It should be Async-Sync bridge and not the other way around since the OData will be a sync call. Refer to the link I provided in the response you marked as helpful.

If you have errors after following that design, post screenshot of the errors as well the configuration of the modules.

Don't replace the Exit module. Just add the beans above and below it.

Just a note, I've never used the OData adapter with the Async-sync bridge beans so not sure if the adapter works with it. I know it definitely works with SOAP adapter.

Regards

Eng Swee

Answers (2)

Answers (2)

former_member187587
Contributor
0 Kudos

After installing the OData adapter you can configure the sender channel in the polling settigns to invoke the C4C with the query in the requested frequancy.

former_member192561
Participant
0 Kudos

Hi Nimrod,

I thought we could only use Odata Adapter as receiver.  We don't have an Odata adapter and so could not get a chance to analyse the options.

So you mean we could use a sender Odata adapter and use post method in the sender communication channel and eventually use a file as a receiver ?  Could this be achieved in single interface with out any sun-async bridge ?

former_member187587
Contributor
0 Kudos

What is you full end to end scenario?

Why using a file?

to which system do you need to upload the file?

OData indeed is for reciever only (confused it with the SFSF REST. my mistake)\

If you have an ABAP WAS or Java WAS as your source system I would sugest implementign a Proxy to Odata sync. scenario.

former_member187587
Contributor
0 Kudos

SFSF OData *

former_member192561
Participant
0 Kudos

Hi Nimrod,

I would like to fetch data out of C4C custom to flat file in XML format. Middle ware is PI 7.4 Sp0 single stack.

In C4C either , I can use soap queries or Odata services to get the data.

what you suggest is inline with the suggestions from Eng see Yeoh ?

or do did I understand you wrong?

former_member187587
Contributor
0 Kudos

A part of Mr. Yeoh answer is align with mine . (The ABAP Proxy part).

But I suggest you might have a design flaw here...

The result XML file, to which system it should be uploaded (type\software vendor)?

former_member192561
Participant
0 Kudos

Request has to be made to a cloud system on a periodic basis using a SOAP query and response from the query has to be written to a FILE server (FTP) in XML format.

We also have an SAP ECC system coupled. However ever i don't have access or cannot get access in a short span.

former_member187587
Contributor
0 Kudos

So this is a security issue that led you to this design?

I suggest using SAP's Security guides for C4C to build a good and secure solution.

using Reverse Proxy,SSL,encryption etc.

See here:http://scn.sap.com/docs/DOC-61145

I don't see ,(only in really rare cases e.g military usage) that an FTP solution should be used.

Also , when you are using an FTP you turn the scenario into an a sync. one...this might have applicative implications (depends on the business process been executed).

Just my 2 cents...

If I was on site I would probably insist on that solution.

If you still insist then an ABAP Proxy to OData should be implemented

Or an FTP file (originated by the sender system if possible to an inbound folder) to trigger the process and write the result in another FTP folder (outbound)

engswee
Active Contributor
0 Kudos

Hi Amber

1. You need to install the Connectivity add-on to have the OData receiver adapter available in your system.

2 & 3. You can use an async-sync bridge to consume the C4C data via an OData receiver channel, and then write the response to a File/FTP/SFTP channel.

You will still need some way of triggering an async request to the bridge to start it. A few options you can consider are:-

  • Trigger it periodically via an ABAP proxy
  • Use a sender file channel in Test mode that picks up a dummy file periodically to trigger the async request

Regards

Eng Swee