Internal table problem

Hi Friends,
I am not an expert in ABAP, but I seem to have a weird problem with the following piece of code. When I uncomment the write statement in the first loop code and execute, it actually displays values for
itab_zsel-zdate1, itab_zsel-ztime1, itab_zsel-zhr, itab_zsel-zvar_log.
But
when I have the code exactly as shown below, it displays just the itab_zsel-zdate1, itab_zsel-ztime1 and not itab_zsel-zvar_log
Can you tell me wht is wrong with this code?
itab_log and itab_sel are internal tables
loop at itab_log.
loop at itab_zsel where zdate1 = itab_log-zbatchdate and zhr = itab_log-zhrmin.
  itab_zsel-zvar_log = itab_log-zlogid.
modify table itab_zsel.
*write:/ itab_zsel-zdate1, itab_zsel-ztime1, itab_zsel-zhr, itab_zsel-zvar_log.
endloop.
endloop.
loop at itab_zsel.
write:/ itab_zsel-zdate1, itab_zsel-ztime1, itab_zsel-zvar_log.
endloop.
Thank you

Hi Deepthi,
  I did not understand what you are trying to do,
but try this and see if it helps
loop at itab_log.
clear lw_tabix.
lw_tabix =sy-tabix.
read table itab_zsel with key zdate1 = itab_log-zbatchdate zhr = itab_log-zhrmin.
if sy-subrc = 0.
itab_zsel-zvar_log = itab_log-zlogid.
modify itab_zsel index lw_tabix.
*write:/ itab_zsel-zdate1, itab_zsel-ztime1, itab_zsel-zhr, itab_zsel-zvar_log.
endif.
endloop.
loop at itab_zsel.
write:/ itab_zsel-zdate1, itab_zsel-ztime1, itab_zsel-zvar_log.
endloop.
Regards,
Ravi

