LSMW using one data file, via Direct input

Hi All,
I have to perform the below LSMW with Direct method only.
We have only one data file with one row containging header and item data. i.e. each row from data file will create one header record and item records.
Each row will have some columns corresponding to header data and some corresponding to Item data.
Now the problem is:
In the data file, we will get one record/line, but we need to create 2 or more items/lines for the same line(of data file).
Letu2019s say: we get this record in the extract:
16 1256 AB 67999 C
When we map this record to SAP structures we will have:
BBKPF u2013 Header
BBSEG u2013 1st Item, we can map this
BBSEG u2013 2nd Item, we need to create this second item structure programmatically. how to do this ???? any idea
Regards,
Pankaj
Moderator message: duplicate post locked.
Edited by: Thomas Zloch on Jul 1, 2011 10:48 AM

Data file will be some what like:
Col1  Col2  Col3  Col4  Col5  Col6     [just an example]
Where, Col1 =, Col2 and Col6 are for header data and Col3 and Col4 for Item data. Based on header data value on Col2 we have to create multiple Items. 
e.g. If Col2 is inbetween 0 to 100, then Create only 1 Item
       If Col2 is inbetween 101 to 1000, then Create 2 Items
       If Col2 is iabove 1000, then Create only 3 Items
There is another logic (Based on some other Header fields) to fill different values for different Items
Hope this expalins the scenerio.
Regards,
Pankaj

