on 03-23-2009 3:15 PM
We've created an inbound proxy. The inbound message has an attachment. How do I get access to it, within the inbound proxy method?
I've got this from the various helps and blogs:
DATA: lt_attach TYPE prx_attach,
l_name TYPE string,
l_xstring TYPE xstring,
l_string TYPE string,
l_type TYPE string,
l_attachment TYPE REF TO if_ai_attachment,
DATA: lr_controller TYPE REF TO if_wsprotocol_attachments.
* Get attachments
lr_controller = cl_wsprotocol_attachments=>get_protocol( ).
lt_attach = lr_controller->get_attachments( ).
LOOP AT lt_attach INTO l_attachment.
...
But lt_attach is always empty.
Any ideas?
Thanks
matt
Edited by: Matt on Mar 23, 2009 4:15 PM
r u sure that the message that come into ABAP inbound proxy has attachements?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Matt,
Sorry to come in so late on this one, but I've got what appears to be a similar requirement. I want to receive a pdf attachment via mail into an inbound proxy (in ECC) and post the attachment to document management. Using your work and others, I now have access to the attachments in the proxy method, except that the table of attachments only ever has 1 'attachment' - not the pdf, but the text of the mail. In the monitor at ECC, I can see both the mail-text and the attachment that I'm after.
I guess my question is whether you used mail as the sender and if so, how did you arrange to pass the real attachment (and if not - the same question).
Thanks for any tips,
Guy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OK, I got it. I needed the server context in order to get the attachments
New code:
DATA: lr_attachments TYPE REF TO if_wsprotocol_attachments.
DATA: lr_server_context TYPE REF TO if_ws_server_context.
lr_server_context = cl_proxy_access=>get_server_context( ).
lr_attachments ?=
lr_server_context->get_protocol( if_wsprotocol=>attachments ).
lt_attach = lr_attachments->get_attachments( ).
* instantiate Attachment
LOOP AT lt_attach INTO l_attachment.
The final clue came from [here|http://help.sap.com/saphelp_nw70/helpdata/en/51/d5cd16235e4643ae8ec92395c4ad97/frameset.htm]
Thanks for you help though
matt.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.