on 06-27-2013 4:00 PM
Hi,
Before I describe the requirement I would like to say that I did search on scn before posting this query
I have a scenario where in an ABAP Proxy with File Name and Date_Time in it's structure would send a flat file as an attachment.
PI is required to drop this flat file in target server using SOAP adapter.
For some reasons FTP or SFTP connectivity is not recommended.
Kindly suggest how to proceed with this design.
Regards,
Vishal
Hi,
We are working on similar scenario. PI [7.11] receives SRM Purchase Orders with any binary attachment. I have gone though various blogs to understand how to read this attachment. But i have not got any concrete result.
I have to read these attachment and further convert them to BASE64 format. I have to generate MIME file with PO XML payload and Base64 attachment data.
Kindly help on reading these attachment.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Vishal ,
Are you sending the attachement through the proxy? i mean using the class .If not please use the following code in ABAP sidee.
REPORT ZPI_P_PROXY_ATTACH_BINARY.
*
*
*
*
*
*
*
DATA:
* Reference variables for proxy and exception class
lo_ClientProxy TYPE REF TO ZCO_MIOA_MSG,
* Structures to set and get message content
ls_request TYPE ZMT_REQUEST,
lo_attachment_protocol TYPE REF TO IF_WSPROTOCOL_ATTACHMENTS,
l_attachment TYPE REF TO if_ai_attachment,
lt_attach TYPE prx_attach,
l_xstring TYPE xstring,
l_string TYPE string,
l_type TYPE string,
l_name TYPE string,
* Exception variables
* lo_oref TYPE REF TO cx_root,
lo_text TYPE STRING,
lo_sys_exception TYPE REF TO cx_ai_system_fault,
lo_app_exception TYPE REF TO cx_ai_application_fault
.
DATA: input_set TYPE STRING,
msg TYPE STRING.
TRY.
CREATE OBJECT lo_ClientProxy.
lo_attachment_protocol ?= lo_ClientProxy->get_protocol( if_wsprotocol=>ATTACHMENTS ).
l_name = 'Ibanez'.
l_type = if_ai_attachment=>C_MIMETYPE_JPEG.
CALL METHOD lo_attachment_protocol->GET_ATTACHMENT_FROM_BINARY
EXPORTING
DATA = l_xstring
TYPE = l_type
NAME = l_name
RECEIVING
ATTACHMENT = l_attachment
.
APPEND l_attachment TO lt_attach.
lo_attachment_protocol->SET_ATTACHMENTS( lt_attach ).
CATCH cx_ai_system_fault INTO lo_sys_exception.
* lo_text = lo_sys_exception->errortext.
lo_text = lo_sys_exception->get_text( ).
MESSAGE lo_text TYPE 'A'.
LEAVE PROGRAM.
ENDTRY.
******************* FILL REQUEST DATA **************************
ls_request-mt_request-name = SY-UZEIT.
ls_request-mt_request-age = '40'.
******************* END OF REQUEST DATA ***************************
TRY.
CALL METHOD lo_ClientProxy->EXECUTE_ASYNCHRONOUS
EXPORTING
OUTPUT = ls_request.
COMMIT WORK.
WRITE: / 'Request sent'.
CATCH cx_ai_system_fault INTO lo_sys_exception.
lo_text = lo_sys_exception->get_text( ).
MESSAGE lo_text TYPE 'A'.
LEAVE PROGRAM.
CATCH cx_ai_application_fault INTO lo_app_exception.
lo_text = lo_sys_exception->get_text( ).
MESSAGE lo_text TYPE 'A'.
LEAVE PROGRAM.
ENDTRY.
Then once you send it to PI in Runtime workbech you check in the payload eaither you are receiving the attachment or not.
Thnaks,
Mohan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
Any idea how to resolve this in PI 7.0?
Regards,
Vishal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Could someone help here?
Regards,
Vishal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Vishal,
Hope you have checked the link http://scn.sap.com/thread/3250774
Are you going to send the file as attachment in ABAP proxy ? then check http://scn.sap.com/thread/3250774 as well.
Ambrish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ambrish,
Thanks for your response. I am on PI 7.0.
The scenario is the ABAP proxy would send file as an attachment and I need to send that file as an attachment to target using SOAP adapter.
Is it possible to do without any UDF or java mapping? Are there any standard adapter modules available to read and write attachments?
Regards,
Vishal
Hi Vishal,
Have you taken a look at:
and
http://scn.sap.com/thread/3250774.
I think you should be able to work out the scenario with these 2.
hope it helps!
Ambrish
SOAP adapter doesnot support FTP protocol connectivty hence not possible to place file on FTP /SFTP.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.