Split File in File Sender

Hi,
I have a source file that can be up to 4MB's and I want to Split it for every 10,000 records in the file. I can't use "Recordsets per Message" because my file has a single Header and multiple Detail records.
Is there any way to split this message in the file sender?

i recommend you to create an xslt mapping and split the source file with it.
in the ESR first resolve all the mapping program, then call the XSLT.
so you ESR configuration will be:
Message mapping: XXXX
Opertation mapping will have two mapping:  XXXX and XSLT.
here give you and example or XSL i use to split Idocs. the XSL receive and idoc WPUUMS01  with 1000 record and the XSL split it into Two.
use it as reference to solve your issue
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns1="http://spsa.com/POS/DailySales">
     <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
     <xsl:template match="ns1:mt_SalesValidation_response">
      <WPUUMS01>
       <xsl:for-each select="row[position() mod 500 = 1]">
         <IDOC>
            <xsl:attribute name="BEGIN">
               <xsl:value-of select="1" />
            </xsl:attribute>
            <EDI_DC40>1
              <SNDPRN>
                   <xsl:value-of select="../OUT_WERKS"/>
              </SNDPRN>
            </EDI_DC40>
            <xsl:for-each select=".| following-sibling::row[position() &lt; 500]">
               <E1WPU01>     
                  <xsl:attribute name="SEGMENT">
                     <xsl:value-of select="1"/>
                  </xsl:attribute>
                  <BELEGDATUM>
                     <xsl:value-of select="../OUT_ERSDA"/>
                  </BELEGDATUM>
                  <BELEGWAERS>PEN</BELEGWAERS>
                <E1WPU02>
                         <xsl:attribute name="SEGMENT">
                              <xsl:value-of select="1"/>
                              </xsl:attribute>
                         <QUALARTNR>EANN</QUALARTNR>
                         <ARTNR>
                           <xsl:value-of select="EAN11"/>
                         </ARTNR>
                         <VORZMENGE>-</VORZMENGE>
                         <UMSMENGE>
                           <xsl:value-of select="TOT_CANTIDAD"/>
                         </UMSMENGE>
                         <UMSWERT>
                              <xsl:value-of select="TOT_VTA"/>
                         </UMSWERT>
                </E1WPU02>
                 </E1WPU01>
              </xsl:for-each>
         </IDOC>
     </xsl:for-each>
      </WPUUMS01>
   </xsl:template>
</xsl:stylesheet>
Hope Helps
Edited by: Rodrigo Alejandro Pertierra on May 18, 2011 12:28 PM

