Attachement to ECC

Hi Experts.
I have the following scenario
Soap -> XI-->ECC (Proxy call)
I need to send the source xml as an attachement to ECC as well as map the data to proxy.
Do you know any module that can be used to send source xml as an attachement to ECC?
Much anticipated.
Regards
Kiran.

As far as I know, in PI 7.0 we cannot add attachments during the mapping (using mapping API) and this is only possible in the module environment (using module and AF API etc..)
May be you have to use this blog concept /people/alessandro.guarneri/blog/2010/08/03/soap-sender-adapter-modules and create your own adapter module for creating attachment from the input payload in SOAP sender adapter channel.
Much better option is to ask SOAP sender system to make a copy of payload and send it as attachment. Hence there will no further development required from PI end.
Regards,
Praveen Gujjeti
Edited by: Praveen Gujjeti on May 26, 2011 10:05 AM

Similar Messages

  • Issue in sending the email with XL attachment in ECC version

    Hi,
    I have an issue with sending the email with XL attachment. My program is sending a mail to the receiver with XLS as attachment. Recently we have migrated from 4.6B to ECC version. Same code was worked in 4.6B.But it is not working in ECC version.When i try to open the attachment, i get a Dialog Box with the following message
    "The file is not in a recognizable format.
    1. if you know the file is from another program whih is incompatible with Microsoft excel,click cancel,then open this file in its original application
    2.If you suspect the file is damaged, click help for more information about solving theproblem.
    3.if you still want to see what text is contained in the file, click OK.Then click the text import wizard. "
    when i click OK, the excel sheet is opening with all required data.
    Can anyone kindly tell me why this is happening.
    I am also attaching part of the coding related to this requirement.
    *&      Form  BUILD_XLS_DATA_TABLE
          text
    -->  p1        text
    <--  p2        text
    FORM build_xls_data_table.
      DATA: w_total(13),
      w_clabs(13),
      w_cinsm(13),
      w_ceinm(13),
      w_cretm(13),
      w_cspem(13),
      w_cumlm(13),
      w_exp_date(8),
      w_v_totalp(13),
      w_min_rem(8),
      w_ersda(10),
      w_hsdat(10),
      w_vfdat(10),
      w_ship_date(10),
      w_plnmg(13),
       w_mhdrz(4).
      CLEAR: w_total, w_clabs, w_cinsm, w_ceinm, w_cspem, w_exp_date,
      w_v_totalp, w_min_rem, w_ersda, w_hsdat, w_vfdat, w_ship_date,
      w_plnmg, w_mhdrz.
      w_total = it_batch1-total.
      w_clabs = it_batch1-clabs.
      w_cinsm = it_batch1-cinsm.
      w_ceinm = it_batch1-ceinm.
      w_cspem = it_batch1-cspem.
      w_cumlm = it_batch1-cumlm.
      w_cretm = it_batch1-cretm.
      w_exp_date = it_batch1-exp_date.
      w_v_totalp = it_batch1-v_totalp.
      w_min_rem = it_batch1-min_rem.
      w_plnmg = it_batch1-plnmg.
      w_mhdrz = it_batch1-mhdrz.
      CONCATENATE it_batch1-ersda6(2) it_batch1-ersda4(2)
                  it_batch1-ersda+0(4) INTO w_ersda SEPARATED BY '.'.
      CONCATENATE it_batch1-hsdat6(2) it_batch1-hsdat4(2)
                  it_batch1-hsdat+0(4) INTO w_hsdat SEPARATED BY '.'.
      CONCATENATE it_batch1-vfdat6(2) it_batch1-vfdat4(2)
                  it_batch1-vfdat+0(4) INTO w_vfdat SEPARATED BY '.'.
      CONCATENATE it_batch1-ship_date6(2) it_batch1-ship_date4(2)
                  it_batch1-ship_date+0(4) INTO w_ship_date SEPARATED BY '.'
      CONCATENATE
      it_batch1-werks it_batch1-mtart it_batch1-matnr it_batch1-maktg
    it_batch1-prdha it_batch1-prctr it_batch1-ktext  it_batch1-dispo
      it_batch1-charg it_batch1-lgort it_batch1-herkl w_clabs
      w_cinsm w_ceinm w_cretm w_cspem
      w_cumlm w_total  it_batch1-meins  it_batch1-v_spr_unit
      w_v_totalp it_batch1-waers w_plnmg  it_batch1-meins
      w_ersda w_hsdat w_vfdat  w_exp_date
       w_ship_date  w_mhdrz  w_min_rem it_batch1-zlifer
       it_batch1-doknr it_batch1-dokar it_batch1-doktl  it_batch1-dokvr
               INTO L_STRING SEPARATED BY CON_TAB.
                  INTO l_string SEPARATED BY cl_abap_char_utilities=>horizontal_tab.
      WHILE l_string <> space.
        CALL FUNCTION 'TEXT_SPLIT'
          EXPORTING
            length       = 255
            text         = l_string
            as_character = 'X'
          IMPORTING
            line         = it_attach
            rest         = l_string.
        IF l_string = space.
       CONCATENATE IT_ATTACH CON_CRET INTO IT_ATTACH.
          CONCATENATE it_attach cl_abap_char_utilities=>cr_lf INTO it_attach.
          APPEND it_attach.
          CLEAR it_attach.
        ELSE.
          APPEND it_attach.
          CLEAR it_attach.
        ENDIF.
      ENDWHILE.
    move l_string to it_attach .
    CONCATENATE it_attach cl_abap_char_utilities=>cr_lf INTO it_attach.
    APPEND it_attach.
    CLEAR it_attach.
    ENDFORM.                    " BUILD_XLS_DATA_TABLE
    *&      Form  SEND_FILE_AS_EMAIL_ATTACHMENT
          text
    -->  p1        text
    <--  p2        text
    FORM send_file_as_email_attachment.
      DATA:w_length TYPE i.
      DATA:  w_cnt TYPE i,
              w_sent_all(1) TYPE c,
              w_doc_data LIKE sodocchgi1,
              gd_error    TYPE sy-subrc,
              gd_reciever TYPE sy-subrc,
              t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE.
    Fill the document data.
      w_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
    w_doc_data-obj_langu = sy-langu.
    w_doc_data-obj_name  = 'SAPRPT'.
    w_doc_data-obj_descr = text-034 .
    w_doc_data-sensitivty = 'F'.
    Fill the document data and get size of attachment
      CLEAR w_doc_data.
    DESCRIBE TABLE it_attach LINES w_cnt.
      DESCRIBE TABLE it_message LINES w_cnt.
      READ TABLE it_message INDEX w_cnt.
    w_length = STRLEN( it_attach ).
      w_doc_data-doc_size =
         ( w_cnt - 1 ) * 255 + STRLEN( it_message ).
      w_doc_data-obj_langu  = sy-langu.
    w_doc_data-obj_name   = 'SAPRPT'.
      w_doc_data-obj_descr  = text-034.
      w_doc_data-sensitivty = 'F'.
      CLEAR t_attachment.
      REFRESH t_attachment.
      t_attachment[] = it_attach[].
    describe the body of the message
      CLEAR t_packing_list.
      REFRESH t_packing_list.
      t_packing_list-transf_bin = space.
      t_packing_list-head_start = 1.
      t_packing_list-head_num = 0.
      t_packing_list-body_start = 1.
    ***Start of changes by 501507008 on 29.01.2009
      t_packing_list-obj_descr  = 'MAIL BODY'.
    ***End of changes by 501507008 on 29.01.2009
      DESCRIBE TABLE it_message LINES t_packing_list-body_num.
      t_packing_list-doc_type = 'RAW'.
      APPEND t_packing_list.
    Create attachment notification
      t_packing_list-transf_bin = 'X'.
      t_packing_list-head_start = 1.
      t_packing_list-head_num   = 1.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
      t_packing_list-doc_type   =  'XLS'.
      t_packing_list-obj_descr  =  text-034.
      t_packing_list-obj_name   =  'filename'.
      t_packing_list-doc_size   =  t_packing_list-body_num * 255.
      APPEND t_packing_list.
    Add the recipients email address
      CLEAR t_receivers.
      REFRESH t_receivers.
      LOOP AT it_adr6.
        t_receivers-receiver = it_adr6-smtp_addr.
        t_receivers-rec_type = 'U'.
        t_receivers-com_type = 'INT'.
        t_receivers-notif_del = 'X'.
        t_receivers-notif_ndel = 'X'.
        APPEND t_receivers.
      ENDLOOP.
    CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
       EXPORTING
         document_data              = w_doc_data
         put_in_outbox              = 'X'
         sender_address             = ' '
         sender_address_type        = ' '
         commit_work                = 'X'
       IMPORTING
         sent_to_all                = w_sent_all
       TABLES
         packing_list               = t_packing_list
         contents_bin               = t_attachment
         contents_txt               = it_message
         receivers                  = t_receivers
       EXCEPTIONS
         too_many_receivers         = 1
         document_not_sent          = 2
         document_type_not_exist    = 3
         operation_no_authorization = 4
         parameter_error            = 5
         x_error                    = 6
         enqueue_error              = 7
         OTHERS                     = 8.
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data                    = w_doc_data
         put_in_outbox                    = 'X'
      commit_work                      = ' '
    IMPORTING
      sent_to_all                      =
      new_object_id                    =
    tables
            packing_list               = t_packing_list
            contents_bin               = t_attachment
            contents_txt               = it_message
            receivers                  = t_receivers
      contents_hex                     =
      object_para                      =
      object_parb                      =
       exceptions
         too_many_receivers               = 1
         document_not_sent                = 2
         document_type_not_exist          = 3
         operation_no_authorization       = 4
       parameter_error                  = 5
       x_error                          = 6
       enqueue_error                    = 7
       OTHERS                           = 8.
      IF sy-subrc <> 0.
      ENDIF.
    ENDFORM.                    " SEND_FILE_AS_EMAIL_ATTACHMENT

    Hi,
    could you tell me which opeion should i select in SCOT under INT node. I have tried with diffrent options. but no luck.
    SAPscript/Smart Forms  - No Conversion
    ABAP List                     - No Conversion
    Business Object/Link     - No Conversion
    RAW Text                     - No Conversion

  • File as an attachment from ECC to PI then to third party

    Hi Experts,
    We are having resume parsing functionality in SAP e-Recruitment. The users are uploading their resumes on SAP Enterprise Portal. We want to transfer resume files in .pdf or .doc format from ECC to Parser server (third party) through PI. This file will be sent as an attachment to the receiver Webservice or HTTP User link.
    So what configurations should be done in ECC and PI both? What adapters should be used at sender and receiver both ends. Kindly help.
    Regards,
    Nikhil Save

    Hi Nikhil,
    First of all you need to decide how you would be sending the File from ECC to PI.
    You can send it via
    SFTP/FTP(basically using File Adapter) or
    you can use a Proxy and send the File as Attachment
    You can go with Option 1 if you have no other data that needs to be transmitted along with the file. Please read the following:
    Sending Text file without mapping using SOAP
    File(PDF as attachment)-->XI-->WebService(SOAP with attachment)
    For the Option 2 you can read the following Options:
    attachments via ABAP Proxy
    Does Proxy is capable of sending Attachments in .CSV files ZIP format?
    Proxy with Attachments.
    Please let me know if you need any other help.
    Thanks & Regards,
    Tejas Bisen

  • Copy of Attachments at Item Level and Replicate the order with Attachment

    Dear Frnds,
    Here i have two questions ,
    1) I want to copy the attachments from Quotations to Sales Orders Item Level , it is possible at header level.Is there any way i can copy from Document to Document at Item Level.I tried copy control of item level its not working.
    2) After Sales order replication from CRM to ECC i should be able to see that Attachment in ECC.
    Please give your valuable inputs.
    Thanks in Advance.
    Regards
    RR

    We have been trying to do this for about 6 months now. I am told that you can not replcate an attachment from CRM to ECC, the best you can do is send an email from CRM with the document attached.
    Karin

  • How to send SOAP message with attachment?

    Hi Experts,
    How do I simulate to send a SOAP message with an attachment? Can I use XMLSpy?
    Please help.
    Thanks,
    Shobhit

    Ravi,
    With the generic SOAP client, it asks for the http based wsdl file location. But my wsdl has been generated by XI and I have the file stored on my desktop.
    Something to do with the path http://zpidd01:8030/XISOAPAdapter/MessageServlet?channel=NetworkPartners:NP_Order_BS:NP_SOAP_Sender_CC ??
    Stefan,
    my scenario is to send a SOAP request with attachment and post the attachment in ECC through the ABAP server proxy.
    WebService Client -
    SOAP----> XI -
    ABAP PROXY CALL ---> ECC
    Need further assistance from both of you how to achieve this scenario.
    Thanks,
    Shobhit
    Edited by: Shobhit Swarup Mathur on Jul 24, 2008 4:34 AM

  • Mail to R/3 with attachement type  PDF

    Hi Experts,
    I have a Scenario, Retrieve email with PDF attachment from MailServer and send it to ECC either in as same as email (mail content and attachment) or xml  using PI 70.How can i achieve this?
    I can able to read the mail with attachment but how can i send attachment to ECC or How can i convert into xml(PDF to XML).?
    Regards
    Upendra.V

    Hi Praveen,
    I done Mail To ABAP proxy ..
    I have used Payloadwapbean in my sender Mail adapter and i can see my inbound paylload as :MailMessage(text/xml;charset=utf8) ,Mailttachment-1(application/octet-stream;name="testpdf(attachementname).
    I am getting Mapping Error  :SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>
      <SAP:P1>com/sap/xi/tf/_MM_MAIL_</SAP:P1>
      <SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException</SAP:P2>
      <SAP:P3>Fatal Error: com.sap.engine.lib.xml.parser.Parser~</SAP:P3>
    plese help me how to reslove this.
    Thanks
    Upendra.V

  • Questions for Content Server

    Dear All;
    l have setup the Content server in Windows 2003 Standard Edition using the filesystem storage (not the MaxDB database), and the size of the document could be approximately 80GB (for the next few years), l didn't setup the Cache server. 
    All the attachment in the ECC will store into this External SAP Content Server.
    Question 1:
    Can anyone advise whether the Content Server(filesystem) will be having performance issue while store/retrieve documents?  Is there any way to improve the performance of the Content Server?
    Question 2: 
    Security. what are the necessary security option that l need to configure for the Content server? at the moment, the Windows server still configure as full access for the Content Repository folder.  Otherwise the ECC will be having access denied problem when communicating with the Content Server.
    Question 3:
    There are some attachment in ECC, how to l move those documents to Content Server?
    Please advise.
    Many thanks
    Jordan

    When I say use certificates, there should be a checkbox with "check signature". This ensure that only sap machines with an active certificate can access the content server.
    On the file system, I would ensure that no users have access to the file system through the backend. If they can modify documents, you will be sitting with major problems from a document integrity and legal perspective.
    On the issue of migration, there is an oss note for the migration of data from one repository to another for archivelink.
    Check note number 1043676
    Symptom
    You have created a new repository, and would like to migrate the ArchiveLink Documents to the new repository.
    Other terms
    Migration of documents, ArchiveLink, repository
    Reason and Prerequisites
    This report helps migration of ArchiveLink documents.
    To use this report effectively, you would need to ensure that you apply the note 732436. However, this note will allow the migration of documents from and to type of repositories which are supported by ArchiveLink. The types of repositories that are supported by ArchiveLink are HTTP, RFC and R/3 Database.
    Solution
    Before you execute the report, you must set up a repository that can
    store the documents (transaction OAC0). The repository may be in an
    external archive(connected via  HTTP or RFC) or (as of Basis Release 6.10) in the OLTP database of the SAP system. You can also use SAP Content Server as an external archive for storing documents.
    The report has the following parameters:
      OLD_ARC ID of the old repository previously used
      NEW_ARC ID of the new repository
      TEST_RUN: If you enable this, only a test run occurs, copy of       documents does not occur.
      DEL_FILE: If you enable this, then the files would be deleted from the old repository.
    Launch the transaction SE38 and create a program with the name ZMIGRATE_ARCHIVELINK_FILES. Once the program is created, now copy the code from the correction instruction.

  • Configuration required for attached for a file in a PO in ECC 6.0

    Hi All,
    1) Is any configuration/setting required for attaching  a file in a PO/PR ECC 6.0.
    2) How we can mail /send that file, is any enhancement required
    Kunwar

    Hi,
    In One ID for any PO ,when go sytem in toolbar --> sevices for object,I am getting the services for object and showing the attachment ,but in another ID with same server ,computer ,it is showing "No services avaiable"
    please guide any configuration/ setting missing?
    Kunwar

  • How to send a text file attachment through mail in ECC 6.0

    Hi Friends,
    As per the requirement, I need to send a ALV report result as text file attachment to user in ECC 6.0 . I know how to do in 4.6C version. But the same code is not working here in ECC 6.0.
    Generally to get the data in new row in the text file we use below code in 4.6c.
    data: c_value type x value ' 0D '.
    concatenate c_value itab-line into itab-line.
    By using above code, we get each row of the itab in a new line in text file.
    Same code is not working in ECC6.0 as it is not supporting  to concatenate bytes with characters. Getting the error like " field c_value should be diclared as type C or I or N or T or P"
    Even I have used function module NLS_STRING_CONVERT_TO_SYS to convert hexa to char. It is converting the value' 0D' to ' # '. But it is not working.
    Could you please suggest me that how can get each row of itab as a new line in text file in ECC 6.0.
    Itab value:
    abcdefdfldjfñlkdsjfñldsjfdsñljñla
    fdsljfñldskjfldsñkjfñldsjfñldsajñld
    vcxusfcxusfcusafcxusafcusafcdsauc
    Actual result currently coming in text file:
    abcdefdfldjfñlkdsjfñldsjfdsñljñlafdsljfñldskjfldsñkjfñldsjfñldsajñldvcxusfcxusfcusafcxusafcusafcdsauc
    Expected result in text file:
    abcdefdfldjfñlkdsjfñldsjfdsñljñla
    fdsljfñldskjfldsñkjfñldsjfñldsajñld
    vcxusfcxusfcusafcxusafcusafcdsauc
    Please do the needful.
    Thanks
    Kumar

    hi,
    Try this function Module
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1 '
    *example code
    ******* Create Message Body Title and Description****************
      i_objtxt = 'test with pdf-Attachment!'.
      append i_objtxt.
      describe table i_objtxt lines v_lines_txt.
      read table i_objtxt index v_lines_txt.
      wa_doc_chng-obj_name = 'smartform'.
      wa_doc_chng-expiry_dat = sy-datum + 10.
      wa_doc_chng-obj_descr = 'smartform'.
      wa_doc_chng-sensitivty = 'F'.
      wa_doc_chng-doc_size = v_lines_txt * 255.
    **** Main Text*****************************
      clear i_objpack-transf_bin.
      i_objpack-head_start = 1.
      i_objpack-head_num = 0.
      i_objpack-body_start = 1.
      i_objpack-body_num = v_lines_txt.
      i_objpack-doc_type = 'RAW'.
      append i_objpack.
    **** Attachment (pdf-Attachment)*************
      i_objpack-transf_bin = 'X'.
      i_objpack-head_start = 1.
      i_objpack-head_num = 1.
      i_objpack-body_start = 1.
      i_objpack-body_num = v_lines_bin.
      i_objpack-doc_type = 'PDF'.
      i_objpack-obj_name = 'smartform'.
      concatenate i_objpack-obj_name i_objpack-doc_type into
    i_objpack-obj_descr separated by '.'.
    *  I_OBJPACK-OBJ_DESCR = 'test'.
      i_objpack-doc_size =  v_lines_bin * 255 .
      append i_objpack.
    * Länge des Attachment ermitteln
      clear i_reclist.
      i_reclist-receiver = 'email address'.
      i_reclist-rec_type = 'U'.
      i_reclist-express = 'X'.
      data: tab_lines like sy-tabix.
      describe table i_objbin lines tab_lines.
      append i_reclist.
      call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        exporting
          document_data              = wa_doc_chng
          put_in_outbox              = 'X'
          commit_work                = 'X'
        tables
          packing_list               = i_objpack
          object_header              = wa_objhead
          contents_bin               = i_objbin
          contents_txt               = i_objtxt
          receivers                  = i_reclist
        exceptions
          too_many_receivers         = 1
          document_not_sent          = 2
          document_type_not_exist    = 3
          operation_no_authorization = 4
          parameter_error            = 5
          x_error                    = 6
          enqueue_error              = 7
          others                     = 8.
      if sy-subrc <> 0.
        write:/ 'Error When Sending the File', sy-subrc.
      else.
        write:/ 'Mail sent'.
      endif.

  • Transfer attachment from SRM SHC to ECC PO

    Hi,
    Im working on SRM 7.0.Classic scenario.I need to enable the transfer of attachments from SRM SC to R/3 PO.Can anyone explain the steps to achieve the above?
    Also in case of extended classic scenario,is the attachment transferred automatically from the SRM Local PO to ECC PO?
    Thanks!
    regards,
    SRM Tech

    Hello SRMTECH,
    You have to do some configuration settings in SPRO
    SPRO>Supplier Relationship Management>SRM Server>Cross-Application Basic Settings>Define Settings for Attachments.
    We are also working for the same requirement. We have did following configuration / customization to achieve this.
    - Activated BADI "BBP_CREATE_BE_RQ_NEW" in SRM and set the indicator as follow:
    cs_ctrl_att-BE_DOC_TYPE = 'SRM'.
    cs_ctrl_att-BE_storage_cat = 'DMS_C1_ST'.
    cs_ctrl_att-TRANSFER_ACTIVE = 'X'.
    - In ECC Side T.code DC10 and defined document type for SRM with following
    Add a New Document Type SRM (if not already exists). Set 'Use KPro', 'Version Assign' and 'Change
    Docs'. Set the Internal and External Number Range (02 and 01). Use MCDOKZNR as Number Exit.
    Ver No. Incr = 1 and Set the File Size (Usually 10000000 bytes).
    Once the Document Type is created, define Object links to PO Item and Pur Req Item. Use - Screen
    Number 247 and Screen Number 248 with Valuation Object of EBAN and EKPO for Objects EBAN
    (PReq) and EKPO (PO) for Doc Type SRM.
    After doing this changes we were able to transfer attachements but we are still facing one issue as we were not able to open that particular document in ECC / R3.
    See related threads for more pointers:
    Attachment transfer issue from Shopping cart to Purchase req in ECC
    Re: How to check the attachment in ME53N
    Re: Sending attachments from SRM to SAP Purchase Requisition
    Re: Attachments with follow-on documents.
    Arshad

  • Employee Document attachment in T Code PA30 in ECC

    Dear All,
    I have requirement that, We want to attach documents like employee's confirmation letter and exit documents in ECC,
    Pls let me know is this possible with out DMS, if yes how it can be done.
    We are using ECC 6 and Ehp6.
    with regards,
    Ramesh

    Hi Ramesh,
    Have a look at similar issue at SAP DMS - HR DOCUMENTS
    Regards,
    Omid

  • How to send file as attachment and call RFC to trigger event in ECC?

    Hello,
    A file is retrieved from FTP into PI (w/ NO MAPPING required - just pass through) and placed on the ECC appl. Server. Then, a RFC is made to trigger an event to process the file in ECC.  However, a RFC cannot be called in the graphical mapping if there is no mapping required.
    I have seen this Blog, u201CFile to R/3 via ABAP Proxyu201D, http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/1847. [original link is broken] [original link is broken] [original link is broken]  But we are told not to touch the file as it will be converted in ECC by a program.
    Also, I read that using ABAP proxy-PI-FTP, I can do a pseudo mapping, simple one node, (just so a RFC can be triggered) and also pass the file as an attachment.  Letu2019s say this works:
    Question 1:  What configuration steps in the FTP adapter that will allow me to u201Calsou201D send the file as an attachment? 
    Question 2: (Continue with ABAP proxy option) How do I control where will it be deposited so that the program can access it?
    Question 3:  If this is not the best approach, how many steps would I need to do it in BPM (i.e. pick up the file from FTP, place it on appl server, and trigger a RFC to call an event to process file)?
    Thanks for any suggestions!
    John_Xi

    I have read those two help file and was able to use it in the ABAP proxy code.  Thanks.
    This is the current outcome.  I totally understand that SAP PI communicates via XML.  So when PI picks up a file that contains XML tags, the Inbound proxy is triggered.  I can see its processing in SM50.  However, when I give the Sender FTP adapter a non-XML file to pick up, the Inbound Proxy does not trigger.  The file itself should be read into memory so that I can save it to the application server via ABAP code (with no mapping).  That is why there is no operation mapping
    The reason I am using using FTP to ABAP proxy is because I need to call a subsequent RFC step to process the file.  Else, I will just use FTP to File Adapter scenario.
    Question 1: I am thinking that that file is the attachment.  Is that where I am incorrect and I still need to send in an XML file with the attachment as an addition?
    Question 2: Is this the best approach or should I use BPM?  If BPM, what steps do I need?

  • Text File Attachment in SAP Mail ECC 6.0

    Hi,
    Is it possible to use a text format 'TXT' on the Function Module "O_NEW_DOCUMENT_ATT_SEND_API1" in ECC 6.0? Because I've seen alot of examples in the forum that are using 'XLS' Format attachments.
    I made a program that have been attaching text fomat file in the SAP mail. It is working fine in other SAP boxes but in our current box, as I tested it, opening the text attachment, the result is a file text now contained a long string (max1022 char) instead of a file that is tab-delimited. What would you suggest on this?

    yes u can attach txt file.refer to the code below!
    data: itcpo like itcpo,
          tab_lines like sy-tabix.
    Variables for EMAIL functionality
    data: maildata   like sodocchgi1.
    data: mailpack   like sopcklsti1 occurs 2 with header line.
    data: mailhead   like solisti1 occurs 1 with header line.
    data: mailbin    like solisti1 occurs 10 with header line.
    data: mailtxt    like solisti1 occurs 10 with header line.
    data: mailrec    like somlrec90 occurs 0  with header line.
    data: solisti1   like solisti1 occurs 0 with header line.
    perform send_form_via_email.
          FORM  SEND_FORM_VIA_EMAIL                                      *
    form  send_form_via_email.
      clear:    maildata, mailtxt, mailbin, mailpack, mailhead, mailrec.
      refresh:  mailtxt, mailbin, mailpack, mailhead, mailrec.
    Creation of the document to be sent File Name
      maildata-obj_name = 'TEST'.
    Mail Subject
      maildata-obj_descr = 'Subject'.
    Mail Contents
      mailtxt-line = 'Here is your file'.
      append mailtxt.
    Prepare Packing List
      perform prepare_packing_list.
    Set recipient - email address here!!!
      mailrec-receiver = [email protected]'.
      mailrec-rec_type  = 'U'.
      append mailrec.
    Sending the document
      call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
           exporting
                document_data              = maildata
                put_in_outbox              = ' '
           tables
                packing_list               = mailpack
                object_header              = mailhead
                contents_bin               = mailbin
                contents_txt               = mailtxt
                receivers                  = mailrec
           exceptions
                too_many_receivers         = 1
                document_not_sent          = 2
                operation_no_authorization = 4
                others                     = 99.
    endform.
         Form  PREPARE_PACKING_LIST
    form prepare_packing_list.
      clear:    mailpack, mailbin, mailhead.
      refresh:  mailpack, mailbin, mailhead.
      describe table mailtxt lines tab_lines.
      read table mailtxt index tab_lines.
      maildata-doc_size = ( tab_lines - 1 ) * 255 + strlen( mailtxt ).
    Creation of the entry for the compressed document
      clear mailpack-transf_bin.
      mailpack-head_start = 1.
      mailpack-head_num = 0.
      mailpack-body_start = 1.
      mailpack-body_num = tab_lines.
      mailpack-doc_type = 'RAW'.
      append mailpack.
      mailhead = 'TEST.TXT'.
      append mailhead.
    File 1
      mailbin = 'This is file 1'.
      append mailbin.
      describe table mailbin lines tab_lines.
      mailpack-transf_bin = 'X'.
      mailpack-head_start = 1.
      mailpack-head_num = 1.
      mailpack-body_start = 1.
      mailpack-body_num = tab_lines.
      mailpack-doc_type = 'TXT'.
      mailpack-obj_name = 'TEST1'.
      mailpack-obj_descr = 'Subject'.
      mailpack-doc_size = tab_lines * 255.
      append mailpack.
    *File 2
      mailbin = 'This is file 2'.
      append mailbin.
      data: start type i.
      data: end type i.
      start = tab_lines + 1.
      describe table mailbin lines end.
      mailpack-transf_bin = 'X'.
      mailpack-head_start = 1.
      mailpack-head_num = 1.
      mailpack-body_start = start.
      mailpack-body_num = end.
      mailpack-doc_type = 'TXT'.
      mailpack-obj_name = 'TEST2'.
      mailpack-obj_descr = 'Subject'.
      mailpack-doc_size = tab_lines * 255.
      append mailpack.
    endform.
    regards,
    madhu

  • Attachment transfer issue from Shopping cart to Purchase req in ECC

    Hello,
    How are you all. Need your expert advise..
    We are trying to achieve functionality where documents which are attached on shopping cart get transfer into Purchase req in ECC (Classic Scenario with SRM 5.0 and ECC 6.0). For this we have done following config / enhancements:
    - Activated BADI "BBP_CREATE_BE_RQ_NEW" in SRM with following code for attachment;
    cs_ctrl_att-BE_DOC_TYPE = 'SRM'.
    cs_ctrl_att-BE_storage_cat = 'DMS_C1_ST'.
    cs_ctrl_att-TRANSFER_ACTIVE = 'X'.
    - Created new document type ECC with t.code DC30 for SRM and assigned the object links for EBAN table.
    After performing above task we are able to see Link of the attachment into Purchase req in ECC with document number (i.e. the one we assigned while defining document type in DC30) but not able to open the document in ECC.
    Could you please let us know if there is any settings which we have missed for actually opening documents in ECC?
    Thank you
    Ritesh

    Issue as reported Please let me know why the docs are not uploaded to SRm succesfully .
    I am facing the below weird issue .
    Easy shopping >Shop> eHiring catalog
    Click Transfer to SRM
    Now click on the button ‘Details’ and open the tab ‘Notes and attachments’
    All attchments are names after the 1st attachment and all have the same file type
    Basically you have lost all you attachments here, except 1 (when you click on the link, all links refer to the same document, so not just cosmetic). This is a problem.
    When you order this shopping cart and search for it and open it again, the attachment tab is even completely empty, so now all attachments are lost.
    Something like this, but less severe, happens in the process a bit further.
    - Approve the shopping cart with the applicable approver
    - Log in as Hiring desk:
    Still no original attachments (like job descriptions).
    Now click button ‘responses and awards’
    Click tab ‘Items’ and fill out price ‘40’ euro
    Click notes and attachment tab
    I added 5 attachments
    As can be seen here, the docx becomes an xlsx again, but it looks like it just takes over the 1st file type that was uploaded, it can also be the other way around (xlsx becomes docx) when the 1st uploaded attachment is a document.
    But in this case, when you click on the link, it will open the right file with the right program, so over here it looks like it is just cosmetic.

  • Create Attachment in workflow through ABAP Class in ECC 5.0

    Hi,
    Wr are using SAP ECC 5.0 and i am trying to create attachment through ABAP class.
    Here in ECC 5.0, macro INCLUDE cntn01_swc is not available.
    I am getting an error in declaration of SOFM object, because again SWC0_OBJECT is not available.
    I've tried creating the parameter as type SOFM and of type table of SOFM but it also not working.
    Can anybody help me how i can create SOFM instance in ABAP class in ECC 5.0?
    Regards,
    Smit

    Hi
    I am not very much sure about ECC 5.0 environment. Firstly are you looking to create a SOFM object inside any class or program or Function module , If yes then you need to include a include INCLUDE CNTN01_SWC (No arrow brackets) if this include is not available then use INCLUDE<CNTN01>  then declare a variable of type SWC0_OBJECT if you are using first include or declare of type SWC_OBJECT.
    Once you include any of the includes then by making use of SWC macros you can create a object
    SWC0_CREATE_OBJECT <VARAIBLE> <BOR NAME> <BORKEY> for first include.
    SWC_CREATE_OBJECT <VARAIBLE> <BOR NAME> <BORKEY> for second include.
    Regards
    Pavan

Maybe you are looking for