Problem in Identifying the different RecordTypes of a FixedLength Flat File

Hi,
We have a requirement to read the fixed length flat file having records of multiple types.
Invoice Data structure is like:
Header Data
12345HDER123abc123
FIRSTSET
12345DETL123abc123
12345DESC123abc123
12345DESC123abc123
12345PRNT123abc123
SECONDSET
62345DETL123abc123
62345DESC123abc123
62345DESC123abc123
62345DESC123abc123
62345PRNT123abc123
N set of Msgs occur
TRAILER Data
12345TRLR123abc123
Here
I have to identify the record types from the four letters positioned 6-9 like
HDER-Header Record
DETL-Detail Record
DESC-Description Record
PRNT-Print Record
TRLR-Trailer Record.
I have seen in articles having the identifier string in the beginning of the record itself.
And solutions suggest to use xsd:choice with condition,xsd:sequence with startswith in those cases.
In this case,KeyString comes in between.
We need help to identify the records with the keyletters so that we can configure File adapter to capture the data?
Please Suggest.Thanks In Advance
Regards
AS

Hi AS,
Write the XSD as below
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
targetNamespace="http://www.example.org/read"
xmlns:tns="http://www.example.org" elementFormDefault="qualified"
attributeFormDefault="unqualified" nxsd:encoding="ASCII"
nxsd:stream="chars" nxsd:version="NXSD">
<xsd:element name="PurchaseOrder850OutBound">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="PurchaseOrder" maxOccurs="unbounded" nxsd:lookAhead="91"
nxsd:lookFor="0010">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="HeaderRecords" nxsd:lookAhead="91"
nxsd:lookFor="0010">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Record0010" nxsd:lookAhead="91"
nxsd:lookFor="0010">
<xsd:complexType>
<xsd:sequence nxsd:style="array" nxsd:arrayTerminatedBy="${eol}">
<xsd:element name="TP" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="25" nxsd:paddedBy=" "
nxsd:padStyle="tail"/>
<xsd:element name="PO_Number" type="xsd:string"
nxsd:style="fixedLength" nxsd:length="22"
nxsd:paddedBy=" " nxsd:padStyle="tail"/>
<xsd:element name="Inventory_Item_Id" type="xsd:string"
nxsd:style="fixedLength" nxsd:length="44"
nxsd:paddedBy=" " nxsd:padStyle="tail"/>
<xsd:element name="Record_Id" type="xsd:string"
nxsd:style="fixedLength" nxsd:length="4"
nxsd:paddedBy=" " nxsd:padStyle="tail"/>
<xsd:element name="Layout_Qual" type="xsd:string"
nxsd:style="fixedLength" nxsd:length="5"
nxsd:paddedBy=" " nxsd:padStyle="tail"/>
<xsd:element name="Communication_Method" type="xsd:string"
nxsd:style="fixedLength" nxsd:length="2"
nxsd:paddedBy=" " nxsd:padStyle="tail"/>
<xsd:element name="TP_Test_Flag" type="xsd:string"
nxsd:style="fixedLength" nxsd:length="1"
nxsd:paddedBy=" " nxsd:padStyle="tail"/>
<xsd:element name="Document_Id" type="xsd:string"
nxsd:style="fixedLength" nxsd:length="6"
nxsd:paddedBy=" " nxsd:padStyle="tail"/>
<xsd:element name="Document_Type" type="xsd:string"
nxsd:style="fixedLength" nxsd:length="5"
nxsd:paddedBy=" " nxsd:padStyle="tail"/>
<xsd:element name="Document_Purpose_Code" type="xsd:string"
nxsd:style="fixedLength" nxsd:length="2"
nxsd:paddedBy=" " nxsd:padStyle="tail"/>
<xsd:element name="Document_Code" type="xsd:string"
nxsd:style="fixedLength" nxsd:length="35"
nxsd:paddedBy=" " nxsd:padStyle="tail"/>
<xsd:element name="TP_Translator_Code" type="xsd:string"
nxsd:style="fixedLength" nxsd:length="30"
nxsd:paddedBy=" " nxsd:padStyle="tail"/>
<xsd:element name="TP_Location_Code_EXT" type="xsd:string"
nxsd:style="fixedLength" nxsd:length="35"
nxsd:paddedBy=" " nxsd:padStyle="tail"/>
<xsd:element name="TP_Description" type="xsd:string"
nxsd:style="fixedLength" nxsd:length="74"
nxsd:paddedBy=" " nxsd:padStyle="tail"/>
<xsd:element name="TP_Reference_Ext1" type="xsd:string"
nxsd:style="fixedLength" nxsd:length="80"
nxsd:paddedBy=" " nxsd:padStyle="tail"/>
<xsd:element name="TP_Reference_Ext2" type="xsd:string"
nxsd:style="fixedLength" nxsd:length="80"
nxsd:paddedBy=" " nxsd:padStyle="tail"/>
<xsd:element name="Transaction_date_Time" type="xsd:string"
nxsd:style="fixedLength" nxsd:length="15"
nxsd:paddedBy=" " nxsd:padStyle="tail"/>
<xsd:element name="Run_Id" type="xsd:string"
nxsd:style="fixedLength" nxsd:length="15"
nxsd:paddedBy=" " nxsd:padStyle="tail"/>
<xsd:element name="Org_Id" type="xsd:string"
nxsd:style="fixedLength" nxsd:length="15"
nxsd:paddedBy=" " nxsd:padStyle="tail"/>
<xsd:element name="Document_Standard" type="xsd:string"
nxsd:style="terminated" nxsd:terminatedBy="${eol}"
nxsd:paddedBy=" " nxsd:padStyle="tail"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
next elements.....
In this we are taking from 91st position
You are saying you need from 6th position
Change the positions accordingly and add other elements
Regards
PavanKumar.M