Similar Messages

  • Using a data file in jsp to generate xml file

    hi
    can anybody help me to
    how to use a data file generated in unix in jsp to generate xml file.
    by using beans i am able to generate the xml.
    thanks in advance.

    You haven't provided adequate relevant information. If you need help provide proper relevant details.

  • I'm running logic pro 8.0.2 on Leopard 10.5.8. I've recorded an evening of live music, the cut the recording into songs using one audio file folder. When working on an individual song, I can't access the sampler.  I get the message "nothing to display"

    I'm running logic pro 8.0.2 on Leopard 10.5.8. I've recorded an evening of live music, then cut the recording into songs using one audio file folder ad multiple song files. When working on an individual song, I can't access the sampler.  I get the message "nothing to display" or "no region or audio file selected"  After much research on the web, I believe this is a permanent bug.  Does anyone have a good work-around for this type of work.  We record live 16T band rehearsals constantly and would love to be able to break individual songs out of the large file and be able to use the sampler.  Thanks in advance for your ideas!  Cheers.

    Another thing - if I copy one of the tracks to another track, then the sample editor works on the copied track.  I don't want to have to copy 16 tracks to new tracks to be able to use the sample editor on a project.  Thanks again.

  • I have 100 data files, I want to join them together as one data file

    I need to join approx. 100 data files into one data file, and be able to read back each data file from that one big file. I would also like a feature to count how many files are in the main one file. The data files contain graphs, text and numerics.

    What you want to do is not going to be easy to implement. The idea is that files are just binary data and you can join the data into one binary file. The trick is going to be creating the appropriate header for the binary file to include things like file location--the beginning and end of a subfile--as well as the number of files. The exact structure of the header is really left up to you and your imagination.
    Why do you want to join all the files into one? It sounds like what you have works now and making one file increases the chances that all of your data will be lost if the file becomes corrupted. Also LabVIEW is limited to files of about 2GBytes, so you will be more likely to run into this limit.

  • LSMW for equipment creation-Standard Batch/Direct Input

    Hi,
    We developed an LSMW with standard batch / direct input method for creating equipment masters.
    We used Object =0400 ( equipment ) and method = 0001 ( batch input)
    We maintained source structures and source fileds. In the source field , we maintained only those fields that we need from table IBIPEQUI but in the order given in this structure.
    Also we maintained filed mapping and field convertion rules for the above source fields.
    When we run LSMW step - Display converted data , we see that
    Transactions Read:                   1
    Records Read:                          1
    Transactions Written:                0
    Records Written:                       0
    Not sure what could have gone wrong?
    Please provide some clues to the following questions.
    1) Should the source structure be same as fields from stuc. IBIPEQUI and should it include all the fields in the source structure?
    2) Is field mapping required or not ?
    3) We are getting an error - transaction is not supported in direct input mode.
    Thanks in advance
    Rgds,
    Rajesh

    1. Source fields are( same as IBIPEQUI structure ; the tab delimited file matches with these fields)
    TCODE                          C(020)    Transaction Code
    RECORDNAME                     C(008)    Record name
    EQUNR                          C(018)    Equipment
    DATSL                          C(008)    Valid On
    EQTYP                          C(001)    Equipment category
    EQKTX                          C(040)    EQKTX
    BEGRU                          C(004)    Authorization Group
    EQART                          C(010)    Technical obj. type
    GROES                          C(018)    Size/dimensions
    INVNR                          C(025)    Inventory number
    BRGEW                          C(017)    Gross Weight
    GEWEI                          C(003)    Weight unit
    ELIEF                          C(010)    Vendor
    ANSDT                          C(008)
    ANSWT                          C(017)    Acquisition Value
    WAERS                          C(005)    Currency
    HERST                          C(030)    Manufacturer
    HERLD                          C(003)    Country of manufact.
    BAUJJ                          C(004)    Construction year
    BAUMM                          C(002)    Construction month
    TYPBZ                          C(020)    Model number
    SERGE                          C(030)    ManufSerialNumber
    MAPAR                          C(030)    ManufactPartNo.
    GERNR                          C(018)    Serial number
    GWLEN                          C(008)    Warranty end date
    KUND1                          C(010)    Customer
    KUND2                          C(010)    End customer
    KUND3                          C(010)    Operator
    SWERK                          C(004)    Maintenance plant
    STORT                          C(010)    Location
    MSGRP                          C(008)    MSGRP
    BEBER                          C(003)    Plant section
    ARBPL                          C(008)    Work center
    ABCKZ                          C(001)    ABC indicator
    EQFNR                          C(030)    Sort field
    BUKRS                          C(004)    Company Code
    ANLNR                          C(012)    Asset Number
    ANLUN                          C(004)    ANLUN
    GSBER                          C(004)    Business Area
    KOSTL                          C(010)    Cost Center
    PROID                          C(024)    PROID
    DAUFN                          C(012)    Standing order
    AUFNR                          C(012)    Order
    TIDNR                          C(025)    Technical IdentNo.
    SUBMT                          C(018)    Construction type
    HEQUI                          C(018)    Superord. Equipment
    HEQNR                          C(004)    Position
    EINZL                          C(001)    Single installation
    IWERK                          C(004)    Planning plant
    INGRP                          C(003)    Planner group
    GEWRK                          C(008)    Main work center
    WERGW                          C(004)    Plant for WorkCenter
    RBNR                           C(009)    Catalog profile
    TPLNR                          C(030)    Functional Location
    DISMANTLE                      C(001)    DismIndic.
    VKORG                          C(004)    Sales Organization
    VTWEG                          C(002)    Distribution Channel
    SPART                          C(002)    Division
    MATNR                          C(018)    Material
    SERNR                          C(018)    BOM explosion number
    WERK                           C(004)    WERK
    LAGER                          C(004)    LAGER
    CHARGE                         C(010)    CHARGE
    KUNDE                          C(010)
    KZKBL                          C(001)    Load records
    PLANV                          C(003)    PLANV
    FGRU1                          C(004)    FGRU1
    FGRU2                          C(004)    FGRU2
    STEUF                          C(004)    Control key
    STEUF_REF                      C(001)    STEUF_REF
    KTSCH                          C(007)    Standard text key
    KTSCH_REF                      C(001)    Std text referenced
    EWFORM                         C(006)    EWFORM
    EWFORM_REF                     C(001)    EWFORM_REF
    BZOFFB                         C(002)    Ref. date for start
    BZOFFB_REF                     C(001)    BZOFFB_REF
    OFFSTB                         C(007)    Offset to start
    EHOFFB                         C(003)    Unit
    OFFSTB_REF                     C(001)    OFFSTB_REF
    BZOFFE                         C(002)    Ref. date for finish
    BZOFFE_REF                     C(001)    BZOFFE_REF
    OFFSTE                         C(007)    Offset to finish
    EHOFFE                         C(003)    Unit
    OFFSTE_REF                     C(001)    OFFSTE_REF
    WARPL                          C(012)    Maintenance Plan
    IMRC_POINT                     C(012)    Measuring point
    INDAT                          C(008)    Inverse date
    INTIM                          C(006)    Processing time OC Workbe
    INBDT                          C(008)    Start-up date
    GWLDT                          C(008)    Guarantee
    AULDT                          C(008)    Delivery date
    LIZNR                          C(020)    License number
    MGANR                          C(020)    Master warranty
    REFMA                          C(018)    REFMA
    VKBUR                          C(004)    Sales Office
    VKGRP                          C(003)    Sales Group
    WARR_INBD                      C(001)    Inbound warranty
    WAGET                          C(001)    Warranty inheritance poss
    GAERB                          C(001)    Indicator: Pass on warran
    ACT_CHANGE_AA                  C(001)    ACT_CHANGE_AA
    STRNO                          C(040)    STRNO
    DATLWB                         C(008)    Date Last Goods Movmnt
    UII                            C(072)    UII
    IUID_TYPE                      C(010)    IUID Type
    UII_PLANT                      C(004)    Plant Responsible for UII
    2, source structure is assigned to target structure IBIPEQUI
    3. In the assign files step - all settings given above are correctly maintained.
    4. Field mapping
    TCODE                        Transaction Code
                        Rule :   Default Settings
                        Code:    IBIPEQUI-TCODE = 'IE01'.
    RECORDNAME                   IBIP: Name of the Data Transfer Record
                        Rule :   Default Settings
                        Code:    IBIPEQUI-RECORDNAME = 'IBIPEQUI'.
    EQUNR                        Equipment Number
                        Source:  ZIE01_002_SOURCE-EQUNR (Equipment)
                        Rule :   Transfer (MOVE)
                        Code:    if not ZIE01_002_SOURCE-EQUNR is initial.
                                   IBIPEQUI-EQUNR = ZIE01_002_SOURCE-EQUNR.
                                 endif.
    DATSL                        Date valid from
                        Source:  ZIE01_002_SOURCE-DATSL (Valid On)
                        Rule :   Transfer (MOVE)
                        Code:    if not ZIE01_002_SOURCE-DATSL is initial.
                                   IBIPEQUI-DATSL = ZIE01_002_SOURCE-DATSL.
                                 endif.
    EQTYP                        Equipment category
                        Source:  ZIE01_002_SOURCE-EQTYP (Equipment category)
                        Rule :   Transfer (MOVE)
                        Code:    if not ZIE01_002_SOURCE-EQTYP is initial.
                                   IBIPEQUI-EQTYP = ZIE01_002_SOURCE-EQTYP.
                                 endif
    When I read data with 1 record uploaded ( in the assign fields step , I did not choose "fields names at start of file" and also saved the file with tab delimited text format without field names), it shows as
    Transactions Read:                    2
    Records Read:                         2
    Transactions Written:                 2
    Records Written:                      2
    I uploaded only one record but it reads as 2 records and can not figure out why 2 records?
    Also when I checked display converted data , it shows 2 records .
    First record shows
    TCODE         Transaction Code                                             IE01
    RECORDNAME    IBIP: Name of the Data Transfer Record                       IBIPEQUI
    EQUNR         Equipment Number
    DATSL         Date valid from                                              05072010
    EQTYP         Equipment category                                           H
    EQKTX         Description of technical object                              PNEUMATIC PIPE BENDER
    BEGRU         Technical object authorization group
    EQART         Type of Technical Object                                     MECH-PRESS
    GROES         Size/dimension                                               1000X500X1500MM
    INVNR         Inventory number
    BRGEW         Gross Weight     : IBIP Character Structure                  50
    GEWEI         Weight Unit                                                  KG
    ELIEF         Vendor number
    ANSDT         Acquisition date
    ANSWT         Acquisition Value: IBIP Character Structure
    All the fields following this , are blank.
    2nd record shows
    TCODE         Transaction Code                                             IE01
    RECORDNAME    IBIP: Name of the Data Transfer Record                       IBIPEQUI
    EQUNR         Equipment Number                                             2009
    DATSL         Date valid from
    EQTYP         Equipment category                                           S
    EQKTX         Description of technical object                              1006324
    BEGRU         Technical object authorization group
    EQART         Type of Technical Object
    GROES         Size/dimension                                               20100406
    uploaded values are jumbled in 1st and 2nd record.
    Hope to receive your valuable ideas for finding out the reason and corrective action required.
    Rgds,
    Rajesh
    I
    Edited by: Rajesh63 on Jul 6, 2010 10:37 PM

  • Lsmw - using bapi's (file structure)

    HI,
      I am trying to use LSMW to upload the purchase order using the bapi.
    I am using the Business object - BUS2012
                          Method             - CREATEFROMDATA
                          Message type   - PORDCR
                          Basic type        - PORDCR05
    In source structure - Posource_head is given and in the lower level
    POsource_item is given. 
    In the maintain source fields,
    For POsource_head,  following fields are given,
    IDENT                          C(001)    Identifier
    LIFNR                          C(010)    Vendor
    EKORG                          C(004)    Purch. Org
    EKGRP                          C(003)    Purchasing group
    for Posource_item , following fields are given,
    IDENT                          C(001)    Identifier
    EMATN                          C(018)    MPn material
    NETPR                          C(011)    Net price
    MATKL                          C(009)    Material group
    WERKS                          C(004)    Plant
    DDATE                          C(010)    Delivery date
    Mapping also done.
    In the excel sheet or notepad, how the fields should be ordered.?
    I just need to know the file format which should be specified in the specify file.
    can anyone give the fields and length that i should create in the excel file or notepad?
    Points will be awarded.
    Regardss,
    Vinoth.

    Hi,
    Field should be ordered as per the source structure of your own.
    In header you can have unique data (strictly) and one more file of item whch will be having correpsonding data for header records.
    Length is as per the Data Element.
    Reward if useful!

  • Error REP-52005 while using cgicmd.dat file

    Hi,
    Per Oracle manual I added a simple key to cgicmd.dat
    statement: userid=uid/passwd@db report=stmt2.rdf
    Stopped and Started all 10gAS processes which includes Report service via OEM.
    Then I used the following URL in the browser,
    http:\\bigdaddy\reports\rwservlet?statement, I received the following error:
    REP-52005: The specified key statement does not exist in the key map file.
    Then I used one of the Oracle suppled keys such as oraqa. I received the simnlar message that it could not find key oraqa.
    What I did I need to do to fix this ?
    Thanks.
    Suresh

    Hi all,
    Resolved my own problem. You need to add %* as the last item of your key. From the documentation in cgicmd.dat it is not quite clear what it is supposed to do. So when I changed my key to
    statement: userid=uid/passwd@db report=stmt2.rdf %*
    it worked fine. Also, at least in 10gAS Midtier, you do not need to stop and start OC4J, OC4J_BI_forms or the report server as many have you believe.
    I checked if the key has been parsed by using the showmaps URL and clicking on parsed map file entries to see if the key has everything that I wanted it to have without re-starting anything.
    http://bigdaddy/reports/rwservlet/showmaps
    Suresh

  • How to extend WM view for materail masterial via direct input?

    Hi,
    Currently I'm using LSMW + Recording to extend warehouse management view of material master, but I found that it's not so good,
    My  question is, how to use Direct Input in LSMW to extend warehouse management view of material master? As I don't know how to use direct input, kindly please advise.
    Thanks a lot!

    Hi Ashok,
    Thanks a lot for your advice.
    I tried to use MM50 but no materials can be found, as these materials are totally new when WM go alive, the warehouse management view is not active yet so MM50 can not found any data need to be extended, so is there any method to solve this problem of MM50?
    Kindly please advise again.
    Thanks.

  • How do I use old data files with a new installation in Oracle 9i

    I am in an unenviable position, with an unsupported database.
    We are running Oracle 9i on Windows XP. We are upgrading soon to Oracle 11g on a newer platform, but need to get our development environment working first.
    We lost a system that was running our development database without having a database export. The C drive was placed into a new system as the D drive.
    I have loaded Oracle 9i on the C drive, but I have been unable to determine how to point it to the existing data files on the D drive. My search skills may be the limiting factor here...
    We cannot simply load the drive as C, since the hardware is different.
    What are the steps to point the new database software at the data files on the D drive? Or, how do I copy the old data files into the new Oracle Home and have them recognized properly?
    Thanks for any advice.

    user3930585 wrote:
    I am in an unenviable position, with an unsupported database.
    We are running Oracle 9i on Windows XP. We are upgrading soon to Oracle 11g on a newer platform, but need to get our development environment working first.
    We lost a system that was running our development database without having a database export. The C drive was placed into a new system as the D drive.
    I have loaded Oracle 9i on the C drive, but I have been unable to determine how to point it to the existing data files on the D drive. My search skills may be the limiting factor here...
    We cannot simply load the drive as C, since the hardware is different.
    What are the steps to point the new database software at the data files on the D drive? Or, how do I copy the old data files into the new Oracle Home and have them recognized properly?
    Are you stating that you don't know how to use COPY command?
    Can you recreate same directory structure on new C drive as exist on old C drive?
    Can you then drag & drop copies of the files?

  • How do I use Spinner data as multiple filed input?

    I am creating a dashboard that displays labor load over a 12 month period.  However, in order for the data to be useful the user must be able to enter the number of employees in specific groups.  This can change from month to month over a 12 month period.  In addition, vacation time must be subtracted in order to calculate a true labor availability to compare to the load in the graph.  I can do this with 12 spinners for the available employees and an additional 12 spinners for vacation hours (one for each month).  It would be much simpler if there was a way to use one spinner for the available employees and point that data into different cells in the associated spreadsheet.  Can this be done?

    Hey, thank you! I'll be sure to look into that and post back if I have any trouble.
    Last edited by MutantJohn (2014-09-18 17:52:28)

  • Help required in using same excel file as both Input and Output source

    Hello Programmers, Here I am trying to read, modify and write an excel file using JAVA, I have successfully employed Jakarta POI and read the file but the problem is that I can''t make changes in the same file and save it.
    I can't use the same file for "FileInputStream" and "FileOutputStream" I think this is causing major hurdle. Any kind of suggestion and help is truly appreciated and welcome. Thank you for your time. Here I am posting my code its a bit crude please pardon.
    * @(#)attempt4.java
    * attempt4
    * @author
    * @version 1.00 2008/3/26
    import java.io.*;
    import java.util.*;
    import org.apache.poi.poifs.filesystem.*;
    import org.apache.poi.hssf.usermodel.*;
    public class attempt4 {
    public static void main(String[] args) {
    try{
    File xlFile = new File("C:\\Drifter\\Study\\Krishnan\\Test.xls");
    FileInputStream readFile = new FileInputStream(xlFile);
    POIFSFileSystem fileSys = new POIFSFileSystem(readFile);
    HSSFWorkbook xlSheetBook = new HSSFWorkbook(fileSys);
    for(int i = 0; i < xlSheetBook.getNumberOfSheets(); i++) {
    HSSFSheet sheetNow = xlSheetBook.getSheetAt(i);
    System.out.println("\n Now Opening Sheet Number" + (i+1));
    if(sheetNow.getPhysicalNumberOfRows() > 0) {
    int numOfRows = sheetNow.getLastRowNum();
    int numOfColumns = 0;
    for(int cols = 0; cols < numOfRows; cols++) {
    HSSFRow rowNow = sheetNow.getRow(cols);
    if(rowNow != null) {
    if(numOfColumns < sheetNow.getRow(cols).getLastCellNum()) {
    numOfColumns = sheetNow.getRow(cols).getLastCellNum();
    System.out.println("\n There are " + (numOfRows+1) + " Number of Rows");
    System.out.println("\n There are " + numOfColumns + " Number of Columns");
    for(int j = 0; j < numOfColumns; j++) {
    float colTotal = 0;
    int numOfNumericCells = 0;
    for(int k = 0; k < numOfRows; k++) {
    HSSFRow rowReading = sheetNow.getRow(k);
    if(rowReading != null) {
    HSSFCell cellReading = rowReading.getCell((short)j);
    if(cellReading != null) {
    if(cellReading.getCellType() == 0) {
    colTotal += cellReading.getNumericCellValue();
    numOfNumericCells ++;
    else if(cellReading.getCellType() != 0) {
    cellReading.setCellValue((double) 0.00);
    System.out.println(" \nSum of Column " + (j+1) + " is " + colTotal);
    System.out.println(" \nAverage of Column " + (j+1) + " is " + (colTotal/numOfNumericCells));
    readFile.close();
    catch(FileNotFoundException ex1) {
    ex1.printStackTrace();
    catch(IOException ex2) {
    ex2.printStackTrace();
    catch(NullPointerException ex3) {
    ex3.printStackTrace();
    The above code can successfully read the excel document and caliculates the sum and averages of the columns, can any one please help me in writing the same into the same file in additional rows. Thank you very much for your time.

    May be you can try to create a temporary copy of the file, do your update on it and then overwrite the original.
    Edited by: jgagarin on Jun 3, 2008 6:55 PM

  • I would like to programatically enable Java Plugin in Firefox 19. I do not want to use pluginreg.dat file in Appdata Folder

    I have a need to enable Java Plug-in 6U20 6.0.200.2 in Firefix 19. This version of Java is disabled by Firefox by default since it has few security issues. But still i need that to be enabled. Do we have a method to do it. I do not want to use %Application Data%\Mozilla\Firefox\Profiles\<Random Profile Name>\pluginreg.dat file as this is created under a random profile. Thanks in advance for any help.

    Hi David, Thanks for the quick reply. But i have already gone through the solution that you provided. My requirement here is to automate this. User machines are already installed with the Java 6 U20 which they need it anyway. When i install Firefox, this Plug in should be enabled to the users. I need to use some script / commands to make this happen.

  • Providing users the ability to Merge using a DAT file under Windows 7

    Hello,
    Our organization uses older software that uses Word Templates with Merge Fields, pulling data out of a SQL database.  The software itself is old and out of date, but still works under Windows 7.  The problem I am having is that the software will
    place its own macros inside of Normal.dot to properly merge fields using the Word Templates.
    Each Merge document accesses the application folder and goes into a sub-folder to access a file called WORDDATA.DAT that is the data source for the merge.  Each workstation has their own WORDDATA.DAT file stored locally in C:\APPLICATION\temp\
    In XP (we never used Vista), the proper way to get these merges to work was to do the following:
    1. Provide Power Users (see below) with Modify rights to the main APPLICATION folder and propagate those rights down to all files underneath of it (including WORDDATA.DAT).  We also had to remove inheritable permissions from the root drive (C).
    2. Add Domain Users to Power Users group (for some reason the merges on XP would not work without this) so that anyone logging onto the machine could merge.
    3. These templates required the Low security setting for macros in Word for the merge to work properly.
    The problem I am facing now is that I cannot get the merges to work properly under Windows 7 Pro without giving the user Administrator rights on the local machine.  This is obviously not a good idea.  No matter what I try, nothing seems to work. 
    I've disabled UAC on these machines.  Given Full Control rights to the application folder and all sub-folders and have even gone so far as to make the user the Owner of the application folder.  But no matter what I do, the merge will not work unless
    the user is added to the local Administrators group.  I've also noticed strange behavior with WORDDATA.DAT, where it will not relinquish the Read-Only attribute.  After running 'attrib' and stripping it of Read-Only and System attributes, the file
    reverts to showing Read-Only in the properties.  I don't know if this matters or not, but it appears as if Windows will not let anyone modify that file completely.
    Does anyone have a suggestion for a workaround?  Keep in mind, 1. Disabled UAC, 2. Running the application under Compatibility Mode for XP.
    I realize we are using outdated software and this can cause some issues of course, but the basic principle of merging documents works.  It has nothing to do with the application itself IMO but seems to be more of a security issue.

    I guess I'm completely out of luck on this issue huh?  The basics of the problem are simply that unless the user is added to Administrator local group on the Win7 machine, when the merge runs and has to use WORDDATA.DAT, it cannot and the merge fails. 
    Add the user as an admin and it works but this leaves our systems vulnerable, particularly with users who are happy to just double-click on any old attachment without checking it first.

  • How to use an .xsl file to transform input XML to re-formatted output XML?

    Hello,
    I have a .xml file from a report that I want to use a stylesheet to transform into a different .xml format.
    I am reading that I can create a .xsl file to read my input and then transform it to a new output .xml file.
    How do I load this into the Apps?
    I tried creating a template definition and loading the .xsl in as type 'XSL-TEXT' and also, I added
    <?xml-stylesheet type="text/xsl" href="Transform.xsl"?> to my xml data source. The output looked the same as the input.
    Has anyone done this before? Any suggestions would be great!
    Thanks
    -CC

    This is how I use e4x with HTTPService:
    import mx.collections.XMLListCollection;
    import mx.rpc.events.ResultEvent;
    [Bindable] private var claimsXLC:XMLListCollection;
    private function claimsHandler(evt:ResultEvent):void{
        claimsXLC = new XMLListCollection(evt.result..claim as XMLList);
    XML data is being returned, but I use XMLList to create the XMLListCollection.
    If this post answers your question or helps, please mark it as such.

  • Binding data when using xml data files

    Hello,
    I am pretty new to Flex4 and hope you hang on with my question. MAny thanks:
    I built an application first with PHP connection into a database which essentially listed IP of my company in a grid.
    One could filter the IP depending of technology, type of Ip and so on.
    When clicking in the grid, the details with many more fileds would apprear. This was working niceley as I had my services defined and needed only to drag services in the right place and add here and there some changes in the code
    Now, I wanted to do the same with an xml file instead of a mySQL database so to deploy it a little easier.
    I have the grid and the filtering working nicely.
    But I cannot create the data binding for the details.
    Below is the code. See the line before last where I tested if I could access to the  descriptipn fuield in my arrayCollection (coming from my xml)
    CAn anyone help me, please
    many thanks in advance and best regards
    Peter
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
       xmlns:s="library://ns.adobe.com/flex/spark"
       xmlns:mx="library://ns.adobe.com/flex/mx"
       applicationComplete="myServ.send()" width="900" height="500">
    <fx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    import mx.controls.Alert;
    import mx.events.ListEvent;
    import mx.rpc.events.FaultEvent;
    import mx.rpc.events.ResultEvent;
    import spark.events.TextOperationEvent;
    [Bindable]
    private var myIPList:ArrayCollection;
    protected function myServ_faultHandler(event:FaultEvent):void
    Alert.show("Something went wrong", "Cannot load data");
    protected function myServ_resultHandler(event:ResultEvent):void
    if(event.result.test.IP is ArrayCollection){
    this.myIPList = event.result.test.IP as ArrayCollection;
    }else{
    var buffer:ArrayCollection = new ArrayCollection([event.result.test.IP]);
    this.myIPList = buffer;
    this.searchInput.enabled = false;
    this.searchInputTechnology.enabled = false;
    this.searchInputProvider.enabled = false;
    // serach for IP
    protected function searchInput_changeHandler(event:TextOperationEvent):void
    this.myIPList.filterFunction = filterFunc;
    this.myIPList.refresh();
    private function filterFunc(item:Object):Boolean
    if(String(item.IP).toLowerCase().indexOf(this.searchInput.text.toLowerCase()) > -1){
    return true;
    }else{
    return false;
    //  Search for Technology
    protected function searchInputTechnology_changeHandler(event:TextOperationEvent):void
    this.myIPList.filterFunction = filterFuncTechnology;
    this.myIPList.refresh();
    private function filterFuncTechnology(item:Object):Boolean
    if(String(item.Technology).toLowerCase().indexOf(this.searchInputTechnology.text.toLowerCa se()) > -1){
    return true;
    }else{
    return false;
    //  Search for Provider
    protected function searchInputProvider_changeHandler(event:TextOperationEvent):void
    this.myIPList.filterFunction = filterFuncProvider;
    this.myIPList.refresh();
    private function filterFuncProvider(item:Object):Boolean
    if(String(item.Provider).toLowerCase().indexOf(this.searchInputProvider.text.toLowerCase() ) > -1){
    return true;
    }else{
    return false;
    protected function myDG_changeHandler(event:ListEvent):void
    Alert.show("I Clicked. It should now be possible to see details, damned");
    ]]>
    </fx:Script>
    <fx:Declarations>
    <s:HTTPService id="myServ" url="IP.xml" fault="myServ_faultHandler(event)" result="myServ_resultHandler(event)"/>
    </fx:Declarations>
    <mx:DataGrid id="myDG" change="myDG_changeHandler(event)" x="37" y="134" width="814" height="159" dataProvider="{this.myIPList}">
    <mx:columns>
    <mx:DataGridColumn headerText="IP" dataField="IP"/>
    <mx:DataGridColumn headerText="short description" dataField="detail"/>
    <mx:DataGridColumn headerText="type" dataField="type"/>
    <mx:DataGridColumn headerText="Provider" dataField="Provider"/>
    <mx:DataGridColumn headerText="Technology" dataField="Technology"/>
    </mx:columns>
    </mx:DataGrid>
    <s:HGroup x="33" y="74" width="152" height="41" verticalAlign="middle">
    <mx:Spacer width="100%">
    </mx:Spacer>
    <s:Label text="IP"/>
    <s:TextInput id="searchInput" change="searchInput_changeHandler(event)" width="103"/>
    </s:HGroup>
    <s:HGroup x="686" y="74" width="153" height="41" verticalAlign="middle">
    <mx:Spacer width="100%">
    </mx:Spacer>
    <s:Label text="Technology"/>
    <s:TextInput id="searchInputTechnology" change="searchInputTechnology_changeHandler(event)" width="94"/>
    </s:HGroup>
    <s:HGroup x="519" y="74" width="153" height="41" verticalAlign="middle">
    <mx:Spacer width="100%">
    </mx:Spacer>
    <s:Label text="Provider"/>
    <s:TextInput id="searchInputProvider" change="searchInputProvider_changeHandler(event)" width="94"/>
    </s:HGroup>
    <s:Label x="135" y="38" text="IP Road Map" fontSize="29" color="#524E4E"/>
    <s:TextArea id="myText" x="37" y="315" width="204" text="{this.myIPList}" height="164"/>
    <mx:Image x="33" y="18" width="74" height="57" id="STLogo" source="file:/Users/peterhirt/Pictures/stlogo.png"/>
    </s:Application>
    Here at tzhe end I append one record out of the xml files I used
    <?xml version="1.0" encoding="utf-8" ?>
    <test>
        <IP>
            <IP>USB2 PHY</IP>
            <detail>single port </detail>
            <type>USB</type>
            <Provider>TR&amp;D</Provider>
            <Technology>65lp</Technology>
            <maturity_status>MAT20</maturity_status>
            <status_date>Q4/09</status_date>
            <next_Maturity>MAT30</next_Maturity>
            <next_Date></next_Date>
            <HED>y</HED>
            <HED_criticality>2</HED_criticality>
            <HED_MAT20_request>Q4/09</HED_MAT20_request>
            <CCI></CCI>
            <CCI_criticality></CCI_criticality>
            <_CCI_MAT20_request></_CCI_MAT20_request>
            <APG></APG>
            <APG_criticality></APG_criticality>
            <APG_MAT20_request></APG_MAT20_request>
            <STE></STE>
            <STE_criticality></STE_criticality>
            <STE_MAT20_request></STE_MAT20_request>
            <IMS></IMS>
            <IMS_criticality></IMS_criticality>
            <IMS_MAT20_request></IMS_MAT20_request>
        </IP>

    Hi Kevin,
    the current XML export version is admittedly not suitable for handling HTML data, as it doesn´t put any data inside CDATA sections.
    How can I strip out this HTML using the XML export?
    I´m not aware of this functionality, but I´m sure it would have to be integrated into the respective "includes" files in order to become effective.
    However, you might consider using the manual "converting database queries to XML" approach explained on this page: http://labs.adobe.com/technologies/spry/samples/utils/query2xml.html -- this will give you notably more freedom to e.g. preprocess some data before it´s getting stuffed inside an XML node.
    I am pulling RSS feeds from news sites and storing the rss items in a database
    Would it be possible to rather sanitize the data before it´s getting stored in the database ?
    Cheers,
    Günter Schenk
    Adobe Community Expert, Dreamweaver

Maybe you are looking for