Similar Messages

  • Bdc upload file data into internal table problem with gui_upload fm

    Hello experts,
    my coding is like this ..
    data : begin of itab occurs 0 .
    field1 like mara-matnr,
    field2......
    etc,
    end of itab.
    data: file1 type string.
    parameter :file like rlgrap-filename.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR file.
    CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
    EXPORTING
    static = 'X'
    mask = space
    field_name = 'FILE'
    CHANGING
    file_name = file.
    START-OF-SELECTION.
    FILE1 = FILE . "HERE I AM PASSING INTO STRING
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = FILE1
    FILETYPE = 'ASC'
    has_field_separator = 'X'
    TABLES
    data_tab = itab. " here the data is not populating from the file , it is giving the error like speified table not found.
    HERE i am getting the message like "specified table name not recgonised" . the data is not populating into the itab from the file.
    file structure is same as the internal table.
    I stored the file as .txt( ie in notepad).
    my file is like this..
    10000 200 323 sunndarrr.......
    i had a problem with this bdc , i am getting like "specified table name not recgonised" in the fm gui_upload while debugging.
    when i am using the ws_upload it is working fine.
    please guide me where i have done the mistake.
    thank you so much for all the replies.

    Hi,
    Have a look on the following code.
    TABLES: kna1.
    DATA: BEGIN OF itab1 OCCURS 0,
          str(255),
          END OF itab1.
    DATA: itab2 TYPE kna1 OCCURS 0 WITH HEADER LINE.
    CALL FUNCTION 'WS_UPLOAD'
      EXPORTING
        filename                = 'D:\ABAP EVE\ffile1.txt'
        filetype                = 'ASC'
      TABLES
        data_tab                = itab1
      EXCEPTIONS
        conversion_error        = 1
        file_open_error         = 2
        file_read_error         = 3
        invalid_type            = 4
        no_batch                = 5
        unknown_error           = 6
        invalid_table_width     = 7
        gui_refuse_filetransfer = 8
        customer_error          = 9
        no_authority            = 10
        OTHERS                  = 11.
    IF sy-subrc <> 0.
      WRITE:/ 'sorry'.
    ELSE.
      LOOP AT itab1.
        SPLIT itab1-str AT ',' INTO itab2-kunnr itab2-name1.
        APPEND itab2.
      ENDLOOP.
      IF sy-subrc = 0.
        LOOP AT itab2.
          WRITE:/ itab2-kunnr,itab2-name1.
          INSERT INTO kna1 VALUES itab2.
        ENDLOOP.
        IF sy-subrc = 0.
          WRITE:/ 'inserted'.
        ELSE.
          WRITE:/ 'not inserted'.
        ENDIF.
      ELSE.
        WRITE:/ 'fail'.
      ENDIF.
    ENDIF.
    Flat file:
    10001,Sadney
    10003,Yogesh
    20005,Madan
    1.U need to define internal table with one field of max size
    2.upload the flat file data into that internal table
    3.split that internal table data into another internal table(having fields)
    <REMOVED BY MODERATOR>
    thanks,
    Chandu
    Edited by: Alvaro Tejada Galindo on Apr 30, 2008 12:17 PM

  • Dynamic internal table problem in FM - HR_INFOTYPE_OPERATIONS

    Dear All,
    I have a problem when I use a Dynamic internal table in FM - HR_INFOTYPE_OPERTATION..
    Please suggest me on the way to overcome this problem..
    We wanted to have a dynamic Program for Info type operations which can be used for any info types as we are changing only BEGDA and the related actions
    So in my program I have the parameters to accept
    P_BEGDA - 01.10.2007
    P_INFTY - P0008
    P_ACTIO - COPY
    I am able to create a dynamic table based on the parameters P_INFTY and able to read it also using the FM - HR_READ_INFOTYPE
    BUT when I pass the dynamic internal table to a FM - HR_INFOTYPE_OPERTATION I am getting a DUMP
    The DUMP is at the below statement from FM - HR_INFOTYPE_OPERTATION
    ASSIGN record TO <record> CASTING TYPE (tabname). "XDP UniCode
    It gives the below possiblities
    "ASSIGN_BASE_TOO_SHORT" C 
    "SAPLHRMM" or "LHRMMU03"  
    "HR_INFOTYPE_OPERATION"   
    But If I use the below internal table
    Data : g_t_0008 like P0008 occurs 0 with header line.
    And If I use the internal table g_t_0008 instead of dynamic tables then it works. So I strongly feel it's due to not having a header in the dynamic table below see below the sample code on how I am generating a dynamic internal table
    field-symbols: <dyn_table> type standard table.
    data: dy_table type ref to data,
          dy_line  type ref to data,
          xfc type lvc_s_fcat,
          ifc type lvc_t_fcat.
    to get the srurcute
    perform get_structure using l_f_table.
    perform create_dynamic_itab .
    assign dy_table->* to <dyn_table>.
    perform get_data tables <dyn_table01>
                      using pernr-pernr p_infty.
    below are the forms routine….
    form get_structure using p_table.
    data : idetails type abap_compdescr_tab,
           xdetails type abap_compdescr.
    data : ref_table_des type ref to cl_abap_structdescr.
    clear : ifc[], dy_table.
    Get the structure of the table.
      ref_table_des ?=
          cl_abap_typedescr=>describe_by_name( p_table ).
      idetails[] = ref_table_des->components[].
      loop at idetails into xdetails.
        clear xfc.
        xfc-fieldname = xdetails-name .
        xfc-datatype = xdetails-type_kind.
        xfc-inttype = xdetails-type_kind.
        xfc-intlen = xdetails-length.
        xfc-decimals = xdetails-decimals.
        append xfc to ifc.
      endloop.
    endform.
    form create_dynamic_itab.
    Create dynamic internal table and assign to FS
      call method cl_alv_table_create=>create_dynamic_table
                   exporting
                      it_fieldcatalog = ifc
                   importing
                      ep_table        = dy_table.
    endform.
    *&      Form  get_data
    form get_data  tables   p_table
                   using    p_pernr
                            p_infty.
    clear : p_table, p_table[].
      CALL FUNCTION 'HR_READ_INFOTYPE'
           EXPORTING
                PERNR           = P_PERNR
                INFTY           = p_infty
                BEGDA           = p_datum
                ENDDA           = p_datum
           TABLES
                INFTY_TAB       = p_table
           EXCEPTIONS
                INFTY_NOT_FOUND = 1
                OTHERS          = 2.
      CHECK SY-SUBRC EQ 0.
    IF lines( p_table ) GT 0.
    *write :/'Record exist' , 'IT', p_infty.
    clear p_table.
    PERFORM hr_operation tables  p_table
                         using  g_t_t588d-actio g_t_t588d-INFTY
                                g_t_t588d-SUBTY.
    else.
    PERFORM append_status using g_t_itab-pernr p_infty ' '
                                'Error' 'No records'.
    ENDIF.
    endform.                    " get_data
    form hr_operation  tables    p_table
                       using     p_actio P_INFTY P_SUBTY.
    data: l_f_return    LIKE bapireturn1.
    ASSIGN COMPONENT 'BEGDA' OF STRUCTURE p_table TO <l_field>.
          <l_field> = p_begda.
            CALL FUNCTION 'HR_INFOTYPE_OPERATION'
              EXPORTING
                infty         = P_infty
                number        = G_T_ITAB-PERNR
                subtype       = P_subty
                validityend   = g_f_endda
                validitybegin = P_datum
                record        = P_TABLE
                operation     = p_actio
              IMPORTING
                return        = l_f_return.
    IF sy-subrc NE 0.
    ENDIF.
    ENDFORM.

    try
    using field symbol for a wrk area instead of Field symbol for a table
    loop your inernal table (again a field symbol) assigning to <fs_wrkarea>
    in loop call HR_INFO.._OP..
    reward if helpful

  • Smartform loop into internal table problem

    hello experts,
    i am doing an example given in **************** regarding smartforms. I am getting problem which doing the smartforms . please help me.
    http://****************/Tutorials/Smartforms/SFMain.htm
    in that i am doing the program
    Working with loop.
    I have done exactly as the screen shots in the program.
    Now in the main window i created a loop.
    in that loop i am not getting the option internal table.
    But it is showing as operand . It is in the data tab of the loop.
    I searched the all the tabs in the loop but did not find the option  internal table.
    so then i ticked the operand and i did as speified in the screen shots.
    it_tab into fs_tab
    Then i created a text and then placed &fs_tab-vbeln& etc.
    then i executed the smartform now in the output i am not getting the sales order number , item etc.
    The output is showing like
    &fs_tab-vbeln&     &fs_tab-posnr&   etc.
    please guide me how to get the internal table option in  the loop. And also tell me how to rectify this problem

    thanks for all the replies.
    I will give all  at the time of closing my thread.
    Hi Sravanthi -> in loop node i am not getting the internal table insted of that i am getting operand in the data tab.
    This is my main problem.I dont why operand is comming there.
    my version is 4.7e
    Hi Karthik and swati -> i simply hard coded the statements in the text as shown in the example.
    Now i will try with the add field.
    But please tell me why i am not getting internal table option in loop.

  • Dynamic ALV Internal table Problem

    Hi all,I have successfully built an IT using method 'create_dynamic_table'.But my problems are :
    1)When Iam trying to select the data with multiple tables then it is short dumping.
    2)I tried to oselect the data using one table,after selecting the data if I use FM REUSE_ALV_Grid_Display then it is showing short dump with error 'type conflict when calling FM'.
    I never used field symbols before.PLZ complete my program or give me suffecient feedback.Here is my program :
    DATA : g_tdref TYPE REF TO data,
           g_wdref TYPE REF TO data.
    DATA : dats LIKE vbbe-mbdat,
           t_fieldcat TYPE lvc_t_fcat,
           wa_fieldcat TYPE lvc_s_fcat.
    FIELD-SYMBOLS : <it_dyn> TYPE STANDARD TABLE,
                    <wa_dyn>,
                    <dyn_field>.
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS : s_mbdat FOR dats.
    SELECTION-SCREEN END OF BLOCK blk1.
    wa_fieldcat-tabname = 'MSKA'.
    wa_fieldcat-fieldname = 'WERKS'.
    wa_fieldcat-datatype = 'CHAR'.
    wa_fieldcat-intlen = '10'.
    APPEND wa_fieldcat TO t_fieldcat.
    CLEAR : wa_fieldcat.
    wa_fieldcat-tabname = 'MSKA'.
    wa_fieldcat-fieldname = 'MATNR'.
    wa_fieldcat-datatype = 'CHAR'.
    wa_fieldcat-seltext = 'Material Number'.
    wa_fieldcat-intlen = '18'.
    APPEND wa_fieldcat TO t_fieldcat.
    CLEAR : wa_fieldcat.
    wa_fieldcat-tabname = 'MAKT'.
    wa_fieldcat-fieldname = 'MAKTX'.
    wa_fieldcat-datatype = 'CHAR'.
    wa_fieldcat-intlen = '10'.
    APPEND wa_fieldcat TO t_fieldcat.
    CLEAR : wa_fieldcat.
    wa_fieldcat-tabname = 'VBBE'.
    wa_fieldcat-fieldname = 'MBDAT'.
    wa_fieldcat-datatype = 'CHAR'.
    wa_fieldcat-intlen = '10'.
    APPEND wa_fieldcat TO t_fieldcat.
    CLEAR : wa_fieldcat.
    wa_fieldcat-tabname = 'VBBE'.
    wa_fieldcat-fieldname = 'OMENG'.
    wa_fieldcat-datatype = 'QUAN'.
    wa_fieldcat-intlen = '10'.
    APPEND wa_fieldcat TO t_fieldcat.
    CLEAR : wa_fieldcat.
    DATA : d TYPE i,
           v(02) TYPE n VALUE '0',
           day(8) TYPE c.
    d = s_mbdat-high - s_mbdat-low + 1.
    DO d TIMES.
      v = v + 1.
      CONCATENATE 'Day' v INTO day.
      wa_fieldcat-tabname = 'VBBE'.
      wa_fieldcat-fieldname = day.
      wa_fieldcat-datatype = 'DATS'.
      wa_fieldcat-seltext = day.
      wa_fieldcat-intlen = '8'.
      APPEND wa_fieldcat TO t_fieldcat.
      CLEAR : wa_fieldcat.
    ENDDO.
    *-----Building Dynamic internal table.
    CALL METHOD cl_alv_table_create=>create_dynamic_table
      EXPORTING
        it_fieldcatalog = t_fieldcat
      IMPORTING
        ep_table        = g_tdref.
    ASSIGN g_tdref->* TO <it_dyn>.
    CREATE DATA g_wdref LIKE LINE OF <it_dyn>.
    ASSIGN g_wdref->* TO <wa_dyn>.
    SELECT m~werks m~matnr v~omeng v~mbdat INTO CORRESPONDING FIELDS
    OF TABLE <it_dyn> FROM mska AS m INNER JOIN vbbe AS v
    ON m~posnr = v~posnr WHERE v~mbdat IN s_mbdat.

    *DATA : d TYPE i,
          v(02) TYPE n VALUE '0',
          day(8) TYPE c.
    *d = s_mbdat-high - s_mbdat-low + 1.
    *DO d TIMES.
    v = v + 1.
    CONCATENATE 'Day' v INTO day.
    wa_fieldcat-tabname = 'VBBE'.
    wa_fieldcat-fieldname = day.
    wa_fieldcat-datatype = 'DATS'.
    wa_fieldcat-seltext = day.
    wa_fieldcat-intlen = '8'.
    APPEND wa_fieldcat TO t_fieldcat.
    CLEAR : wa_fieldcat.
    *ENDDO.
    *-----Building Dynamic internal table.
    CALL METHOD cl_alv_table_create=>create_dynamic_table
      EXPORTING
        it_fieldcatalog = t_fieldcat
      IMPORTING
        ep_table        = g_tdref.
    ASSIGN g_tdref->* TO <it_dyn>.
    CREATE DATA g_wdref LIKE LINE OF <it_dyn>.
    ASSIGN g_wdref->* TO <wa_dyn>.
    SELECT OMENG FROM VBBE INTO CORRESPONDING FIELDS OF TABLE <IT_DYN> WHERE MBDAT IN S_MBDAT.
    BREAK-POINT.
    YOU WILL GET VALUES IN INTERNAL TABLE.
    TO SOLVE YOUR ISSUE YOU SHOULD USE NUM INSTEAD OF DATS.

  • Import   internal table problem

    Hi..
      I have 2 programs with me.
    In the first program my code is like this
    REPORT  Y_TEST1.
    DATA:
      BEGIN OF FS_DATA,
        NUMBER   TYPE I,
        NAME(30) TYPE C,
      END OF FS_DATA.
    DATA:
      T_DATA LIKE STANDARD TABLE OF FS_DATA.
    DEFINE APPEND_TABLE.
      FS_DATA-NUMBER = &1.
      FS_DATA-NAME = &2.
      APPEND FS_DATA TO T_DATA.
      CLEAR FS_DATA.
    END-OF-DEFINITION.
    APPEND_TABLE 1 'HARISH'.
    APPEND_TABLE 2 'MAHESH'.
    APPEND_TABLE 3 'SURESH'.
    APPEND_TABLE 4 'WAJID'.
    APPEND_TABLE 5 'SANKAR'.
    APPEND_TABLE 6 'SATISH'.
    APPEND_TABLE 7 'CHANDU'.
    APPEND_TABLE 8 'VEERESH'.
    EXPORT T_DATA TO MEMORY ID 'NAM'.
    SUBMIT Y_TEST1_CALLED.
    And my Second Program code is ..
    REPORT  Y_TEST1_CALLED.
    DATA:
        FS_DATA(30).
    DATA:
    T_DATA LIKE STANDARD TABLE OF FS_DATA.
    IMPORT T_DATA FROM MEMORY ID 'NAM' . ******ERROR
    LOOP AT T_DATA INTO FS_DATA.
      WRITE: / FS_DATA.
    ENDLOOP.
    These are the programs that i have here in
    second Prog i am getting Shortdump as Types mis match ..
    but according  to my requirement i need to get the data into itab t_data without changing structure of the internal tables ,
    here I need to use any of options in IMPORT
    { { { {[ACCEPTING PADDING] [ACCEPTING TRUNCATION]}
            | [IGNORING STRUCTURE BOUNDARIES] }
            [IGNORING CONVERSION ERRORS [REPLACEMENT CHARACTER rc]] }
        | [IN CHAR-TO-HEX MODE] }
        [CODEPAGE INTO cp]
        [ENDIAN INTO endian].
    what i need to use and how ......
    i think correct option is IGNORING CONVERSION ERRORS but it is giving syntax error ..can any one send me the proper code and my system is ECC 5.

    Hi Pasupulati,
    Please try it in this way. I have already done it in my one requirement.
    Hi,
    Please use it in this way,
    *& First Prog----
    data: char4(4) type c.
    EXPORT char4 TO MEMORY ID 'ZOT'.
    *& Other Prog---
    Data: char4(4) type c.
    IMPORT char4 FROM MEMORY ID 'ZOT'.
    Once you get the output.
    Then Free the Memory
    syntax is:
    Free memory id 'ZOT'.

  • Urgent...simple internal table problem

    Hi gurus
    i am filling a internal table like this
    loop at i_0001 into s_0001.
    clear out_final.
    out_final-pernr = s_0001-pernr.
    out_final-parea = s_0001-parea.
    loop at i_0021 into s_0021 where pernr = s_0001-pernr and subty ne '7'.
    perform rec1.
    endloop.
    loop at i_0106 into s_0106 where pernr = s_0001-pernr and subty ne '7'.
    perform rec2.
    append out_final to i_final.
    clear out_final.
    endloop.
    and my performs are
    FORM rec1.
    read table i_0021 into s_0021 with key pernr = s_0001-pernr.
    out_final-fname = s_0021-fname.
    out_final-lname = s_0021-lname.
    out_final-bdate = s_0021-bdate.
    ENDFORM.                    " rec1
    FORM rec2.
    read table i_0106 into s_0106 with key pernr = s_0001-pernr.
    out_final-ssn = s_0106-ssn.
    out_final-add1 = s_0106-add1.
    out_final-add2 = s_0106-add2.
    out_final-city = s_0106-city.
    out_final-state = s_0106-state.
    out_final-country = s_0106-country.
    out_final-zip = s_0106-zip.
    out_final-hphone = s_0106-hphone.
    ENDFORM.                    " rec2
    all my declerations and syntax are correct
    now i have 2 simple things to ask
    1. when i write data i get duplicate records ....is my loop , clear and append are in right place
    2. i wan to delimit this data for a condition where bdate is greater than 18. bdate is of type p0021-fgbdt which i have to format using some FM....how do i do that where do i have to add code for that.
    thanks in advance
    plz help
    regards

    Hi,
      Check the below code.
    loop at i_0001 into s_0001.
    clear out_final.
    out_final-pernr = s_0001-pernr.
    out_final-parea = s_0001-parea.
    <b>*****loop at i_0021 into s_0021 where pernr = s_0001-pernr and subty ne '7'.</b>
    perform rec1.
    <b>***endloop.
    ****loop at i_0106 into s_0106 where pernr = s_0001-pernr and subty ne '7'.</b>perform rec2.
    <b>if not out_final is initial.</b>
    append out_final to i_final.
    <b>endif.</b>
    clear out_final.
    endloop.
    and my performs are
    FORM rec1.
    read table i_0021 into s_0021 with key pernr = s_0001-pernr
                                                             <b>subty ne '7'.</b>
    <b>if sy-subrc = 0.</b>
    out_final-fname = s_0021-fname.
    out_final-lname = s_0021-lname.
    out_final-bdate = s_0021-bdate.
    <b>endif.</b>
    ENDFORM. " rec1
    FORM rec2.
    read table i_0106 into s_0106 with key pernr = s_0001-pernr
                                                             <b>subty ne '7'.</b>
    <b>if sy-subrc = 0.</b>
    out_final-ssn = s_0106-ssn.
    out_final-add1 = s_0106-add1.
    out_final-add2 = s_0106-add2.
    out_final-city = s_0106-city.
    out_final-state = s_0106-state.
    out_final-country = s_0106-country.
    out_final-zip = s_0106-zip.
    out_final-hphone = s_0106-hphone.
    <b>endif.</b>
    ENDFORM. " rec2
    <b></b><b></b>
    Hope this will solve ur duplication problem

  • Internal table problem for BDC

    Hai i am having flatfile like this format
    H   text1   1000   plant_name   10 short_text   X     X
                                                     20 short_text   X     X
                                                     30 short_text   X     X
    H   text1   1000   plant_name   10 short_text   X     X
                                                     20 short_text   X     X
                                                     30 short_text   X     X
    now this H indicates new record. In each new record number of line items are there.
    How to proceed using internal tables. please help me.

    hi,
    arrange your flat file like this...
    H    text1 1000  plant_name  10  short_text X X
    H    text1 1000  plant_name  20 short_text  X X
    H    text1 1000  plant_name  30 short_text  X X
    H1  text1 1000  plant_name  10 short_text  X X
    H1  text1 1000  plant_name  20 short_text  X X
    H1  text1 1000  plant_name  30 short_text  X X
    now make an internal table having all the fields present in your flat file
    and loop at that internal table and on change of field H call your function module and pass the value for record H......
    similarly it will work for H1.....H2.....
    for eg...
    LOOP AT "Your internal table" INTO "Work area of your internal table".
        AT END OF "field name for H".
          CALL FUNCTION ''Your function module"

  • Dynamic Internal Table problem

    Hello all,
    I have created a Dynamic ALV using RTTS classes like cl_abap_structdescr,cl_abap_tabledescr and cl_abap_datadescr.
    The number of columns to be displayed is dynamic and i am able to display the same.
    Now i need to perform SUBTOTAL on few of the columns.
    In dynamic table how do i assign those columns as Type 'I' so that i can perform DO_SUM.
    I used the method GET_I of class cl_abap_elemdescr but unable to achive the same.
    Kindly suggest.
    Regards,
    Arun

    I know when I need to create a dynamic alv I use the following (plumbing code removed).
    DATA: it_field_catalog      TYPE lvc_t_fcat.
    DATA: dyn_table             TYPE REF TO data.
    FIELD-SYMBOLS: <dyn_table>         TYPE table.
    create your alv as normal. Or auto create the entries based on the tables, whatever conditions you use to determine the structure of the table at run time.
      ls_fcat-fieldname   = '???'.
      ls_fcat-inttype     = '?' .
      ls_fcat-outputlen   = '?' .
      ls_fcat-coltext     = '?' .
      ls_fcat-seltext     = '?' .
      ls_fcat-f4availabl  = '?'.
      ls_fcat-edit        = '?'.
      ls_fcat-key         = '?'.
      APPEND ls_fcat TO it_field_catalog .
        CALL METHOD cl_alv_table_create=>create_dynamic_table
           EXPORTING it_fieldcatalog = it_field_catalog
           IMPORTING ep_table        = dyn_table
           EXCEPTIONS
                  generate_subpool_dir_full = 1.
       ASSIGN dyn_table->* TO <dyn_table>.
    This field symbol to the table can then be passed in place of the table when calling your alv and performing operations on it.

  • Upload data into internal table

    Hi All,
             could you help me on this plaese,
                                                     i want to convert the text data into the internal table.
    problem is in my notepad i having the field names and values
    i want to upload that total data into my internal table.
    i.e in notepad  having like this
    NAME      NUMBER }------   field names
    NARESH     222          }------ values
    KUMAR     333
    REDDY     444
    this is tha data, now i want to upload field name s  as well as values.
    thanks,
    naresh

    Hi ,
    call following function module
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          FILENAME                      =  'PC_FILE'   <----
    File name
          FILETYPE                      = u2018ASCu2019
          HAS_FIELD_SEPARATOR           = 'X'
          DAT_MODE                = 'X'
        TABLES
          DATA_TAB                      = 'Your internal Table'  <-------Internal table name
       EXCEPTIONS
         FILE_OPEN_ERROR               = 1
         FILE_READ_ERROR               = 2
         NO_BATCH                      = 3
         GUI_REFUSE_FILETRANSFER       = 4
         INVALID_TYPE                  = 5
         NO_AUTHORITY                  = 6
         UNKNOWN_ERROR                 = 7
         BAD_DATA_FORMAT               = 8
         HEADER_NOT_ALLOWED            = 9
         SEPARATOR_NOT_ALLOWED         = 10
         HEADER_TOO_LONG               = 11
         UNKNOWN_DP_ERROR              = 12
         ACCESS_DENIED                 = 13
         DP_OUT_OF_MEMORY              = 14
         DISK_FULL                     = 15
         DP_TIMEOUT                    = 16
         OTHERS                        = 17
      IF SY-SUBRC <> 0.
       MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.

  • Performance Problems with "For all Entries" and a big internal table

    We have big Performance Problems with following Statement:
    SELECT * FROM zeedmt_zmon INTO TABLE gt_zmon_help
      FOR ALL ENTRIES IN gt_zmon_help
        WHERE
        status = 'IAI200' AND
        logdat IN gs_dat AND
        ztrack = gt_zmon_help-ztrack.
    In the internal table gt_zmon_help are over 1000000 entries.
    Anyone an Idea how to improve the Performance?
    Thank you!

    >
    Matthias Weisensel wrote:
    > We have big Performance Problems with following Statement:
    >
    >  
    SELECT * FROM zeedmt_zmon INTO TABLE gt_zmon_help
    >   FOR ALL ENTRIES IN gt_zmon_help
    >     WHERE
    >     status = 'IAI200' AND
    >     logdat IN gs_dat AND
    >     ztrack = gt_zmon_help-ztrack.
    >
    > In the internal table gt_zmon_help are over 1000000 entries.
    > Anyone an Idea how to improve the Performance?
    >
    > Thank you!
    You can't expect miracles.  With over a million entries in your itab any select is going to take a bit of time. Do you really need all these records in the itab?  How many records is the select bringing back?  I'm assuming that you have got and are using indexes on your ZEEDMT_ZMON table. 
    In this situation, I'd first of all try to think of another way of running the query and restricting the amount of data, but if this were not possible I'd just run it in the background and accept that it is going to take a long time.

  • Problem to upload the data into internal table record length more than 6000

    Hi all
            I stuck with this problem from past 3 days. I have to upload the data from excel sheet. iam making it tab delimited and trying to upload from gui_upload. but in the structure of file, we have, one field of 4000 characters, and other fields of 255 characters.
    how can i upload this into internal table . From excel sheet or from tab delimeted or any other format? or any special function module is there?  while iam doing this its truncating the datat 255 characters and not uploading the other fields also...
    can any one of you help me out. ASAP
    thnks in advance

    from one of the forum iam just pasting code which it is used in lsmw, try the same logic in ur code hope it can work.
    you have to create multiple lines with do...enddo loop., like this:
    (assuming excel_long_text-text is 924 characters long, 7 lines X 132 char)
    __GLOBAL_DATA__
    data: offset type i,
    text_132(132) type c.
    __BEGIN_OF_RECORD__ Before Using Conversion Rules
    Rule : Default Settings Modified
    Code: /sapdmc/ltxtl = init_/sapdmc/ltxtl.
    CLEAR offset.
    DO 7 TIMES.
    text_132 = excel_long_text-text+offset(132).
    offset = offset + 132.
    __END_OF_RECORD__ After Using Conversion Rules
    Rule : Default Settings Modified
    Code: transfer_record.
    ENDDO.
    also check this
    COMMIT_TEXT
    To load long text into SAP
    READ_TEXT
    To load long text into SAP

  • BRFplus: Problem updating values in an internal table in a loop expression

    Hi
    I'm looking into the loop expression type of BRFplus and I have come across a problem updating an internal table, I'm trying to create and populate the table using a loop, here is the functionality I'm trying to achieve:
    In a rule set create an internal MONTH_TBL table containing 12 rows of two columns: MONTH_NUM containing values 1 through 12 and MONTH_VAL containing an amount (initially 0,00 EUR in all 12 rows).
    After initializing the table traverse through SFLIGHT table and for each row add PRICE from the table to MONTH_VAL in the row of MONTH_TBL corresponding to the month of FLDATE field in SFLIGHT.
    The initialization of MONTH_TBL works as intended, as does the traversal of and retrieval of values from SFLIGHT. The problem however is the update of the internal table MONTH_TBL (defined as result data object for the function). I don't get an error, but the tables does not get updated, and I cannot seem to find out what the problem is. I would have attached an XML extract of the function + ruleset for information, but it dosen't seem like that is possible, I could e-mail it on request (for SAP employees with access to system QU5 the function is LOOP_TEST in application Z_KLAUS_TEST).
    I hope that this is sufficient information to understand the issue that I'm dealing with.
    best regards
    Klaus Stenbæk, KMD

    Hi Klaus,
    The Loop expression is part of NW 7.02 which is not yet released. When you experience the problem as part of a test you should have a contact at SAP for dealing with problems/errors. Usually SAP-internal messages are used for this purpose. Please clarify with your SAP contact how the model is.
    BR,
    Carsten

  • Problem in assigning field symbol to a nested internal table

    Hi All,
    I have searched the forum but could not find a solution to this problem. I have a requirement where I need to define an internal table within an internal table, so I have used pointer within the outer internal table(itab2) which point to the inner table. However, I am facing problem while assigning the pointer.
    data: begin of struct1 occurs 0,
            fld3(10) type C,
           end of struct1.
    data: begin of itab2 occurs 0,
            fld1(10) type C,
            fld2(10) type C,
            p_inner like ref to struct1,
          end of itab2.
    field-symbols <inner_table> type any.
    I want to assign "itab2->p_inner->* " to "<inner_table>".
    However, the following statement is Not working:
    assign itab2->p_inner->* to <inner_table>.
    I want to fill the values within fields fld1, fld2 and fld3 and append it in itab2.
    The final table should be like:
    ITAB2:
    fld1    fld2    fld3
    aa      bb      cc
                     dd
                     ee
    11      22      33
                     44
                     55
    I have tried many other ways too but could not suceed, please help.
    Thanks,
    Vishal.

    Thanks Matt,
    But how do I append the values within this internal table ??
    When I am using the following code:
    ls_wa-fld3 = 'A'.
    ls_wa-t_in-fld1 = 'B'.
    ls_wa-t_in-fld2 = 'C'.
    ls_wa-t_in-fld1 = 'D'.
    ls_wa-t_in-fld2 = 'E'.
    append ls_wa to lt_tab.
    Its giving an error that:
    The data object "LS_WA" does not have a component called "T_IN-FLD1".
    I wanted the values to be appended in the following way in lt_tab:
    fld3     fld1     fld2
    A     B     C
         D     E
    Please help.

  • I have problem of uploading excel file to my internal table

    Hi,
    I trying to upload data from excel file to my internal table and when i tried to debug the program and check the data in internal table and iam gettin # in all the fields and the data in not populated in internal table , as we are using 4.0b version and we are using UPLOAD FUNCTION.
            BUKRS(4) TYPE C,     
             PONO(8) TYPE C,     
             GRNNO(8) TYPE C,   
             DELNOTE(16) TYPE C,
             RECPTDT(10) TYPE C,  
             SUPPCODE(20) TYPE C, 
              RECPT(12) TYPE C,  
              GLACCT(10) TYPE C, 
             CCTR(6) TYPE C,      
      CALL FUNCTION 'UPLOAD'
        TABLES DATA_TAB = STRU.
      IF SY-SUBRC NE 0.
        WRITE: /'Data file error'.
      ENDIF.
    i am using the same sequeuence in the above structure in excel.

    Hi KODAMANCHILI,
    Refer following link :
    http://help.sap.com/saphelp_40b/helpdata/en/fc/eb3d9d358411d1829f0000e829fbfe/frameset.htm
    This will surely solve your problem.
    Regards,
    Vivek

Maybe you are looking for

  • Using foreign CDMA phones on Verizon Wireless

    Hi, I went to South Korea for an internship and was given a LG U+ Samsung Galaxy S2 from a relative. It is CDMA, and after looking at the specifications it seems like it should work on Verizon Wireless network. However I was told that non VZW branded

  • XI Pro: How to change page size?

    I have a letter-sized document where each page has extremely large margins and text in a tiny font size. Can I use the 'Remove White Margins' function (Crop pages > Set Page Boxes) to remove the large margins and then resize what remains back to 8.5"

  • Is there a function to open the outlook mail and to attach certain..

    Hello, Is there a function to open the outlook mail and to attach certain selected files?

  • Quicktime pro for videos

    Do i need quicktime pro to convert video to watch on my ipod?

  • Intel iMac trying to die a death

    A few of days ago my iMac began to go into the rainbow wheel for any command i gave it, taking up to three minutes to even open a folder. Then the next day after leaving it to sit overnight, it stopped doing that and everything ran suspiciously fine.