Use FTP Transport Protocol (XI) to send text file created from R3

I've configured a Port in IDoc Processing (WE21) to create an output file from a Bank Partner Profile (WE20) where my Message Type is PAYEXT and IDoc Type PEXR2002.
I need to take this Text File and send it to the Bank;s FTP site using the Integration Server (XI).
How can I take this text file and simply send it to the Bank without going through File Content Conversion in order to convert it to XML as the Sender and then uncovert it during the Receiver to FTP the file to the Bank?
If that is not possible, would anyone know how to configure the RecordSet Structure and parameters for both the Sender and Receiver?

Hi,
Let me re-phrase your scenario:
ECC is required to send PAYEXT IDOC to XI which needs to be send to the bank in IDOC text file format to the bank. If this is the case we can achieve this by doing the following:
1.Rather than using TRFC port used by the IDOC as the method of communication, you can leverage using file port. The configurations to the file port are simple. You need to select a place where you can drop the IDOC file created by the ECC system and XI would pick up the file.
2. Poll for the file using NFS from that particular location where ECC drops the file. (If it is being staged on the ECC system, then XI service user SAPservice<SID> must have access permission on that folder like \usr\sap\put\interfaces.
3. Configure receiver FTP adapter to send the file to the bank.
Hope this helps.
Indranil
Award points if helpful

Similar Messages

  • NFS or FTP transport protocol

    what is the difference between NFS and FTP transport protocol? and when do we use them?
    Regards,
    Ashish Goyal

    NFS stands for File System.
    Both of NFS and FTP should make the following specifications for file:
    <b>File name schema</b>:
        Name of the file
    <b>File Construction Mode</b>:
    Create file, append to existing file, or specify additional parameters for the file name
    <b>File Type</b>:
    Binary or text file (in the case of the latter also specify the file encoding as a code page)
    <b>Operating System Command</b>:
    To be executed after successful processing (you can use placeholders for the file name)
    Additionally,If you specify NFS as the transport protocol, the only other specification you need to make is the <b>Target Directory</b> in which the file is to be generated.
    But if you want use FTP, following specifications should be made:
    <b>Server</b>
        Host name or IP address of the FTP server
    <b>Port</b>
        Port number of the FTP server (default: 21)
    <b>Connect Mode</b>
        The connection can be permanently open, or it can be established for each file transfer
    <b>Transfer Mode</b>
        Text or binary data transfer
    <b>Put File</b>
        Direct or temporary file (collected before final transfer)
    <b>Folder</b>
        Target folder for the file
    <b>Logon Data</b>
        User/password, or anonymous (anonymous/anonymous)
    Check this one
    FTP Vs NFS
    Message was edited by: YiNing Mao

  • Files with .a extension using ftp transport

    Hi.
    Am using ftp adapter in osb to read .txt files(e.g. abcd.txt) from ftp location, process the body/text() in OSB and then place the incoming file to an outbound folder.
    the flow is like ftp-> Proxy Service->Business Service->outbound ftp
    the service works fine where then is less load or the no. of incoming files is less.
    However,sometimes the outbound folder contains the files with .a extension at the end.(e.g. abcd.txt.a)
    Can someone tell me the rootcause of these .a file creation and the scenarios in which the .a files are created.
    Also,please tell me what are these .a files meant for?
    How,can I eliminate this while configuring the services using ftp transport.
    Thanks in adavance

    I had this recently with a variety of FTP servers, FileZilla, Microsoft etc.
    For me, it happened when the file already exists in the destination and I was expecting the destination file to be overwritten. My application would generate the same filename, say FileA.txt and expect that to be overwritten, but with OSB 10gR3 I would get files with .a stuck on the end.
    This functionality changed between ALSB and OSB and I had a patch developed to restore the ALSB functionality.
    I spent ages looking at it, and debugging FTP commands and going from memory, I'm pretty certain that the FTP adapter doesn't implement the correct FTP spec for the RNFR command according to the RFC in the case where a file already exists - it doesn't handle overwrite.
    Hope that may help.
    Pete

  • Please help!!!!!! i filled out a job application using adobe reader but i cannot send the file back via email because the file is protected with a lock. how do i unlock this file to send it?!!!!!!!!!

    please help!!!!!! i filled out a job application using adobe reader but i cannot send the file back via email because the file is protected with a lock. how do i unlock this file to send it?!!!!!!!!!

    Hi kevinv1987,
    It doesn't sound like the PDF was password protected (or Adobe Reader would prompt you for a password). Instead, it sounds like that file may be marked locked by your operating system. Are you on Mac OS or Windows? In either case, here are instructions for removing the lock icon from the file:
    Remove the Lock Icon from a Folder in Windows 7 (check Microsoft's website if you have a different version of Windows)
    On Mac OS, select the file in the Finder, and choose File > Get Info. Then, just deselect the Lock checkbox.
    Please let us know how it goes.
    Best,
    Sara

  • Function upload text file or from clipboard in Bex with BI 70

    Will it be possbile to use the function to upload data in from a text file or from clipboard with BI 70?
    With older BW versions it was possible to fill a variable with lists.
    Can someone help where I can find information about this issue?
    Best Regards, Tina

    Will it be possbile to use the function to upload data in from a text file or from clipboard with BI 70?
    With older BW versions it was possible to fill a variable with lists.
    Can someone help where I can find information about this issue?
    Best Regards, Tina

  • "Import from Text File" & "Upload from Clipboard" icon not appearng in F110

    Hi Experts,
    While making the payment to the vendors through TN F110, in "PARAMETER" screen just next to 'STATUS' screen, there is a vendor field for selection in range and just ahead of this there is an icon for multiple vendor selection ( Bold arrow mark ). If I click on that multiple vender selection icon ( on bold arrow mark ), an another screen opens for multiple selection for vendors. In this screen 'Enter, Copy, Delete etc' icons are appearing at the bottom of the screen but "Import from Text File" & "Upload from Clipboard" icon are not appearing there.
    Can you please let me know how to bring that icons there?
    Points would be awarded.
    Rgds,
    Shailesh

    Hi Ravi,
    I have not yet created anything and have just entered the parameter. In the multiple screen for vendors there are 5 fields for individual and 5 for range selection. Even you can put more than five range selections or individual selections by clicking on the page button but there I am not finding these two icons.
    Can you please check at your end and let me know if you are getting or what to do to bring those two icons in F110.
    Rgds,
    Shailesh

  • Administrators unable to write to a text file created by another Administrator on Windows Server 2008.

    Why are Administrators unable to write to a text file created by another Administrator on Windows Server 2008?
     --- The Administrators already have full control so how do I fix this? ---
    Example:  On a Windows Server 2008 (SP1): user A (who belongs to the Administrators group) logs in and creates a directory C:\foo and creates a file readme.txt in the foo directory.  User B (also a member of the Administrators group) logs in and opens C:\foo\readme.txt in notepad. User B types something and tries to save the file. User B cannot save the file…an option to save as some other file name is presented. The security permissions of C:\foo\readme.txt show that Administrators have full control.  
    Work around 1: Explicitly add user B to have full control over the foo directory. The problem is that all the all other Administrators still need to be added (current and future).
    Work around 2: Change the Users security permission to be full control on the foo directory. (this seems dangerous!)
    It is interesting to not that this same procedure is not a problem in Windows Vista. (Any insight about the difference?)
    Sincerely,
    Ian 

    so there is no way to change this without literally shutting down the UAC?
    I have files that  I need to modify all the time, and it is very annoying to have to save as to my desktop modify and then copy and paste the file again.
    I would also rather not give myself permissions to the entire C:\ Drive even specified Folders or documents, etc......
    You can change these settings without bringing down the UAC
    <!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin-top:0in; margin-right:0in; margin-bottom:10.0pt; margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-fareast-font-family:Calibri; mso-bidi-font-family:"Times New Roman";} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; font-size:10.0pt; mso-ansi-font-size:10.0pt; mso-bidi-font-size:10.0pt; mso-ascii-font-family:Calibri; mso-fareast-font-family:Calibri; mso-hansi-font-family:Calibri;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} -->
    1.    Click Start, type gpedit.msc and press Enter.
    2.    Expand Computer Configuration -> Windows Settings -> Security Settings -> Local Policies -> Security Options.
    <!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin-top:0in; margin-right:0in; margin-bottom:10.0pt; margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-fareast-font-family:Calibri; mso-bidi-font-family:"Times New Roman";} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; font-size:10.0pt; mso-ansi-font-size:10.0pt; mso-bidi-font-size:10.0pt; mso-ascii-font-family:Calibri; mso-fareast-font-family:Calibri; mso-hansi-font-family:Calibri;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} -->
    3.    Double-click “User Account Control: Behavior of the elevation prompt for administrators in Admin Approval Mode” on the right pane.
    a.    Choose “Elevate without prompting” and click OK.
    b.    Double-Click “User Account Control: Admin Approval Mode for the Built-in Administrator account”, Click Enable, Apply and then OK
    c.     Double-Click “User Account Control: Run all users, including administrators, as standard users”,Click Enable, Apply and then OK
    Then reboot the Server. You should now have the ability to modify any document, etc....

  • How to copy/send text file from FTPS to SAP ECC File Port

    Hi Frdns,
    I am working on one design, actually my requirement as follows
    I am receiving financial information document from Banks, which is in the form of BIA2 message format, it looks like text file. This information needs to be sending to SAP ECC system.
    I identified some approaches to full fill the requirement
    1)Using Conversion agent/or third party tools to convert BIA2 message in to XML, then using PI I will pick up the XML message, convert it in to IDoc.
    2)Without any conversion I will copy the same file (original BIA2 message) in to SAP ECC file port, in this case no conversion required, calling some program I will schedule it.
    I am looking forward t implement the second approach because it saves lot of money to my client.
    Now I am wondering using File adapter can i copy to SAP ECC File Port or I required ABAP proxy?
    What is the best approach to copy the BIA message text file from FTPS to SAP ECC File Port.??
    Regards,
    Raj

    Hi Raja,
    >>Now I am wondering using File adapter can i copy to SAP ECC File Port or I required ABAP proxy?
    Yes you can do this copy, the only restriction that can happen is the file size.. If you are sure that the fiel will be of few MB at the max then you can use the Configuration part alone and copy it to ECC folder. For doing this you need the following:
    1. Sender agreement (mention the sender interface as anything XYZ)
    2. Sender communication channel. Pick the file in binary mode
    3. Receiver determination (keep both the sender and receiver service as same)
    4. Interface Detemiantion (dont specify any mapping and keep the receiver interface name as XYZ)
    5. Create receiver agreement (with same service and interface)
    6. Use file adapter here
    Regards
    Suraj

  • Problem to send text file to mail from ALV report

    Hi Friends,
    I have a problem in my ALV report with text file.  As per the requirment, when we execute the program then text attachment should go to the particual email.
    When i am using file type as XLS i am getting attachment with all 4 recoreds( input for 4 records) in mail. But all 4 records are coming in SAME ROW. It should come 4 records in 4 rows. when I use file type as TXT and separated by pipe symble in code, it is showing only one recored for same above input.
    When i use file type as XLS and click the attachment in email, it will triggire one popul with three options like SAVE, OPEN, CANCEL.
    But when i click on text file attachment, it is directly showing ony one recored.
    Please correct me on this.
    my code is
    PERFORM send_file_as_email_attachment
                                   tables i_message
                                          i_attach
                                    using v_email
                                          'User last log on details'
                                          'XLS'
                                          'User log on list'
                                 changing v_error
                                          v_reciever.
    FORM send_file_as_email_attachment tables pi_message
                                              pi_attach
                                        using p_email
                                              p_mtitle
                                              p_format
                                              p_filename
                                              p_attdescription
                                              p_sender_address
                                              p_sender_addres_type
                                     changing p_error
                                              p_reciever.
      DATA: l_error    TYPE sy-subrc,
              l_reciever TYPE sy-subrc,
              l_mtitle LIKE sodocchgi1-obj_descr,
              l_email LIKE  somlreci1-receiver,
              l_format TYPE  so_obj_tp ,
              l_attdescription TYPE  so_obj_nam ,
              l_attfilename TYPE  so_obj_des ,
              l_sender_address LIKE  soextreci1-receiver,
              l_sender_address_type LIKE  soextreci1-adr_typ,
              l_receiver LIKE  sy-subrc.
      l_email   = p_email.
      l_mtitle = p_mtitle.
      l_format              = p_format.
      l_attdescription      = p_attdescription.
      l_attfilename         = p_filename.
      l_sender_address      = p_sender_address.
      l_sender_address_type = p_sender_addres_type.
    Fill the document data.
      v_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
      v_doc_data-obj_langu = sy-langu.
      v_doc_data-obj_name  = 'SAPRPT'.
      v_doc_data-obj_descr = l_mtitle .
      v_doc_data-sensitivty = 'F'.
    Fill the document data and get size of attachment
      CLEAR v_doc_data.
      READ TABLE i_attach INDEX v_cnt.
      v_doc_data-doc_size =
         ( v_cnt - 1 ) * 255 + STRLEN( i_attach ).
      v_doc_data-obj_langu  = sy-langu.
      v_doc_data-obj_name   = 'SAPRPT'.
      v_doc_data-obj_descr  = l_mtitle.
      v_doc_data-sensitivty = 'F'.
      CLEAR i_attachment.
      REFRESH i_attachment.
      i_attachment[] = pi_attach[].
    Describe the body of the message
      CLEAR i_packing_list.
      REFRESH i_packing_list.
      i_packing_list-transf_bin = space.
      i_packing_list-head_start = 1.
      i_packing_list-head_num = 0.
      i_packing_list-body_start = 1.
      DESCRIBE TABLE i_message LINES i_packing_list-body_num.
      i_packing_list-doc_type = 'RAW'.
      APPEND i_packing_list.
    Create attachment notification
      i_packing_list-transf_bin = 'X'.
      i_packing_list-head_start = 1.
      i_packing_list-head_num   = 1.
      i_packing_list-body_start = 1.
      DESCRIBE TABLE i_attachment LINES i_packing_list-body_num.
      i_packing_list-doc_type   =  l_format.
      i_packing_list-obj_descr  =  l_attdescription.
      i_packing_list-obj_name   =  l_attfilename.
      i_packing_list-doc_size   =  i_packing_list-body_num * 255.
      APPEND i_packing_list.
    Add the recipients email address
      CLEAR i_receivers.
      REFRESH i_receivers.
      i_receivers-receiver = l_email.
      i_receivers-rec_type = 'U'.
      i_receivers-com_type = 'INT'.
      i_receivers-notif_del = 'X'.
      i_receivers-notif_ndel = 'X'.
      APPEND i_receivers.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
           EXPORTING
                document_data              = v_doc_data
                put_in_outbox              = 'X'
                sender_address             = l_sender_address
                sender_address_type        = l_sender_address_type
                commit_work                = 'X'
           IMPORTING
                sent_to_all                = v_sent_all
           TABLES
                packing_list               = i_packing_list
                contents_bin               = i_attachment[]
                contents_txt               = i_message
                receivers                  = i_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.
    Populate zerror return code
      l_error = sy-subrc.

    Hi,
    declare the following constant in u r program and concatenate at the end of each and every record in your internal table.
    CONSTANTS : LV_CRLF TYPE C VALUE CL_ABAP_CHAR_UTILITIES=>CR_LF.
    for eg.
    if u internal table has values like
    row1
    row2
    row3
    concatenate the 1st record lv_crlf into first record.
    conactenate second record lv_crlf into second record.
    concatenate third record lv_crlf into third record.
    now attach  the internal table to the FM which u use for sending email. Each and every row will come in new line. The LV_CRLF will hold nothing but a line feed character (#).
    Hope it will solve u r problem
    Regards,
    Rose.

  • Send text file to spool

    Hello Gurus,
    I like to send a text file from the aplication server to spool or send this file to a specific printer.
    What instructions do you know?
    Thanks.
    Joseph.

    Hi,
    I think the best way to send a text file from application server to the spool printer.
    1. Download the file into a internal table
    2. Use standard function modules to send the table to the spool printer
    Regards

  • How to send text file as an email attachment havin more than 255 characters

    My requirement is to generate a text file and to send this text file as E-mail attachment. I am using FM 'SO_NEW_DOCUMENT_ATT_SEND_API1' to send the E-mail. but here the limitation is the number of characters per line must not be more than 255 characters whereas in my case it is exceeding 1000 characters per line. could anyone please suggest me what should i do now ? Each field in the text file has to be tab delimited.

    Simplest might well be to use javamail API instead of the two tags that Sites provides, e.g. see email - Sending mail attachment using Java - Stack Overflow for a full example.
    Phil

  • Sending text files as attachments in mails

    Hi Experts,
    I want to send some content in a text file as an attachment in the mail. Can anybody provide me the sample code for this.
    points guaranteed.
    thanks
    sanakr

    HI
    Check this one
    first create a Include report with the following coding
    *&  Include           ZPA1_INCLFOR_MAIL                                *
    * Data
    DATA: docdata LIKE sodocchgi1,
    objpack LIKE sopcklsti1 OCCURS 1 WITH HEADER LINE,
    objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE,
    objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE,
    objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE,
    objhex LIKE solix OCCURS 10 WITH HEADER LINE,
    reclist LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
    DATA: tab_lines TYPE i,
    doc_size TYPE i,
    att_type LIKE soodk-objtp.
    DATA: listobject LIKE abaplist OCCURS 1 WITH HEADER LINE.
    * FORM
    FORM ml_customize USING objname objdesc.
    *----------- Clear Variables
    CLEAR docdata.
    REFRESH objpack.
    CLEAR objpack.
    REFRESH objhead.
    REFRESH objtxt.
    CLEAR objtxt.
    REFRESH objbin.
    CLEAR objbin.
    REFRESH objhex.
    CLEAR objhex.
    REFRESH reclist.
    CLEAR reclist.
    REFRESH listobject.
    CLEAR listobject.
    CLEAR tab_lines.
    CLEAR doc_size.
    CLEAR att_type.
    *--------- Set Variables
    docdata-obj_name = objname.
    docdata-obj_descr = objdesc.
    ENDFORM. "ml_customize
    * FORM
    FORM ml_addrecp USING preceiver prec_type.
    CLEAR reclist.
    reclist-receiver = preceiver.
    reclist-rec_type = prec_type.
    APPEND reclist.
    ENDFORM. "ml_customize
    * FORM
    FORM ml_addtxt USING ptxt.
    CLEAR objtxt.
    objtxt = ptxt.
    APPEND objtxt.
    ENDFORM. "ml_customize
    * FORM
    FORM ml_prepare USING bypassmemory whatatt_type whatname.
    IF bypassmemory = ''.
    *--------- Fetch List From Memory
    CALL FUNCTION 'LIST_FROM_MEMORY'
    TABLES
    listobject = listobject
    EXCEPTIONS
    OTHERS = 1.
    IF sy-subrc <> 0.
    MESSAGE ID '61' TYPE 'E' NUMBER '731'
    WITH 'LIST_FROM_MEMORY'.
    ENDIF.
    CALL FUNCTION 'TABLE_COMPRESS'
    * IMPORTING
    * COMPRESSED_SIZE =
    TABLES
    in = listobject
    out = objbin
    EXCEPTIONS
    OTHERS = 1
    IF sy-subrc <> 0.
    MESSAGE ID '61' TYPE 'E' NUMBER '731'
    WITH 'TABLE_COMPRESS'.
    ENDIF.
    ENDIF.
    * Header Data
    * Already Done Thru FM
    * Main Text
    * Already Done Thru FM
    * Packing Info For Text Data
    DESCRIBE TABLE objtxt LINES tab_lines.
    READ TABLE objtxt INDEX tab_lines.
    docdata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
    CLEAR objpack-transf_bin.
    objpack-head_start = 1.
    objpack-head_num = 0.
    objpack-body_start = 1.
    objpack-body_num = tab_lines.
    objpack-doc_type = 'TXT'.
    APPEND objpack.
    * Packing Info Attachment
    att_type = whatatt_type..
    DESCRIBE TABLE objbin LINES tab_lines.
    READ TABLE objbin INDEX tab_lines.
    objpack-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objbin ).
    objpack-transf_bin = 'X'.
    objpack-head_start = 1.
    objpack-head_num = 0.
    objpack-body_start = 1.
    objpack-body_num = tab_lines.
    objpack-doc_type = att_type.
    objpack-obj_name = 'ATTACHMENT'.
    objpack-obj_descr = whatname.
    APPEND objpack.
    * Receiver List
    * Already done thru fm
    ENDFORM. "ml_prepare
    * FORM
    FORM ml_dosend.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = docdata
    put_in_outbox = 'X'
    commit_work = 'X' "used from rel. 6.10
    * IMPORTING
    * SENT_TO_ALL =
    * NEW_OBJECT_ID =
    TABLES
    packing_list = objpack
    object_header = objhead
    contents_bin = objbin
    contents_txt = objtxt
    * CONTENTS_HEX = objhex
    * OBJECT_PARA =
    * object_parb =
    receivers = 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.
    MESSAGE ID 'SO' TYPE 'S' NUMBER '023'
    WITH docdata-obj_name.
    ENDIF.
    ENDFORM. "ml_customize
    * FORM
    FORM ml_spooltopdf USING whatspoolid.
    DATA : pdf LIKE tline OCCURS 0 WITH HEADER LINE.
    *-------------- Call Function
    CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
    EXPORTING
    src_spoolid = whatspoolid
    TABLES
    pdf = pdf
    EXCEPTIONS
    err_no_otf_spooljob = 1
    OTHERS = 12.
    *------------- Convert
    PERFORM doconv TABLES pdf objbin.
    ENDFORM. "ml_spooltopdf
    * FORM
    FORM doconv TABLES
    mypdf STRUCTURE tline
    outbin STRUCTURE solisti1.
    *-------- Data
    DATA : pos TYPE i.
    DATA : len TYPE i.
    *------------ Loop And Put Data
    LOOP AT mypdf.
    pos = 255 - len.
    IF pos > 134. "length of pdf_table
    pos = 134.
    ENDIF.
    outbin+len = mypdf(pos).
    len = len + pos.
    IF len = 255. "length of out (contents_bin)
    APPEND outbin.
    CLEAR: outbin, len.
    IF pos < 134.
    outbin = mypdf+pos.
    len = 134 - pos.
    ENDIF.
    ENDIF.
    ENDLOOP.
    IF len > 0.
    APPEND outbin.
    ENDIF.
    ENDFORM. "doconv
    Then include that report in the following report and copy the same code and paste it there
    *& Report  ZPA_TEMP147                                                 *
    REPORT  ZPA_TEMP147                             .
    INCLUDE zpa1_inclfor_mail.
    * DATA
    DATA : itab LIKE tline OCCURS 0 WITH HEADER LINE.
    DATA : file_name TYPE string.
    data : path like PCFILE-PATH.
    data : extension(5) type c.
    data : name(100) type c.
    * SELECTION SCREEN
    PARAMETERS : receiver TYPE somlreci1-receiver lower case.
    PARAMETERS : p_file LIKE rlgrap-filename
    OBLIGATORY.
    * AT SELECTION SCREEN
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    CLEAR p_file.
    CALL FUNCTION 'F4_FILENAME'
    IMPORTING
    file_name = p_file.
    * START-OF-SELECTION
    START-OF-SELECTION.
    PERFORM ml_customize USING 'Tst' 'Testing'.
    PERFORM ml_addrecp USING receiver 'U'.
    PERFORM upl.
    PERFORM doconv TABLES itab objbin.
    PERFORM ml_prepare USING 'X' extension name.
    PERFORM ml_dosend.
    SUBMIT rsconn01
    WITH mode EQ 'INT'
    AND RETURN.
    * FORM
    FORM upl.
    file_name = p_file.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = file_name
    filetype = 'BIN'
    TABLES
    data_tab = itab
    EXCEPTIONS
    file_open_error = 1
    file_read_error = 2
    no_batch = 3
    gui_refuse_filetransfer = 4
    invalid_type = 5
    no_authority = 6
    unknown_error = 7
    bad_data_format = 8
    header_not_allowed = 9
    separator_not_allowed = 10
    header_too_long = 11
    unknown_dp_error = 12
    access_denied = 13
    dp_out_of_memory = 14
    disk_full = 15
    dp_timeout = 16
    OTHERS = 17.
    path = file_name.
    CALL FUNCTION 'PC_SPLIT_COMPLETE_FILENAME'
    EXPORTING
    complete_filename = path
    * CHECK_DOS_FORMAT =
    IMPORTING
    * DRIVE =
    EXTENSION = extension
    NAME = name
    * NAME_WITH_EXT =
    * PATH =
    EXCEPTIONS
    INVALID_DRIVE = 1
    INVALID_EXTENSION = 2
    INVALID_NAME = 3
    INVALID_PATH = 4
    OTHERS = 5
    ENDFORM. "upl
    Regards
    Pavan

  • Sending text file out of sap

    Hi All
    I have this requirement
    I have to read vendor data in sap , create a text file of this data in the daily basis and send the text file to a third party system.
    I know how to read data and create the file , but how can I send this file to other third party system , actually it is an SQL server, which uses this file to update the vendor table.
    Thank you.

    hi Malu,
    If you want o put the File in Unix server..
    us the commands FTP_COMMAND , FTP_CONNECT and place the file in the unix server.
    of you want to place file in the Application server use open data set and close data set..
    if you want to place file manually..
    use t-code CZ3Y.
    regards,
    Prabhudas

  • SENDING TEXT FILE AS AN ATTACHMENT

    Hi,
    I want to send an email as a TEXT file attachment.
    Thanks
    Vikranth Khimavath

    hi,
    Use the FM SO_NEW_DOCUMENT_ATT_SEND_API1 to send mail with an attachment. Here is the sample code.
    FUNCTION Z_SEND_MAIL.
    ""Local interface:
    *" IMPORTING
    *" VALUE(MESSAGE) TYPE STRING OPTIONAL
    *" VALUE(RECEIVER_MAIL) TYPE STRING OPTIONAL
    *" VALUE(TO) TYPE STRING OPTIONAL
    data for send function
    DATA doc_data TYPE sodocchgi1.
    DATA object_id TYPE soodk.
    DATA objcont TYPE TABLE OF soli INITIAL SIZE 10.
    DATA wa_objcont LIKE LINE OF objcont.
    DATA receiver TYPE TABLE OF somlreci1 INITIAL SIZE 1.
    DATA wa_receiver LIKE LINE OF receiver.
    move message
    TO doc_data-obj_descr .
    This is the subject for your mail.
    WRITE 'Sub:test Mail' TO doc_data-obj_descr.
    This is the body of your mail.
    concatenate ' Hi ' to into wa_objcont-line separated by space.
    append wa_objcont to objcont.
    wa_objcont-line = message.
    append wa_objcont to objcont.
    Specify receipent id.
    MOVE: RECEIVER_MAIL TO wa_receiver-receiver,
    'X' TO wa_receiver-express,
    'U' TO wa_receiver-rec_type.
    APPEND wa_receiver TO receiver.
    Finally call the function module.
    CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
    EXPORTING
    document_data = doc_data
    put_in_outbox = 'X' "Save Document in Outbox
    COMMIT_WORK = 'X'
    IMPORTING
    new_object_id = object_id
    TABLES
    object_content = objcont
    receivers = receiver
    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.
    SUBMIT rsconn01 USING SELECTION-SET 'SAP&CONNECTINT' AND RETURN.
    ENDFUNCTION.
    REPORT RSCONN01 MESSAGE-ID XS NO STANDARD PAGE HEADING.
    INCLUDE <SYMBOL>. " 11.11.96
    TYPE-POOLS: SX.
    TYPE-POOLS: KKBLO.
    PARAMETERS: MODE(3) TYPE C DEFAULT '*',
    OUTPUT TYPE C DEFAULT ' '. "B20K072036 new parameter
    selection-screen skip.
    parameters maxjobs type sx_maxjobs default 1.
    parameters rfcgroup type bdfields-rfcgr.
    selection-screen skip.
    parameters maxpsize type sx_maxpsize default 1000.
    parameters minpsize type sx_minpsize default 20.
    parameters maxsel type sx_maxqrows default 20000.
    parameters timepo type sx_timepo default 2.
    parameters timeout type sx_arfctimeout default 100.
    parameters commit type sx_commit default 1.
    data address_types type sx_addrtab.
    data job_params type sxjobs.
    data jobdata type sxjobdata.
    --- initialization -
    initialization.
    get default parameters
    call function 'SX_JOBDATA_GET'
    changing
    jobdata = jobdata.
    give defaults to parameters
    maxjobs = jobdata-maxjobs.
    maxpsize = jobdata-maxpsize.
    minpsize = jobdata-minpsize.
    maxsel = jobdata-maxsel.
    timepo = jobdata-timepo.
    timeout = jobdata-arfc_timeout.
    commit = jobdata-commit_after.
    --- start-of-selection -
    start-of-selection.
    perform addr_type_to_table using mode
    changing address_types.
    job_params-maxjobs = maxjobs.
    job_params-rfcgroup = rfcgroup.
    job_params-maxpsize = maxpsize.
    job_params-minpsize = minpsize.
    job_params-maxsel = maxsel.
    job_params-timepo = timepo.
    job_params-arfc_timeout = timeout.
    job_params-commit_after = commit.
    call function 'SX_OBJECTS_SEND'
    exporting
    address_types = address_types
    output = output
    job_params = job_params
    exceptions
    others = 1.
    if sy-subrc <> 0.
    message id sy-msgid type sy-msgty number sy-msgno
    with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    endif.
    exit.
    TABLES: SXADDRTYPE.
    DATA: selection type SX_ADDRTAB,
    NR_SO_OBJECTS TYPE I,
    OBJ_CAT TYPE SX_OBJ_CAT OCCURS 20 WITH HEADER LINE.
    if sy-batch = 'X'.
    message I078 with 'RSCONN01' SY-HOST SY-MANDT.
    endif.
    *fill selection table
    refresh selection.
    if mode = '*'.
    clear mode.
    endif.
    IF NOT ( MODE IS INITIAL ).
    SELECT SINGLE * FROM SXADDRTYPE WHERE ADDR_TYPE EQ MODE.
    IF SY-SUBRC NE 0.
    IF OUTPUT EQ 'X'.
    WRITE: MODE, TEXT-001, TEXT-002.
    ENDIF.
    EXIT.
    ENDIF.
    IF SXADDRTYPE-METHOD NE 'SAPCONNECT'.
    IF OUTPUT EQ 'X'.
    WRITE: MODE, TEXT-003, TEXT-004, TEXT-005.
    ENDIF.
    EXIT.
    ENDIF.
    append sxaddrtype-addr_type to selection.
    ELSE.
    select * from sxaddrtype
    where method = 'SAPCONNECT'
    and extern = sx_true.
    case sxaddrtype-addr_type.
    when 'INT' or 'FAX' or 'PAG' or
    'PRT' or 'RML' or 'X40'.
    append sxaddrtype-addr_type to selection.
    endcase.
    endselect.
    ENDIF.
    CALL FUNCTION 'SX_OBJECTS_SEND'
    EXPORTING
    ADDRESS_TYPES = SELECTION
    IMPORTING
    NR_SO_OBJECTS = NR_SO_OBJECTS
    TABLES
    OBJ_CAT = OBJ_CAT
    EXCEPTIONS
    INTERNAL_ERROR = 1
    OTHERS = 2.
    IF SY-SUBRC NE 0.
    IF OUTPUT EQ 'X'.
    Always write out this error message:
    WRITE: TEXT-006, SY-SUBRC.
    ENDIF.
    EXIT.
    ENDIF.
    IF NR_SO_OBJECTS = 0.
    IF OUTPUT EQ 'X'.
    WRITE: TEXT-007.
    ENDIF.
    EXIT.
    ENDIF.
    IF OUTPUT EQ 'X'.
    PERFORM DISPLAY_OBJECT_CATALOGUE.
    ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR MODE.
    PERFORM F_SHOW_ADDR_TYPES CHANGING MODE.
    AT SELECTION-SCREEN ON HELP-REQUEST FOR OUTPUT.
    PERFORM F_HELP_OUTPUT.
    *& Form addr_type_to_table
    text
    form addr_type_to_table using address_type type sx_addrtyp
    changing address_types type sx_addrtab.
    data adrtp_wa type sxaddrtype.
    data adrtp type sx_addrtyp.
    if address_type <> '*'.
    adrtp = address_type.
    endif.
    if not adrtp is initial.
    select single * from sxaddrtype into adrtp_wa
    where addr_type = adrtp.
    if sy-subrc <> 0.
    message i009 with adrtp.
    exit.
    endif.
    if adrtp_wa-method ne 'SAPCONNECT'.
    message i027 with adrtp.
    exit.
    endif.
    append adrtp_wa-addr_type to address_types.
    else.
    select * from sxaddrtype into adrtp_wa
    where method = 'SAPCONNECT'
    and extern = sx_true.
    case adrtp_wa-addr_type.
    when 'INT' or 'FAX' or 'PAG' or
    'PRT' or 'RML' or 'X40'.
    append adrtp_wa-addr_type to address_types.
    endcase.
    endselect.
    endif.
    endform. " addr_type_to_table
    *& Form DISPLAY_OBJECT_CATALOGUE
    Anzeige der Liste der zum Versenden selektierten Objekte
    --> p1 text
    <-- p2 text
    FORM DISPLAY_OBJECT_CATALOGUE.
    DATA: FIELD_LST TYPE KKBLO_T_FIELDCAT.
    DATA: FIELD_CAT TYPE KKBLO_FIELDCAT.
    DATA: IS_LAYOUT TYPE KKBLO_LAYOUT.
    IS_LAYOUT-NO_ZEBRA = 'X'.
    FIELD_CAT-REF_TABNAME = 'SXOBJCAT'.
    FIELD_CAT-NO_SUM = 'X'.
    FIELD_CAT-JUST = 'L'.
    FIELD_CAT-OUTPUTLEN = 3.
    FIELD_CAT-REPTEXT = 'Trc'.
    FIELD_CAT-FIELDNAME = 'DISPL_TRC'.
    FIELD_CAT-HOTSPOT = 'X'.
    FIELD_CAT-SYMBOL = 'X'.
    APPEND FIELD_CAT TO FIELD_LST.
    FIELD_CAT-SYMBOL = ' '.
    FIELD_CAT-OUTPUTLEN = 0.
    FIELD_CAT-HOTSPOT = ' '.
    FIELD_CAT-REPTEXT = ' '.
    CLEAR: FIELD_CAT-NO_ZERO, FIELD_CAT-KEY .
    FIELD_CAT-FIELDNAME = 'ID'. APPEND FIELD_CAT TO FIELD_LST.
    FIELD_CAT-FIELDNAME = 'TITLE'. APPEND FIELD_CAT TO FIELD_LST.
    FIELD_CAT-FIELDNAME = 'TYPE'. APPEND FIELD_CAT TO FIELD_LST.
    FIELD_CAT-FIELDNAME = 'NR_RECIP'. APPEND FIELD_CAT TO FIELD_LST.
    LOOP AT FIELD_LST INTO FIELD_CAT.
    FIELD_CAT-COL_POS = SY-TABIX.
    MODIFY FIELD_LST FROM FIELD_CAT.
    ENDLOOP.
    LOOP AT OBJ_CAT.
    OBJ_CAT-DISPL_TRC = SYM_PENCIL.
    MODIFY OBJ_CAT.
    ENDLOOP.
    CALL FUNCTION 'K_KKB_LIST_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = 'RSCONN01'
    I_CALLBACK_USER_COMMAND = 'CB_OL_UCOMM'
    I_CALLBACK_TOP_OF_PAGE = 'CB_OL_TOP'
    I_CALLBACK_PF_STATUS_SET = 'CB_OL_PFSTATUS'
    I_TABNAME = 'OBJ_CAT'
    IS_LAYOUT = IS_LAYOUT
    IT_FIELDCAT = FIELD_LST
    TABLES
    T_OUTTAB = OBJ_CAT
    EXCEPTIONS
    OTHERS = 1.
    ENDFORM. " DISPLAY_OBJECT_CATALOGUE
    *& Form CB_OL_PFSTATUS
    Callback Funktion (wird aus Listtool heraus gerufen) *
    --> p1 text
    <-- p2 text
    FORM CB_OL_PFSTATUS
    USING EXTAB TYPE KKBLO_T_EXTAB.
    SET PF-STATUS 'CATALOG' EXCLUDING EXTAB.
    SET TITLEBAR 'CAT'.
    ENDFORM. " CB_OL_PFSTATUS
    *& Form CB_OL_TOP
    Callback Funktion (wird aus Listtool heraus gerufen) *
    --> p1 text
    <-- p2 text
    FORM CB_OL_TOP.
    ENDFORM. " CB_OL_TOP
    *& Form CB_OL_UCOMM
    text *
    --> p1 text
    <-- p2 text
    FORM CB_OL_UCOMM
    USING UCOMM LIKE SY-UCOMM
    SELFIELD TYPE KKBLO_SELFIELD.
    DATA: NUMC5(5) TYPE N.
    NUMC5 = SELFIELD-TABINDEX.
    CASE UCOMM.
    WHEN 'PIC1'.
    CASE SELFIELD-SEL_TAB_FIELD.
    WHEN 'OBJ_CAT-DISPL_TRC' OR 'OBJ_CAT-TITLE' OR 'OBJ_CAT-ID'.
    READ TABLE OBJ_CAT INDEX SELFIELD-TABINDEX.
    IF SY-SUBRC NE 0.
    MESSAGE E042.
    ENDIF.
    SUBMIT RSWTTR01
    WITH P_TYPE = 'D'
    WITH P_UNAME = SPACE
    WITH P_OBJ = OBJ_CAT-ID AND RETURN.
    WHEN OTHERS.
    MESSAGE I041 WITH NUMC5 SELFIELD-SEL_TAB_FIELD UCOMM.
    ENDCASE.
    WHEN OTHERS.
    MESSAGE I041 WITH NUMC5 SELFIELD-SEL_TAB_FIELD UCOMM.
    ENDCASE.
    ENDFORM. " CB_OL_UCOMM
    *& Form F_SHOW_ADDR_TYPES
    text
    <--P_MODE text *
    FORM F_SHOW_ADDR_TYPES CHANGING A_TYPE.
    DATA: HELP_INFO LIKE HELP_INFO
    , sel_value like help_info-fldvalue
    , CUCOL LIKE SY-CUCOL
    , CUROW LIKE SY-CUROW
    , value like help_info-fldvalue value 'SE38'
    , IND LIKE SY-INDEX
    , C_SY_SUBRC(3) TYPE C
    DATA: BEGIN OF FIELDS OCCURS 5.
    INCLUDE STRUCTURE HELP_VALUE.
    DATA: END OF FIELDS.
    DATA: BEGIN OF LIST_OF_FIELDS OCCURS 5,
    NAME(21) TYPE C.
    DATA: END OF LIST_OF_FIELDS.
    DATA: BEGIN OF FULL_LIST OCCURS 5,
    ADDRESS_TYPE LIKE SXADDRTYPE-ADDR_TYPE,
    END OF FULL_LIST.
    REFRESH FIELDS.
    REFRESH LIST_OF_FIELDS.
    REFRESH FULL_LIST.
    HELP_INFO-TABNAME = 'SXADDRTYPE'.
    HELP_INFO-FIELDNAME = 'ADDR_TYPE'.
    SELECT * FROM SXADDRTYPE.
    IF SXADDRTYPE-METHOD NE 'SAPCONNECT'
    OR SXADDRTYPE-EXTERN NE SX_TRUE.
    CONTINUE.
    ENDIF.
    MOVE SXADDRTYPE-ADDR_TYPE TO FULL_LIST-ADDRESS_TYPE.
    APPEND FULL_LIST.
    ENDSELECT.
    MOVE '*' TO FULL_LIST-ADDRESS_TYPE.
    APPEND FULL_LIST.
    LIST_OF_FIELDS-NAME = 'SXADDRTYPE-ADDR_TYPE'.
    APPEND LIST_OF_FIELDS.
    CALL FUNCTION 'TRANSFER_NAMES_TO_FIELDS'
    EXPORTING
    SELECTFIELD = HELP_INFO-FIELDNAME
    TABLES
    FIELDS = FIELDS
    NAMELIST = LIST_OF_FIELDS
    EXCEPTIONS
    WRONG_FORMAT_GIVEN = 1
    OTHERS = 2.
    CALL FUNCTION 'HELP_VALUES_GET_WITH_VALUE'
    EXPORTING
    DISPLAY = ' '
    FIELDNAME = HELP_INFO-FIELDNAME
    TABNAME = HELP_INFO-TABNAME
    GIVEN_VALUE = HELP_INFO-FLDVALUE
    TITEL = TEXT-002
    IMPORTING
    SELECT_VALUE = HELP_INFO-FLDVALUE
    SELECT_INDEX = IND
    TABLES
    FIELDS = FIELDS
    VALUETAB = FULL_LIST
    EXCEPTIONS
    FIELD_NOT_IN_DDIC = 1
    MORE_THEN_ONE_SELECTFIELD = 2
    NO_SELECTFIELD = 3
    OTHERS = 4.
    C_SY_SUBRC = SY-SUBRC.
    CASE SY-SUBRC.
    WHEN '0'.
    READ TABLE FULL_LIST INTO A_TYPE INDEX IND.
    WHEN OTHERS.
    MESSAGE E022 WITH C_SY_SUBRC.
    ENDCASE.
    ENDFORM. " F_SHOW_ADDR_TYPES
    *& Form F_HELP_OUTPUT
    text
    --> p1 text
    <-- p2 text
    FORM F_HELP_OUTPUT.
    DATA: CANCELLED TYPE C,
    C_SY_SUBRC(8) TYPE C.
    CALL FUNCTION 'POPUP_DISPLAY_TEXT'
    EXPORTING
    LANGUAGE = SY-LANGU
    POPUP_TITLE = 'SAPconnect'
    TEXT_OBJECT = 'RSCONN01_F1_OUTPUT_40B'
    IMPORTING
    CANCELLED = CANCELLED
    EXCEPTIONS
    TEXT_NOT_FOUND = 1
    OTHERS = 2.
    C_SY_SUBRC = SY-SUBRC.
    IF SY-SUBRC NE 0.
    MESSAGE E035 WITH C_SY_SUBRC. leads to dump !
    ENDIF.
    ENDFORM. " F_HELP_OUTPUT
    Regards,
    Richa

  • Sending Text File through Mail Adapter

    Hi Group,
    I need to send my Target as Mail attachment in the Text File?Can any body Suggest

    Hi swabap,
         You need to use PayloadSwapBean module in the Mail receiver adapter. This module will send the payload as an attchment to the mail server.
    Check the following link
    <a href="/people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure:///people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure
    Regards,
    Akshay

Maybe you are looking for

  • Calendar will no longer sync

    Hello, Using Desktop manager 5.0.1, I can no longer sync Microsoft Outlook Calendar 2007 with my BB 9700.  My Desktop manager installed quite a few updates this morning, prior to this syncing problem.  Outlook Contacts and Task appear to be syncing o

  • Creation of shortend Fiscal year for the Merger of two Companies.

    Company 'A'is getting Merged with the Company 'B' on 15th February 2010. Company 'A' is suppose to submit all the financial details to the Company 'B' on 15th February 2010, furthermore the users with the Company 'A' should not be allowed to post any

  • How to connect to home ster

    I recently purchased a Belkin Y audio cable for my Zen Vision M and connected it to my home surround sound receiver. As soon as I connected it, the music started playing but the screen went off. Does anyone know how to keep the screen on when connect

  • Error -36 alert displays when connecting to a Windows server

    Hi All I am getting error -36 when I tried to copy any file or folder from windows server "Error -36 alert displays when connecting to a Windows server" Even the file info is zero KB, while from other MAC machine it is right size.

  • How to determine or verify the language used if your application is in mult

    hi, How to determine or verify the language used if your application is in multi Language Env. Thanks & Regards