Export - Import In ABAP ( for variables and internal table)

how can we pass value for the variable and internal table using Export and Import?
data: var type sy-uzeit.
var = sy-uzeit.
EXPORT var TO MEMORY ID 'TIME'.
data: var type sy-uzeit.
IMPORT var FROM MEMORY ID 'TIME'.
write:/ var,sy-subrc,sy-uzeit.
i found var value 0 while importing. 
what is the right syntax for passing value of variable and internaltable.
regards,
dushyant.

Hi,
There are two possible solutions.
Solution1:
Program1.Should be run before atleast once so that TIME should be filled.
data: var type sy-uzeit.
var = sy-uzeit.
EXPORT var TO MEMORY ID 'TIME'.
Program2.IF the TIME is filled,then only it will produce the result.
data: var type sy-uzeit.
clear var.
IMPORT var FROM MEMORY ID 'TIME'.
write:/ var, sy-subrc, sy-uzeit.
Solution2:
Single program:
data: var type sy-uzeit.
var = sy-uzeit.
EXPORT var TO MEMORY ID 'TIME'.
clear var.
IMPORT var FROM MEMORY ID 'TIME'.
write:/ var, sy-subrc, sy-uzeit.
Kindly reward points by clikcing the star on the left of reply,if it helps.

Similar Messages

  • Export import - using TOAD FOR ORACLE  and ORACLE DATABASE 10G EXPRESS or s

    Hi all,
    Could you please kindly help me?
    I am using TOAD FOR ORACLE to export a table to flat file A. The tool just supports to distinguish fields by "spaces".
    And the web page of ORACLE DATABASE 10G EXPRESS to import the data from flat file A to another database. To load data to a table from a text file, the web page bases on "comma" to distinguish fields.
    So could you have any suggestion for me? I need to export data via TOAD FOR ORACLE. And then import it to another database by the home page of ORACLE DATABASE 10G EXPRESS or sqlplus.
    Thank you so much for your help!

    Dont use TOAD for exporting your data. Use PL/SQL. Below is the code given in Asktom.com that does what you want.
    create or replace function  dump_csv( p_query     in varchar2,
                                          p_separator in varchar2 default ',',
                                          p_dir       in varchar2 ,
                                          p_filename  in varchar2 )
    return number
    is
        l_output        utl_file.file_type;
        l_theCursor     integer default dbms_sql.open_cursor;
        l_columnValue   varchar2(2000);
        l_status        integer;
        l_colCnt        number default 0;
        l_separator     varchar2(10) default '';
        l_cnt           number default 0;
    begin
        l_output := utl_file.fopen( p_dir, p_filename, 'w' );
        dbms_sql.parse(  l_theCursor,  p_query, dbms_sql.native );
        for i in 1 .. 255 loop
            begin
                dbms_sql.define_column( l_theCursor, i, l_columnValue, 2000 );
                l_colCnt := i;
            exception
                when others then
                    if ( sqlcode = -1007 ) then exit;
                    else
                        raise;
                    end if;
            end;
        end loop;
        dbms_sql.define_column( l_theCursor, 1, l_columnValue, 2000 );
        l_status := dbms_sql.execute(l_theCursor);
        loop
            exit when ( dbms_sql.fetch_rows(l_theCursor) <= 0 );
            l_separator := '';
            for i in 1 .. l_colCnt loop
                dbms_sql.column_value( l_theCursor, i, l_columnValue );
                utl_file.put( l_output, l_separator || l_columnValue );
                l_separator := p_separator;
            end loop;
            utl_file.new_line( l_output );
            l_cnt := l_cnt+1;
        end loop;
        dbms_sql.close_cursor(l_theCursor);
        utl_file.fclose( l_output );
        return l_cnt;
    end dump_csv;
    /Here is the link to this thread in asktom.
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:95212348059

  • Portal export/import between 9.0.2 and 9.o.3

    I am aware that you can not export/import between portal installations on different versions e.g. 3.0.9 and 9.0.2 but is it possible to do export/import between 9.0.2 and 9.0.3?

    The FAQ only states:
    <<<<Snip>>>>
    Portal Export/Import utilities will only work between portal installations that are at the same revision level. For example, Portal Import/Export will copy content successfully between two 9.0.2.x instances of Portal, but not between a 9.0.2 portal instance and a 3.0.9 portal instance.
    That said, Portal Export/Import WILL work between two portal instances that are of different "minor" revision levels. For example, Portal Export/Import will work between a 9.0.2.2.14 portal instance to a 9.0.2.2.22 portal instance, and vice versa.
    <<<</Snip>>>>

  • Best Practices in use of ABAP for SRM and/or CRM Configuration

    I was wondering if there is a document that defines best practices for the use of ABAP with the installation and customization of SRM and/or CRM. Such as amount of ABAP coding typically required, and best practices around the use of ABAP for customization and configuration.
    Thanks.

    Hi, Johnson
    Sorry, Please don't mind, you are not at right place to ask the Question like this
    Please read "The Forum Rules of Engagement" before posting!  HOT NEWS!!
    Thanks and Regards,
    Faisal

  • DTW template to import opening Balences for BP and Items

    Hi all,
    Is there any DTW template to import opening Balences for BP and Items
    Thanks & Regards,
    Naresh K

    Naresh,
    When you are talking about opening balances of BP and Items, I believe you are talking about Open AR and AP transactions and Opening Stock for Items.
    If this is the case then,
    For BP Opening Balance, you will need to import them as AR and AP Service Invoice using the template inside folder oInvoices and oPurchaseInvoices
    For Opening Stock, you will use template inside oStockTaking
    Suda

  • Import an open office spreadsheet into internal table

    hi all,
            i have one requirment to import excel into sap but  i dont have MS office on my system     
              is  there any way to import an open office spreadsheet into internal table
                by using  ALSM_EXCEL_TO_INTERNAL_TABLE fm  or any other ways.

    Hi,
    You can use this function module 'ALSM_EXCEL_TO_INTERNAL_TABLE',
    It works fine, Here is a sample code hwich I developed and working fine.
      FIELD-SYMBOLS: <FS1>.
    Variables
      DATA: LV_BEGCOL TYPE I VALUE 1,
            LV_BEGROW TYPE I VALUE 1,
            LV_ENDCOL TYPE I VALUE 100,
            LV_ENDROW TYPE I VALUE 32000.
      DATA: LV_FILENAME LIKE RLGRAP-FILENAME.
      DATA: LV_ZWLEN TYPE I,
            LV_ZWLINES TYPE I.
      DATA: LV_TIND(4) TYPE N.
      DATA: LV_ZWFELD(30).
      DATA: KZHEADER TYPE XFELD.
    Internal Tables
      DATA: BEGIN OF LT_INTERN OCCURS 0.
              INCLUDE STRUCTURE  ALSMEX_TABLINE.
      DATA: END OF LT_INTERN.
      DATA: BEGIN OF LT_INTERN1 OCCURS 0.
              INCLUDE STRUCTURE  ALSMEX_TABLINE.
      DATA: END OF LT_INTERN1.
      DATA: BEGIN OF LT_COL OCCURS 0,
             COL LIKE ALSMEX_TABLINE-COL,
             SIZE TYPE I.
      DATA: END OF LT_COL.
      DATA: BEGIN OF LT_FIELDNAMES OCCURS 3,
              TITLE(60),
              TABLE(6),
              FIELD(10),
              KZ(1),
            END OF LT_FIELDNAMES.
    No of columns
      DATA: BEGIN OF LT_DATA_TAB OCCURS 0,
             VALUE_0001(50),
             VALUE_0002(50),
             VALUE_0003(50),
             VALUE_0004(50),
             VALUE_0005(50),
             VALUE_0006(50),
             VALUE_0007(50),
             VALUE_0008(50),
             VALUE_0009(50),
             VALUE_0010(50).
      DATA: END OF LT_DATA_TAB.
    Initialization
      LV_FILENAME = P_UFILE.
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        EXPORTING
          FILENAME                = LV_FILENAME
          I_BEGIN_COL             = LV_BEGCOL
          I_BEGIN_ROW             = LV_BEGROW
          I_END_COL               = LV_ENDCOL
          I_END_ROW               = LV_ENDROW
        TABLES
          INTERN                  = LT_INTERN
        EXCEPTIONS
          INCONSISTENT_PARAMETERS = 1
          UPLOAD_OLE              = 2
          OTHERS                  = 3.
      IF SY-SUBRC <> 0.
        WRITE:/ 'Uploading Error'(019), SY-SUBRC.
      ENDIF.
    Arrange Data
      LOOP AT LT_INTERN.
        LT_INTERN1 = LT_INTERN.
        CLEAR LT_INTERN1-ROW.
        APPEND LT_INTERN1.
      ENDLOOP.
      SORT LT_INTERN1 BY COL.
      LOOP AT LT_INTERN1.
        AT NEW COL.
          LT_COL-COL = LT_INTERN1-COL.
          APPEND LT_COL.
        ENDAT.
        LV_ZWLEN = STRLEN( LT_INTERN1-VALUE ).
        READ TABLE LT_COL WITH KEY COL = LT_INTERN1-COL.
        IF SY-SUBRC EQ 0.
          IF LV_ZWLEN > LT_COL-SIZE.
            LT_COL-SIZE = LV_ZWLEN.
    Internal Table, Current Row Index
            MODIFY LT_COL INDEX SY-TABIX.
          ENDIF.
        ENDIF.
      ENDLOOP.
      DESCRIBE TABLE LT_COL LINES LV_ZWLINES.
      SORT LT_INTERN BY ROW COL.
      IF KZHEADER = 'X'.
        LOOP AT LT_INTERN.
          LT_FIELDNAMES-TITLE = LT_INTERN-VALUE.
          APPEND LT_FIELDNAMES.
          AT END OF ROW.
            EXIT.
          ENDAT.
        ENDLOOP.
      ELSE.
        DO LV_ZWLINES TIMES.
          WRITE SY-INDEX TO LT_FIELDNAMES-TITLE.
          APPEND LT_FIELDNAMES.
        ENDDO.
      ENDIF.
      SORT LT_INTERN BY ROW COL.
      LOOP AT LT_INTERN.
        IF KZHEADER = 'X'
        AND LT_INTERN-ROW = 1.
          CONTINUE.
        ENDIF.
        LV_TIND = LT_INTERN-COL.
        CONCATENATE 'LT_DATA_TAB-VALUE_' LV_TIND INTO LV_ZWFELD.
        ASSIGN (LV_ZWFELD) TO <FS1>.
        <FS1> = LT_INTERN-VALUE.
        AT END OF ROW.
          APPEND LT_DATA_TAB.
          CLEAR LT_DATA_TAB.
        ENDAT.
      ENDLOOP.
    Thanks & Regards,
    Dileep .C

  • Senarious for using different internal table types

    please give scenarios for  using different internal table types?

    Refer to the following.
    Internal table types
    This section describes how to define internal tables locally in a program. You can also define internal tables globally as data types in the ABAP Dictionary.
    Like all local data types in programs , you define internal tables using the TYPES statement. If you do not refer to an existing table type using the TYPE or LIKE addition, you can use the TYPES statement to construct a new local internal table in your program.
    TYPES <t> TYPE|LIKE <tabkind> OF <linetype> [WITH <key>]
    [INITIAL SIZE <n>].
    After TYPE or LIKE, there is no reference to an existing data type. Instead, the type constructor occurs:
    <tabkind> OF <linetype> [WITH <key>]
    The type constructor defines the table type <tabkind>, the line type <linetype>, and the key <key> of the internal table <t>.
    You can, if you wish, allocate an initial amount of memory to the internal table using the INITIAL SIZE addition.
    Table type
    You can specify the table type <tabkind> as follows:
    Generic table types
    INDEX TABLE
    For creating a generic table type with index access.
    ANY TABLE
    For creating a fully-generic table type.
    Data types defined using generic types can currently only be used for field symbols and for interface parameters in procedures . The generic type INDEX TABLE includes standard tables and sorted tables. These are the two table types for which index access is allowed. You cannot pass hashed tables to field symbols or interface parameters defined in this way. The generic type ANY TABLE can represent any table. You can pass tables of all three types to field symbols and interface parameters defined in this way. However, these field symbols and parameters will then only allow operations that are possible for all tables, that is, index operations are not allowed.
    Fully-Specified Table Types
    STANDARD TABLE or TABLE
    For creating standard tables.
    SORTED TABLE
    For creating sorted tables.
    HASHED TABLE
    For creating hashed tables.
    Fully-specified table types determine how the system will access the entries in the table in key operations. It uses a linear search for standard tables, a binary search for sorted tables, and a search using a hash algorithm for hashed tables.
    Line type
    For the line type <linetype>, you can specify:
    Any data type if you are using the TYPE addition. This can be a predefined ABAP type, a local type in the program, or a data type from the ABAP Dictionary. If you specify any of the generic elementary types C, N, P, or X, any attributes that you fail to specify (field length, number of decimal places) are automatically filled with the default values. You cannot specify any other generic types.
    Any data object recognized within the program at that point if you are using the LIKE addition. The line type adopts the fully-specified data type of the data object to which you refer. Except for within classes, you can still use the LIKE addition to refer to database tables and structures in the ABAP Dictionary (for compatibility reasons).
    All of the lines in the internal table have the fully-specified technical attributes of the specified data type.
    Key
    You can specify the key <key> of an internal table as follows:
    [UNIQUE|NON-UNIQUE] KEY <col1> ... <col n>
    In tables with a structured line type, all of the components <coli> belong to the key as long as they are not internal tables or references, and do not contain internal tables or references. Key fields can be nested structures. The substructures are expanded component by component when you access the table using the key. The system follows the sequence of the key fields.
    [UNIQUE|NON-UNIQUE] KEY TABLE LINE
    If a table has an elementary line type (C, D, F, I, N, P, T, X), you can define the entire line as the key. If you try this for a table whose line type is itself a table, a syntax error occurs. If a table has a structured line type, it is possible to specify the entire line as the key. However, you should remember that this is often not suitable.
    [UNIQUE|NON-UNIQUE] DEFAULT KEY
    This declares the fields of the default key as the key fields. If the table has a structured line type, the default key contains all non-numeric columns of the internal table that are not and do not contain references or internal tables. If the table has an elementary line type, the default key is the entire line. The default key of an internal table whose line type is an internal table, the default key is empty.
    Specifying a key is optional. If you do not specify a key, the system defines a table type with an arbitrary key. You can only use this to define the types of field symbols and the interface parameters of procedures . For exceptions, refer to Special Features of Standard Tables.
    The optional additions UNIQUE or NON-UNIQUE determine whether the key is to be unique or non-unique, that is, whether the table can accept duplicate entries. If you do not specify UNIQUE or NON-UNIQUE for the key, the table type is generic in this respect. As such, it can only be used for specifying types. When you specify the table type simultaneously, you must note the following restrictions:
    You cannot use the UNIQUE addition for standard tables. The system always generates the NON-UNIQUE addition automatically.
    You must always specify the UNIQUE option when you create a hashed table.
    Initial Memory Requirement
    You can specify the initial amount of main memory assigned to an internal table object when you define the data type using the following addition:
    INITIAL SIZE <n>
    This size does not belong to the data type of the internal table, and does not affect the type check. You can use the above addition to reserve memory space for <n> table lines when you declare the table object.
    When this initial area is full, the system makes twice as much extra space available up to a limit of 8KB. Further memory areas of 12KB each are then allocated.
    You can usually leave it to the system to work out the initial memory requirement. The first time you fill the table, little memory is used. The space occupied, depending on the line width, is 16 <= <n> <= 100.
    It only makes sense to specify a concrete value of <n> if you can specify a precise number of table entries when you create the table and need to allocate exactly that amount of memory (exception: Appending table lines to ranked lists). This can be particularly important for deep-structured internal tables where the inner table only has a few entries (less than 5, for example).
    To avoid excessive requests for memory, large values of <n> are treated as follows: The largest possible value of <n> is 8KB divided by the length of the line. If you specify a larger value of <n>, the system calculates a new value so that n times the line width is around 12KB.
    Examples
    TYPES: BEGIN OF LINE,
    COLUMN1 TYPE I,
    COLUMN2 TYPE I,
    COLUMN3 TYPE I,
    END OF LINE.
    TYPES ITAB TYPE SORTED TABLE OF LINE WITH UNIQUE KEY COLUMN1.
    The program defines a table type ITAB. It is a sorted table, with line type of the structure LINE and a unique key of the component COLUMN1.
    TYPES VECTOR TYPE HASHED TABLE OF I WITH UNIQUE KEY TABLE LINE.
    TYPES: BEGIN OF LINE,
    COLUMN1 TYPE I,
    COLUMN2 TYPE I,
    COLUMN3 TYPE I,
    END OF LINE.
    TYPES ITAB TYPE SORTED TABLE OF LINE WITH UNIQUE KEY COLUMN1.
    TYPES: BEGIN OF DEEPLINE,
    FIELD TYPE C,
    TABLE1 TYPE VECTOR,
    TABLE2 TYPE ITAB,
    END OF DEEPLINE.
    TYPES DEEPTABLE TYPE STANDARD TABLE OF DEEPLINE
    WITH DEFAULT KEY.
    The program defines a table type VECTOR with type hashed table, the elementary line type I and a unique key of the entire table line. The second table type is the same as in the previous example. The structure DEEPLINE contains the internal table as a component. The table type DEEPTABLE has the line type DEEPLINE. Therefore, the elements of this internal table are themselves internal tables. The key is the default key - in this case the column FIELD. The key is non-unique, since the table is a standard table.
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb35de358411d1829f0000e829fbfe/content.htm

  • SAP QUERY LOOPS AND INTERNAL TABLE

    Hi All, I have a query which i have made. It runs from Table EKPO which has PO details and what I want to do is now via ABAP Code pull through the total of goods receipt for the PO and Line Item into a field. Sounds Easy enough..Problem now,
    The table which contains the GR data is EKBE which agains a PO and Line Item can have many 101 movements and 102 movements so what I want is an ABAP Statent to basically sum up the total of 101 for the PO & LINE ITEMS and then minus this from the total of 102 for the PO & LINE ITEMS and post the result in to this new field I have created.
    I am pretty decent with ABAP Code in Querys I.e Select statements etc but from what I can see i need to create an internal table and do a loop and collect statement but I keep on failing due to not enough knowledge. Please can some one help me with this and provide me with the code and explanation as i would like to understand,
    POINTS WILL BE REWARDED
    Thanks
    Kind Regards
    Adeel Sarwar

    Hi,
    This is the full code i have entered but its not working. Any help would be appreciated. If you could rectify the code and internal tables that would be great.
    Thanks
    TABLES: EKBE.
    DATA: PurO LIKE EKPO-EBELN,
          POLI LIKE EKPO-EBELP.
    *New Table and Vars defined
    DATA:   BEGIN OF IT_EKBE,
              IT_EKBE LIKE EKBE,
            END OF IT_EKBE.
    DATA:  BEGIN OF IT_SUM OCCURS 0,
              EBELN TYPE EBELN,
              EBELP TYPE EBELP,
              DMBTR TYPE DMBTR,
              MENGE TYPE MENGE,
          END OF IT_SUM.
    CLEAR: QTYD.
    MOVE: EKPO-EBELN TO PurO,
          EKPO-EBELP TO POLI.
    SELECT * FROM EKBE INTO IT_EKBE
        WHERE EBELN = PurO
        AND   EBELP = POLI
        AND   BEWTP = 'E'
    LOOP AT IT_EKBE.
      MOVE CORRESPOING IT_EKBE TO IT_SUM.
      IF IT_EKBE-BWART = '102'.
        IT_SUM-DMBTR = IT_SUM-DMBTR * -1.
        IT_SUM-MENGE = IT_SUM-MENGE * -1.
      ENIDF.
      COLLECT IT_SUM.
      CLEAR IT_SUM.
    ENDLOOP.
    ENDSELECT.
    If sy-subrc = 0.
      QTYD = IT_SUM.
    ELSE.
      QTYD = 0.
    ENDIF.

  • No storage space available for extending an internal table.

    Hi All,
    I am using Function Module :  VC_I_GET_CONFIGURATION in FI related Sales Order Report to get
    configuration data for fields Model/Engine and Line no.
    when the program executed in Production environment, It is giving Runtime Error TSV_TNEW_PAGE_ALLOC_FAILED.
    ShrtText : No storage space available for extending an internal table.  
    The termination occurred in the ABAP program "SAPLIBINF" in "SELECT_INSTANCES_01" . its all happening
    in the above FM.
    Is there any possibility to get configuration data (Model/Engine and Line no)  with out using FM.
    please advise me on how you would like to proceed related to this issue.
    Thanks & Regards
    Satish Reddy

    Hi Satish,
    Please go through the below links and see if you can use this to address your issue,
    http://wiki.sdn.sap.com/wiki/display/ABAP/ReplacementofVC_I_GET_CONFIGURATIONforperfomance+tunning
    VC_I_GET_CONFIGURATION and paging memory
    Regards,
    Chen
    Edited by: Chen K V on May 26, 2011 2:34 PM

  • Variable field internal table

    Greetings,
    Has anyone created an internal table programmatically with the number of fields based on user input?
    Thanks in advance,
    JR

    Hi,
    Check this example..
    If you give the input as 3...IT will create 3 columns..
    PARAMETERS: p_input TYPE i OBLIGATORY.
    START-OF-SELECTION.
    DATA: v_fieldname TYPE char30.
    DATA: v_char TYPE numc4.
    DATA: it_fldcat TYPE lvc_t_fcat.
    DATA: wa_it_fldcat LIKE LINE OF it_fldcat.
    DATA: gp_table TYPE REF TO data.
    FIELD-SYMBOLS: <gt_table> TYPE table.
    DO p_input TIMES.
    v_fieldname = 'COL'.
    v_char = sy-index.
    CONCATENATE v_fieldname v_char INTO v_fieldname.
    CONDENSE v_fieldname.
    CLEAR wa_it_fldcat.
    wa_it_fldcat-fieldname = v_fieldname.
    wa_it_fldcat-datatype = 'CHAR'.
    wa_it_fldcat-outputlen = 5.
    wa_it_fldcat-intlen = 5.
    APPEND wa_it_fldcat TO it_fldcat .
    ENDDO.
    Internal table creation..
    CALL METHOD cl_alv_table_create=>create_dynamic_table
    EXPORTING it_fieldcatalog = it_fldcat
    IMPORTING ep_table = gp_table.
    ASSIGN gp_table->* TO <gt_table>.
    CHECK sy-subrc = 0.
    DATA: WA TYPE REF TO DATA.
    Work area for the dynamic internal table.
    CREATE DATA WA LIKE LINE OF <gt_table>.
    WRITE: / 'Dynamic internal table created'.
    Thanks,
    Naren

  • Difference between the Field Group  and Internal Table.

    Hi all,
    Can anybody tell me the difference between the Field group and Internal table and when they will used?
    Thanks,
    Sriram.

    Hi
    Internal Tables: They are used to store record type data in tabular form temporarily in ABAP programming. Or we can say, it stores multiple lines of records for temporary use in ABAP programming.
    A field group is a user-defined grouping of characteristics and basic key figures from the EC-EIS or EC-BP field catalog.
    Use
    The field catalog contains the fields that are used in the aspects. As the number of fields grows, the field catalog becomes very large and unclear. To simplify maintenance of the aspects, you can group fields in a field group. You can group the fields as you wish, for example, by subject area or responsibility area. A field may be included in several field groups.
    When maintaining the data structure of an aspect, you can select the field group that contains the relevant characteristics and basic key figures. This way you limit the number of fields offered.
    Regards
    Ashish

  • Difference between line type and internal table?

    Hi..
    I wanted to know, what is the difference between Line type and Internal Table?

    Hi,
        Before the 4.7 release in SAP if we want to define an internal table we have to write the defination using the occurs statement and we need to define all the fields using INCLUDE STRUCTURE or indidually all the fields ine by one.
    From 4.7 release of R/3 SAP introduced the Line type concept and it's part of the ABAP OOPS concept. for internal table defination we don't need to use the occur statements. Instead INCLUDE structure  we need to create a Line type for that structure in Se11 and then we can define the internal table like :
    DATA : ITAB TYPE TABLE OF <LINE_TYPE>.
    Only thing is this table will be  a table without header. So for internal table processing we need to define a work area structure of type line of line type  . EX:
    DATA: WA_ITAB TYPE LINE OF <LINE_TYPE>.
    Hope this helps.
    Thanks,
    Greetson

  • Table types and internal table

    Hi all,
    What is the relationship between table type in ABAP dictionary and internal table?
    Moderator message : Search for available information OR read ABAP documentation. Thread locked.
    Edited by: Vinod Kumar on Jul 16, 2011 11:16 AM

    You can INCLUDE TYPE.
    Types: begin of itab,
           field1 type string,
           field2 type string,
    *      More Fields in here.
           Field30 type string,
           End of itab.
    Data: lt_itab type table of itab.
    TYPES BEGIN OF new_itab.
           INCLUDE type itab.
    TYPES: field31 type string,
           field32 type string,
    END OF new_itab.
    Regards,
    Rich Heilman

  • Include space between two variables from internal table

    Hi Experts,
    I have an internal table with 4 fields with values for a b c d , i have to arrange them in the specific order so that i can download all the data in a text file.
    the first 3 variables are already arranged , the format is a bc, but the var d should be put in a specific positon after predefined spaces from var c.
    Please refer below for the sample of of the output text file. In this example:
    a = A20N
    b = 7227802
    c = 0300207
    d = 010109
    Space between c & d is determined by a POS variable in internal table
    a        b         c                                          d                       
    A20N 72278020300207                               010109     
    A20A 72278020300207        21     
    A20N 72278020300207          2511100     
    A21F 72278020300207        Van Capellen     
    A21G 72278020300207        Tim     
    A20E 72278020300207                    1     
    A20T 72278020300207        2     
    A20T 72278020300207                                                   1     
    A20E 72278020300207                    01     
    A20E 72278020300207                        Vilvoorde     
    plz help me out as i have to resolve this as soon as possible.

    Hi,
    Check this sample code using offsets, and modify as per ur requirement.
    DATA : L1 TYPE I.
    DATA : L2 TYPE I.
    DATA : L3 TYPE I.
    DATA : BEGIN OF ITAB OCCURS 0,
           A(30) TYPE C,
           B(30) TYPE C,
           C(30) TYPE C,
           D(30) TYPE C,
           POS(2) TYPE C,
           END OF ITAB.
    DATA : TEXT(120) TYPE C.
    START-OF-SELECTION.
    BREAK-POINT.
      ITAB-A = 'ABC'.
      ITAB-B = 'IND'.
      ITAB-C = 'CATOR'.
      ITAB-D = 'FINAL'.
      ITAB-POS = '3'.
      APPEND ITAB.
      CLEAR ITAB.
      LOOP AT ITAB.
        L1 = STRLEN( ITAB-A ).
        L2 = STRLEN( ITAB-B ).
        L3 = STRLEN( ITAB-C ).
        TEXT = ITAB-A.
        L1 = L1 + 1.
        TEXT+L1 = ITAB-B.
        L1 = L1 + L2.
        TEXT+L1 = ITAB-C.
        L1 = L1 + L3 + ITAB-POS.
        TEXT+L1 = ITAB-D.
        CLEAR L1.
        CLEAR L2.
        CLEAR L3.
      ENDLOOP.
      WRITE : TEXT.
    Rgds
    siva

  • F.05 : No more storage space is available for extending  an internal table

    Hi,
    While executing F.05(FCV), I am getting ABAP Run time Error which is as below
    Short Text: No more storage space is available for extending  an internal table
    Pls, Give me solution and get more points. It is very urgent
    Thanks in advance
    Akash

    call your sap basis guys
    i don't need any points

Maybe you are looking for

  • Using the iPod Touch for Productivity (To Do Lists)

    I've been looking around for a good "To Do" list that I can throw ideas into, with due dates, etc. as soon as I think of them and haven't really found anything I like yet. I really need pop up reminders to generate with it as well. Any suggestions?

  • Issue with BDC of ME22N to change gross price of service.

    Hi, I have a requirement where I have to undelete the PO > services tab of the item details > change the gross price to the value thats calculated by the program  for each of the services of the PO > set the deletion indicator to the PO. The spec say

  • Problem installing Windows 7 64bit using bootcamp

    Hello all, I am sorry to ask a question that has probably been asked many time. It almost three days that I am browsing all possible forum but I have not been able to find the solution to this particular problem. I am trying to install Windows 7 Ulti

  • HT5622 how can i retrieve my product serial number from apple.

    Good Afternoon, I am trying to located my ipod touch serial number because it was lost with the bus company and i want to pick it up with the serial number. Could apple email that serial number to me please. thanks. Noel.

  • XML Payload does not have namespace and prefix.

    Hello I have created a consumer business service which will be called from JDEdwards EOne, pulls data from database and send it to Fusion Middleware. SO, I have created proxy using JAX-WS option. And suggested in oracle doc, I created proxy outside O