Read the first line of the table.

Hi,
Can you pls let me know as to how I read the first line of the table.
Thx.

hi check this.
data: begin of itab occurs 0,
        matnr like mara-matnr ,
        meins like mara-meins,
        end of itab.
select-options: s_matnr for mara-matnr .
select matnr
         meins
         from mara
         into table itab
         where matnr in s_matnr .
read table itab index 1 .
loop at itab .
write:/ itab-matnr .
endloop .
regards,
venkat.

Similar Messages

  • Could not parse the file contents as a data set. There were too many variable names in the first line of the text file.

    Could not parse the file contents as a data set. There were too many variable names in the first line of the text file.

    What are the Variables settings, what is the text file’s content, …?

  • When printing a highlighted (selected) print range from an internet item pulled up through Firefox, the first line of the selected range is not printing or is partially cut off.

    When printing a highlighted (selected) print range from an internet item pulled up through Firefox, the first line of the selected range is not printing or is partially cut off. This is not an issue with my printer, as printer prints the whole selected print range when using Internet Explorer or Word Doc applications. The problem only happens when using Firefox. Please advise on how to fix this. Is this a settings issue or do I need to download and update? Thx

    * [[Printing a web page]]
    * [[Firefox prints incorrectly]]
    Check and tell if its working.

  • How to set cursor at the first line in a table control?

    Hi,
           I have a customized infotype screen where a table control is being used to input new values.The tab control has 30 lines.Now, the problem is that when the screen is displayed, the cursor always starts at 8th or 4th line.The behaviour is not very consistent.I tried the following statement in the PBO, but no effect.
    SET CURSOR FIELD P9417-ZCOUNTRY LINE 1.  ( P9417-ZCOUNTRY is the name of the tab control field where i want to set the cursor ).This is the last statement in the PBO.
    Can someone please tell me why still I am not able to set the cursor at the first line? I have infact noticed that , in the debugging mode , sometimes the cursor starts at the first line.Please help. Thanks

    I have got a new requirement on this now. If the table control does not have any records , then the cursor position should be on the first row.Otherwise, if it already has some records, then the cursor should be at the first empty row.I wrote the code like below.
    if sy-ucomm = 'INSERT'.
    set cursor 'P9714-ZCOUNTRY'  line 1.
    else if sy-ucomm eq 'CHANGE'.
    describe table itab lines fill.
    fill = fill + 1.
    set cursor 'P9714-ZCOUNTRY'  line fill.
    endif.
    I am facing a strange problem now.The table control has some 10 rows when you see the screen for the first time.If the number of records already present is less than 10, I am able to position the cursor on the first empty row.But if the number is say 15, then the cursor position goes to eighth or fourth line or sometimes the first line.
    Is there any way to display the last few records , ie, if there are 15 records , is there any way to display the last five rows when I see the screen for the first time, rather than showing the first 10 records?How can I position the cursor at the first empty row, when there are more records?
    Thanks in advance..good answers will be rewarded.
    Mahesh

  • When Syncing my ipad, it does not show the business PO Box field from outlook which is the first line of the address

    Hi, I was wondering if someone out there could help me.
    I am trying to syncronise my outlook address book with my Ipad.
    The actual sync does work but it is missing the field Business Address PO Box, and this is where the first part of the address is stored, so when I try to look up an address on my ipad part of it is missing.
    However if I send the contact by email to my ipad as a internet format vCard it will import the whole address. However as I have 400+ contacts I really don't want to have to do it manually.
    Many thanks for any advice given.

    terminology is the issue here.
    Whilst AOL have refered to these additional email accounts as identities basically forever, they are not identities, they are email accounts. So simply add it to Thunderbird as an existing email account (File menu ) New> existing mail account

  • Remove 1st & 2nd lines in 1st file, and 1st line in 2nd file. I want the headers to be the first line after the script runs!

    I have two files that look like this (Notepad++):
    In the first file, which has a date as a name and always ends in 'COV', I want to remove the 1st & 2nd lines.  All lines end in LF (LineFeed).  In the 2nd file, which has a date as a name and always ends in 'RSK', I want to remove the 1st line. 
    Basically I want only the headers.  I'm working with the code below.  I've tried several different iterations of
    reader.ReadLine().Skip(1);
    reader.ReadLine().Skip(2);
    reader.ReadLine().Skip(3);
    It never really gives me what I want, so I can't tell what's going on here.  I guess I'm missing something simple, but I don't know what.  Any ideas, anyone?
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.IO;
    using System.Diagnostics;
    namespace ConsoleApplication1
    class Program
    static void Main(string[] args)
    string sourceDirectory = @"C:\Users\rshuell\Desktop\Downloads\Files";
    try
    var txtFiles = Directory.EnumerateFiles(sourceDirectory);
    foreach (string currentFile in txtFiles)
    if (currentFile.Contains("COV"))
    var items1 = new LinkedList<string>();
    using (var reader = new StreamReader(currentFile))
    reader.ReadLine().Skip(2); // skip 2lines
    string line;
    while ((line = reader.ReadLine()) != null)
    items1.AddLast(line.Replace("\"", ""));
    File.WriteAllLines(currentFile, items1);
    else
    var items2 = new LinkedList<string>();
    using (var reader = new StreamReader(currentFile))
    reader.ReadLine().Skip(1); // skip one line
    string line;
    while ((line = reader.ReadLine()) != null)
    items2.AddLast(line.Replace("\"", ""));
    File.WriteAllLines(currentFile, items2);
    catch (Exception ex)
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

    Call the ReadLine() twice if you want to skip the first two lines. Each call results in a single line being read:
    static void Main(string[] args)
    string sourceDirectory = @"C:\Users\rshuell\Desktop\Downloads\Files";
    try
    var txtFiles = Directory.EnumerateFiles(sourceDirectory);
    foreach (string currentFile in txtFiles)
    if (currentFile.Contains("COV"))
    var items1 = new LinkedList<string>();
    using (var reader = new StreamReader(currentFile))
    reader.ReadLine(); //read line 1
    reader.ReadLine(); //read line 2
    string line;
    while ((line = reader.ReadLine()) != null)
    items1.AddLast(line.Replace("\"", ""));
    File.WriteAllLines(currentFile, items1);
    else
    var items2 = new LinkedList<string>();
    using (var reader = new StreamReader(currentFile))
    reader.ReadLine(); // skip one line
    string line;
    while ((line = reader.ReadLine()) != null)
    items2.AddLast(line.Replace("\"", ""));
    File.WriteAllLines(currentFile, items2);
    catch (Exception ex)
    Calling the Skip method on the already read string returned by the ReadLine() method won't help you at all here. By the time you call the Skip method the line has already been read from the file. You must call the ReadLine() method for a new line being read.
    Hope that helps.
    Please remember to close your threads by marking helpful posts as answer and please start a new thread if you have a new question.

  • Texteditor - get_text_as_r3table only copies the first line into the itab.

    Hi Folks.
    I have a Texteditor from which i want to copie the entered text into an itab.
    i defined my itab like this:
    DATA: BEGIN OF txt_tab OCCURS 0,
    line(250) ,
    END OF txt_tab.
    but now if someone writes into the Texteditor:
    Blablablabla, blabla
    blebleblebleble.
    It only copies "Blablablabla, blabla" into the txt_tab. Do i have to do it now this way?
    DATA: BEGIN OF txt_tab OCCURS 0,
    line1(250) ,
    line2(250) ,
    line3(250) ,
    line4(250) ,
    END OF txt_tab.
    or is there another way? thx for all answers!

    solved the problem by myself... damn i was stupid ^^
    i just had to loop over the itab like this x(
    CALL METHOD obj_texteditor1->get_text_as_r3table
        IMPORTING
          table                  = txt_tab[]
        EXCEPTIONS
          error_dp               = 1
          error_cntl_call_method = 2
          error_dp_create        = 3
          potential_data_loss    = 4.
      IF sy-subrc <> 0 AND sy-subrc <> 4.
        MESSAGE 'Fehler' TYPE 'E' DISPLAY LIKE 'I'.
      ENDIF.
      LOOP AT txt_tab INTO wa_txt_tab.
        CONCATENATE wa_fftxt-reason wa_txt_tab-line INTO wa_fftxt-reason SEPARATED BY space.
      ENDLOOP.
    so sorry for robbing your time
    Edited by: rafe b. on Nov 19, 2009 3:37 PM

  • File Sender adapter not reading the first line

    Hi,
    I have a scenario configured from file to jdbc adapter.
    However, I found a problem in my file sender adapter. My file adpater always not picking up the first line from my text even I have set the 'Document Offset' to 0.
    Any Ideas? Thanks.
    Regards,
    Pua

    Hi Latika Sethi,
    My complete input text file is as below, it contains only 2 testing records:-
    H1|DIZ1                          |A0016507    |10000020|09/2007
    H2|ABC0001
    D|P|0001|Gaji Pokok       |   1,000.09
    D|D|0002|Denda              |   1,000.00
    D|P|0003|Elaun               |   1,000.00
    H1|PUA1                        |A0016508    |10000021|09/2007
    H2|ABC0002
    D|P|0001|Gaji Pokok       |   2,744.09
    D|D|0002|Denda              |   2,000.00
    D|P|0003|Elaun               |   2,000.00
    After the message mapping, I found the pipeline existed in sxmb_moni as below:-
    <?xml version="1.0" encoding="utf-8"?>
    <ns:mt_rmp03B_filejdbc_sender xmlns:ns="urn:rmp03:pdrm:ips:jdbcjdbc">
    <PaySlip>
    ..<Header2>
    .... <IC>ABC0001</IC>
    .. </Header2>
    .. <Details>
    .... <Jenis>P</Jenis>
    .... <No>0001</No>
    .... <Deskripsi>Gaji Pokok</Deskripsi>
    .... <Jumlah>1,000.09</Jumlah>
    .. </Details>
    </PaySlip>
    <PaySlip>
    .. <Header1>
    .... <Nama>PUA1</Nama>
    .... <KWSP>A0016508</KWSP>
    .... <NoGaji>10000021</NoGaji>
    .... <Bulan>09/2007</Bulan>
    .. </Header1>
    .. <Header2>
    .... <IC>ABC0002</IC>
    .. </Header2>
    .. <Details>
    .... <Jenis>P</Jenis>
    .... <No>0001</No>
    .... <Deskripsi>Gaji Pokok</Deskripsi>
    .... <Jumlah>2,744.09</Jumlah>
    .. </Details>
    </Payslip>
    There are 2 payslips as for the top payslip node...Header1 tag is missing. It means that during the file sender step....the first line of my record which is :-
    "H1|DIZ1                          |A0016507    |10000020|09/2007"
    is not read into the xi pipeline. Basically this is the problem i faced.
    Has somebody facing the same problem before? Currently I have no choice but moved the First line of the text into Second line and left the first line of the text become null/ empty line. As such both records can be successfully read by the XI.
    However what I wondered is sometimes clients will do insert the records into the first line and this might made some data loss.
    Thanks...

  • No page break between table header and first line of the table main area

    Hi all.
    I'm printing a form which contains a lot of tables. Sometimes while printing the table header line remains at the bootom of  the page and the lines of internal table are printed on the next page (also with header because i have marked 'at page break' in the header). How is it possible not to break header line of 'Table'-node and the first line of internal table?
    Regards, Nikolai.

    Hello Niki,
    try to use page protection......
    create a folder and place the text that r to be displayed without break.........
    and check the checkbox page protection.
    I think you cannot put an entire table in a folder & turn "Page Protection" on simultaneously.
    Any ideas?
    BR,
    Suhas

  • Button is not coming in the first row of a table view

    Hi,
    I am having an assignment block in which i have added a button in DO_PREPARE_OUTPUT method. It is displaying in the second line in the header of the table view and the first line shows the excel and personalization buttons. I want all these buttons to display on the same line in the assignment block.
    the .html code is below
       <%@page language="abap" %>
    <%@extension name="thtmlb" prefix="thtmlb" %>
    <%@extension name="chtmlb" prefix="chtmlb" %>
    <%@extension name="bsp" prefix="bsp" %>
    <%@extension name="tajax" prefix="tajax" %>
    <%
      data: lv_xml          type string value is initial.
      DATA: lv_displayMode  TYPE crmt_boolean.
      lv_xml    = controller->CONFIGURATION_DESCR->GET_CONFIG_DATA( ).
      lv_displayMode = controller->view_group_context->is_view_in_display_mode( controller ).
    %>
    <%
      IF lv_displayMode eq abap_true.
    %>
    <%--<chtmlb:tableExtension tableId = "ResultList"
                           layout  = "FIXED" >--%>
    <chtmlb:configTable id                    = "Table"
                        navigationMode        = "BYPAGE"
                        onRowSelection        = "select"
                        selectedRowIndex      = "<%= ADMINS->SELECTED_INDEX %>"
                        selectedRowIndexTable = "<%= ADMINS->SELECTION_TAB %>"
                        selectionMode         = "<%= ADMINS->SELECTION_MODE %>"
                        table                 = "//ADMINS/Table"
                        usage                 = "ASSIGNMENTBLOCK"
                        visibleRowCount       = "6"
    <%--                    actions          = "<%= controller->gt_button %>"--%>
    <%--                    actionsMaxInRow       = "6"--%>
                        width                 = "100%"
    <%--                    headerVisible         = "TRUE"--%>
                        hasLeadSelection      = "X"
                        personalizable        = "FALSE"
                        downloadToExcel       = "FALSE"
                        showNoMatchText       = "FALSE"
                         />
    <%--</chtmlb:tableExtension>                     --%>
    <%
      ELSE .
    %>
    <chtmlb:tableExtension tableId = "Table"
                           layout  = "FIXED" >
    <chtmlb:configTable id               = "Table"
                        displayMode      = "<%= lv_displayMode %>"
                        navigationMode   = "BYPAGE"
                        onRowSelection   = "select"
                        selectedRowIndex = "<%= ADMINS->selected_index %>"
                        table            = "//ADMINS/Table"
                        usage            = "ASSIGNMENTBLOCK"
                        visibleRowCount  = "6"
                        selectionMode    = "<%= ADMINS->SELECTION_MODE %>"
                        allRowsEditable  = "TRUE"
                        personalizable   = "FALSE"
                        downloadToExcel  = "FALSE"
                        headerVisible    = "TRUE"
                        hasLeadSelection = "X"
                        visibleFirstRow       = "<%= ADMINS->visible_first_row_index %>"
                        actions          = "<%= controller->gt_button %>"
    <%--                actionsMaxInRow       = "6"--%>
                        width            = "100%" />
    </chtmlb:tableExtension>
    <%
      ENDIF .
    %>
    Could you please let me know where i went wrong.

    In your code
    if(rs.next()){
      depflights = new ArrayList();
       while(rs.next()){ ...when you call rs.next() in the if statement, the resultset cursor has been placed on the first record and you are not reading it. So, you never get the first record.
    Change your code to remove that if condition and simply initialize the ArrayList.

  • af:table, only the first row of the table is effect

    Hi experts,
    I have an issue about using the <af:table, needs your help:
    1.The default selected line is the first line of the table(This should be ok).
    2.Only the first line can react to my manipulate, such as select one line and click delete button.
    3.While choosing the other line-->click the command button, the page will be refreshed and the selected one will turned to the first line. (Now the selected row, will be the first row). And will do nothing ,and has no action with the command button.
    I have an page OVS_Server.jspx, parts of it is :
    <af:table value="#{backVS.serverList}"
    var="row" rows="20"
    emptyText="#{globalRes['ovs.site.noRows']}"
    binding="#{backing_app_broker_OVS_Server.serverListTable}"
    id="serverListTable" width="100%"
    partialTriggers="poll1 commandButton_refresh commandButton_searchServer"
    selectionListener="#{backing_app_broker_OVS_Server.onSelect}">
    <f:facet name="selection">
    <af:tableSelectOne text="#{globalRes['ovs.site.selectAnd']}" autoSubmit="true"
    id="tableSelectOne" required="false">
    <af:commandButton text="#{globalRes['ovs.site.server.poweroff']}"
    id="commandButton_powerOff"
    action="#{backing_app_broker_OVS_Server.powerOffAction}"
    partialTriggers="tableSelectOne"
    disabled="#{backing_app_broker_OVS_Server.unreachableServer}"
    />
    <af:commandButton text="#{globalRes['ovs.site.edit']}"
    id="commandButton_edit"
    action="#{backing_app_broker_OVS_Server.editAction}"
    />
    <af:commandButton text="#{globalRes['ovs.site.delete']}"
    id="commandButton_delete"
    action="#{backing_app_broker_OVS_Server.deleteAction}"
    />
    </f:facet>
    <af:column sortProperty="ip" sortable="true"
    headerText="#{globalRes['ovs.site.serverHost2']}"
    id="column_ip">
    <af:commandLink text="#{row.ip}"
    id="commandLink_ip"
    shortDesc="#{globalRes['ovs.site.viewUpdateDetails']}"
    action="#{backing_app_broker_OVS_Server.viewAction}"
    immediate="true"/>
    </af:column>
    <af:column sortProperty="serverName" sortable="true"
    headerText="#{globalRes['ovs.site.serverName']}"
    id="column_serverName">
    <af:outputText value="#{row.serverName}"/>
    </af:column>
    </af:table>
    One JavaBean OVS_Server.java,and part of it is :
    public class OVS_Server {
    private CoreTable serverListTable;
    private VirtualServer selectedServer;
    public void onSelect(SelectionEvent selectionEvent) {
    selectedServer = (VirtualServer)serverListTable.getSelectedRowData();
    public String deleteAction(){
    if (selectedServer!=null) {
    deleteServerOper.execute();
    return "deleteServer";
    Would anyone show some lights on it?
    Thank you very much.

    Thank you for your reply!
    But the example you mentioned also has the issue like one of the comments :
    "Hi, on selecting the first row it displays the correct value, when navigating to another row still it displays the old value and not fetching the new selected row, actually I can see this on your sample screen shots... is there any way we can fix??"
    Is there any resolution?

  • Display the first line

    hi,
    i have a field called comments of length 1000. i need to display only the first line of the comments field in the alv grid.

    Hi Juli,
    Once you get the data into the internal table (itab)....
    Read itab with sy-index 1 into one internal table.
    then pass this to the alv grid fm...

  • The first line in a file is supressed

    hi all,
    i have a really weird problem.
    i have a file with a lot of data and i am using a file adapter with file content conversion to parse it.
    the file adapter is a sender one.
    the problem come when i do read the file and then it ignore the first line of the file.
    all the lines from the second one forward is shown in SXMB_MONI but the first line of the file isn't.
    i can't seem to figure out what the problem is, i tryed looking for some kind of attribute in the file adpater but had no luck.
    could you please help me?
    btw,
    the file structure is: header,1,body1,<wildcard>,body2,<wildcard>
    Edited by: Roi Grossfeld on Oct 29, 2008 4:24 PM

    Recordset Structure: H1,1,B1,<wildcard>,B2,<wildcard>
    Key Field Name: RecordType
    H1.fieldFixedLengths 6,2,8,1,1,3,30,5
    H1.fieldNames FileNo,RecordType,TransmissionDate,Car_Truck,BU,MD,FileName,Count
    H1.keyFieldValue H1
    B1.fieldFixedLengths 6,2,10,27,8,8,4,5,3,11,9,9,11,11,9,9,7,9,11
    B1.fieldNames FileNo,RecordType,InvoiceNumber,VesselName,MMSEShipmentDate,PlanArrivalDate,DeliveryPlace,Units,Currency,ModelPriceAmount,OptionPriceAmount,ColourPriceAmount,REPriceAmount,TotalPriceAmount,FreightChargeAmount,InsuranceFeeAmount,MiscellaneousAmount,VATAmount,GrandTotalAmount
    B1.keyFieldValue B1
    B2.fieldFixedLengths 6,2,10,12,12,12,5,6,12,3,3,3,4,17,7,7,12,8,5,3,9,7,7,9,9,7,9,4,20
    B2.fieldNames FileNo,RecordType,InvoiceNumber,MDOrderNumber,MMSEOrderNumber,MMSECaseNumber,ModelYear,BodyType,Model,ExteriorColourCode,InteriorTrimColourCode,OptionCode,RearEquipment,VehicleIdentificationNumber,ChassisModel,CSequenceNumber,EngineModel,ESequenceNumber,KeyNumber,Currency,UnitModelPrice,UnitOptionPrice,UnitColourPrice,UnitRearEquipmentPrice,UnitTotalPrice,UnitVATAmount,UnitTotalVAT,VATRate,VATNumber
    B2.keyFieldValue B2
    ignoreRecordsetName true
    Edited by: Roi Grossfeld on Oct 29, 2008 4:39 PM

  • When I print a selection of text the top half of the first line is cut off, i. e. isn't printed, OS X 10.7.2, Firefox 9.0.1.

    When I try to print selected text ("Print Selection Only"), the top half of the first line of the first page is chopped off. Then the last line is chopped in half (top half on the bottom of page 1, bottom half on top of page 2). This occurs on all subsequent pages.

    I have a very similar problem on the same versions of Firefox and OS X as the OP.
    For me, the cutoff problem occurs on the top and bottom of ALL pages intermittently, depending on the line spacing of the current selection (or so I assume).

  • Trying to use this() in a constructor, not the first line

    I'm currently re-writing some old code of mine that was used to create a neural network. My main contructor, originally, was
    public Network(int sizeLayer1, int sizeLayer2, int sizeLayer3) Now, however, I've decided that I want to make my network a little more general, and allow any number of layers. Therefore, my revised basic constructor is
    public Network(int[] sizeLayers)which expects an array of ints corresponding to the size of each layer.
    However, I've got some old programs that use the old contructor which I can't change (and anyway, it's good to have the option to be able to use both). I therefore want to create a constructor that has the same signature as the old one, but simply places the values in an array and passes the array to the new constructor.
    public Network(int sizeLayer1, int sizeLayer2, int sizeLayer3) {
      int[] sizeLayers = {sizeLayer1, sizeLayer2, sizeLayer3};
      this(sizeLayers);
    }obviously won't work, because 'this' must be the first line of the constructor. How can I put my values in an array and call the new constructor?
    Thanks!

    Silly me -- I had been trying to do
    this({sizeLayer1, sizeLayer2, sizeLayer3});but of course that wouldn't work.
    Thank you very much for that reply!
    However, more generally, what if I wanted to do a few lines of processing on the variables passed, like adding them together before calling this()? Is there no way to do that? What's the purpose of requiring that this() be the first line in the constructor?
    Thanks!

Maybe you are looking for

  • Digitale Signatur für AddOn-Installer falsch

    Hallo zusammen, ich hab einen AddOn erstellt. Beim istallieren kriege ich eine Meldung: "Digitale Signatur für AddOn-Installer falsch". Woran kann das denn liegen? Gruß Alexnader

  • IPhoto books will not print

    iPhoto books will not allow me to print book in draft or save as pdf. Program hangs on page 2 with dialogue box. Really glad I'm depending on this for a present. Should have know better than to trust latest upgrade.....iPhoto 11 9.2.2 Help please.

  • Unable to test my muse website with business catalyst .

    Hello, I am currently in trial of creatives-corner. I have developed an website with muse and trying to test it with business catalyst. But whenever i try to publish it is shows the following error. Error: Error uploading file slideshow1.png. There w

  • HT1338 why has my download navigator icon turned into a ?

    why has the download navigator icon turned into a ?.

  • Create and Deploy a WAR file

    Hello, We are using OBIEE 10.1.3.4.1 and Oracle Application Server 10.1.3.1. We need to recompile the analytics war file and make a new deployment of it after a patch. But I am not sure about how to do this. Can someone please guide me to do this in


HashFlare