I have a DSP page that takes input as a normal xml file and IDOC. I publish the normal xml using pub.publish:publish that is entered by the user and the same is subscribed by the appropriate subscriber and it is executed.
My question is, is there any way to publish the IDOC using service (not adapter)? There are different IDOCs that we need to publish and I need a generic service.
Aditya – If you treat IDOC as normal publishable doc then yes, you can. But if you want to send IDOC to SAP system then you should go with existing wM built-in services.
please check the SAP Adapter Install and User Guide for build in services.
Hopefully you are running SAP Adapter 7.1 with recent Fix and recent JCo libraries.
For sending IDoc to SAP system we are using pub.sap.transport.ALE:OutboundProcess.
This will require an active RFC-Connection to the SAP system which can be assigned by its alias.
Thanks for the reply…
But I want to just publish it via service. I don’t want to send it to SAP because there will be one more mapping service that is going to subscribe it and going to perform mapping on it and then it will send it to SAP.
I am copy/pasting the IDOC test data in the text are on DSP page and then on the event of Submit button, I have to publish that IDOC.
I have different IDOCs to publish and want a generic method to publish them.
I can’t use adapters because I can use it only for one particular IDOC, for different types IDOCS I have to create many adapters.
can you share the signature (Input/Output) of the service which is called when the DSP is submitted?
There are no AdapterService-Templates for sending IDocs to SAP.
pub.sap.transport.ALE:OutboundProcess is independend to IDoc-Types.
Looks like you will need to do some transformation to the IDoc to a string and wrap this string into a publishable DocType. The subscribing service will do the transformation in the reverse way from string to IDoc.
Aditya – My suggestion is prepare a generic doc, publish it through Broker, receive the same, apply business logic and convert it to specific iDOC format based on some flag and then use wM SAP built-in service to push to SAP. Let me know if you have some other thoughts.
Please see the screen shots for the current development that I use for publishing XML,
Donnees M3 is where I enter the IDOC. The entered IDOC value is referenced by variable “donneesM3”
And on the click on “Envoyer” the page routes to the service Publier.
The entered IDOC value is referenced by variable “donneesM3”. I put it in document and then use pub.publish:publish service
what is the value of the documentTypeName in the first picture?
Is this document publishable and sychronized with Messsaging (Broker or UM)?.
It’s a name of the publishable document…
The attached set up is not for IDOC…I want to do it on the same lines for IDOC.