Read itab without header

Hi,
I'm moving  in an internal table (without header) using a loop and I need to read the lines.
With the read line (saving data in a wa) sentence it can be done but it returns me an error because the itab hasn't header.
Can anybody tell me the correct syntax to achieve this?
Thanks in advance.
Regards.

Hi  David,
If you delcare Internal table  with headerline, system automatically assign headerline,
but
if you delcare Internal table without header line, you should delcare workarea or field symbols.
Syntex.
Data: itab type table of mara,
         wa like line of itab.
read table itab into wa with key fieldname = fieldname.
with Header line.
data: itab type table of mara with headerline initial size 0.
read table itab with key matnr = matnr.
Regards,
Venkat.

Similar Messages

  • How to read a file which has header and without header

    Hi,
    I have a file to file scenario wherein there are txt files in the source system, some of which has header and some without header.
    How does the sender adapter dynamically identify a file with header and without header.
    I knew that File content Conversion in the sender adapter with "Recordsets per message = 1" can read the header.  But how to handle dynamically.
    Thanks in advance for suggestions and advice.
    Regards.
    Praveen

    Hi,
    Let me give a more clear picture:-
    One of my file which has header and the corresponding values is listed hereunder:
    PERNR;KID;PNALT;NACHN;NAME2;VORNA;TITEL;TITL2 and so on.....
    ;1200;1200;Angus;; and so on.........
    Other file which has no header but only values in it:-
    1200;1200;;Werner;Angus and so on.......
    The structure remains same for all the files.  The only difference is that some of the file has header in it and some without header.  The Message Type is mentioned hereunder:-
    DT_LegacyEmployee (Category - Complex Type)
         Employees (Category - Element, Occurence - 1)
              Employee (Categroy - Element, Type - DT_LegacyEmployee_Row, Occurence - 0...unbounded)
                   PERNR
                   KID
                   PNALT
                   NACHN
                   NAME2 and so on......     
    I read the file in record row.  The file conversion parameters in the file sender adapter are mentioned hereunder:-
    Document Name - MT_LegacyEmployee
    Document Namespace - http://abc.com/xi
    Recordset Name - Employees
    Rescordset Structure - Employee,*
    Recordsets per Message - 1
    Key Field Type - String (Case Sensitive)
    Employee.fieldSeparator - ;
    Employee.endSeparator - 'nl'
    Employee.fieldNames - PERNR,KID,PNALT,NACHN,NAME2,VORNA,TITEL,TITL2 and so on........
    How do we dynamically identify whether the file has header or not.  Even if the file has header or without header, the file needs to be picked and transferred to the target system.  Kindly clarify.
    Regards.
    Praveen

  • Moving data into internal table without header line

    Hello experts.
    i have two internal tables . itab1 without headerline and itab2 with headerline. itab1 has 10 fields and itab2 has 2 fields.
    BEGIN OF itab,
            lifnr LIKE lfa1-lifnr,
            ktokk LIKE lfa1-ktokk,
            name1 LIKE lfa1-name1,
            sortl LIKE lfa1-sortl,
            pstlz LIKE lfa1-pstlz,
            ort01 LIKE lfa1-ort01,
            land1 LIKE lfa1-land1,
           j_1ipanno LIKE j_1imovend,
    end of itab.
    DATA: itab1 TYPE STANDARD TABLE OF itab.
    data: begin of itab2 occurs 0,                             
          lifnr like j_1imovend-lifnr,
          j_1ipanno like j_1imovend-j_1ipanno,
      end of itab2.
    now i want to move the data from itab2-j_1ipanno into itab1-j_1ipanno. so pls tell me how to do that. lifnr in both the tables are the same.
    thanks for all the replies.

    Hi Shiva,
    In with out header line,
    You declare header line & body separately like
    data: IT_MARA type standard table of MARA,
    WA_MARA like line of IT_MARA.
    Advantages:
    1. Clear differentiation of header line over body
    2. It is must in the ABAP Objects to have separate header line & body
    3. Use ful in Nested Internal tables
    Disadvantages:
    1. Long syntax
    for example: Loop at IT_MARA into WA_MARA.
    In with header line
    Data ITAB like MARA occurs 0 with header line.
    Advantages:
    1. Simple to use & declare over without header line.
    Also,
    With Header line:
    codedata : itab like <dbtable> occurs 0 with header line.
    Data: begin of itab occurs 0,
    f1 type f1,
    f2 type f2,
    end of itab.[/code]
    Without Header line.
    codeTypes: begin of ty_tab,
    f1 type f1,
    f2 type f2,
    end of ty_tab.
    Data: itab type table of ty_tab, " Internal Table
    wa type ty_tab. " Work Area[/code]
    at any point of time use internal table without header line,it will be good performance as well OO ABAP will allow only internal table without header line.
    Just use one simple example :
    create one simple program with header line,use get run time field.
    create one simple program without header line,use get run time field.
    see the results ,here time will be micro seconds,so take 1000 records to internal table and do calculate the time.
    While adding or retrieving records to / from internal table we have to keep the record temporarily.
    The area where this record is kept is called as work area for the internal table. The area must have the same structure as that of internal table. An internal table consists of a body and an optional header line.
    Header line is a implicit work area for the internal table. It depends on how the internal table is declared that the itab will have the header line or not.
    e.g.
    data: begin of itab occurs 10,
    ab type c,
    cd type i,
    end of itab. " this table will have the header line.
    data: wa_itab like itab. " explicit work area for itab
    data: itab1 like itab occurs 10. " table is without header line.
    The header line is a field string with the same structure as a row of the body, but it can only hold a single row.
    It is a buffer used to hold each record before it is added or each record as it is retrieved from the internal table. It is the default work area for the internal table.
    kindly reward if found helpful.
    cheers,
    Hema.

  • Report without HEADER LINE

    how to create a report with out the HEADER LINE concept....because I want the output as only some of the fields from the table.....
    And this type of programming consumes much processing than the normal one.....
    NOTE: In normal process I am facing memory problem. It's giving error like "the WORKAREA <internal table> is not enough"
    Regards
    Suresh

    Check the below example ,it has both header line and withou header line:
    Internal table with header line
    here i am using get time field command ,so use both program and see comparision time
    report zxyz.
    Internal table with header line.
    DATA:BEGIN OF itab OCCURS 0,
    lifnr LIKE lfa1-lifnr,
    name1 LIKE lfa1-name1,
    END OF itab.
    data : f1 type i,
           f2 type i,
           f3 type i.
    start-of-selection.
    get run time field f1.
    SELECT lifnr name1 FROM lfa1 INTO TABLE itab up to 200 rows.
    loop at itab.
    endloop.
    get run time field f2.
    f3 = f2 - f1 .
    write :/ 'Time taken by query in Micro seconds', f3.
    Internal table without header line
    report zxyz1.
    Internal table without header line.
    types : begin of ty_itab ,
            lifnr LIKE lfa1-lifnr,
            name1 LIKE lfa1-name1,
            end of ty_itab.
    data itab type standard table of ty_itab.
    data wa_itab like line of itab.
    data : f1 type i,
           f2 type i,
           f3 type i.
    start-of-selection.
      get run time field f1.
      SELECT lifnr name1 FROM lfa1 INTO TABLE itab up to 200 rows.
      loop at itab into wa_itab.
      endloop.
      get run time field f2.
      f3 = f2 - f1 .
      write :/ 'Time taken by query in Micro seconds', f3.
    I would suggest use always internal table without header line.
    Thanks
    Seshu

  • Export data to excel without header in OBIEE

    Dear experts,
    I have some reports in OBIEE and I want to export them to excel or text(.csv),
    I want to export without header .
    How can I do that?
    Regards,
    David

    Did you try the following steps?
    1. Edit the report layout
    2. Go to the columns and measures section
    3. Click on the column / Measure properties
    4. uncheck the 'Display Heading'
    5. Save the report
    6. Export to excel/csv
    Please mark if helpful/correct.

  • Deleting Duplicate from ITAB without sorting????

    Hi,
    A challenging and interesting problem please help. I want to delete duplicates from an ITAB without sorting (so cant use delete adjacent duplicates)
    data:  begin of dpp occurs 0,
            val type i,
            end of dpp.
            dpp-val = 13.
            append dpp.
            dpp-val = 15.
            append dpp.
            dpp-val = 26.
            append dpp.
            dpp-val = 15.
            append dpp.
            dpp-val = 27
            append dpp.
            dpp-val = 15.
            append dpp.
    As you see 15 is duplicated in DPP,,,how can duplicated 15 entries be deleted without sorting
                       VAL
         13
         15
         26
         15
         27
         15
    thhnx
    Edited by: Salman Akram on Oct 12, 2010 3:54 PM

    Hi,
    Loop through your DPP itab then append to another. try this:
    DATA: BEGIN OF dpp OCCURS 0,
    val TYPE i,
    END OF dpp.
    dpp-val = 13.
    APPEND dpp.
    dpp-val = 15.
    APPEND dpp.
    dpp-val = 26.
    APPEND dpp.
    dpp-val = 15.
    APPEND dpp.
    dpp-val = 27.
    APPEND dpp.
    dpp-val = 15.
    APPEND dpp.
    DATA: BEGIN OF dpp1 OCCURS 0.
            INCLUDE STRUCTURE dpp.
    DATA: END OF dpp1.
    LOOP AT dpp.
      READ TABLE dpp1 WITH KEY val = dpp-val.
      IF sy-subrc NE 0.
        APPEND dpp TO dpp1.
      ELSE.
        CONTINUE.
      ENDIF.
    ENDLOOP.
    REFRESH dpp.
    dpp[] = dpp1[].
    thanks.

  • I am moving from PC to Mac.  My PC has two internal drives and I have a 3Tb external.  What is best way to move the data from the internal drives to Mac and the best way to make the external drive read write without losing data

    I am moving from PC to Mac.  My PC has two internal drives and I have a 3Tb external.  What is best way to move the data from the internal drives to Mac and the best way to make the external drive read write without losing data

    Paragon even has non-destriuctive conversion utility if you do want to change drive.
    Hard to imagine using 3TB that isn't NTFS. Mac uses GPT for default partition type as well as HFS+
    www.paragon-software.com
    Some general Apple Help www.apple.com/support/
    Also,
    Mac OS X Help
    http://www.apple.com/support/macbasics/
    Isolating Issues in Mac OS
    http://support.apple.com/kb/TS1388
    https://www.apple.com/support/osx/
    https://www.apple.com/support/quickassist/
    http://www.apple.com/support/mac101/help/
    http://www.apple.com/support/mac101/tour/
    Get Help with your Product
    http://docs.info.apple.com/article.html?artnum=304725
    Apple Mac App Store
    https://discussions.apple.com/community/mac_app_store/using_mac_apple_store
    How to Buy Mac OS X Mountain Lion/Lion
    http://www.apple.com/osx/how-to-upgrade/
    TimeMachine 101
    https://support.apple.com/kb/HT1427
    http://www.apple.com/support/timemachine
    Mac OS X Community
    https://discussions.apple.com/community/mac_os

  • Inspection Lot for Process Order without Header Material

    Guys,
    We have an scenario that we create a Process Order without Header material using T code CORO. Is it possible to assign or create  a Inspection lot for Process order?
    Regards,
    Senthilraja

    Hi
    Please refer
    QPL10004 User subscreen for displaying additional data in insp. lot
    Regards
    Sujit

  • Reading material ledger header record

    Dear Gurus,
    I am getting the following error when i save the 561 movement posting.
    Error reading material ledger header record
    Message no. C+065
    Diagnosis
    Internal error in function module CKMS_HEADER_READ_WITH_ITAB.
    System Response
    The transaction was terminated.
    Procedure
    Inform your system administrator.
    Kindly help..
    Aktolga

    Hi Aktolga,
    The mentioned error means that the material is relevant for Material Ledger but it does not exist in Material Ledger tables. It is
    an inconsistency and should be repaired. This type of inconsistencies are repaired by Sap support, to repair it, you should create a oss message.
    Best regards,
    Maria Luisa

  • Where can I download the Adobe Reader file without installing it?

    Where can I go to download the Adobe Reader file without installing it?

    You can use the Adobe FTP site to download any Reader version: ftp://ftp.adobe.com/pub/adobe/reader/

  • ALV - putting itab as header

    Hi Guys,
    I would like to put the contents of an itab at the start of an ALV output as Element of Type Grid with gridlines.
    DATA it_spfli TYPE spfli_tab.
    SELECT * FROM spfli INTO TABLE it_spfli.
    Just as an example,I would like out put the "carrid" and "connid" fields of the itab as header info.
    Is there a way to do it.Is it performant?
    The reason why I want to do it is I need to have 2 different outputs on the same screen.
    The first one I thought - could be put in as an ALV header (The itab I mentioned above)and
    the second one in an ALV itself so that they could both be seen on the same screen.
    A sample code for the header itab would be great....
    Thanks
    P

    Hi,
    Here is another way to achieve this. This technique will display multiple ALV GRID's in one screen.
    1. First define 2 custom containers in your screen and name them accordingly say u201CCONT1u201D and u201CCONT2u201D.
    2. In your data declaration defines the variables say as below.
    DATA: g_container1 TYPE scrfname VALUE 'CONT1',
                        g_container2 TYPE scrfname VALUE 'CONT2',
                        grid1 TYPE REF TO cl_gui_alv_grid,
                        grid2  TYPE REF TO cl_gui_alv_grid,
                        g_custom_container1 TYPE REF TO cl_gui_custom_container,
                        g_custom_container2 TYPE REF TO cl_gui_custom_container.
    3. Now there is one main thing to understand u2013what is the use of the Class cl_gui_custom_container? Actually, the custom objects that one can see in the attached screen shot are two containers, which need to be attached with objects of type ref to cl_gui_custom_container by way of coding. Now on this container object will sit two alv grid containers and the alv grid containers will hold the data.           
    4. Follow the below lines of code.
    * Create the custom container object and attachwith the screen container u2018CONT1u2019.
         IF g_custom_container1 IS INITIAL.
        CREATE OBJECT g_custom_container1
               EXPORTING container_name = g_container1.
    Now create the grid object: -
        CREATE OBJECT grid1
               EXPORTING i_parent = g_custom_container1.
    * Now call the method u2018SET_TABLE_FOR_FIRST_DISPLAYu2019 and pass the required parameters.
       CALL METHOD grid1->set_table_for_first_display
          EXPORTING
            i_structure_name = 'MARA'
          CHANGING
            it_outtab        = gt_mara.   u201CThe internal table containing the data
      ENDIF.
    * Follow the same procedure for the other custom control also.
    IF g_custom_container2 IS INITIAL.
        CREATE OBJECT g_custom_container2
               EXPORTING container_name = g_container2.
        CREATE OBJECT grid2
               EXPORTING i_parent = g_custom_container2.
        CALL METHOD grid2->set_table_for_first_display
          EXPORTING
            i_structure_name = 'MARA'
          CHANGING
            it_outtab        = gt_mara.
      ENDIF.
    5. We can create as many grids as we need using the above technique.                                                   
    Regards,
    Ganga

  • Production orders without header material transfer to APO

    Hi,
    for our process it's necessary to transfer dependent demands from rework production orders (without header material) to APO because the ATP check for the component take place in APO. In standard there is no way tor transfer such orders to APO. Only one possible solution is to add during order transfer a dummy material in order to trigger the transfer to APO. Is there anybody that have already used this???
    Best regards
    alex

    Hi JJ,
    1. Reference Operation Set - t-code CA11. In the initial screen, enter description, plant - xxxx, usage - 1 & status - 4, unit of measure - same as the material for which the routing is to be used (eg - EA or KG etc).
    Click on operations tab, enter control key, work center, operation description.
    2. Settlement - When you enter the basic details in co07 like description, basic qty, dates, the system will take you to the settlement screen where you need to enter the settlement receiver. Here you specity CTR for cost center or G/L for G/L account, you then have to specify the corresponding cost element number & also the % of settlement, which is normally 100%. You can also access this by clicking on header - settlement
    Hope the above answers your query. If additional info is required, revert back.
    If helpful award points
    Regards,
    Vivek

  • Install Fingerprint Reader drivers without the software?

    Since my last question was answered so quickly and so well I thought I'd try one more.  Are there any drivers to install just the fingerprint reader device without the extra software that comes with it?  I don't want to use the fingerprint reader, but also don't want a unrecognized device in the device manager.
    Thanks for any and all help.
    Solved!
    Go to Solution.

    Thanks for your reply.  I've tried both your options without much success.
    1. I've downloaded the software from here, but when I extract it the only thing extracted is a Setup32.exe and SWI.xml
    2. I don't have an option to disable the scanner in the registry.  When I look I have the following options:
      Security-> Fingerprint-> Predesktop Authentication = disabled (it was enabled, but I disabled it)
      Security-> Fingerprint-> Reader Priority = External
      Security-> Fingerprint-> Security Mode = Normal
    Changing the Predesktop Authentication to disabled didn't stop Windows from prompting about a new device.  Any other ideas?
    Thanks for the help so far.

  • Reading a page header with getHeaderField()

    How can I read the file header of a page using getHeaderField()? I'm new to java and I guess this is a pretty easy thing to do. What I want to do is to read the header "tems" but exactly how should I write my program? Any help would be appreciated.

    import java.net.*;
    public class PrintHeaders {
        public static void main(String[] args) throws Exception {
            URL url = new URL(args[0]);
            HttpURLConnection.setFollowRedirects(false);
            HttpURLConnection connection = (HttpURLConnection) url.openConnection();
            String header = connection.getHeaderField(0);
            System.out.println(header);
            System.out.println("---Start of headers---");
            int i = 1;
            while ((header = connection.getHeaderField(i)) != null) {
                String key = connection.getHeaderFieldKey(i);
                System.out.println(((key==null) ? "" : key + ": ") + header);
                i++;
            System.out.println("---End of headers---");
    }

  • I am looking for a way to automate index creation using Adobe Reader Pro without having to use the screen user interface, as the indexing has to be run by a batch process.

    I am looking for a way to automate index creation using Adobe Reader Pro without having to use the screen user interface, as the indexing has to be run by a batch process.

    [discussion moved to Creating, Editing & Exporting PDFs forum.]

Maybe you are looking for