on 06-23-2005 5:14 AM
Hello Everybody,
I want to find the way how can i expose the IDoc as webservice.
First of all is it possible? If yes then how can we achieve this?
Thanks In advance,
Bhavik
Hi,
From my understanding, an IDoc is a container of data. The best you can do is to expose the Function Module as webservice that creates/updates the IDoc you want to work with.
There are more than one options available, depending on the technology you intend to use. You could, e.g. use Business Connector to expose the FM as a webservice. The online documentation for BC details the process step-by-step. Similarly, any SAP interfacing technology that allows to deploy webservices can be used to expose the FM.
Hope it helps.
Regards
Shehryar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bhavik,
There is a basic difference between web service and IDOC. Web service is a call based interface, where you use request and response mechanism to call a functionality, these are mostly synchronous. IDOC is document based interface, these are mostly assynchronous.
Coming to your problem, since you want to use IDOC's you can not expect to get a response synchronously(Processing of IDOC depends on partner profile) and I am quite sure you are talking about an inbound scenario because for outbound scenario you will consume web service rather than exposing web service.
If my assumption is correct then from WAS 6.20 onwards you can use FM IDOC_PROCESS_ASYNCHRONOUS (I can't recall the exact name of the FM but it sounds like this) and create a WSDL for this using BSP application 'WEBSERVICEBROWSER'.
Regards,
Sanjeev
Hi Sanjeev,
What this function module exactly does?
What i want is, I want to post data for creating Purchase order in SAP r/3 through IDoc.
As i cant use this IDoc from outside directly, I have two options.
1. Expose this IDoc as webservice and then use this Webservice across any systems.
2. Expose some Function module as webservice and this Function module behaves like wrraper for this IDoc. Means, this Function module creates IDOc internally.
So, how can i achieve this?
Thanks in advance,
Bhavik
if the requirement is to create purchase order using webservice method why cant you just use the BAPI
BAPI_PO_CREATE1 .
just give the WSDL for this to the application which want to consume this webservice.
or is it that you want to do it only thru IDOC method? if yes
look at the service at trnsaction SICF
sap/bc/idoc_xml
to this node the external application can post XML document (IDOC in xml format).
Take a look at the handler class code of this node which would give you some idea.
Regards
Raja
Hi Bhavik,
No you are not required to have a WAS 6.40 for accepting IDOC as XML over http port. We have done that on R3 4.7 Enterprise. Only difference is that you need to create a service in SICF (if you have the authorization you can do that easily). In the 'handler list' tab of the service put 'CL_HTTP_IDOC_XML_REQUEST' and activate the service. You are ready to accept the IDOC-XML over http.
Regards,
Sanjeev
Hi Sanjeev,
Thanks for your reply.
Thats right.
I got that URL but i think i have to pass some data as parameters to this URL also. But i don't know what are the parameters for that.
Is any additional parameters are required for that? or simply post the Idoc data to this URL?
And what is the structure of the IDoc data payload?
Thnaks,
Bhavik
Hi Sanjeev,
Thanks for your reply.
Thats right.
I got that URL but i think i have to pass some data as parameters to this URL also. But i don't know what are the parameters for that.
Is any additional parameters are required for that? or simply post the Idoc data to this URL?
And what is the structure of the IDoc data payload?
Thnaks,
Bhavik
Hi Sanjeev,
Now, I am passing the XML data for CREMAS.CREMAS03 IDoc to the idoc_xml service to the following HTTP request:
http://<host name>:<port>/sap/bc/idoc_xml?sap-user=<user>&sap-password=<password>&sap-client=<client>&sap-language=E
Is this link is correct or not.
When i am passing the data to this URL it is giving me the response code 407 which is because of some conflicts.
Any ideas behind this?
Thanx,
Bhavik
User | Count |
---|---|
83 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.