
Querying Attachments at the Receiver
Procedure
Using the controller object method
get_attachments() you can fetch attachments on the receiver side: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.
lt_attach = controller->get_attachments( ).
loop at lt_attach into l_attachment.
l_type = l_attachment->get_kind( ).
if l_type = IF_AI_ATTACHMENT=>C_ATTACH_TYPE_BINARY.
l_name = l_attachment->get_document_name( ).
l_xstring = l_attachment->get_binary_data( ).
* Do whatever you want with your binary attachment
else. " l_type eq IF_AI_ATTACHMENT=>C_ATTACH_TYPE_TEXT.
l_name = l_attachment->get_document_name( ).
l_string = l_attachment->get_text_data( ).
* Do whatever you want with your text attachment
endif.
endloop.
![]()
Once you have fetched the input message attachments, you can set attachments for the output message in the synchronous case, using