Similar Messages

  • Which is the better format for message handling - flat files or SOAP?

    We have the possibility to specify from our EDI partner how to send messages into XI. We can ask them to send the messages in as SOAP or flat files.
    Is there a definite preference for one format over the other? Can somebody advise with reasons?
    BR,
    Tony.

    >>We have the possibility to specify from our EDI partner how to send messages into XI. We can ask them to send the messages in as SOAP or flat files.
    I would strongly suggest you go with SOAP rather than File.
    Reason : In case of file, the EDI partner will send a file to a machine in your network where FTP server is running and you make your XI server poll the particular folder every 10 min or so. But in case of SOAP, the <b>communication is real time</b>. Your EDI partner can invoke either the SOAP adapter directly or send a SOAP msg directly to Integration Server.
    Just my ideas.
    Regards,
    Jai Shankar

  • What are the advantages of idoc compare to flat file. how data is secure

    what are the advantages of idoc compare to flat file. how data is secure in idocs compare to flat file

    Hi Ramana,
    In simple words, Main advantage with idoc over flat file is security....
    I will explain you some scenario here U got a flat file with all the data...Now u r having the flat file if you want u can modify the data in it, or somehow any one can modify the data in it  if they were able to access this file. That means u maintained the file in the presentation server
    One level of higher security to the above level is maintaining the flat file in application server, at point also even though lot of people r not having the access to that file, super user who is  having  the access may modify the data or delete the data from it rite....
    so in both of those levels u don't have 100% security...
    So there come to the picture of idocs, Idocs simply data carriers, those r generated by a program but not manually...data will be divided into number of segments based upon ur program. So manually its not so easy to modify the data in these idocs. If any changes to be made in the data then u have to modify the data in the application and then u have to update the idoc or you have to generate the new idoc with that corresponding data. so in this case not even super user can manipulate the data directly in the idoc....
    I think u got my point what I mean to say.....
    If you find it useful mark the points
    ~~Guduri

  • Problem with identifying the Train in Dynamic Region

    Hi,
    I have a two task flows(firstflow,secondflow) and they both have its own individual trains and they are all page fragments. Then I have my main page where in I created a dynamic region based on secondflow. Then in the same page I have dynamic region links for firstflow and secondflow. When I run the application I first see the second flow and its train. Now when I click the firstflow link. its corresponding page is showing up then when I click the train it then goes to the secondflow and its train, I cannot navigte within the firstflow and its train. Please let me know any solution to this. Thanks.

    Hi Chetan,
    Thanks. It did worked. When I first faced this problem and when I created the dynamic region I was propmpted to create the bean and I tried creating it wieth scope = session but then I could not run the application. So I kept it as request. But now when it is changed from the property inspector it is running. I need to try the first method again to see it that happens. Thanks for the solution.

  • I have a problem in identifying the local carrier and there is no network in my iPhone 5   "Searching network

    i need help

    Hello Saif,
    Thanks for using Apple Support Communities.
    I found a support article that has some troubleshooting steps for your to follow through in order to resolve the issue of not having a cellular connection on your iPhone 5.
    iPhone: Troubleshooting a cellular data connection
    http://support.apple.com/kb/TS3780
    Take care,
    Alex H.

  • Problem in selecting the different fields from different text fields

    hi,
    Can anyone help me regarding my query.
    i have 3 select list columns separately and what i m trying is that when i select one field from first select list the related fields must only be available for me in the second select list and so on.
    Suppose i select EBSO as a product name from the first select list then only those thing should be visible to me in the second select list which is only related to EBSO only...and same wise with the third select list..
    If anyone has the clue for this pls help me.
    The only clue which i m finding is that to use the java scrpts but how to use is another difficulty for me.
    Regards

    I will explain this through an example.
    In my application I have created two Select Lists.
    The first select list is a select list with a submit
    P3_X allows selection of 1,2,3
    The page branch sets the value of P3_X with &P3_X. so that way the second select list knows what value it will be using.
    The second select list P3_Y is a dynamic query that says
    Select SCOL d, SCOL r from TEST1 where FCOL=:P3_X
    If you were to have a third select list you would make the second Select List also a submit and have the page branch also set P3_Y with &P3_Y.
    The third Select list would say select from where item=:P3_Y
    Does this answer your question?

  • Problem while navigating the different portal Web Dynpro application

    Hi .
    while navigating from one application to another.
    my IE browser stuck with the error.
    Can't execute the code from the freed script.
    it occurs:
    when i navigate from tree structure 's child to another web dynpro application.
    what to do ...
    Regards

    Hi John,
    How have you added the required jar files. For DC projects you cannot use project properties and add the jar files to the build path (In case you have followed this method).
    You will have to add the public part (i believe it is ejbclient.jar and is generated automatically when you create an EJB DC) of the EJB DC as used dc.
    Regards
    Sidharth

  • Ftp wont upload the magix host having problems with identifying the domain

    help

    Hi Fparistk5,
    Could you please share the exact error message?
    Also, please attach a screen shot, if possible.
    Regards
    Sonam

  • What is the format of 0calmonth data in flat file

    Hi,
    What is the format  for  0calmonth field data  in flatfile to load data in to cube.
    Thanks .

    Hi Alex,
    Thanks for your response. Iam providing 0calmonth  field data as 200904 ,200905 and further  then at the time of loading it is throughing error like
         Value '090420 ' of characteristic 0CALMONTH is not plausible     BRAIN     27     
    Please suggest me.
    Thanks.

  • Identifying the unsigned jar

    If one of the JAR files in the resource list has a missing or incorrect certificate, then JWS will fail during launch with a message that an unsigned application is requesting full access.
    Problem is that the application may have dozens of jar files in the resource list and finding the one with the bad certificate can take a lot of time. The exception message does not identify which jar caused the app to become unsigned.
    So, is there any way to identify which jar caused the problem other than going through them one-by-one to list the contents? If not, does anyone know of a utility that will validate the jars files against the jnlp specification? (Or does anyone care to write one?)
    Thanks.

    jarsigner -verify file.jarThanks, that's helpful. Too bad it doesn't accept
    jarsigner -verify *.jar
    Or give you a way to tell that all jar's have the same
    certificate.
    Under windows you can do in a batch file:
    @for %%F in (*.jar) do jarsigner -verify %%F

  • Bulid 9926 problem getting on the internet

    I have installed build 9926 and now it won't let me on the internet. I have everything set up same as my other computers  and they are not having ay problems plus my other pc s' on my home network can see my win 10 pc and it can see all my other pc's
    And there is no problem communicating between the different pc's. The only problem is build 9926 wil not let me on the net.
    I would welcome any suggestion as to solving this problem.
    Jay

    Hi grandpaofmany,
    What is your current situation?
    For Windows 10 can't access Internet, you may follow the steps listed in the article below:
    Why can't I connect to the Internet?
    You may also try to reinstall the NIC driver and check the issue again.
    Best regards
    Michael Shao
    TechNet Community Support

  • Extract data from Query to a Flat File - scheduling in the background

    Hi All,
    We need to extract data from a query to a flat file periodically, but each time 10 separate executions based on 10 profit centers, to get the separate files.
    So, we have PC1, PC2, ... PC10 Profit centeres.
    We have Query1, with profit center variable.
    We have created 10 variants for Query1 so that we can execute for 10 profit centers.
    Now, we have used RSCRM_BAPI to execute the Query1 and write to a flat file. Now we are having a problem in getting this feature used to execute the query automatically for 10 different varaints.
    Thanks in advance,
    _ Shashi

    Shashi,
       You can try using Information Broadcasting or Reporting Agent. You can schedule this in Information Broadcasting.
    check this link for Information Broadcasting... <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/a5/359840dfa5a160e10000000a1550b0/content.htm">http://help.sap.com/saphelp_nw04s/helpdata/en/a5/359840dfa5a160e10000000a1550b0/content.htm</a>
    Nagesh Ganisetti.

  • Too many flat files with different formats.

    Hi gurus,
    i have a headache problems. that is follows:
    We will upload data from flat files,but you know there are about 100 .xls files and with different formats.
    and as you know  the datasource of the flat file must correspond to every fields of the flat file.
    but you know there are 100 flat files and if we donot do any optimise,we will create about 100 transformation and 100 datasource to meet our requirements.
    but that seems impossible.
    is there any good idea to decrease the number of transfomation ?

    Hi AK1987,
    To import flat files with dynamic columns, we can use Script Task inside a Foreach Loop Container to parse the first row of the flat file to get the columns names and save them into a .NET variable, then, we can create “Create Table” script based on this
    variable, and then store the script into a SSIS package variable. After that, we create a staging table based on the package variable, load the flat file data to the staging table. Eventually, we load data from the staging table to the destination table. For
    the detail steps, please walk through the following blog:
    http://www.citagus.com/citagus/blog/importing-from-flat-file-with-dynamic-columns/ 
    Regards,
    Mike Yin
    TechNet Community Support

  • Import flat file to multiple tables based on identifier column

    Hello,
    I am trying to setup a package that will import one pipe-delimited flat file (a utility bill) to multiple data tables based on the value of the first column.  I have been told it is similar in format to an EDI file, but there are some differences.
    The number of columns is consistent where the first columns are the same.  Meaning a record that has '00' in the first column will always have 10 columns; a record that has '01' in the first column will always have 9 columns; etc.
    Each value in the first column represents a separate destination data table.  Meaning a record that has '00' in the first column should be output to table '00'; a record that has '01' in the first column should be output to table '01'; etc.  All
    destination tables reside on the same SQL Server.
    Identifier columns can repeat multiple times throughout the flat file.  Meaning a record that starts with '01' may be repeated multiple times in the same.
    Sample Data:
    00|XXXXXXXX|XXX|XXXXXXXX|XXXXXX|XXXX|X|XXXXXXXXXX|XX|XXXXX
    01|XXXXXXXXXXX|XXX|XXXXXXXX|XXXXX|XXXXXXXXXXXXXXXXXXXX|XXXXXXXXXX|XXXXXXX|XXXXXXXXXXXXXX
    02|XXXXXXXXXXX|XXXXXXXX|XXXXXXX|XXXXX|XXXXX|XXXXX|XXXXX|XXXXX|XXXXX|XXXXX|XXXXX
    04|XXXXXXXXXXX|XXXXXXXXXXXXX|XXX|XXXXXXXX
    05|XXXXXXXXXXX|XXXXXXXXXXXXX|XXX|XXXXXXXX|XXXX
    07|XXXXXXXXXXXXX|X|XXXXXXXXXXXXXXX|XXX|XXXXXXXX|XXXX|XXXXXXX|XXXXXXXXXXX
    07|XXXXXXXXXXXXX|X|XXXXXXXXXXXXXXX|XXX|XXXXXXXX|XXXX|XXXXXXX|XXXXXXXXXXX
    07|XXXXXXXXXXXXX|X|XXXXXXXXXXXXXXX|XXX|XXXXXXXX|XXXX|XXXXXXX|XXXXXXXXXXX
    07|XXXXXXXXXXXXX|X|XXXXXXXXXXXXXXX|XXX|XXXXXXXX|XXXX|XXXXXXX|XXXXXXXXXXX
    01|XXXXXXXXXXX|XXX|XXXXXXXX|XXXXX|XXXXXXXXXXXXXXXXXXXX|XXXXXXXXXX|XXXXXXX|XXXXXXXXXXXXXX
    02|XXXXXXXXXXX|XXXXXXXX|XXXXXXX|XXXXX|XXXXX|XXXXX|XXXXX|XXXXX|XXXXX|XXXXX|XXXXX
    04|XXXXXXXXXXX|XXXXXXXXXXXXX|XXX|XXXXXXXX
    Any help would be appreciated.

    Hi koldar.308,
    If there are few distinct values in the first column, we can use Flat File Source connect to that flat file, then use Conditional Split Transformation to split the first column to multiples, and then load the data to multiple tables with OLE DB Destination
    based on the outputs of Conditional Split.
    After testing the issue in my environment, please refer to the following steps to achieve this requirement:
    Drag a  Flat File Source connect to that flat file with Flat File Connection Manager.
    Drag a Conditional Split Transformation connects to the Flat File Source.
    Double-click the Conditional Split Transformation, add several Output based on the first column values as below:
    Drag same number OLE DB Destinations as the outputs of Conditional Split, connect to Conditional Split with one case output:
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    If you have any feedback on our support, please click
    here.
    Katherine Xiong
    TechNet Community Support

  • What are the key steps & order to follow: changes in my flat file structure

    HI,
    I have a Cube which sits on ODS.
    In the ODS,  the are 6 characterisics: Char1, Char2,...., char6; and 3 key figures: kf1, kf2, and kf3.
    The ODS is loaded through a flat file.
    Through an update rule and startup routine, the ODS updates the cube.
    Now, I have a new requirement to add 2 new characteristics (Cha10, char20) and one 2 key figures (KF55, KF66)).i.e. the flat file will now be coming in with these new fields.
    I have an idea but this this is the first time I really have to implement, I need to be sure.
    What are the key steps that I need to go through and in what order?
    Thanks

    What version are you running ?
    Will you need to load history data as for these new fields or is it just going forward ?
    Is it all one to one mapping for the new fields ?
    1. Make sure you know to what dimensions you need to add the new chars ? New dimension for these two ?
    2. New chars to be made keyfields ?
    3. Update Type for keyfigures Overwrite or Additive ?
    Enhance the Cube, DSO, change  TRFN/TR/UR..

