How to read mutiple excel columns from clipboard and populate table control

Hi All,
I have a requirement to populate two columns in table control from excel using clipboard. (Copy two columns from excel and then, click on a button on the screen and table control's two columns should be filled).
I am using FM CLPB_IMPORT to get clipboard values.
eg: I am getting clipboard values as        val1#val2
                                                                 val3#val4   
where each row is a row in excel and # indicates the columns.
The problem here is that I am not able to split val1 and val2 using the SPLIT statement using # character.
Any ideas will be appreciated.
Regards,
Arun Mohan

Hi,
Try suing the below code instead of "#" in the SPLIT statement.
CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.
Regards,
Naveen
Edited by: Naveen Kumar on May 13, 2010 1:48 AM

Similar Messages

  • How to read only particualr columns from excel sheet to internal table

    Hi,
    I have and excel sheet which has around 20 columns, in which i want to read only 6 columns. They are at different column positions, means the 1st column, 6thcolumn, 8th column so on..
    Can we do this in sap? do we have any FM to do this?
    Thanks.
    Praveena.

    hi,
    Use the below logic to fetch the data into internal table..You need to read the data cell by cell and update the internal table,
    DATA l_count TYPE sy-tabix.
       CONSTANTS: lc_begin_col TYPE i VALUE '1',
                  lc_begin_row TYPE i VALUE '2',
                  lc_end_col   TYPE i VALUE '2',
                  lc_end_row   TYPE i VALUE '3000'.
      CLEAR p_i_excel_data. REFRESH p_i_excel_data.
    * Function module to read excel file and convert it into internal table
       CALL FUNCTION 'KCD_EXCEL_OLE_TO_INT_CONVERT'
         EXPORTING
           filename                = p_p_file
           i_begin_col             = lc_begin_col
           i_begin_row             = lc_begin_row
           i_end_col               = lc_end_col
           i_end_row               = lc_end_row
         TABLES
           intern                  = i_data
         EXCEPTIONS
           inconsistent_parameters = 1
           upload_ole              = 2
           OTHERS                  = 3.
    * Error in file upload
       IF sy-subrc NE 0 .
         MESSAGE text-006 TYPE 'E'.
         EXIT.
       ENDIF.
       IF i_data[] IS INITIAL .
         MESSAGE text-007 TYPE 'E'.
         EXIT.
       ELSE.
         SORT i_data BY row col .
    * Loop to fill data in Internal Table
         LOOP AT i_data .
           MOVE i_data-col TO l_count .
           ASSIGN COMPONENT l_count OF STRUCTURE p_i_excel_data TO <fs_source> .
           MOVE i_data-value TO <fs_source> .
           AT END OF row .
    * Append data into internal table
             APPEND p_i_excel_data.
             CLEAR p_i_excel_data.
           ENDAT .
         ENDLOOP .
       ENDIF .

  • How to extract a single column from XML and load in Oracle

    Hi
    below I have a structure of xml files , I just need to extarct <RecordReference>PQPMID:7358</RecordReference>
    from file and load in to oracle ..
    Please let me know how to do ..??
    file content below
    HoldingsRecord>
    <RecordReference>PQPMID:7358</RecordReference>
    <NotificationType>00</NotificationType>
    <SerialVersion>
    <SerialVersionIdentifier>
    <SerialVersionIDType>07</SerialVersionIDType>
    <IDValue>1068624X</IDValue>
    </SerialVersionIdentifier>
    <SerialVersionIdentifier>
    <SerialVersionIDType>01</SerialVersionIDType>
    <IDTypeName>PMID</IDTypeName>
    <IDValue>7358</IDValue>
    </SerialVersionIdentifier>
    <Title>
    <TitleType>02</TitleType>
    <TitleText>Pittsburgh Post - Gazette</TitleText>
    </Title>
    <Publisher>
    <PublishingRole>01</PublishingRole>
    <PublisherName>Post Gazette Publishing Company</PublisherName>
    </Publisher>
    <OnlinePackage>
    <OnlineServiceName>ProQuest</OnlineServiceName>
    <Website>
    <WebsiteRole>03</WebsiteRole>
    <WebsiteLink>http://proquest.umi.com/pqdweb</WebsiteLink>
    </Website>
    <HoldingsDetail>
    <JournalIssue>
    <JournalIssueRole>04</JournalIssueRole>
    <JournalIssueDate>
    <DateFormat>00</DateFormat>
    <Date>19930118</Date>
    </JournalIssueDate>
    </JournalIssue>
    <JournalIssue>
    <JournalIssueRole>06</JournalIssueRole>
    <JournalIssueDate>
    <DateFormat>00</DateFormat>
    <Date>20080915</Date>
    </JournalIssueDate>
    </JournalIssue>
    <EpubFormat>10</EpubFormat>
    </HoldingsDetail>
    </OnlinePackage>
    </SerialVersion>
    </HoldingsRecord>

    My mistake - thought you're looking for a general idea. Here's the working example:
    CREATE OR REPLACE PROCEDURE import_test (i_result_file IN XMLTYPE DEFAULT XMLTYPE(bfilename('XMLDIR','my_test.xml'),nls_charset_id('ALT32UTF8')))
    IS
    xml_rec XMLTYPE;
    v_index PLS_INTEGER;
    v_rec_ref VARCHAR2(30);
    BEGIN
    v_index := 1;
    WHILE i_result_file.Existsnode('/rec/HoldingsRecord['||To_Char(v_index)||']') > 0
    LOOP
    BEGIN
    --- Get the line
    xml_rec := i_result_file.Extract('/rec/HoldingsRecord['||To_Char(v_index)||']');
    CASE WHEN i_result_file.Existsnode('rec/HoldingsRecord['||To_Char(v_index)||']/RecordReference') > 0
    THEN v_rec_ref := xml_rec.extract('HoldingsRecord/RecordReference/text()').getStringVal();
    DBMS_OUTPUT.put_line('v_rec_ref: '||v_rec_ref);
    END CASE;
    EXCEPTION WHEN OTHERS THEN
    DBMS_OUTPUT.put_line('My Message: '||v_index||' '||SQLERRM);
    END;
    v_index := v_index + 1;
    END LOOP;
    END import_test;
    and here is my_test.xml I have used:
    <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
    <rec>
    <HoldingsRecord>
    <RecordReference>PQPMID:7358</RecordReference>
    <NotificationType>00</NotificationType>
    <SerialVersion>
    <SerialVersionIdentifier>
    <SerialVersionIDType>07</SerialVersionIDType>
    <IDValue>1068624X</IDValue>
    </SerialVersionIdentifier>
    <SerialVersionIdentifier>
    <SerialVersionIDType>01</SerialVersionIDType>
    <IDTypeName>PMID</IDTypeName>
    <IDValue>7358</IDValue>
    </SerialVersionIdentifier>
    <Title>
    <TitleType>02</TitleType>
    <TitleText>Pittsburgh Post - Gazette</TitleText>
    </Title>
    <Publisher>
    <PublishingRole>01</PublishingRole>
    <PublisherName>Post Gazette Publishing Company</PublisherName>
    </Publisher>
    <OnlinePackage>
    <OnlineServiceName>ProQuest</OnlineServiceName>
    <Website>
    <WebsiteRole>03</WebsiteRole>
    <WebsiteLink>http://proquest.umi.com/pqdweb</WebsiteLink>
    </Website>
    <HoldingsDetail>
    <JournalIssue>
    <JournalIssueRole>04</JournalIssueRole>
    <JournalIssueDate>
    <DateFormat>00</DateFormat>
    <Date>19930118</Date>
    </JournalIssueDate>
    </JournalIssue>
    <JournalIssue>
    <JournalIssueRole>06</JournalIssueRole>
    <JournalIssueDate>
    <DateFormat>00</DateFormat>
    <Date>20080915</Date>
    </JournalIssueDate>
    </JournalIssue>
    <EpubFormat>10</EpubFormat>
    </HoldingsDetail>
    </OnlinePackage>
    </SerialVersion>
    </HoldingsRecord>
    <HoldingsRecord>
    <RecordReference>PQPMID:9875</RecordReference>
    <NotificationType>00</NotificationType>
    <SerialVersion>
    <SerialVersionIdentifier>
    <SerialVersionIDType>07</SerialVersionIDType>
    <IDValue>1068624X</IDValue>
    </SerialVersionIdentifier>
    <SerialVersionIdentifier>
    <SerialVersionIDType>01</SerialVersionIDType>
    <IDTypeName>PMID</IDTypeName>
    <IDValue>7358</IDValue>
    </SerialVersionIdentifier>
    <Title>
    <TitleType>02</TitleType>
    <TitleText>Pittsburgh Post - Gazette</TitleText>
    </Title>
    <Publisher>
    <PublishingRole>01</PublishingRole>
    <PublisherName>Post Gazette Publishing Company</PublisherName>
    </Publisher>
    <OnlinePackage>
    <OnlineServiceName>ProQuest</OnlineServiceName>
    <Website>
    <WebsiteRole>03</WebsiteRole>
    <WebsiteLink>http://proquest.umi.com/pqdweb</WebsiteLink>
    </Website>
    <HoldingsDetail>
    <JournalIssue>
    <JournalIssueRole>04</JournalIssueRole>
    <JournalIssueDate>
    <DateFormat>00</DateFormat>
    <Date>19930118</Date>
    </JournalIssueDate>
    </JournalIssue>
    <JournalIssue>
    <JournalIssueRole>06</JournalIssueRole>
    <JournalIssueDate>
    <DateFormat>00</DateFormat>
    <Date>20080915</Date>
    </JournalIssueDate>
    </JournalIssue>
    <EpubFormat>10</EpubFormat>
    </HoldingsDetail>
    </OnlinePackage>
    </SerialVersion>
    </HoldingsRecord>
    </rec>

  • How to read write excel through BPEL

    hi,
    how to read write excel file from BPEL process; is there any adapter available for excel specially.

    Hi,
    there is no adapter provided from Oracle.
    I think you have to write a .NET webservice, which accomplished this for you....

  • Problem in Selecting the data from EKPO and KONV tables

    Hi Experts,
    Presently I am working on Report with Comparision-Sheet Between the vendor's Quotations. I have to display the Discount, Freight, Packing and Forwarding, Vat in Item level data based on the conditions made in PO.
    As per my Knowledge, Condition Types are stored in KONV Table. But there is no relation between KONV and EKPO tables.  So, I am unable to print the data for Discount, Freight, Packing and Forwarding, Vat... How can I get the values from EKPO and KONV tables?
    Thanks in Advance.
    Thanks n Regards,
    Muralikrishna.

    Don't recall if this is correct, but you may need the condition number from the header (EKKO) combined with EKPO-EBELP or other field as you key to access KONV (KNUMH and KPOSN).  My site doesn't run PP, so can't verify if the data is actually stored that, so just a possibility.

  • How to read a XML file from BLOB column and insert in a table - PL/SQL Only

    Hi,
    To make data load more simple to end user instead placing file on the server and use SQL-LOADER, I came up with new idea that using oracle ebusiness suite attachment functionality. that loads a XML file from local PC to a database column(table is fnd_attachments, default data type is BLOB over here).
    I tried with DBMS_LOB and didnt get around.
    Please can anyone tell me how to read the BLOB column using PL/SQL and store the data in a oracle table. Here's the sample XML file and table structure FYI.
    <?xml version="1.0" encoding="UTF-8"?>
    <dataroot xmlns:od="urn:schemas-microsoft-com:officedata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Corporate_alloc.xsd" generated="2009-07-07T14:17:49">
    <Corporate_alloc>
    <PKG_CODE>BKCORP</PKG_CODE>
    <PKG_NAME>Corporate Edition - Books</PKG_NAME>
    <DET_CODE>B9780080543758</DET_CODE>
    <DET_NAME>Waves, Tides and Shallow-Water Processes</DET_NAME>
    <ALLOCATION_RATIO>0.000041</ALLOCATION_RATIO>
    </Corporate_alloc>
    <Corporate_alloc>
    <PKG_CODE>BKCORP</PKG_CODE>
    <PKG_NAME>Corporate Edition - Books</PKG_NAME>
    <DET_CODE>B9780080534343</DET_CODE>
    <DET_NAME>Hydrostatically Loaded Structures</DET_NAME>
    <ALLOCATION_RATIO>0.000127</ALLOCATION_RATIO>
    </Corporate_alloc>
    </dataroot>
    CREATE TABLE TEST_XML
    ( PKG_CODE VARCHAR2(50),
    PKG_NAME VARCHAR2(100),
    DET_CODE VARCHAR2(20),
    DET_NAME VARCHAR2(500),
    ALLOCATION_RATIO NUMBER )
    Thanks
    EBV

    In regards to #3, use the COLUMNS functionality of XMLTable instead of using Extract. Two simple examples are
    Re: XML Data - Caliculate fields
    Re: Extractvalue function not recognised

  • How can I change excel column header using Labile.

    Dear Experts,
                          How can i change excel column header using LabVIEW.
    Thanks for any and all help!
    M.S.Sivaraj.
    Sivaraj M.S
    CLD

    As I said in my previous post, column headers in Excel are merely row 1 cells. May be I missing something here, so please be more explicit with your question.
    I guess you are using the Excel Report tools, and you want to modify an existing sheet. From my limited experience with the Excel Report tools, it is not possible to open an existing woorkbook (except as template...), so the answer to your question should be "Forget it"...
    The work around is to use the example I pointed for you before, and either to write the whole new colum headers as a string array, starting in A1, or to write a single string to a given cell in row 1.
    Hope this helps 
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        

  • How to read an excel file in webdynpro application

    Hello Experts,
    Can someone please tell me how to read an excel file in a webdynpro application?
    There is a tutorial for how to write contect into an excel, but i want to read the excel.
    Can someone help please !!
    Thanks and Kind regards,
    G.Singh.

    Hello Experts,
    I have done all the given above.
    I want to read a excel file from KM. My code is as below
    ResourceContext resourceContext = buildResourceContext();
    IResourceFactory resourceFactory = ResourceFactory.getInstance();
    RID pathRID = RID.getRID("/documents/ExcelReport.xls");     
    IResource resource =     resourceFactory.getResource(pathRID, resourceContext);
    Workbook wb = Workbook.getWorkbook(resource.getURI().getPath());
    Sheet sh = wb.getSheet(0);
    int columns = sh.getColumns();
    int rows = sh.getRows();
    wdComponentAPI.getMessageManager().reportSuccess(" Rows: " + rows);
    wdComponentAPI.getMessageManager().reportSuccess(" Columns: " + columns);
    This does not give me the excel file form the KM
    Can you please just what i can do at this point?
    Kind Regards,
    G Singh.

  • How to Create a new column from two different result sets

    How to Create a new column from two different result sets, both the result set uses the different date dimensions.

    i got solutions for this is apply filters in column formula it self, based on the requirement.

  • How to create a multi column list item and select these values from a LOV

    Hi all,
    My requirements are:
    1) create an LOV which holds the productno, productname and productprice fields (this is working)
    2) at run time, select one record from LOV and populate the list/grid with this selected record values of productno, productname and productprice fields, so we are showing them on the form in the form of a table/grid (not working)
    3) be able to select multiple records from LOV and be able to populate the list item with multiple records (not working)
    4) have two more columns in the list/grid, for productquatity and total price (not wokring)
    Please help me.
    how can i create this grid or list in oracle
    whats the possible way of acheiving this in oracle

    If you use a list item to display multiple columns then you'll need to use a fixed-width font. You can achieve a similar look with proportional fonts by using a normal block and setting the fields' bevel to 'None'.
    Each column in the LOV has a Return Item property (under Column Mapping Properties). Set this to a :block.item reference for each column to bring the data back into those referenced fields.
    You can't select multiple records from an LOV. For this you will need to create your own form. Check the help for system.mouse_button_modifiers to see how to respond to Ctrl+click and Shift+click.
    To add columns just modify the LOV's record group's query.

  • Read an EXCEL file from application server

    Hi all
    I have to read an excel file from applicatin sever and update my custom tablels.
    The problem is when the file is uploaded into the application server .
    the fields it has are
    name age gender
    xyz    67  m.
    when seeing the file using al11 tcode :
    its showing the following:
    ###&#2161;##################>#######################################################################################################################
    #################################################################O#b#j#I#n#f#o################################################################
    How do i read this and put in my internal table
    Pleaes help.
    Thanks and Regards,

    Hi,
    I am using ECC6.0.
    I think the EXCEL file is stored in compressed format to save space.
    Please let me know how to decompress etc.
    I tried using the function moduel
    text_convert_xls_to_sap.
    How do I pass the parameter to I_filename.
    Regards,

  • How to read line number text from PDF using plugin?

    Hi, I would like to know how to read line number text from PDF using plugin?
    Thanks in advance.

    Ok, some background reading of the PDF Reference will help you understand why this is so difficult. PDF files are not organised into lines. It is best to think of each word or character on the page as being a graphic with its own position. The human eye sees lines where a series of graphics (words) are roughly in the same horizontal region.
    In the general case it is difficult or even impossible to answer this. You may have columns with different spacing (but the PDF stores no information on what is a column). You may have subscripts and superscripts. You may have text in graphics coinciding with other text. Commonly, there may be titles, headings or page numbers which are just ordinary text and might count as lines.
    That said, what you need to do is extract the text on the page and its positions. The WordFinder APIs are the way to do that. Now, sort all the words out, using the Y coordinates and size to try and guess what makes a "line". Now you are in a position to find the text (divided into words, not strings) and report the "line number" you have estimated.

  • Error While reading an Excel file from KM Folder.

    Hi Guru's,
    In my PDK Application I am trying to read an Excel file from KM Folder.
    Workbook workbook = Workbook.getWorkbook(new File("/irj/go/km/docs/documents/test/Test.xls"));
    It gives an error:
    Error:java.io.FileNotFoundException: \irj\go\km\docs\documents\test\Test.xls (The system cannot find the path specified)
    Details of appli:
    In my JspDynpage I am calling a utility Java file.
    There I have to read an  Excel and to passit to JSP.
    Details of jar files  used:
      jxl-2.6
      com.sap.security.api.jar
    Regards,
    Ram

    Hi,
    You are trying to read file wrong way. In the tutorial of Java Excel Api: "JExcelApi can read an Excel spreadsheet from a file stored on the local filesystem or from some input stream.". You are trying to read from file system. So you must get file input stream then you can read it. Please search forums KM file read.

  • How can I download to one excel sheet from more than two table?

    Hi.
    as you know
    <SAP_BW_URL CMD='EXPORT' FORMAT='XLS' DATA_PROVIDER='DATAPROVIDER_T1' >
    this script can make download excel sheet which is same cotents of table or chart in web template.
    but if template has more than two tables how can we get excel sheet from tables?
    <SAP_BW_URL CMD='EXPORT' FORMAT='XLS' DATA_PROVIDER_1='DATAPROVIDER_T1' DATA_PROVIDER_2='DATAPROVIDER_T2'>
    I hope this gonna work but result was fail same as I expected.
    is there any way put two tables download one excel sheet?

    Welcome to SDN.
    Post this in Business Explorer forum for quicker resposne.
    SAP Business Explorer (SAP BEx)
    Regards
    Raja

  • Code for how to read an integer array from the command prompt...

    hello,
    Could anyone give me the code for how to read an integer array from the command prompt...its very urgent!..

    If you are using a recent version of Java (5 or later) you can use Scanner:
    http://java.sun.com/javase/6/docs/api/java/util/Scanner.html
    That page has some example code on it, too.

Maybe you are looking for

  • Trying to backup my time machine..

    I am trying to backup my time machine but keeps coming up with error 6584 can anyone help please <Re-Titled By Host>

  • Installing HFM in hyperion 9.3.1

    Hello gurus, I am new to hyperion system 9.3.1 and I have issue in installation configuration in HFM 9.3.1, I have installed following components on Windows server 2003 SP1 x86, and I have used SQL server 2005 SP1. 1. Shared service 2. Reporting and

  • Which user id is used in each data source?

    Using SQ: SSRS 2008 R2 - Beginner - Is there a report or query that provides which user ID is associated with the data source of each report? I need to be able to list out all the data sources being used and which user id is being used in the data so

  • Loosing precision when computing

    Hi everyone ! I've got a problem with math operation. I loose precision on simple operations, and i can't understand why. I've got a JTable with several rows. Each row represent a product, that I need to order. After filling this table with some prod

  • The 'DbProviderFactories' section can only appear once per config file. (System.Configuration)

    Hi I have installed just the enterprise manager, and client connectivity tools on my workstation. When I try to do something in Enterprise manager like create a new view I get the error in the Title line. I have checked and double checked the section