Similar Messages

  • Split a ZIP File in smaller Chunks / payloads on ECC 6.0 (NOT PI)

    I call a external web service directly from ECC6.0.  In one of the proxy class's methods I need to send a zip file. I can generate ZIP file using SAP supplied class. The file size of this zip file 150 MB and I want to break this file in smaller chunks say 2 MB chunks. Is there a FM / Class / some way to break this file into smaller chunks?
    Appreciate your inputs
    Thanks,
    Vikram

    Hi Vikram,
    You can use the FM DX_SPLIT_FILE to split the zip file.
    Regards,
    Ashvin

  • Issue with file to file in PI 7.3 (Splitting huge files)

    Hi All,
    Need your help in fixing the issue with file splitting
    We are doing some sample scenarios(file to file) on PI 7.3 server.
    We are trying to split a 10MB file by using the 'Advanced Mode' option in the sender file adapter. We gave max split file size as 2MB. The file got split into 5 chunks and was successfully sent to receiver file adapter. In receiver adapter we are able to see that. But in the target folder only 1 file was seen with size 2MB. All other chunks were missing. We need to have the whole data sent from source to target.
    How to fix this issue? please provide your inputs.
    Thanks and Regards,
    Lakshmi Narayana

    PI 7.3 has capable of processing larger size files.
    Questions:
    Have you picked EOIO quality of service? Hope you dont do mapping or content conversion for this file?
    have you seen this link
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a06d79f3-d094-2e10-1a81-f4d802d0bcf1?QuickLink=index&overridelayout=true
    http://help.sap.com/saphelp_nw73/helpdata/en/44/682BCD7F2A6D12E10000000A1553F6/frameset.htm

  • How to split a single file and then route it to different systems

    Hi All,
    I have a requirement like...my incoming file(single file) needs to be split into 3 files based on a field "company code".and then route it into different systems.
    my incoming file is like this .....
    Header,name,.....,.....,........,.....,.....
    Detail,.....,.....,.....,.....,......,companycode(100),....,.....,......
    Detail,.....,.....,.....,.....,......,companycode(101),....,.....,......
    Detail,.....,.....,.....,.....,......,companycode(100),....,.....,......
    Detail,.....,.....,.....,.....,......,companycode(102),....,.....,......
    Detail,.....,.....,.....,.....,......,companycode(101),....,.....,......
    Detail,.....,.....,.....,.....,......,companycode(102),....,.....,......
    EOF.
    I need to split this file and my ouput file should be like this
    For 1st system
    Header,name,.....,.....,........,.....,.....
    Detail,.....,.....,.....,.....,......,companycode(100),....,.....,......
    Detail,.....,.....,.....,.....,......,companycode(100),....,.....,......
    EOF.
    For 2nd system
    Header,name,.....,.....,........,.....,.....
    Detail,.....,.....,.....,.....,......,companycode(101),....,.....,......
    Detail,.....,.....,.....,.....,......,companycode(101),....,.....,......
    EOF.
    For 3rd system
    Header,name,.....,.....,........,.....,.....
    Detail,.....,.....,.....,.....,......,companycode(102),....,.....,......
    Detail,.....,.....,.....,.....,......,companycode(102),....,.....,......
    EOF.
    and then send it three systems based on company code.
    Can anyone tell me how this can be achieved?
    Thanks,
    Hemanth.

    Hi Nallam,
    I tried the same thing but in the input file as there are different company codes,It is not splitting the file into three parts and sending only concerned data to repective system instead the whole file is going to the all the systems.
    I came to know that the file has to splitted in the mapping only, we are able to do it by using mapping but the problem is in Routing,as in receiver determination we makes use of source structure for giving the condition. Can you please help me on this.
    Thanks,
    Hemanth.

  • File Splitting for Large File processing in XI using EOIO QoS.

    Hi
    I am currently working on a scenario to split a large file (700MB) using sender file adapter "Recordset Structure" property (eg; Row, 5000). As the files are split and mapped, they are, appended to a destination file. In an example scenario a file of 700MB comes in (say with 20000 records) the destination file should have 20000 records.
    To ensure no records are missed during the process through XI, EOIO, QoS is used. A trigger record is appended to the incoming file (trigger record structure is the same as the main payload recordset) using UNIX shellscript before it is read by the Sender file adapter.
    XPATH conditions are evaluated in the receiver determination to eighther append the record to the main destination file or create a trigger file with only the trigger record in it.
    Problem that we are faced is that the "Recordset Structure" (eg; Row, 5000) splits in the chunks of 5000 and when the remaining records of the main payload are less than 5000 (say 1300) those remaining 1300 lines get grouped up with the trigger record and written to the trigger file instead of the actual destination file.
    For the sake of this forum I have a listed a sample scenario xml file representing the inbound file with the last record wih duns = "9999" as the trigger record that will be used to mark the end of the file after splitting and appending.
    <?xml version="1.0" encoding="utf-8"?>
    <ns:File xmlns:ns="somenamespace">
    <Data>
         <Row>
              <Duns>"001001924"</Duns>
              <Duns_Plus_4>""</Duns_Plus_4>
              <Cage_Code>"3NQN1"</Cage_Code>
              <Extract_Code>"A"</Extract_Code>
         </Row>
         <Row>
              <Duns>"001001925"</Duns>
              <Duns_Plus_4>""</Duns_Plus_4>
              <Cage_Code>"3NQN1"</Cage_Code>
              <Extract_Code>"A"</Extract_Code>
         </Row>
         <Row>
              <Duns>"001001926"</Duns>
              <Duns_Plus_4>""</Duns_Plus_4>
              <Cage_Code>"3NQN1"</Cage_Code>
              <Extract_Code>"A"</Extract_Code>
         </Row>
         <Row>
              <Duns>"001001927"</Duns>
              <Duns_Plus_4>""</Duns_Plus_4>
              <Cage_Code>"3NQN1"</Cage_Code>
              <Extract_Code>"A"</Extract_Code>
         </Row>
         <Row>
              <Duns>"001001928"</Duns>
              <Duns_Plus_4>""</Duns_Plus_4>
              <Cage_Code>"3NQN1"</Cage_Code>
              <Extract_Code>"A"</Extract_Code>
         </Row>
         <Row>
              <Duns>"001001929"</Duns>
              <Duns_Plus_4>""</Duns_Plus_4>
              <Cage_Code>"3NQN1"</Cage_Code>
              <Extract_Code>"A"</Extract_Code>
         </Row>
         <Row>
              <Duns>"9999"</Duns>
              <Duns_Plus_4>""</Duns_Plus_4>
              <Cage_Code>"3NQN1"</Cage_Code>
              <Extract_Code>"A"</Extract_Code>
         </Row>
    </Data>
    </ns:File>
    In the sender file adapter I have for test purpose changed the "Recordset structure" set as "Row,5" for this sample xml inbound file above.
    I have two XPATH expressions in the receiver determination to take the last record set with the Duns = "9999" and send it to the receiver (coominication channel) to create the trigger file.
    In my test case the first 5 records get appended to the correct destination file. But the last two records (6th and 7th record get sent to the receiver channel that is only supposed to take the trigger record (last record with Duns = "9999").
    Destination file: (This is were all the records with "Duns NE "9999") are supposed to get appended)
    <?xml version="1.0" encoding="UTF-8"?>
    <R3File>
         <R3Row>
              <Duns>"001001924"</Duns>
              <Duns_Plus_4>""</Duns_Plus_4>
              <Extract_Code>"A"</Extract_Code>
         </R3Row>
         <R3Row>
              <Duns>"001001925"</Duns>
              <Duns_Plus_4>""</Duns_Plus_4>
              <Extract_Code>"A"</Extract_Code>
         </R3Row>
         <R3Row>
              <Duns>"001001926"</Duns>
              <Duns_Plus_4>""</Duns_Plus_4>
              <Extract_Code>"A"</xtract_Code>
         </R3Row>
              <R3Row>
              <Duns>"001001927"</Duns>
              <Duns_Plus_4>""</Duns_Plus_4>
              <Extract_Code>"A"</Extract_Code>
         </R3Row>
              <R3Row>
              <Duns>"001001928"</Duns>
              <Duns_Plus_4>""</Duns_Plus_4>
              <Extract_Code>"A"</Extract_Code>
         </R3Row>
    </R3File>
    Trigger File:
    <?xml version="1.0" encoding="UTF-8"?>
    <R3File>
              <R3Row>
              <Duns>"001001929"</Duns>
              <Duns_Plus_4>""</Duns_Plus_4>
              <Ccr_Extract_Code>"A"</Ccr_Extract_Code>
         </R3Row>
              <R3Row>
              <Duns>"9999"</Duns>
              <Duns_Plus_4>""</Duns_Plus_4>
              <Ccr_Extract_Code>"A"</Ccr_Extract_Code>
         </R3Row>
    </R3File>
    I ve tested the XPATH condition in XML Spy and that works fine. My doubts are on the property "Recordset structure" set as "Row,5".
    Any suggestions on this will be very helpful.
    Thanks,
    Mujtaba

    Hi Debnilay,
    We do have 64 bit architecture and still we have the file processing problem. Currently we are splitting the file into smaller chuncks and processsing. But we want to process as a whole file.
    Thanks
    Steve

  • The amount of memory used for data is a lot larger than the saved file size why is this and can I get the memory usage down without splitting up the file?

    I end up having to take a lot of high sample rate data for relativily long periods of time. When I save the data it is usually over 100 MB. When I load the data for post-processing though the amount of memory used is excessively higher than the file size. This causes my computer to crash because 1.5 GB is not enough. Is there a way to stop this from happening withoput splitting up the file into smaller files.

    LabVIEW can efficiently handle large files, far beyond 100Mb, provided that care is taken in the coding of the loading/processing routines. Here are several suggestions:
    1) Check out the resources National Instruments has put together (NI Developer Zone > Development Library > Measurement and Automation Software > LabVIEW > Development System > Optimizing Applications > Managing Memory), specifically the article entitled "Managing Large Data Sets in LabVIEW".
    2) Load and process the data in chunks if possible.
    3) Avoid sending the data to front panel indicators, using local/global variables for data storage, or changing data types unless absolutely necessary.
    4) If using LabVIEW 7.1, use the "show buffer" tool to determine when LabVIEW is creating extra
    copies of data in memory.

  • File-XI-File BPM Split Question

    Iam using BPM to split the 1 file into 2 files. I have to use BPM due to requirement.
    Iam sending file to BPM
    In BPM:
    receive step
    transform Step - Here message split is performed
    Fork Start
    Send Message 1
    Send Message 2
    Fork End ( end condition is 1=1 )
    Stop.
    Only 1 file is written and 2nd file no information
    When I looked at SXMB_MONI_BPE
    Send1 Workflow system logically deleted
    Send2  Workflow system completed
    I dont know whats happening for Send 1
    Where can I look for potential errors ?
    In the request message mapping of SXMB_MONI ( 2 payloads are as follows )
    1st Payload ( Maindocument ( Application/xml))
    <?xml version="1.0" encoding="utf-8" ?>
    - <ns1:MT_State xmlns:ns1="http://www.test.com">
    - <State>
      <State_rec>NYC</State_rec>
      <State_rec>FLA</State_rec>
      <State_rec>CAN</State_rec>
      <State_rec>CAS</State_rec>
      </State>
      </ns1:MT_State>
    2nd Payload (XI_Context(text/xml))
    <?xml version="1.0" encoding="utf-8" ?>
    - <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
    - <asx:values>
    - <CONTEXT>
    - <RMS_CONTEXT>
      <NAMESPACE>http://sap.com/xi/XI/System</NAMESPACE>
      <NAME>ProcessStep</NAME>
      <VALUE />
      </RMS_CONTEXT>
      </CONTEXT>
      </asx:values>
      </asx:abap>
    Anyone have any suggestion for me how to fix this issue?
    Thanks a lot.

    Ram,
    Since Iam going to add more process steps ( such as synchronous calls) i really wanted to finsih the sending of both SEND steps in the FORK. If I dont give end condition, am I sure that those SENDS are processed before next process step following fork ?
    BPM will come out of FORK only when all steps in all branches are executed succesfully.
    If you give an END condition to the fork, then this is used when you are not sure for how long the steps in the fork should run, and so on.
    http://help.sap.com/saphelp_nw04/helpdata/en/24/e2283f2bbad036e10000000a114084/content.htm
    +You use a fork () when you want to continue a process in branches that are independent of each other, for example, to communicate with two systems that are independent of each other. The branches of the fork join in a union operator.
    You can specify the required number of branches and then define whether the process must run through all branches, or just a particular number of branches. Furthermore, you can define an end condition for the fork (see also: Condition Editor).
    As soon as a branch reaches the union operator at runtime, the system checks the following conditions in the specified order:
    · The process has run through the required number of branches
    · The specified end condition has returned true
    The step is complete as soon as one of the conditions returns true.+  
    Earlier when you gave condition as 1=1 one of the steps was executed and it came out of the fork. So, do no give any condition and it will execute all steps in the FORK and come out as you want.
    Regards,
    Bhavesh

  • Hi experts...file to file....one sender n no of recievers....

    hi,
       this is file to file scenario...sender side i have my file like...empno empfirst name emp last nem persno....here im sending one mesg...and it has split into n recivers depending on persno...any one can help me in this issue ...without using bpm....
    Thanks in advance and for ans u'll be rewarded....
    Edited by: hari prasad on Apr 2, 2008 8:51 AM

    hi
    you are creating the file to file scenarios
    create the IR
    and then create the ID
    you are creating the one sender and n number of receiver for that you just give the condtion in interface determination
    that is some condition satisfy then data goes to the perticular receiver
    and just check it
    I hope your prob will solved
    thanks
    Regards
    vijay

  • Is there a way to view the messages I sent along with files in Adobe Send?

    Is there a way to view the messages I sent along with files in Adobe Send?

    Too bad...I wish that feature was still there that was in SendNow...I also have to go and get the recipients email each time I send a file instead of Send remembering the email addresses I have sent to in the past.
    Are any of the great features of SendNow going to be brought over into Send? Or are they just gone...I am a paying CC user...just curious what's going on at Adobe...Thanks for your very quick response though...I guess my message content is gone.

  • File format while sending a file  using FTP Process

    Hi,
    I am facing a formatting problem when i send a file from SAP application server to a different sever using FTP process.
    The problem is like this:
    Lets say I have a file with 10 records on the application server. When i am downloading this file to a pc, the file is showing 10 lines.
    But when i open the same file on the other server it is showing 10 records as 1 line.
    The file i am sending is a text file.(ex: acc_payable.txt)
    If i open the same file on the other server using word pad it is showing 10 records in 10 different lines.
    I want the file to be opened using notepad and want to see the each record in a different line
    Can anybody help me on this issue
    Regards,
    Radhakrishna

    Another stab at "simplest": can you avoid embedding
    newline characters in the strings
    your write and reply on PrintWriter's
    println() methods instead?But, if I understand the OP, this will cause the same problem. He is running on Unix but wants to generate a DOS type eol. The println() method will use the OS default; therefore, he needs to explicitly specify the DOS eol.

  • File-to-file scenario: no mapping, filename from sender file

    Hi all,
    file-to-file without mapping.
    we want to use XI to transport just files from XI file directory to another ftp-server (+ archiving on xi file directory)
    we configered an sender file adapter that picks the file up, but
    we have problems configuring the receiver adapter in that way that the filename or the original file is used
    Is that possible? with which parameter settings
    filename is not content of the XI message content so "message:FileName" doenst work
    Thank you very much
    regards
    Hans

    Hi Hans,
    Check this link:
    How to send any data (even binary) through XI, without using the Integration Repository
    OR
    Copy a file with same filename using XI
    Sachin
    Edited by: Sachin Dhingra on Nov 7, 2008 8:19 PM

  • Scenario PROXY - SENDER FILE - RECEIVER FILE

    Hi Experts,
    I need to create a synchronous scenario where the proxy sends the filename to send and PI must transfer the file to a location X. The source file is in a different location of the destination file 
    This scenario, should this be done through Process Integration?
    Thanks,

    Hi,
    I think you can use a sync/async bridge to do your scenario and you wont need any development outside of using standard modules. The idea is to create a scenario Proxy(sync)-File(Async) -File (Async) without BPM. Check the point 8 in this document http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/80f96dbf-adca-3010-ffb5-daf2d1f0e276?QuickLink=index&…
    I have never tested this with the SFTP channel, and i dont know if this adapter supports the RequestOneWayBean and WaitResponseBean modules. May be you should wait to someone that confirms to you the possibility of using this modules with the SFTP adapter.
    Regards.

  • Flat file name from Sender Side Dynamically into subject of Receiver Mail

    Hi All,
             I am Using a file to Mail Scenario, My requirement is to get dynamically the file name from flat file of the Sender Side into Subject of Receiver Mail Adapter and attachment of file from the Sender Side. Can anyone help me out.
    Thanks in Advance

    Hi....
              You can write udf in the message mapping to get the Dynamic file name and map that to the subject of the receiver mail.
      DynamicConfiguration conf = (DynamicConfiguration) param.get(
              StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey KEY_FILENAME = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
          // read value
          String Filename = conf.get(KEY_FILENAME);
    Regards,
    Leela

  • File Adapter as Sender not picking the files

    We configured the File Adapter as Sender, Transport Protocol =NSF and message protocol as FCC.
    In OS we have folder to read the file, but SAP XI unable to read the file.
    To trouble shoot this issue we copied that file into another location and reverted back to the same location then XI File adaptor is able to read the file.
    Now we have compared the Attributes of the path
    the only difference in file attributes
    Coded character set ID . . . . . . . . :   819      
    CCSID 819 (decimal)
    0333 (hex)
    Name ISO 8859-1 ASCII
    Description ISO 8859-1: Latin Alphabet Number 1Latin-1 countries and regions
    Notes Related CCSID with euro is 923           
    able to read the file attributes:
    Coded character set ID . . . . . . . . :   1252                    
    CCSID 1252 (decimal)
    04E4 (hex)
    Name MS-WIN LATIN-1
    SC Co-existence/Migration
    FMS Subset
    Registration Date 
    Description MS Windows, Latin-1
    Notes CCSID for this code page with euro is 5348
    We have tried to chage the File type as Text and File Encoding with ISO-8859-1even then its not picking the files.
    Please suggest me where i am doing wrong here
    Thanks,
    Venkat.

    Hi,
    Check the file path & file name , Check  the processing mode parameter which you have set?
    Check the folder properties & provide all the permission ...
    Finally check the communication channel status in RWB, If the problem persist try to stop & start the communication channel again..
    Hope it helps...
    Regards,
    Kumar.

  • What is the use of additional file(s) in  sender file adapter?

    Hi experts,
    what is the use of  additional files parameter in sender file adapter?
    give me some example.......
    Thanks & Regards
    E.Ravi Chandra Reddy

    Hi,
    please check the below link,
    you can specify additional files to be included in the XI message as attachments.
    http://help.sap.com/saphelp_tm90/helpdata/en/44/692ab8a4b633eae10000000a1553f6/content.htm
    Regards

Maybe you are looking for

  • How to get a color profile stored in a user library from within Photoshop CS5

    Hi! I have a specific color profile that I want to load int PS CS5 color settings. I've placed it into my user library/application support/adobe/color/settings folder and all was good. Now i'm in PS and can't find the user library to load the setting

  • Pricing, Modifiers in Sales Order Form

    Hi Gurus, Please help me to resolve the issue with Pricing, Modifier to Sales Order: I have created Master price List for Item A - $40 Modifer 1 - Dealer Discount Price is 20% (Created Modifier as Dealer Discount - 20%) Modifer 2 - Order Header disco

  • .and suddenly java.io.IOException: Server returned HTTP response code: 500

    I have this code for a long time and it always works:      URL url = new URL("http://www.infoamistades.net/load.do");                     URLConnection urlConnection = null;           urlConnection = url.openConnection();           urlConnection.setR

  • Vendor Code 1317 Query execution was interrupted MySQL

    An Error was encountered performing the requested operation: Query execution was interrupted Vendor Code 1317 Is this a network issue? A database issue? This is intermittent, for a period I can query tables then I try a new query or click on a differ

  • Transactions to Display Item-Condtions-Detail for Pricing?

    User sent me a screen shot where I can see at the top: Item, Condition Type, Application, and CondPricingDate. Below are details like Amount, Qty Conversion, Cond. base value, etc. Any idea what transaction they used and how they got to it (params)?