Maybe you are looking for

  • Error While Using FORALL --

    Hi All, I am using FORALL for inserting 40000 records from the file to the table. After reading data from the file it has been stored in type Table array, But while executing FORALL statement its giving ora-00600. error. It is a memory error, some wh

  • Installing Windows 8.1 Enterprise on a Windows 8.1 OEM Laptop

    Hello, I have a new ASUS laptop running an OEM version of basic Windows 8.1. I've installed many applications and put much time personalizing the GUI. I wish to upgrade it to Windows 8.1 Enterprise (I have an enterprise key from MVLS volume license).

  • Deleting Texts from a Custom Infotype

    I have created a custom infotype. On the infotype screen, there is a button that allows the user to enter some custom text. The screen works well in create, change and display mode; however, when I delete the infotype, the data in the PA9XXX is delet

  • Error JMS queue cannot be multi-conumer enabled

    Hi I wanted to enqueue using IPmessage type in java but I ended up getting the error Exception: oracle.jms.AQjmsException: JMS-130: JMS queue cannot be multi-conumer enabled Below is my java code. Anyone has any ideas. public static void main (String

  • Error when syncing groups

    I've got a test install of Vibe, and when I try to do an LDAP sync, with the option to automatically create group profiles, I get an error in catalina.out: 2014-01-21 21:07:27,272 WARN [http-8080-1] [org.kablink.teaming.spring.web.portlet.DispatcherP