What is internal table? read the another questions

What are internal tables? How do you get the number of lines in an internal table? How to use a specific number occurs statement?
send me replay also

hi,
try this links....
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb35de358411d1829f0000e829fbfe/content.htm
An internal table is one of two structured data types in ABAP. It can contain any number of identically structured rows, with or without a header line.
The header line is similar to a structure and serves as the work area of the internal table. The data type of individual rows can be either elementary or structured.
Internal tables provide a means of taking data from a fixed structure and storing it in working memory in ABAP. The data is stored line by line in memory, and each line has the same structure. In ABAP, internal tables fulfill the function of arrays. Since they are dynamic data objects, they save the programmer the task of dynamic memory management in his or her programs. You should use internal tables whenever you want to process a dataset with a fixed structure within a program. A particularly important use for internal tables is for storing and formatting data from a database table within a program. They are also a good way of including very complicated data structures in an ABAP program.
Fields of Internal Tables
SY-TABIX
Current line of an internal table. SY-TABIX is set by the statements below, but only for index tables. The field is either not set or is set to 0 for hashed tables.
APPEND sets SY-TABIX to the index of the last line of the table, that is, it contains the overall number of entries in the table.
COLLECT sets SY-TABIX to the index of the existing or inserted line in the table. If the table has the type HASHED TABLE, SY-TABIX is set to 0.
LOOP AT sets SY-TABIX to the index of the current line at the beginning of each loop lass. At the end of the loop, SY-TABIX is reset to the value that it had before entering the loop. It is set to 0 if the table has the type HASHED TABLE.
READ TABLE sets SY-TABIX to the index of the table line read. If you use a binary search, and the system does not find a line, SY-TABIX contains the total number of lines, or one more than the total number of lines. SY-INDEX is undefined if a linear search fails to return an entry.
SEARCH <itab> FOR sets SY-TABIX to the index of the table line in which the search string is found.
SY-TFILL
After the statements DESCRIBE TABLE, LOOP AT, and READ TABLE, SY-TFILL contains the number of lines in the relevant internal table.
SY-TLENG
After the statements DESCRIBE TABLE, LOOP AT, and READ TABLE, SY-TLENG contains the length of the lines in the relevant internal table.
SY-TOCCU
After the statements DESCRIBE TABLE, LOOP AT, and READ TABLE, SY-TLENG contains the initial amount of memory allocated to the relevant internal table.
i think this will solve your problem don't forget to reward points.
regards,

