How to Reload XML file in ActionScript?

Hi,
I have a problem with action script.
How can I reload/update xml file per 5 minutes in actionscript?
isn't there someway i can do to complete the script?
my script:
====================================
delay = 3000;
function loadXML(loaded) {
     if (loaded) {
          xmlNode = this.firstChild;
          schedule = [];
          remark = [];
          term = [];
          total = xmlNode.childNodes.length;
          for (i=0; i<total; i++) {
               schedule[i] = xmlNode.childNodes[i].childNodes[4].firstChild.nodeValue;
               remark[i] = xmlNode.childNodes[i].childNodes[6].firstChild.nodeValue;
               term[i] = xmlNode.childNodes[i].childNodes[7].firstChild.nodeValue;
          firstData();
     } else {
          content = "file not loaded!";
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("mydata.xml");
p = 0;
function nextData() {
     if (p<(total-1)) {
          p++;         
          schedule_txt.text = schedule[p];
          remark_txt.text = remark[p];
          term_txt.text = term[p];
          slideshow();
function firstData() {
     schedule_txt.text = schedule[p];
     remark_txt.text = remark[p];
     term_txt.text = term[p];
     slideshow();
function slideshow() {
     myInterval = setInterval(pause_slideshow, delay);
     function pause_slideshow() {
          clearInterval(myInterval);
          if (p == (total-1)) {
               p = 0;
               firstData();
          } else {
               nextData();
===================================

Take a similar approach with another setInterval and have your xmlData loading code be in the function that the interval calls.

Similar Messages

  • Reading an xml file in actionscript using flex3

    plzz tell me how to read an xml file in actionscript using flex3.......

    One possible option to parse an xml-file to a flex XML object:
    public function parseConXML(source:String):void
                    xmlLoader = new URLLoader();
                    xmlLoader.load(new URLRequest(source));
                      // Eventlistener: if URL loaded --> onLoadComplete function
                      xmlLoader.addEventListener(Event.COMPLETE, xmlLoadComplete);
                public function xmlLoadComplete(evt:Event):void{               
                    var xml:XML = new XML();
                     // ignore comments in XML-File
                    XML.ignoreComments = true;  
                       //ignore whitespaces in XML-File
                     XML.ignoreWhitespace = true;
                    // XML-Objekt erstellen
                    xml = new XML(evt.target.data);
                   //AFTERWARDS use your xml as your wish

  • How to refresh XML file  from my client machine

    Hai All
    I have temp.XML and temp.XSL template in our server machine.
    when i give a print from client machine first time it gives the record,and next time it did not get refresh.Always it shows the previous records in the browser.But when i go into the server machine and click on temp.xml,it shows the current record(correct records)
    How to refresh XML file  from my client machine?
    Regards
    Dhina

    You never delete a Time Machine backup by dragging it to the Trash. You are supposed to use the TM application to manage the backups. What you will need to do now is to simply erase the drive using Disk Utility.

  • How to generate xml-file for SAP Fiori (UI add-on) with Solution Manager 7.0.1?

    Hello Guru,
    could you please help with my issue with Fiori Installation.
    We want to install SAP Fiori Front-End (GW+UI) on the Sandbox system with SAP Netweaver 7.3.1. (SP14)
    Gateway component (SAP GW CORE 200 SP10) was installed without any problems.
    But I need to install UI-add-on (NW UI Extensions v1.0) and when I try to install it via SAINT, transaction said me that I need to generate xml-file for it (as in General notes for UI add-on mentioned).
    But I have Solution Manager 7.0.1 and in MOPZ for this version I do not have option  "install Add-on" as it written in Guide for ui add-on installation.
    Could you please help me with advice how to generate xml-file for UI add-on installation on SolMan v.7.0.1?
    If where is no way, but only to upgrade Solution Manager, maybe somebody could give me xml-file for your system (for NW 731) and I will change it to my needs, I will be very grateful!
    Thanks in advance for any help!!!
    Bets regards,
    Natalia.

    Hello Guru,
    could you please help with my issue with Fiori Installation.
    We want to install SAP Fiori Front-End (GW+UI) on the Sandbox system with SAP Netweaver 7.3.1. (SP14)
    Gateway component (SAP GW CORE 200 SP10) was installed without any problems.
    But I need to install UI-add-on (NW UI Extensions v1.0) and when I try to install it via SAINT, transaction said me that I need to generate xml-file for it (as in General notes for UI add-on mentioned).
    But I have Solution Manager 7.0.1 and in MOPZ for this version I do not have option  "install Add-on" as it written in Guide for ui add-on installation.
    Could you please help me with advice how to generate xml-file for UI add-on installation on SolMan v.7.0.1?
    If where is no way, but only to upgrade Solution Manager, maybe somebody could give me xml-file for your system (for NW 731) and I will change it to my needs, I will be very grateful!
    Thanks in advance for any help!!!
    Bets regards,
    Natalia.

  • How to convert XML file to an internal table ?

    Hi All,
    I want to do a batch input program. The source data would be given as an excel file . I would like to know how to convert XML file to internal table properly. Please help me out..
    Thanking you in advance ..
    Shankara Narayanan T.V

    Hi Shankar,
    use 'ALSM_EXCEL_TO_INTERNAL_TABLE' FM.
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
             EXPORTING
                  filename                = p_file1
                  i_begin_col             = '1'
                  i_begin_row             = '5'
                  i_end_col               = '40'
                  i_end_row               = '16'
             TABLES
                  intern                  = it_intern
             EXCEPTIONS
                  inconsistent_parameters = 1
                  upload_ole              = 2
                  OTHERS                  = 3.
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    LOOP AT it_intern.
          AT NEW row.
            CLEAR it_intern.
          ENDAT.
            CASE lv_flag.
        Production Version
              WHEN  1.
                it_master-matnr      =   it_intern-value.     
              WHEN  2.
                it_master-werks      = it_intern-value.
              WHEN  3.
                it_master-verid      = it_intern-value.
              WHEN  4.
                it_master-text1      = it_intern-value.
              WHEN  5.
                it_master-fdate     = it_intern-value.
          AT END OF row.
            APPEND it_master.
          ENDAT.
        ENDLOOP.
    -Anu
    Message was edited by:
            Anupama Reddy

  • How to create xml file from Oracle and sending the same xml file to an url

    How to create xml file from Oracle and sending the same xml file to an url

    SQL/XML (XMLElement, XMLForest, XMLAgg, etc) and UTL_HTTP.
    Whether that works for you with the version of Oracle you have, your requirements, and needs is another story. A little detail goes a long way.

  • How to read .xml file from embedded .swf(flash output) in captivate

    I have been trying to read .xml file from the .swf (Flash output) that is embedded within the captivate file but no luck yet . Please if anyone got any clue on how get this thing done using Action script 3.0 then let me know. I am using Adobe Captivate 5.5 at present and Flash CS 5.5.
    I am well aware about how to read .xml file through action script 3.0 in flash but when insert the same flash in captivate and publish nothing comes in captivate output. I would higly appreciate if anyone could help me out with that.
    Here is is graphical demonstration of my query :
    Message was edited by: captainmkv

    Hi Captainmkv,
    Does the information in this post cover what you're trying to do: http://forums.adobe.com/message/5081928#5081928
    Tristan,

  • How to upload XML file from Application server.

    Hi,
    How to upload XML file from Application server.Please tell me as early as possible.
    Regards,
    Sagar.

    Hi,
    parameters : p_file type ibipparms-path obligatory.
    ***DOWNLOAD---->SAP INTO EXCEL
    filename1 = p_file.
    call function 'GUI_DOWNLOAD'
      exporting
      BIN_FILESIZE                    =
        filename                        = filename1
        filetype                        = 'ASC'
      APPEND                          = ' '
      WRITE_FIELD_SEPARATOR           = 'X'
      HEADER                          = '00'
      TRUNC_TRAILING_BLANKS           = ' '
      WRITE_LF                        = 'X'
      COL_SELECT                      = ' '
      COL_SELECT_MASK                 = ' '
      DAT_MODE                        = ' '
      CONFIRM_OVERWRITE               = ' '
      NO_AUTH_CHECK                   = ' '
      CODEPAGE                        = ' '
      IGNORE_CERR                     = ABAP_TRUE
      REPLACEMENT                     = '#'
      WRITE_BOM                       = ' '
      TRUNC_TRAILING_BLANKS_EOL       = 'X'
      WK1_N_FORMAT                    = ' '
      WK1_N_SIZE                      = ' '
      WK1_T_FORMAT                    = ' '
      WK1_T_SIZE                      = ' '
    IMPORTING
      FILELENGTH                      =
      tables
        data_tab                        = it_stock
      FIELDNAMES                      =
    exceptions
       file_write_error                = 1
       no_batch                        = 2
       gui_refuse_filetransfer         = 3
       invalid_type                    = 4
       no_authority                    = 5
       unknown_error                   = 6
       header_not_allowed              = 7
       separator_not_allowed           = 8
       filesize_not_allowed            = 9
       header_too_long                 = 10
       dp_error_create                 = 11
       dp_error_send                   = 12
       dp_error_write                  = 13
       unknown_dp_error                = 14
       access_denied                   = 15
       dp_out_of_memory                = 16
       disk_full                       = 17
       dp_timeout                      = 18
       file_not_found                  = 19
       dataprovider_exception          = 20
       control_flush_error             = 21
       others                          = 22
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    Regards,
    Deepthi.

  • How to use XML file as a source in BODS?

    How to use XML file as a source in BODS?
    Could anyone please help me out for this?

    exmpale XML file :
    <?xml version="1.0" encoding="utf-8"?>
    <MM_RECON_REPORT>
      <RPT_DATE>str1234</RPT_DATE>
      <RPT_ROW>
        <SRC_EXT_REC_COUNT>123.45</SRC_EXT_REC_COUNT>
        <PRE_TRANS_REC_COUNT>123.45</PRE_TRANS_REC_COUNT>
        <POST_TRANS_REC_COUNT>123.45</POST_TRANS_REC_COUNT>
        <PASS_BAPI_REC_COUNT>123.45</PASS_BAPI_REC_COUNT>
        <TOT_SAP_RETURN>123.45</TOT_SAP_RETURN>
        <TOT_SAP_SUCC_REC_COUNT>123.45</TOT_SAP_SUCC_REC_COUNT>
        <PARTIAL_SUCC_REC_COUNT>123.45</PARTIAL_SUCC_REC_COUNT>
        <TOT_SAP_ERR_REC_COUNT>123.45</TOT_SAP_ERR_REC_COUNT>
        <MM_SUCC_REC_COUNT>123.45</MM_SUCC_REC_COUNT>
        <MM_ERR_REC_COUNT>123.45</MM_ERR_REC_COUNT>
        <CLS_SUCC_REC_COUNT>123.45</CLS_SUCC_REC_COUNT>
        <CLS_ERR_REC_COUNT>123.45</CLS_ERR_REC_COUNT>
        <CP_SUCC_REC_COUNT>123.45</CP_SUCC_REC_COUNT>
        <CP_ERR_REC_COUNT>123.45</CP_ERR_REC_COUNT>
        <VMS_SUCC_REC_COUNT>123.45</VMS_SUCC_REC_COUNT>
        <VMS_ERR_REC_COUNT>123.45</VMS_ERR_REC_COUNT>
        <SOURCE_TYPE>str1234</SOURCE_TYPE>
        <RUN_ID>123.45</RUN_ID>
        <RUN_SEQ>123.45</RUN_SEQ>
        <RUN_DATE>2012-12-13</RUN_DATE>
      </RPT_ROW>
    </MM_RECON_REPORT>
    example XSD file :
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema  xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <xsd:annotation>
        <xsd:documentation xml:lang="en">
        XML Schema generated by Data Services
        </xsd:documentation>
      </xsd:annotation>
    <xsd:simpleType name="DIType-decimal-28-0">
      <xsd:restriction base="xsd:decimal">
        <xsd:totalDigits value="28"/>
        <xsd:fractionDigits value="0"/>
      </xsd:restriction>
    </xsd:simpleType>
    <xsd:simpleType name="DIType-varchar-200">
      <xsd:restriction base="xsd:string">
      <xsd:maxLength value="200"/>
      </xsd:restriction>
      </xsd:simpleType>
    <xsd:simpleType name="DIType-varchar-10">
      <xsd:restriction base="xsd:string">
        <xsd:maxLength value="10"/>
      </xsd:restriction>
    </xsd:simpleType>
    <xsd:simpleType name="DATE">
      <xsd:restriction base="xsd:date">
      </xsd:restriction>
      </xsd:simpleType>
    <xsd:element name="MM_RECON_REPORT" >
        <xsd:complexType>
          <xsd:sequence>
            <xsd:element ref="RPT_DATE" minOccurs="0" maxOccurs="1"/>
            <xsd:element ref="RPT_ROW"  minOccurs="0" maxOccurs="unbounded"/>
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
    <xsd:element name="RPT_DATE" type = "DIType-varchar-200"/>
    <xsd:element name="RPT_ROW" >
        <xsd:complexType>
          <xsd:sequence>
            <xsd:element ref="SRC_EXT_REC_COUNT" />
            <xsd:element ref="PRE_TRANS_REC_COUNT" />
            <xsd:element ref="POST_TRANS_REC_COUNT" />
            <xsd:element ref="PASS_BAPI_REC_COUNT" />
            <xsd:element ref="TOT_SAP_RETURN" />
            <xsd:element ref="TOT_SAP_SUCC_REC_COUNT" />
            <xsd:element ref="PARTIAL_SUCC_REC_COUNT" />
            <xsd:element ref="TOT_SAP_ERR_REC_COUNT" />
            <xsd:element ref="MM_SUCC_REC_COUNT" />
            <xsd:element ref="MM_ERR_REC_COUNT" />
            <xsd:element ref="CLS_SUCC_REC_COUNT" />
            <xsd:element ref="CLS_ERR_REC_COUNT" />
            <xsd:element ref="CP_SUCC_REC_COUNT" />
            <xsd:element ref="CP_ERR_REC_COUNT" />
            <xsd:element ref="VMS_SUCC_REC_COUNT" />
            <xsd:element ref="VMS_ERR_REC_COUNT" />
            <xsd:element ref="SOURCE_TYPE" />
            <xsd:element ref="RUN_ID" />
            <xsd:element ref="RUN_SEQ" />
            <xsd:element ref="RUN_DATE" />
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
    <xsd:element name="SRC_EXT_REC_COUNT" type = "DIType-decimal-28-0"/>
    <xsd:element name="PRE_TRANS_REC_COUNT" type = "DIType-decimal-28-0"/>
    <xsd:element name="POST_TRANS_REC_COUNT" type = "DIType-decimal-28-0"/>
    <xsd:element name="PASS_BAPI_REC_COUNT" type = "DIType-decimal-28-0"/>
    <xsd:element name="TOT_SAP_RETURN" type = "DIType-decimal-28-0"/>
    <xsd:element name="TOT_SAP_SUCC_REC_COUNT" type = "DIType-decimal-28-0"/>
    <xsd:element name="PARTIAL_SUCC_REC_COUNT" type = "DIType-decimal-28-0"/>
    <xsd:element name="TOT_SAP_ERR_REC_COUNT" type = "DIType-decimal-28-0"/>
    <xsd:element name="MM_SUCC_REC_COUNT" type = "DIType-decimal-28-0"/>
    <xsd:element name="MM_ERR_REC_COUNT" type = "DIType-decimal-28-0"/>
    <xsd:element name="CLS_SUCC_REC_COUNT" type = "DIType-decimal-28-0"/>
    <xsd:element name="CLS_ERR_REC_COUNT" type = "DIType-decimal-28-0"/>
    <xsd:element name="CP_SUCC_REC_COUNT" type = "DIType-decimal-28-0"/>
    <xsd:element name="CP_ERR_REC_COUNT" type = "DIType-decimal-28-0"/>
    <xsd:element name="VMS_SUCC_REC_COUNT" type = "DIType-decimal-28-0"/>
    <xsd:element name="VMS_ERR_REC_COUNT" type = "DIType-decimal-28-0"/>
    <xsd:element name="SOURCE_TYPE" type = "DIType-varchar-10"/>
    <xsd:element name="RUN_ID" type = "DIType-decimal-28-0"/>
    <xsd:element name="RUN_SEQ" type = "DIType-decimal-28-0"/>
    <xsd:element name="RUN_DATE" type = "xsd:date"/>
    </xsd:schema>
    compare the xml vs xsd for better understanding

  • HOw to update XML file residing in DAM by component JSP in run-time?

    i have made a component which reads xml file residing in DAM.
    Content Author can fill some values in dialog of this component, as soon as author provide the values,i have to update these values in XML file and component reloadsby reading the updated xml file.
    i am trying to achieve this by making object of XML file and giving it's path., but i ma unable to access the XML file.
    Can anyone help me out to how to update XML file by component JSP in run-time?

    Now the changed data must be exported back into the XML file, meaning that the content of certain elements must be updated. How can this be done with XSLT?
    XSLT approach:  check these online tutorial
    http://www.xml.com/pub/a/2000/08/02/xslt/index.html
    http://www.xml.com/pub/a/2000/06/07/transforming/index.html
    ABAP approach:
    for example you have the xml (original) in a string called say xml_out .
    data: l_xml  type ref to cl_xml_document ,
            node type ref to if_ixml_node  .
    create object l_xml.
    call method l_xml->parse_string
      exporting
        stream = xml_out.
    node = l_xml->find_node(
        name   = 'IDENTITY'
       ROOT   = ROOT
    l_xml->set_attribute(
        name    = 'Name'
        value   = 'Charles'
        node    = node
    (the above example reads the element IDENTITY and sets attribute name/value to the same)
    like wise you can add new elements starting from IDENTITY using various methods available in class CL_XML_DOCUMENT
    so how do I access the XML file in order to update it?
    you have already read this XML into a ABAP variable right?
    Sorry couldnt understand your whole process, why do you need to read local XML file?
    Raja

  • How to send XML file to https server using POST

    Hi, I am having an requirement, that I have to connect to https server and I have to pass an input XML file as a response server will give me output XML file.
    The certificate validation part is over, I am using FileInputStream to read the XML file and attaching this to connection.getOutputStream(); but server is throwing me DTD does n't match.
    Can any body tell me how to send XML file, I have to use any DOM parser to send the XML file, suggest me and give me sample code.
    Thanks,

    Can anybody give me the solution

  • How to read xml file as shown below.

    Hello,
    I am using flash builder 4 and currently working on implementing AIR application.
    I need to read xml file data.
    Normal xml files are easy to read and i am much more aware of it.
    But can any one have idea how to read XML file which is given below.
    <node>
    <key>ID</key>
    <integer>1</integer>
    <key>Name</key>
    <string>Dhwani</string>
    <key>Postno</key>
    <integer>20</integer>
    <key>deskname</key>
    <string>flex</string>
    <key>empid</key>
    <integer>25</integer>
    <key>projectname</key>
    <string>abc</string>
    </node>
    Here i have xml file in form of key value pair. <key> node shows name of the key and after that <integer> or <string> node are the value for that specific key.
    if i select node.key then it shows me all the keys. and from that i cant make out what is the value for key ID.
    Is there any way to take first node and then second. i mean first i ll take value of key and store it into some arraycollection. and then value will be stored.
    Any help is appreciated.. Looking for positive reply.
    Thanks
    Dhwani

    There are different methods to access XML data which have pro's and cons. Let us know more about what you want to do and we can help you.

  • How to read XML file and write into another XML file

    Hi all, I am new to JAVAXML.
    My problem is I have to read one XML file and take some Nodes from that and write these nodes into another XML file...
    I solved, how to read XML file
    But I don't know how to Write nodes into another XML.
    Can anyone help in this???
    Thanks in advance..

    This was answered a bit ago. There was a thread called "XML Mergine" that started on Sept 14th. It has a lot of information about what it takes to copy nodes from one XML Document object into another.
    Dave Patterson

  • How to convert XML file to PDF

    Hi there,
    Does anyone know by any chance, how to covert XML file to PDF? Thanks

    Hello,
    You can convert most of the files in PDF by using the Print menu.
    Open the file you want to save in PDF and choose in the menu bar File > Print....
    You will see a will the Print window and at the left, click on the PDF button.
    Choose in the menu “Save as PDF...”
    Insert the name and you can also set security settings (like a password) and click on the “Save” button.
    Hope this will help.
    EDIT : (oups, dsimagry posted as the same time of me)

  • How to Download XML File to internal table

    Hi Friends,
    This is my urgent requirement. How to download XML File to Internal table.
    regards
    pauldharma

    Hai,
    Please check this Link
    http://www.sap-img.com/abap/upload-direct-excel.htm
    PARAMETERS: filename LIKE rlgrap-filename MEMORY ID M01,
                begcol TYPE i DEFAULT 1 NO-DISPLAY,
                begrow TYPE i DEFAULT 1 NO-DISPLAY,
                endcol TYPE i DEFAULT 100 NO-DISPLAY,
                endrow TYPE i DEFAULT 32000 NO-DISPLAY.
    * Tick don't append header
    PARAMETERS: kzheader AS CHECKBOX.
    DATA: BEGIN OF intern OCCURS 0.
            INCLUDE STRUCTURE  alsmex_tabline.
    DATA: END OF intern.
    DATA: BEGIN OF intern1 OCCURS 0.
            INCLUDE STRUCTURE  alsmex_tabline.
    DATA: END OF intern1.
    DATA: BEGIN OF t_col OCCURS 0,
           col LIKE alsmex_tabline-col,
           size TYPE i.
    DATA: END OF t_col.
    DATA: zwlen TYPE i,
          zwlines TYPE i.
    DATA: BEGIN OF fieldnames OCCURS 3,
            title(60),
            table(6),
            field(10),
            kz(1),
          END OF fieldnames.
    * No of columns
    DATA: BEGIN OF data_tab OCCURS 0,
           value_0001(50),
           value_0002(50),
           value_0003(50),
           value_0004(50),
           value_0005(50),
           value_0006(50),
           value_0007(50),
           value_0008(50),
           value_0009(50),
           value_0010(50),
           value_0011(50),
           value_0012(50),
           value_0013(50),
           value_0014(50),
           value_0015(50),
           value_0016(50),
           value_0017(50),
           value_0018(50),
           value_0019(50),
           value_0020(50),
           value_0021(50),
           value_0022(50),
           value_0023(50),
           value_0024(50),
           value_0025(50),
           value_0026(50),
           value_0027(50),
           value_0028(50),
           value_0029(50),
           value_0030(50),
           value_0031(50),
           value_0032(50),
           value_0033(50),
           value_0034(50),
           value_0035(50),
           value_0036(50),
           value_0037(50),
           value_0038(50),
           value_0039(50),
           value_0040(50),
           value_0041(50),
           value_0042(50),
           value_0043(50),
           value_0044(50),
           value_0045(50),
           value_0046(50),
           value_0047(50),
           value_0048(50),
           value_0049(50),
           value_0050(50),
           value_0051(50),
           value_0052(50),
           value_0053(50),
           value_0054(50),
           value_0055(50),
           value_0056(50),
           value_0057(50),
           value_0058(50),
           value_0059(50),
           value_0060(50),
           value_0061(50),
           value_0062(50),
           value_0063(50),
           value_0064(50),
           value_0065(50),
           value_0066(50),
           value_0067(50),
           value_0068(50),
           value_0069(50),
           value_0070(50),
           value_0071(50),
           value_0072(50),
           value_0073(50),
           value_0074(50),
           value_0075(50),
           value_0076(50),
           value_0077(50),
           value_0078(50),
           value_0079(50),
           value_0080(50),
           value_0081(50),
           value_0082(50),
           value_0083(50),
           value_0084(50),
           value_0085(50),
           value_0086(50),
           value_0087(50),
           value_0088(50),
           value_0089(50),
           value_0090(50),
           value_0091(50),
           value_0092(50),
           value_0093(50),
           value_0094(50),
           value_0095(50),
           value_0096(50),
           value_0097(50),
           value_0098(50),
           value_0099(50),
           value_0100(50).
    DATA: END OF data_tab.
    DATA: tind(4) TYPE n.
    DATA: zwfeld(19).
    FIELD-SYMBOLS: <fs1>.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR filename.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
           EXPORTING
                mask      = '*.xls'
                static    = 'X'
           CHANGING
                file_name = filename.
    START-OF-SELECTION.
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
           EXPORTING
                filename                = filename
                i_begin_col             = begcol
                i_begin_row             = begrow
                i_end_col               = endcol
                i_end_row               = endrow
           TABLES
                intern                  = intern
           EXCEPTIONS
                inconsistent_parameters = 1
                upload_ole              = 2
                OTHERS                  = 3.
      IF sy-subrc <> 0.
        WRITE:/ 'Upload Error ', SY-SUBRC.
      ENDIF.
    END-OF-SELECTION.
      LOOP AT intern.
        intern1 = intern.
        CLEAR intern1-row.
        APPEND intern1.
      ENDLOOP.
      SORT intern1 BY col.
      LOOP AT intern1.
        AT NEW col.
          t_col-col = intern1-col.
          APPEND t_col.
        ENDAT.
        zwlen = strlen( intern1-value ).
        READ TABLE t_col WITH KEY col = intern1-col.
        IF sy-subrc EQ 0.
          IF zwlen > t_col-size.
            t_col-size = zwlen.
    *                          Internal Table, Current Row Index
            MODIFY t_col INDEX sy-tabix.
          ENDIF.
        ENDIF.
      ENDLOOP.
      DESCRIBE TABLE t_col LINES zwlines.
      SORT intern BY row col.
      IF kzheader = 'X'.
        LOOP AT intern.
          fieldnames-title = intern-value.
          APPEND fieldnames.
          AT END OF row.
            EXIT.
          ENDAT.
        ENDLOOP.
      ELSE.
        DO zwlines TIMES.
          WRITE sy-index TO fieldnames-title.
          APPEND fieldnames.
        ENDDO.
      ENDIF.
      SORT intern BY row col.
      LOOP AT intern.
        IF kzheader = 'X'
        AND intern-row = 1.
          CONTINUE.
        ENDIF.
        tind = intern-col.
        CONCATENATE 'DATA_TAB-VALUE_' tind INTO zwfeld.
        ASSIGN (zwfeld) TO <fs1>.
        <fs1> = intern-value.
        AT END OF row.
          APPEND data_tab.
          CLEAR data_tab.
        ENDAT.
      ENDLOOP.
      CALL FUNCTION 'DISPLAY_BASIC_LIST'
           EXPORTING
                file_name     = filename
           TABLES
                data_tab      = data_tab
                fieldname_tab = fieldnames.
    *-- End of Program
    http://sap.ittoolbox.com/groups/technical-functional/sap-dev/excel-file-download-to-an-internal-table-in-sap-crm-1719453#
    tables: zinv_release,
    zpo_release.
    ** decleration of data
    DATA: BEGIN OF my_tab OCCURS 0.
    INCLUDE STRUCTURE zinv_release.
    DATA: END OF my_tab.
    *DATA: hex_tab TYPE x VALUE '09'.
    DATA: rec(200)."'/usr/test.dat'.
    DATA:
    zhours(20) TYPE c,
    MINS(20) type c. "decimals.
    data: coma.
    coma = ','.
    SELECTION-SCREEN BEGIN OF BLOCK txt
    WITH FRAME TITLE text-001.
    PARAMETERS: dsn(60) DEFAULT '\\sapdev01\prod\'.
    SELECTION-SCREEN END
    OF BLOCK txt.
    *using a dataset to get text
    OPEN DATASET dsn FOR INPUT IN TEXT MODE.
    IF sy-subrc = 0.
    DO.
    READ DATASET dsn INTO rec.
    IF sy-subrc <> 0.
    EXIT.
    ENDIF.
    split rec at coma into
    zpo_release-REL_GRP
    zpo_release-REL_CODE
    zpo_release-RESPREL
    zpo_release-ALTREL
    zpo_release-MANAGER
    ZHOURS
    MINS
    zpo_release-FROMTIME
    zpo_release-TOTIME
    zpo_release-EXCLWKENDS.
    move zpo_release-REL_GRP to my_tab-REL_GRP.
    move zpo_release-REL_CODE to my_tab-REL_CODE.
    move zpo_release-RESPREL to my_tab-RESPREL.
    move zpo_release-ALTREL to my_tab-ALTREL.
    move zpo_release-MANAGER to my_tab-MANAGER.
    move ZHOURS to my_tab-ZHOURS.
    move MINS to my_tab-mins.
    move zpo_release-FROMTIME to my_tab-fromtime.
    move zpo_release-TOTIME to my_tab-totime.
    move zpo_release-EXCLWKENDS to my_tab-exclwkends.
    APPEND my_tab.
    ENDDO.
    INSERT zpo_release FROM TABLE my_tab ACCEPTING DUPLICATE KEYS.
    ** DELETE zmm_ppa_cc FROM TABLE tab.
    ** INSERT zzzak_emp FROM TABLE my_tab ACCEPTING DUPLICATE KEYS.
    IF sy-subrc = 0.
    MESSAGE i000(zv) WITH 'File Successful stored in DB.' '' '' ''.
    ** ELSE.
    MESSAGE i000(zv) WITH 'File already stored in DB.' '' '' ''.
    endif.
    ENDIF.
    reward if helpful
    raam

Maybe you are looking for

  • Weird problem trying to install XP using Boot Camp 3.0.1

    Hi everyone, first post here. I have been trying to install XP in my Mac Pro using Boot Camp and a very strange thing happened. I created the partition allright, I inserted my Windows XP cd, hit install, the computer restarted and that´s when it froz

  • Com. Channel of type XI: URL and logon

    Hi I am stuck with a set of scenarios and business processes in XI. Just to give an overview: I have a business process in XI which I would like to be called from several other processes. But I would like to do this without replicating the informatio

  • How can I create updateable views

    Hi, When I create a new page using form --> master detail form, I put one view as the master table and another view as the detail table. By default, the detail table is set as the type SQL Query(updateable report). I guess this is the reason I can ad

  • LR4.0: Library Grid Compact Cells view shows just numbers instead of filename, etc.

    RAW files (Red) no longer show their filenames in the Library Grid Compact Cells view (now just shows numbers)! JPGs (Green & Blue) show nothing at all, including ratings and Pick status, and the Develops are gone. This was after having imported a LR

  • Restricting User defined Field  for certain user

    Hi experts I have a field name U_JobNumber at header level of Item Master Data. Can we make visible for certain user ? Is this possible . Thank you in advance Bishal