FCC on Sender CC to convert flat file to complex xml structure

Hi ,
i need to create a complex xml structure using FCC at the sender communication channel.
the datatype structure is as follows:
Data type     Occurrence
DT_SOURCE     
SEG_9     1..1
SEG_10     1..1
SEG_20     1..1
SEG_30     0..1
SEG_40     1..2
SEG_50     0..1
SEG_55(loop)     0..1
       SEG_55     0..9999
       SEG_60-70(loop)     1..1
            SEG_60     0..1
            SEG_70     0..9999
SEG_90     0..1
Please let me know how this can be acheived.
Regards,
Meenakshi
Edited by: meenakshipradhan on Apr 5, 2010 7:44 PM

Hi  Meenakshi,
Please let us know the Hierarchy of the structure to be created, is it one level only?
Could you please explaing  what is the loop meant here?
SEG_55(loop) 0..1
SEG_55 0..9999
SEG_60-70(loop) 1..1
Please specify if there are any delimiters or what is the  file format at source.
Or Try reading the whole content of the file then use a XSLT to create the desired structure, i think in XSLT you can easily try out the looping.
Regards,
Srinivas.

Similar Messages

  • Converting Flat File data into XML

    Hi Experts,
    Consider the message type of the SENDER system and flat file data
    <dt_sender>
    <root>
    <header1>   0..1
        <f1>
        <f2>
        <f3>
    <header2>   0..1
        <f4>
        <f5>
        <f6>
    <item>        1..unbounded
        <f7>
        <f8>
        <f9>
        <f10>
        <f11>
        <f12>
    </item>
    abc     def     ghi     jkl     mno     pqr
    123     123     123     123     123     123
    456     456      456     456     456     456
    how to convert the flat file data into following XML data. please note that each field value is separated by TAB delimeter...wht parameters shld b used
    <root>
        <Header1>
            <f1>abc</f1>
            <f2>def</f2>
            <f3>ghi</f3>
        </Header1>
        <Header2>
            <f4>jkl</f4>
            <f5>mno</f5>
            <f6>pqr</f6>
        </Header1>
        <item>
            <f7>123</f7>
            <f8>123</f8>
            <f9>123</f9>
            <f10>123</f10>
            <f11>123</f11>
            <f12>123</f12>
            <f7>456</f7>
            <f8>456</f8>
            <f9>456</f9>
            <f10>456</f10>
            <f11>456</f11>
            <f12>456</f12>
        </item>
    points will be given to the correct answers
    Thanks in advance.
    FAisal
    Edited by: Abdul Faisal on Feb 29, 2008 5:53 AM

    Faisal,
    When you read the multiple recordset strucutre file then each record in txt file should have an header from which you can identiy which segment it should go.. and you identiy it by using the keyfiledValue in file adapter
    <root>
    <header1> 0..1
    <f1>
    <f2>
    <f3>
    <header2> 0..1
    <f4>
    <f5>
    <f6>
    <item> 1..unbounded
    <f7>
    <f8>
    <f9>
    <f10>
    <f11>
    <f12>
    </item>
    for this input file
    abc def ghi jkl mno pqr
    123 123 123 123 123 123
    456 456 456 456 456 456
    abc def ghi can be read using the file adater to header 1 usinfg key field value, but using the same file adapter you cannt put GHI into header2.
    else you should read whole row abc def ghi jkl mno pqr in single filed and write an UDF to split data to header1 and Header 2
    similarly you have to take care for item records also
    if your inout file is something like this
    abc def ghi
    jkl mno pqr
    123 123 123 123 123 123
    456 456 456 456 456 456
    abc identifies to Header 1
    JKL for Header 2  so on...
    read the whole line in single field  and write UDF to Split to header 1 and header 2 similary for item.

  • Flat File to simple XML structure in Mail Sender Adapter

    Hi,
    I have a scenario, where I want to put the content of a flat file (text, no csv or similar), which is an attachement of an e-mail, into a simple XML structure: entire file content as content of one XML tag. E.g.:
    file content:
    "abcdefgh"
    xml file:
    <root>
      <content>abcdefgh</content>
    </root>
    Do I need to use MessageTransformBean? Or is there an easiert way?
    Thanks,
    Torsten

    Hi Dirk,
    When we use MessageTransform, we can use ContentDisposition to specify, as to whether the payload has to go as an attachment or inline(as the mail itself.)
    It could also be a text file. Right?
    Just take a look at this..
    http://help.sap.com/saphelp_nw2004s/helpdata/en/57/0b2c4142aef623e10000000a155106/frameset.htm
    cheers,
    Prashanth

  • URGENT : Program to convert flat file to XML file.

    Hello,
           Good Morning. I want an urgent program to convert a flat file seperated by '/' to an XML file format and store that in the the application server. If any one has done such a developement, could you please send me the code.
    The flat file format is as below :
    72/070414/114147/11973//100-//EA/00000000///04198//RRT0/RC23///////353825001511172/72/070414/123620/11973//1000//EA/00000000///04198//RRT0/RC23///////354762008125236/72/070414/125411/13814//1000//EA/00000000///04198//INV/ID06///////90000000002697/72/070414/140820/11973//1000//EA/00000000///04198//RRT0/RC23///////353057002479718/72/070414/145438/13814//1000//EA/00000000///04198//INV/ID06///////90000000002739/72/070414/145438/11973//1000-//EA/00000000///04198//INV/ID06///////353057002479718/72/070414/150008/13814//1000
    It needs to be filtered by removing the '/' and also grouped based on two fields namely store number and transaction number.  The sample XML output required is as below :
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <MT_POLL07 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../MT_POLL07.xsd">
      <MessageHeader>
        <File>
          <Name>C:/kai/perl/storemaster_home/stores/09100/inbound/POLL07.DOS</Name>
          <CreatedDate>Wed Feb  7 13:09:15 2007</CreatedDate>
          <TotalRecordNo>19</TotalRecordNo>
        </File>
      </MessageHeader>
      <Transaction>
        <TransactionHeader>
          <TRANSACTION>20070414001559</TRANSACTION>
          <STORE_NO>09100</STORE_NO>
          <BOFTTP>72</BOFTTP>
        </TransactionHeader>
        <Item>
          <BOFTDT>070414</BOFTDT>
          <BOFTTM>114147</BOFTTM>
          <BOFSKU>11973</BOFSKU>
          <BOFUPC></BOFUPC>
          <BOFQTY>100</BOFQTY>
          <BOFQTN>-</BOFQTN>
          <BOFCST>0</BOFCST>
          <BOFCSN>+</BOFCSN>
          <BOFUM>EA</BOFUM>
          <BOFHRF>00000000</BOFHRF>
          <BOFSRF></BOFSRF>
          <BOFVND></BOFVND>
          <BOFLOC>04198</BOFLOC>
          <BOFEQT></BOFEQT>
          <BOFEQN>+</BOFEQN>
          <BOFRTP>RRT0</BOFRTP>
          <BOFREA>RC23</BOFREA>
          <BOFCID></BOFCID>
          <BOFAUT></BOFAUT>
          <BOFCUR></BOFCUR>
          <BOFPTP></BOFPTP>
          <BOFUPT></BOFUPT>
          <BOFUMR></BOFUMR>
          <BOFSRN>353825001511172</BOFSRN>
          <GMNUMBER>1</GMNUMBER>
        </Item>
        <Item>
          <BOFTDT>070414</BOFTDT>
          <BOFTTM>123620</BOFTTM>
          <BOFSKU>11973</BOFSKU>
          <BOFUPC></BOFUPC>
          <BOFQTY>1000</BOFQTY>
          <BOFQTN>+</BOFQTN>
          <BOFCST>0</BOFCST>
          <BOFCSN>+</BOFCSN>
          <BOFUM>EA</BOFUM>
          <BOFHRF>00000000</BOFHRF>
          <BOFSRF></BOFSRF>
          <BOFVND></BOFVND>
          <BOFLOC>04198</BOFLOC>
          <BOFEQT></BOFEQT>
          <BOFEQN>+</BOFEQN>
          <BOFRTP>RRT0</BOFRTP>
          <BOFREA>RC23</BOFREA>
          <BOFCID></BOFCID>
          <BOFAUT></BOFAUT>
          <BOFCUR></BOFCUR>
          <BOFPTP></BOFPTP>
          <BOFUPT></BOFUPT>
          <BOFUMR></BOFUMR>
          <BOFSRN>354762008125236</BOFSRN>
          <GMNUMBER>2</GMNUMBER>
        </Item>
      </Transaction>
    </MT_POLL07>
    Please send me the code : It is urgent. Thanks in advace. Points to be rewarded.

    hi !
    Check with this thread discuss the same
    http://www.sap-img.com/abap/sample-xml-source-code-for-sap.htm
    Flat file to XML
    CONVERTION OF FLAT FILE TO XML : NO OUT PUT FOUND
    Converting Idoc flat file representation to XML
    how to convert flat file into IDOC-XML
    Regds
    Abhishek

  • Converting flat file to XML using JMS

    Hi,
    I want to convert flat file to xml. My sender adapter is JMS,
    Can anyone tell me that how to do that conversion ? Conversion is very simple.
    Can we use File content conversion in JMS Sender ? any link or blog ? or any other idea to achieve this ?
    Regards
    Kulwinder

    Hi,
    The pdf has been removed from that link i suppose.
    Anyways, go through the below help, everything that is there in "HowToConveModuleJMS.pdf" has been mentioned in this...
    http://help.sap.com/saphelp_nw04/helpdata/en/24/4cad3baabd4737bab64d0201bc0c6c/content.htm
    Hope it would surely help you.
    You can go through the below link, for better understanding..
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a05b2347-01e7-2910-ceac-c45577e574e0
    Regards,
    Swetha.
    Edited by: Swetha Reddy on Feb 26, 2009 5:30 AM

  • Converting flat files to csv format

    hi,
    Iam converting flat files to csv format..the problem is that iam running a script for inserting values.while i run this script it works fine .but while i open this csv file the datas in the excel sheet is not coming in a single line that is for a particular record its moving to second line .there is a break for a single record.so there is a problem in conversion.can anything be done in it this to avoid the breaking of lines
    thanks
    Ratheesh

    YOGenereally, you shouldn't convert from a lossy format AAC or MP3) to another lossy fomrat.
    It's called loss because you lose information when you convert it.
    If you only use these files on the computer and the iPod, I'd recommend AAC. Better quality at same bit rate as MP3.

  • How to convert Flat file(.txt) data to an Idoc format(ORDERS05)

    Hi,
    How to convert Flat file(.txt) data to an Idoc format(ORDERS05). If any FM does the same work please let me know.
    thanks in advance,
    Chand
    Moderator message : Duplicate post locked. Read forum rules before posting.
    Edited by: Vinod Kumar on Jul 26, 2011 11:11 AM

    Hi,
            For more information, please check this link.
    http://sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/46759682-0401-0010-1791-bd1972bc0b8a
    Have a look at the FM IDOC_XML_FROM_FILE. May be it helps...
    Regards

  • How can i convert flat idoc to IDOC-xml

    Hi all,
    I want to convert flat idoc to Idoc-xml. Suggest some methods for that....
    K.S Grewal

    This is the sample idoc data which i have been provided. actually i dont have much knowledge abt structure of idocs. As i have to test my scenario hich is idoc to file, i need Idoc-xml format.
    ISA00          00          01006922827PCE1  126155214895     0612211736U004000004633020P|GSRE006922827PCE16155214895200612211736463302X004010ST9440001W17F20061221018085336610001 398456   1*83209N1WHWarehouseG620920061221W0740EA*PO5500203183PL000010*1MT42PF5321D/37~N9KK0180853366000001N9PEUS1TWHSW1440~SE90001~ST9440002~W17F20061221018085336710001 398448   183209N1WHWarehouseG620920061221W0756EA*PO5500203182PL000010*1MT*42PF7421D/37N9KK0180853367000001~N9PEUS1TWHS~W1456SE90002ST9440003W17F20061221018085338810001 398446   1*83209N1WHWarehouseG620920061221W071EA*PO5500205659PL000010*1MT50PF9731D/37~N9KK0180853388000001N9PEUS1TWHSW141~SE90003~GE3463302~IEA1*000463302~

  • HOW TO CONVERT PDF FILE IN TO XML FILE?

    HOW TO CONVERT PDF FILE IN TO XML FILE

    No Office programs can open a pdf and edit the contents so you will have to get a different app to convert teh pdf into xls format. There are plenty to be found on the web.
    Rod Gill
    The one and only Project VBA Book
    Rod Gill Project Management

  • Can we assign 1 flat file to 2 different structures in LSMW.

    Hi all,
      Can we assign 1 flat file to 2 different structures in LSMW.
    Please help.
    Thanks in Advance,
    Amruta.

    Hi,
    of course you can assign a flat file to as many LSMW structures you want.. If one structure is subordinate to the other, then all fields of your flat file are available to assign to any field in the structures.
    For example, you want to create/change vendor company code data via standard upload program. There are structures BLFB1 for company code data and also BLFBW for vendor withholding tax. If your file is a flat file and contains a record for each vendor and say, up to three withholding tax types, you can assign your structure to both BLFB1 & BLFBW. You have to enter code in BLBW, though to transfer up to 3 BLBW records
    Edited by: Harris Veziris on Dec 31, 2007 10:34 PM

  • How to convert HL7 file into an XML

    Hi All,
    I am new to HL7,can any one tell how to convert HL7 file into an XML.Give sample demo or related links.
    My sample HL7 file is as follows how can I convert.
    FHS|^~\&||Tax ID123^Lab Name123^L|||201110191435||HL7.txt||1234567|123||
    PID|seqno|123||john^chambers^^Dr^Dr|2456 california ave^San jose^CA^85254|19601212|M
    FHS|^~\&||Tax ID123^Lab Name123^L|||File Creaqted Date|File Security|FileName||File HeaderComment||Facility|FileCreatedDateTime|File Security|File Name|File Header Comment|FileControlId|Reference File Control ID|
    PID|seqno|patientId||LastName^FirstName^MiddleName^Title^Degree|Street^City^State^zip|patientDOB|gender
    <Report>
    <FileHeader>
    <FileSendingApplication> </FileSendingApplication>
    <TaxID>Tax ID123</TaxID>
    <LabName>Lab Name123</LabName>
    <FileSendngFacilityType>L</FileSendngFacilityType>
    <FileReceivingApplication></FileReceivingApplication>
    <FileReceivingFacility></FileReceivingFacility>
    <FileCreatedDateTime>201110191435</FileCreatedDateTime>
    <FileSecurity></FileSecurity>
    <FileName>HL7.txt</FileName>
    <FileHeaderComment></FileHeaderComment>
    <FileControlId>1234567</FileControlId>
    <ReferenceFileControlID></ReferenceFileControlID>
    <FileHeader>
    <Patient>
    <seqno> </seqno>
    <patientId>Tax ID123</patientId>
    <LastName>Lab Name123</LastName>
    <FirstName>L</FirstName>
    <MiddleName></MiddleName>
    <Title> </Title>
    <Degree></Degree>
    <Street></Street>
    <City></City>
    <State>HL7.txt</State>
    <Zip></Zip>
    <patientDOB>1234567</patientDOB>
    <gender></gender>
    <Patient>
    </Report>
    Thanks
    Mani

    Hi Prabu,
    With input as in single line I'm able to get the the output but with the multiple lines of input,error was occured.Any suggestions.
    Error while translating. Translation exception. Error occured while translating content from file C:\temp\sampleHL7.txt Please make sure that the file content conforms to the schema. Make necessary changes to the file content or the schema.
    The payload details for this rejected message can be retrieved.          Show payload...
    Thanks
    Mani

  • Converting Idoc flat file representation to XML

    Hi ,
    I went through the guide for How To Convert Between IDoc and XML in XI 3.0. I'm concerned with the second part of the guide which says convert from falt file representation of Idoc to XML. Can anyone tell me what are the other design and configuration objects to be created for this scenario ( message types,interfaces, mapping , etc )
    Also which step of the pipeline does the converted XML goes to ?
    The program also expects a filename, what if I want to pass the file name dynamically ? Any ideas on this one.
    Hope someone replies this time.........:)
    Thanks for you help and improving my knowledge
    Thanks
    Advait Gode.

    Hi Advait,
    Let me give you a small overview on how inbound IDOCs work before answering your question-
    The control record is the key in identifying the routing of the IDOC. If you try to think IDOCs as normal mails(post), the control record is the envolope. It contains information like who the sender is and who the receiver should be and what the envelope contains (no different than receiving mails/letters by post).
    Then the data records contain the actual data, in our example would be the actual letter. The status records contain the tracking information.
    Traditionally SAP's IDOC interface (even before XI comes in picture) has utility programs to post incoming IDOCs in to SAP. One such program is RSEINB00 which basically takes  the IDOC file name and the port as input. This program opens the file and posts the contents to the SAP IDOC interface (which is a set of function modules) via the port. The idea is to read the control record and determine the routing and further posting to application. Note that one information in the control record is the message type/idoc type which decides how the data records need to be parsed.
    Now in XI scenario, what happens if we receive data as flat file? Normally, we use flat file adapter and in the file adapter we provide information on how to parse the file. But, if the incoming file is flat and in IDOC structure, why do we have to configure the file adapter, when the parsing capability is already available using RSEINB00/Standard IDOC interface.
    This the reason, the guide suggests you to use RSEINB00. Now, your concern is what if you need to provide a dynamic filename. My idea is to write a wrapper program. This would be an ABAP program in your integration engine. This program will determine the file name (based on a logic which should be known to you) and then call program RSEINB00 using a SUBMIT/RETURN. You would then schedule this ABAP program in background to run in fixed schedules.
    There are other ways of handling your scenario as well but from limited information from your request, I will stop with this now. Post me if you have any more queries.
    KK

  • Sender Idoc_AAE Adapter for flat file format

    I have been given to develop a Scenario where in  an Idoc in a flat file (.txt) format needs to be sent from ECC system to a Bank SFTP server . NO ESR objects are involved ,just pick and place .Kindly Explain the configuration on the Sender Idoc_AAE Adapter .

    Hi Srinath,
    Please refer the below blogs for IDOC_AAE configuration
    How to create and configure Sender Idoc AAE Scenario - PI 7.3
    refer the below blog for IDOC to file scenario (with IDOC_AAE)
    IDOC_AAE To File with all Configurations
    to convert IDOC XML to IDOC flat you need to create JCA in NWA. Please refer the below blog
    Converting IDoc XML to Flat File and Vice-Versa
    regards,
    Harish

  • How to convert flat file type from DAT to ASC

    hello all
    i am trying to download a flat file and trying  to upload it in another program.
    for this i am using gui_upload and gui_download function modules.
    if i download the file as ASC and upload with ASC there is no problem.
    if i download the file as DAT and upload with DAT its giving an exception invalid file type
    if i download the file as DAT and upload with  ASC  its giving an exception bad data format.
    but in real senario my customer is sending a flat file with DAT type and i am unable to upload it.
    how to solve this problem?

    Hi,
    when uploading DAT pass file type as 'ASC' and give HAS_FIELD_SEPARATOR  = 'X'.
    For other types see the code below.
    CASE P_RECTYP.
       WHEN 'DAT'.
         MOVE 'X' TO L_FLDSEP.
         MOVE 'ASC' TO L_TYPE.
       WHEN 'ASC'.
          MOVE ' ' TO L_FLDSEP.
          MOVE P_RECTYP TO L_TYPE.
       WHEN 'BIN'.
           CLEAR L_TYPE.
         MOVE P_RECTYP TO L_TYPE.
         MOVE ' ' TO L_FLDSEP.
       WHEN OTHERS.
        MOVE 'X'  TO L_FLDSEP.
        MOVE 'ASC' TO L_TYPE.
    ENDCASE.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
       FILENAME                      = LV_FILENAME
       FILETYPE                      = l_type
       HAS_FIELD_SEPARATOR           = l_fldsep
    Regards,
    Vasanth

  • How to convert flat file to XMl without key field value

    Hi experts,
    I have a input CSV Flat file which has got one HEADER line and Multiple Detail records.
    I do not have any key field value to convert this FLAT file to XML using normal file content conversion.
    Is there any module or Bean which can be used to convert this Flat File to XML.
    Or any other remedy to overcome this problrm.
    Thanks in advance.
    Regards
    Pradeep

    Hi Saurabh,
    Thanks for the reply.
    Ur understanding is perfectly alright.Lets say my file is like below.
    Account Number,Account Name,Currency,Unclear Balance,Account Balance010205000033,VAISHNAVI SALES CORPN,0.00,0.00,350000.00
    010205000034,CHAKKA ENTERPRISES,0.00,-641350.47,8649.53
    010205000035,SEHGAL TRADING COMPANY,338665.00,-220.00,461115.00
    010205000036,SHUBH LAXMI AGENCIES,0.00,0.00,0.00
    010205000037,EMPIRE AGENCIES,0.00,-245.11,0.00
    010205000038,PIONEER AGENCIES,0.00,-696386.00,303614.00
    I am not using the first line in the mappiing.
    Are you saying that I need to ignore the first line while doing the conversion using Recordset OFFSET ?
    Or do I need to make a single structure taking all the fields from header as well as details and while defining the structure I need to ignore the fields from header?
    Please suggest.

Maybe you are looking for

  • BMR/Systemstate backup not working on windows server 2008 error 2147942487

    Hi, trying to backup system image using SCDPM 2010 RTM.Most of the server are getting healthy backups except for this one server which is giving error: Affected area: Computer\System Protection Occurred since: 1/27/2014 2:43:27 PM Description: The re

  • JS isnt called by firefox but is in IE why?

    This is the main parts of the page, i dont really understnad why but the button has no function, it doest even appear to attemp to call the JS at all. and i dont understand what may cause this... <%@ page import="java.util.*;" %> <%@ page contentType

  • Forecast accuracy check in R/3 ECC 6.0

    Folks, We've designed a Flexible Plng solution for our clients to address a very complex reqt. But as it stands, any good design of Flex Plng (SOP for that matter) is incomplete without a very reliable way to forecast & keep bettering the forecast vi

  • How many backups are saved in iCloud?

    Hi, how many backups has my icloud account?. i want to recover an important note

  • Call Rejected error when Using CTI Port to call out

    Hello, I am using Cisco Call Recording feature that is enabled on a phone that has a CTI Port and number assigned to invoke a call recording session to dial out a Long Distance number. I used JTAPI tool to invoke a call and then used the CTI that was