Similar Messages

  • Create an internal table with the rows of another internal table.

    Hi I want to know if posible to create an internal table structure with the  rows of another internal table?
    ex.
    If in i_tab column A has this values: row 1 = first, row 2 = second, row 3 = third.
    Now I want that the structure of my internal table be: first, second, third

    Hi,
    If you do this way then what will be the difference between the two table anyway?? First internal table has the same structure irrespective of which row you select. and you are going to store the data from each row to the rows of the second internal table. In that case, the structure of the internal table is the same as first table. and it would have same rows.
    Am I missing something here? or you want to declare the internal table with each field being the structure of the first table? In this case you'd have to do a dynamic declaration of data as the first table can have any no of rows then the second table would have any no of fields in the structure.
    Now if you know that your first internal table is going to have a fixed no of rows eg 3 rows then it becomes simple. Do the following then
    Data: begin of second_table occurs 0,
    first type <first_table type>,
    second type <first_table type>,
    third type <first_table type>,
    end of second_table.
    Regards
    Prasenjit

  • How to Read the internal table for the data download from the spool

    HI all,
    I have one issue regarding the spool ,we are getting the correct output as per requirement of  user but when we send the same to the user in pdf format they did notget the same.
    they are telling that the due date is missing from the pdf.
    Please advice me how to track the internal  table for the spool data converted intopdf in a readable format.
    the FM used for the above task is : 
    call function 'CONVERT_OTFSPOOLJOB_2_PDF'
    Please reply if any one worked on the same.
    Thanks in advance.
    Gaurav,

    Hi Wang,
    Please let me know how you solved your question.
    Points will be rewarded.
    Thanks,
    Arun.

  • Internal table(Optimizing the codes)

    Dear all,
      Please help me in optimizing the following codes..
    FORM fetch_item_data1 .
      CLEAR itab_zsbhdr .
      LOOP AT itab_zsbhdr .
        IF itab_zsbhdr-bedae = 'SPI'.
          SELECT * FROM zioel2 INTO  i_zioel
                        WHERE ordr = itab_zsbhdr-vbeln
                        AND item = itab_zsbhdr-posnr
                        AND vdatu = itab_zsbhdr-vdatu .
            APPEND i_zioel.
            CLEAR i_zioel .
          ENDSELECT .
        ENDIF .
      ENDLOOP .
    ENDFORM.                    " FETCH_ITEM_DATA1
    MY DOUBT:
    For example if you all can see the select statement,,there we can also write as,
    data : itab_zsbhdr_dummy like itab_zsbhdr occurs 0 with header line.
    CLEAR itab_zsbhdr .
    itab_zsbhdr_dummy[] = itab_zsbhdr[].
    DELETE itab_zsbhdr_DUMMY[] WHERE bedat NE 'SPI'.
    SELECT * FROM zioel2 appending table i_zioel
                 for all entries in itab_zsbhdr_DUMMY
                     WHERE ordr = itab_zsbhdr_dummy-vbeln
                     AND item = itab_zsbhdr_dummy-posnr
                     AND vdatu = itab_zsbhdr_dummy-vdatu .
    So now we can see there is no append and modify.
    So my question is ,,"Is it the right way to go?"
    Again i am taking off the loop & instead deleting those date not equals to SPI.
    So please help me by either confirming me with this particular optimization or give me some other optimized codes on this regard.
    Thanx.

    hye..
    i am inserting my comments
    FORM fetch_item_data1 .
    CLEAR itab_zsbhdr .
    You have cleared the internal table, so the content is empty.. hence it will not enter into the loop.
    LOOP AT itab_zsbhdr .
    IF itab_zsbhdr-bedae = 'SPI'.
    SELECT * FROM zioel2 INTO i_zioel
    WHERE ordr = itab_zsbhdr-vbeln
    AND item = itab_zsbhdr-posnr
    AND vdatu = itab_zsbhdr-vdatu .
    Never use a select in a loop, this means ur hitting the database n number of times which is not at all recommondable.
    APPEND i_zioel.
    CLEAR i_zioel .
    ENDSELECT .
    instead of using select and end select it can be directly writen into
    select * from [dbtab] into table [itab] for all entreis in it_comparision
    where [field] = it_comparision-field.
    ENDIF .
    ENDLOOP .
    ENDFORM. " FETCH_ITEM_DATA1
    Yeah ur second code is more recommmended with these modifications.
    hope this is useful.
    thnks.
    imran.

  • Dynamic Internal Table with the same name

    Hey Guys
    I have a question.
    I know that we can create dynamic internal table taking a struct dynamically.
    But I have 2 ques on the same subject.
    1. Can we create an internal table based on a type that we have locally declared eg
    types: begin of ty_demo.
               var1(1) type c,
               var2     type p,
              end of ty_demo.
    2. If an internal table is already declared based on the above type say data: i_tab type standard table of ty_demo.
        If i need to enhance the struct of this internal table. Can i do that by dynamically redefining it based on a different structure but keepin the same name i_tab.
    In a nut shell I cannot change the name of my itab but I want to enhance the structure.
    I Hope I am clear.
    Help will be greatly apprcieated.
    Thanks
    Sameer

    hai.
    we can create an internal table based on a type that we have locally declared, but you have to use data instead of types like.
    data: begin of ty_demo.
    var1(1) type c,
    var2 type p,
    end of ty_demo.
    check the example notes for dynamic itab .
    Dynamic internal table is internal table that we create on the fly with flexible column numbers.
    For sample code, please look at this code tutorial. Hopefully it can help you
    Check this link:
    http://www.****************/Tutorials/ABAP/DynamicInternaltable/DynamicInternalTable.htm
    Sample code:
    DATA: l_cnt(2) TYPE n,
    l_cnt1(3) TYPE n,
    l_nam(12),
    l_con(18) TYPE c,
    l_con1(18) TYPE c,
    lf_mat TYPE matnr.
    SORT it_bom_expl BY bom_comp bom_mat level.
    CLEAR: l_cnt1, <fs_dyn_wa>.
    Looping the component internal table
    LOOP AT it_bom_expl INTO gf_it_bom_expl.
    CLEAR: l_cnt1.
    AT NEW bom_comp.
    CLEAR: l_cnt, <fs_dyn_wa>, lf_mat.
    For every new bom component the material data is moved to
    temp material table which will be used for assigning the levels
    checking the count
    it_mat_temp[] = it_mat[].
    Component data is been assigned to the field symbol which is checked
    against the field of dynamic internal table and the value of the
    component number is been passed to the dynamic internal table field
    value.
    ASSIGN COMPONENT c_comp_list OF STRUCTURE <fs_dyn_wa> TO
    <fs_check>.
    <fs_check> = gf_it_bom_expl-bom_comp.
    ENDAT.
    AT NEW bom_mat.
    CLEAR l_con.
    ENDAT.
    lf_mat = gf_it_bom_expl-bom_mat.
    Looping the temp internal table and looping the dynamic internal table
    *by reading line by line into workarea, the materialxxn is been assigned
    to field symbol which will be checked and used.
    LOOP AT it_mat_temp.
    l_nam = c_mat.
    l_cnt1 = l_cnt1 + 1.
    CONCATENATE l_nam l_cnt1 INTO l_nam.
    LOOP AT <fs_dyn_table2> ASSIGNING <fs_dyn_wa2>.
    ASSIGN COMPONENT l_nam OF STRUCTURE <fs_dyn_wa2> TO <fs_xy>.
    ENDLOOP.
    IF <fs_xy> = lf_mat.
    CLEAR lf_mat.
    l_con1 = l_con.
    ENDIF.
    Checking whether the material exists for a component and if so it is
    been assigned to the field symbol which is checked against the field
    of dynamic internal table and the level of the component number
    against material is been passed to the dynamic internal table field
    value.
    IF <fs_xy> = gf_it_bom_expl-bom_mat.
    ASSIGN COMPONENT l_nam OF STRUCTURE <fs_dyn_wa> TO <fs_check>.
    CLEAR l_con.
    MOVE gf_it_bom_expl-level TO l_con.
    CONCATENATE c_val_l l_con INTO l_con.
    CONDENSE l_con NO-GAPS.
    IF l_con1 NE space.
    CONCATENATE l_con1 l_con INTO l_con SEPARATED BY c_comma.
    CLEAR l_con1.
    l_cnt = l_cnt - 1.
    ENDIF.
    <fs_check> = l_con.
    l_cnt = l_cnt + 1.
    ENDIF.
    ENDLOOP.
    AT END OF bom_comp.
    At end of every new bom component the count is moved to the field
    symbol which is checked against the field of dynamic internal table
    and the count is been passed to the dynamic internal table field
    value.
    ASSIGN COMPONENT c_count OF STRUCTURE <fs_dyn_wa> TO <fs_check>.
    <fs_check> = l_cnt.
    INSERT <fs_dyn_wa> INTO TABLE <fs_dyn_table>.
    ENDAT.
    ENDLOOP.
    regards.
    sowjanya.b

  • Passing the Dynamic Internal Table as the Output Parameter of the FM...

    Hi,
    How can we pass the internal table as the output from the Function Module TABLES parameter.
        SELECT * FROM TVRO BYPASSING BUFFER INTO TABLE <ltable>.
    Now I need to pass the dynamic internal table <ltable> as the output in the function module.
    Thanks!
    Puneet.

    I can't use TVRO as the table type. The Table name is as the Input. This program will download the contents of the table and create an app server file. It can be for any database table.
    so i want the output of this FM should be the data from that table. So what should be the TABLE type.
    like in  a program i will use:::
      FIELD-SYMBOLS: <ltable> TYPE ANY TABLE,
                     <l_line> TYPE ANY,
                     <l_field> TYPE ANY.
        SELECT * FROM (p_table) BYPASSING BUFFER INTO TABLE <ltable>.
    That is my requirement.

  • Adding Specific columns of dynamic internal table row into another column

    Hi Gurus,
    I need to add  few columns of a dynamic internal table row into another column:
    Article description hy01 hy02 total
    101      panza         10     12      22
    102      masht         12     12     24
    dynamic internal table is created and columns hy01 hy02.... can increase
    How to add the the values in hy01 hy 02... into total.
    Regards,
    Dep

    Hi,
    If you really want to have a dynamic table, then you will have to find a way to generate a whole new table, and then copy the data from the old table to the new one. There is no way to modify a type during runtime in ABAP.
    Here an example how to generate a dynamic table based on another internal table, hope this will help you.
    TYPE-POOLS: slis.
    PARAMETERS: p_nb_hy TYPE i DEFAULT 2. "Number of new HY columns to be added
    * Type ZST_T:
    *   matnr  TYPE matnr
    *   maktx  TYPE maktx
    *   hy01   TYPE i
    *   total  TYPE i
    TYPES: ty_t TYPE STANDARD TABLE OF zst_s.
    PERFORM main.
    *&      Form  main
    *       text
    FORM main.
      DATA: lt_fieldcat     TYPE slis_t_fieldcat_alv,
            lt_t            TYPE ty_t,
            lr_new_t        TYPE REF TO data.
      FIELD-SYMBOLS: <lt_new_t> TYPE STANDARD TABLE.
      "Add some lines to LT_T just to have something to display on screen
      DO 10 TIMES.
        APPEND INITIAL LINE TO lt_t.
      ENDDO.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name = 'ZST_S'
        CHANGING
          ct_fieldcat      = lt_fieldcat.
      "Copy LT_T to LR_NEW_T
      PERFORM extend_and_copy_table USING lt_t p_nb_hy CHANGING lr_new_t lt_fieldcat.
      CLEAR lt_t. "Not needed anymore...
      ASSIGN lr_new_t->* TO <lt_new_t>.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          it_fieldcat = lt_fieldcat
        TABLES
          t_outtab    = <lt_new_t>.
    ENDFORM.                    "main
    *&      Form  extend_and_copy_table
    FORM extend_and_copy_table USING ut_t           TYPE STANDARD TABLE
                                     uv_nb_hy       TYPE i
                               CHANGING cr_t        TYPE REF TO data
                                        ct_fieldcat TYPE slis_t_fieldcat_alv
                               RAISING cx_sy_struct_creation cx_sy_table_creation.
      DATA: lo_tabledescr      TYPE REF TO cl_abap_tabledescr,
            lo_structdescr     TYPE REF TO cl_abap_structdescr,
            lo_new_structdescr TYPE REF TO cl_abap_structdescr,
            lo_new_tabledescr  TYPE REF TO cl_abap_tabledescr,
            lt_components      TYPE cl_abap_structdescr=>component_table,
            ls_component       TYPE cl_abap_structdescr=>component,
            lv_field_cnt       TYPE numc2,
            ls_fieldcat        TYPE slis_fieldcat_alv,
            lr_fieldcat        TYPE REF TO slis_fieldcat_alv.
      FIELD-SYMBOLS: <ls_old_s> TYPE ANY,
                     <lt_new_t> TYPE STANDARD TABLE,
                     <ls_new_s> TYPE ANY.
      "Get the list of all components from UT_T line structure
      lo_tabledescr  ?= cl_abap_tabledescr=>describe_by_data( ut_t ).
      lo_structdescr ?= lo_tabledescr->get_table_line_type( ).
      lt_components  = lo_structdescr->get_components( ).
      "The new columns will be from type of column HY01
      ls_component-type = lo_structdescr->get_component_type( 'HY01' ).
      "The new columns will have the same fieldcat info as column HY01
      READ TABLE ct_fieldcat INTO ls_fieldcat WITH KEY fieldname = 'HY01'.
      "HY<lv_field_cnt> = new field name
      lv_field_cnt = uv_nb_hy + 1.
      "For each new column...
      DO uv_nb_hy TIMES.
        "Generate the new column field name
        CONCATENATE  'HY' lv_field_cnt INTO ls_component-name.
        ls_fieldcat-fieldname = ls_component-name.
        "Add the new field to the components of the new structure
        INSERT ls_component INTO lt_components INDEX 4.
        "Add the new field's fieldcat info to the fieldcat
        INSERT ls_fieldcat  INTO ct_fieldcat   INDEX 4.
        lv_field_cnt = lv_field_cnt - 1.
      ENDDO.
      "Adjust the COL_POS from fieldcat
      LOOP AT ct_fieldcat REFERENCE INTO lr_fieldcat.
        lr_fieldcat->col_pos = sy-tabix.
      ENDLOOP.
      "Create the new table
      lo_new_structdescr = cl_abap_structdescr=>create( p_components = lt_components ).
      lo_new_tabledescr  = cl_abap_tabledescr=>create( p_line_type = lo_new_structdescr ).
      CREATE DATA cr_t TYPE HANDLE lo_new_tabledescr.
      ASSIGN cr_t->* TO <lt_new_t>.
      "Copy all data from old to new table
      LOOP AT ut_t ASSIGNING <ls_old_s>.
        APPEND INITIAL LINE TO <lt_new_t> ASSIGNING <ls_new_s>.
        MOVE-CORRESPONDING <ls_old_s> TO <ls_new_s>.
      ENDLOOP.
    ENDFORM.                    "main

  • Is it possible to view all open internal tables in the 4.7 debugger?

    Hello,
    Is it possible to view all open internal tables in the 4.7 debugger?
    Thx.
    Andy

    As far as i know in 4,7 there is no new debugger. But it is the new debugger which brings the functionality so i fear you go no chance.
    And for the rest who is still struggling on what OP meant: He meant the tab "globals" on the variables tab of the new debugger.

  • How to send data from internal table to the shared folder in ABAP

    Hi experts,
             My requirement is to transfer data from a file to shared folder. i just did reading data from a file to a internal table. Now i want to send this internal table data into a shared folder which is  "
    xxx\y\z....".
    I do not have any idea on how to send data from internal table to the shared folder path.
    can anybody please help me out how to do this?
    Thanks & Regards
    Sireesha.

    Where that folder is located, its on presentation server i.e. desktop or application server.
    If its on presentation server, use FM GUI_UPLOAD.
    If its on application server, then use DATASET functions. Have a look at below link.
    [File Handling in ABAP|http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3ca6358411d1829f0000e829fbfe/frameset.htm]
    I hope it helps.
    Thanks,
    Vibha
    Please mark all the useful answers

  • How to display data from internal table in the SELECTION-SCREEN

    Hello Experts,
    My requirement is to display the data's from an internal table in the selection screen. I tried using selection-screen comment. But it is working only for a single record. Can anyone please tell me how to do this?

    Hi Ritika,
    we cant use write statement inside selection-screen.
    see my coding.
    SELECTION-SCREEN BEGIN OF SCREEN 123 AS WINDOW TITLE TEXT-456.
      SELECTION-SCREEN BEGIN OF BLOCK BL1 WITH FRAME TITLE TEXT-BL1
                                          NO INTERVALS.
        SELECT-OPTIONS SEL1 FOR SY-DATUM.
        PARAMETERS     PAR1(10).
    <b>** I WANT ALL RECORDS FROM AN INTERNAL TABLE HERE ONLY</b>
        SELECTION-SCREEN END OF BLOCK BL1.
      SELECTION-SCREEN PUSHBUTTON 2(10)  but1 USER-COMMAND cli1.
      SELECTION-SCREEN PUSHBUTTON 20(10)  but2 USER-COMMAND cli2.
    SELECTION-SCREEN END OF SCREEN 123.

  • How do I select a range of rows from an internal table in the debugger?

    Hi,
    I have a case where I wanted to delete a range of rows (several thousand) from an internal table using the debugger.
    It seems that rows can only be selected one at a time by selecting (clicking) on the far left side of the row.
    This is cumbersome, if not impossible when wishing to delete several thousand rows. 
    Other tools, such as Excel for example, allow for selecting a range of rows by selecting the first row and then holding the SHIFT key and selecting the last row and all rows in between will be selected.
    I can't seem to find the combination of keys that will allow this in the table (or structure) tab of the debugger.
    Is it possible to select a range of rows without having to select each row one at a time?
    Thanks for your help,
    Andy

    While it's a Table Control and should/could have a button to select all fields (or visible fields)...I don't think we can do it right now...I know it's a pain to select each row one at a time...but I don't we have any more options...
    Greetings,
    Blag.

  • To Load data to internal  Table from  the spoolrequest

    HI  All,
          I'm trying to load a data to the internal table with  the  reference of  spoolrequest generated by the programme during background process. Can anyone help me.
    Regards,
    S.JANANI

    http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm
    CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
           EXPORTING
                src_spoolid              = gd_spool_nr
                no_dialog                = c_no
                dst_device               = c_device
           IMPORTING
                pdf_bytecount            = gd_bytecount
           TABLES
                pdf                      = it_pdf_output
           EXCEPTIONS
                err_no_abap_spooljob     = 1
                err_no_spooljob          = 2
                err_no_permission        = 3
                err_conv_not_possible    = 4
                err_bad_destdevice       = 5
                user_cancelled           = 6
                err_spoolerror           = 7
                err_temseerror           = 8
                err_btcjob_open_failed   = 9
                err_btcjob_submit_failed = 10
                err_btcjob_close_failed  = 11
                OTHERS                   = 12.
      CHECK sy-subrc = 0.
    * Transfer the 132-long strings to 255-long strings
      LOOP AT it_pdf_output.
        TRANSLATE it_pdf_output USING ' ~'.
        CONCATENATE gd_buffer it_pdf_output INTO gd_buffer.
      ENDLOOP.
      TRANSLATE gd_buffer USING '~ '.
      DO.
        it_mess_att = gd_buffer.
        APPEND it_mess_att.
        SHIFT gd_buffer LEFT BY 255 PLACES.
        IF gd_buffer IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.

  • Reading the older questions, is there a way in which the full screen slide shows can be saved and/or exported?

    Reading the older questions, is there a way in which a full screen slide show (such as places or geotagged photo's) can be saved and/or exported for viewing by another party?

    Yes. Just export the slideshow and select your preferred output size.
    Regards
    TD

  • What is exchange table in the upgrade of ECC6?

    what is exchange table in the upgrade of ECC6?

    I found the answer, it is table like DD*, tadir...

  • Moving  data in all the internal tables to the final table  t_data

    hi all,
    how to data in all the internal tables to the final table  t_data
    *selecting fields from bkpf table
      SELECT     bukrs
                 belnr
                 gjahr
                 bldat
                 xblnr
                 usnam
         FROM    bkpf
         INTO TABLE t_bkpf
        WHERE  bukrs  EQ po_bukrs AND
               belnr IN  so_belnr  AND
               budat IN  so_budat  AND
               blart IN  so_blart.
      IF t_bkpf[] IS INITIAL.
        MESSAGE a999(zfi_ap_gl) WITH text-011.
        STOP.
      ELSE.
    *selecting fields from  bseg table.
        SELECT  bukrs
                belnr
                gjahr
                koart
                shkzg
                dmbtr
                zuonr
                sgtxt
                kostl
                hkont
                lifnr
                prctr
                FROM bseg
                INTO  TABLE  t_bseg
                FOR ALL ENTRIES IN t_bkpf
              WHERE bukrs EQ  t_bkpf-bukrs AND
                    belnr EQ t_bkpf-belnr AND
                    gjahr EQ t_bkpf-gjahr AND
                    lifnr IN so_lifnr.
      ENDIF.
      IF t_bseg[] IS INITIAL.
        MESSAGE a999(zfi_ap_gl) WITH text-011.
        STOP.
      ELSE.
    *selecting the companies address from adrc table
        SELECT  SINGLE addrnumber street str_suppl2 city1
                       region post_code1
                       FROM adrc
                       INTO wa_adrc
                       WHERE addrnumber EQ w_adrnr.
    *selecting adrnr from the lfa1 table
        SELECT lifnr adrnr name1 ort01 regio pstlz
                     FROM lfa1
                     INTO TABLE t_adrnr
                     FOR ALL ENTRIES IN t_bseg
                     WHERE  lifnr EQ t_bseg-lifnr.
        IF NOT t_adrnr[] IS INITIAL.
    *populating the t_vaddress table.
          SELECT  addrnumber
                  street
                  str_suppl2
                  FROM adrc
                  INTO TABLE t_vaddress
                  FOR ALL ENTRIES IN t_adrnr
                  WHERE addrnumber  EQ t_adrnr-adrnr.
    *populating the t_vendor table with the vendor address
          SELECT lifnr
                 adrnp_2
                 namev
                 name1
                 INTO TABLE t_vendor
                 FROM knvk
                 FOR ALL ENTRIES IN t_adrnr
                 WHERE  lifnr EQ t_adrnr-lifnr AND
                        adrnp_2 EQ t_adrnr-adrnr.
        ENDIF.
      ENDIF.

    Loop the internal table which is having the maximum number of records,then use read table....for other internal tables....in that loop and then append them into final internal table.
    Ex-LOOP AT IT_VBRP INTO WA_VBRP.
        WA_FINAL-WERKS = WA_VBRP-WERKS_I.
        WA_FINAL-KUNAG = WA_VBRP-KUNAG.
        WA_FINAL-AEDAT = WA_VBRP-AEDAT.
        READ TABLE IT_KONV INTO WA_KONV WITH KEY KNUMV = WA_VBRP-KNUMV
                                                 KPOSN = WA_VBRP-POSNR_I.
        IF SY-SUBRC EQ 0.
          WA_FINAL-KSCHL = WA_KONV-KSCHL.
          CLEAR WA_KONV.
        ENDIF.
        READ TABLE IT_KNA1 INTO WA_KNA1  WITH KEY KUNNR = WA_VBRP-KUNAG.
        IF SY-SUBRC EQ 0.
          WA_FINAL-NAME1 = WA_KNA1-NAME1.
          CLEAR WA_KNA1.
        ENDIF.
        ENDIF.
        APPEND WA_FINAL TO IT_FINAL.
        CLEAR: WA_FINAL,WA_KONV,wa_kna1.
      ENDLOOP.

Maybe you are looking for