on 09-20-2011 9:34 AM
I have a scenario to be developed, it is a Proxy to SOAP sceanrio.
There are about 8 fields coming from Proxy.
Can we create an attachment from these fields.
Also we have to do a mapping of this attachment to a field in the target External Defination and also 2 fields of the 8 have to mapped to the other respective fields of the external defination.
All this has to be posted on a webservice through SOAP with
the 2 fields in payload and
the attachment in the attachemnt section of the message
Could this be achieved?
I don't understand who designs a scenario where you have two fields in main message and 6 fields in attachment.
This sounds strange.
You should create the attachment in the ABAP proxy ans create the whole message as the receiver requests it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your response. So what you are basically suggesting is that the attachment should come from the proxy and PI without processing it should pass it on to the webservice.
Actually it is a business requirement and have to chekc its feasibility.
Also all 8 fields are part of the attachment and among those 8 2 have to be mapped with the 2 fields of the External definition and 1 field of the External Defintion is there for mapping with the attachment,
Hope you can suggest more to this.
In ABAP proxy you create a message with the two fields which you need for main SOAP message.
The attachment is created exactly how it is requested from web service.
You create a String with the XML (including tags) and do a codepage conversion to UTF-8 (or whatever is requested)
Note: The payload is created in UTF-8 automatically, the attachment is treated as binary.
You can also use a Java mapping for creating the attachment, if you have good Java skills, but I recommend to use program code for one purpose only on one place.
Thanks for your response, I tried with a udf and I guess it is almost sorted.
There is another query which I have. The 8 fields which I was discussing about, out of them 1 has to be stored and provided to the SAP system in addition to the response from the webservice. Can you suggest any way of doing the same? Is global varivale an option, if yes can you provide any link of how to use it.
Thanks for the response. But if the SAP system wants to just retain that particular field of the 8 fields as a refernce for the response, then this need could rise. As in suppose 1 of the 8 fields is doucment id and the response which is a transfer id is to be stored alongwith that document id for which it is generated, then?
Also when and are global varibales used?
Since Proxy uses SOAP message for the communication, you can have both payload and attachment. The previous michal link can help you to write abap program to achieve this. Since you have some fields attachments and some as payload, I would atleast recommend keep mapping required fields in the payload section and rest fields in the attachment. So that you can avoid mapping attachment fields and keep the design simple.
IMO, business requirement fields should appear only in the payload for the mapping. Hope that helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please check the below link
/people/michal.krawczyk2/blog/2006/04/19/xi-rfc-or-abap-proxy-abap-proxies-with-attachments
Thanks
Suma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.