Passing internal table from one program to other without using IMPORT

Hi Experts,
I need to pass an internal table from one program to other. However i cannot use IMPORT/EXPORT due to some reason. Any idea how this can be done?
Warm regards,
Harshad.

hi,
for passing itab from one program to another u can use
IN FIRST PROGRAM WRITE ,
perform pass_data(SECOND_PROGRAM_NAME) using ITAB.
in both the program declare itab with same structure.
if u want to do some changes in that itab and if u want it back in first program then write as
perform pass_data(SECOND_PROGRAM_NAME) using ITAB changing itab.

Similar Messages

  • Importing internal table from one program to another program

    Hi everybody,
    i have one small doubt.
    i am using submit statement and passing the values from this program to another program selection screen. in that program logic is written.In that program one internal table values are being exported to the memory id of that program. now i have to import that internal table values into my program by using import statement. i am using the following syntax
    import itab from menory id 'program name'.
    but i am getting an error saying program name is unknown.
    what is the exat syntax for this .
    thanking you,
    giri.

    hi,
    check these statements.
    IMPORT - Get data
    Variants:
    1. IMPORT obj1 ... objn FROM DATA BUFFER f.
    2. IMPORT obj1 ... objn FROM INTERNAL TABLE itab.
    2. IMPORT obj1 ... objn FROM MEMORY.
    3. IMPORT obj1 ... objn FROM SHARED MEMORY itab(ar) ID key.
    4. IMPORT obj1 ... objn FROM SHARED BUFFER itab(ar) ID key.
    5. IMPORT obj1 ... objn FROM DATABASE dbtab(ar) ID key.
    6. IMPORT obj1 ... objn FROM DATASET dsn(ar) ID key.
    7. IMPORT obj1 ... objn FROM LOGFILE ID key.
    8. IMPORT DIRECTORY INTO itab FROM DATABASE dbtab(ar) ID key.
    9. IMPORT (itab) FROM ... .
    In some cases, the syntax rules that apply to Unicode programs are different than those for non-Unicode programs. For more details, see Storing Cluster Tables.
    Variant 1
    IMPORT obj1 ... objn FROM DATA BUFFER f.
    Extras:
    1. ... = f (for each object to be imported)
    2. ... TO f (for each object to be imported)
    3. ... ACCEPTING PADDING
    4. ... ACCEPTING TRUNCATION
    5. ... IGNORING STRUCTURE BOUNDARIES
    6. ... IGNORING CONVERSION ERRORS
    7. ... REPLACEMENT CHARACTER c
    8. ... IN CHAR-TO-HEX MODE
    9. ... CODE PAGE INTO f1
    10. ... ENDIAN INTO f2
    The syntax check performed in an ABAP Objects context is stricter than in other ABAP areas.
    See You Cannot Use Implicit Field Names in Clusters.
    Effect
    Imports the data objects obj1 ... objn from the data buffer declared. The data buffer must be of type XSTRING . The data objects obj1 ... objn can be fields, structures, complex structures, or tables. The system imports all the data that has been stored in the data buffer f using the EXPORT ... TO DATA BUFFER statement and is listed here. It also checks that the structure used in the IMPORT statement matches the one in the EXPORT statement.
    The Return Code is set as follows:
    SY-SUBRC = 0:
    The existing data objects in the data cluster specified were imported. The rest remain unchanged. (In some circumstances, this may mean that no data objects were imported).
    SY-SUBRC = 4:
    The data objects could not be imported. The contents of all the objects remain unchanged.
    Addition 1
    ... = f (for each object to be imported)
    Addition 2
    ... TO f (for each object to be imported)
    Effect
    The object is stored in the field f.
    Addition 3
    ... ACCEPTING PADDING
    Effect
    This addition allows you to append new fields to the end
    of structures, sub-structures, and internal tables. The IMPORT statement fills the additional fields with initial values; make existing fields (C, N, X, P, I1, and I2) longer; map character-type fields to STRING-type fields; or to map byte-type fields to XSTRING-type fields.
    Addition 4
    ... ACCEPTING TRUNCATION
    Effect
    This addition allows you to shorten the last CHAR
    fields, or to omit the last component at the top level. (Until Release 4.6, you could do this without using an addition).
    Addition 5
    ... IGNORING STRUCTURE BOUNDARIES
    Effect
    This addition means that only the fragment sequence is
    relevant - that is, that any sub-structures match. If you use this addition, the system ignores any alignment changes necessitated by Unicode - such as inserting named includes.
    You cannot use this addition with either addition 3 (enlarge structure) or addition 4 (shorten structure), since it specifies that structure and include boundaries are to be ignored.
    From Release 6.10 onwards, the include information is stored in datasets, so that the system can also check that includes match - that is, that sub-structures and includes (named or unnamed) are treated equally. When data is imported in a Release prior to 6.10, includes are not checked.
    Addition 6
    ...IGNORING CONVERSION ERRORS
    Effect
    This addition prevents the system from triggering a
    runtime error, if an error occurs when the character set is converted. '#' is used as a replacement character.
    Addition 7
    ... REPLACEMENT CHARACTER c
    Effect
    The replacement character is used if a particular
    character cannot be converted when the character set is converted.
    This addition can only be used in conjunction with addition 6.
    Addition 8
    ... IN CHAR-TO-HEX MODE
    Effect
    Not all character-type fields are converted. To convert
    a field, you must create a field (or structure) that is identical to the exported field or structure, except that all its character-type components must be replaced with hexadecimal fields.
    You can only use this addition in Unicode programs, to allow you to import camouflaged binary data as single-byte characters.
    Moreover, you cannot use this addition in conjunction with the additions 3, 4, 5, 6, or 7.
    Addition 9
    ... CODE PAGE INTO f1
    Effect
    The code page of the exported data is stored in the
    character-type field f1 - for example, to analyze data that has been imported with the IN CHAR-TO-HEX MODE addition.
    Addition 10
    ... ENDIAN INTO f2
    Effect
    The byte order (LITTLE or BIG) of the
    exported data is stored in the field f2 - for example, to analyze data that has been imported with the IN CHAR-TO-HEX MODE addition. The field f2 must have the type ABAP_ENDIAN, which is defined in the type group ABAP. For this reason, the type group ABAP must be included in the ABAP program using a TYPE-POOLS statement.
    Variant 2
    IMPORT obj1 ... objn FROM INTERNAL TABLE itab.
    Extras:
    1. ... = f (for each object to be imported)
    2. ... TO f (for each object to be imported)
    3. ... ACCEPTING PADDING
    4. ... ACCEPTING TRUNCATION
    5. ... IGNORING STRUCTURE BOUNDARIES
    6. ... IGNORING CONVERSION ERRORS
    7. ... REPLACEMENT CHARACTER c
    8. ... IN CHAR-TO-HEX MODE
    9. ... CODE PAGE INTO f1
    10. ... ENDIAN INTO f2
    The syntax check performed in an ABAP Objects context is stricter than in other ABAP areas. See No implicit field names in cluster.
    Effect
    Imports the data objects obj1 ... objn (fields, structures, complex structures, or tables) from the specified internal table itab. The first column in the internal table must be of the predefined type INT2 and the second must be type X. To define the first column you must refer to a data element in the ABAP Dictionary that has the predefined type INT2.
    All data that was stored in the internal table itab using EXPORT ... TO INTERNAL TABLE and listed, is imported. The system checks that the EXPORT and IMPORT structures match.
    The Return Code is set as follows:
    SY-SUBRC = 0:
    The existing data objects in the specified data cluster were imported, the rest remain unchanged (it is possible that no data object was imported).
    SY-SUBRC = 4:
    The data objects could not be imported.
    The contents of all listed objects remain unchanged
    Addition 1
    ... = f (for each object to be imported)
    Addition 2
    ... TO f (for each object to be imported)
    Effect
    Places the object in the field f.
    Addition 3
    ... ACCEPTING PADDING
    Effect
    This addition allows you to add new fields to the ends
    of structures, even to substructures and internal tables (the additional fields are filled with initial value during the IMPORT). It also allows you to increase the size of existing fields (C, N, X, P, I1, and I2) and to map Char fields to STRING type fields or byte fields to XSTRING type fields.
    Addition 4
    ... ACCEPTING TRUNCATION
    Effect
    This addition allows you to shorten the last CHAR
    field or omit the last component on the highest level (till Release 4.6 this was possible without specifying an addition).
    Addition 5
    ... IGNORING STRUCTURE BOUNDARIES
    Effect
    This addition means that only the page order is
    relevant, that is any substructures match. With this addition, the system also ignores alignment changes arising from the Unicode conversion (for example, due to subsequent insertion of named includes).
    This addition rules out any subsequent structural enhancements (addition 3) or structural shortening (addition 4) because with this addition it is the structural limits and include limits that are to be ignored.
    As from Release 6.10, the include information will also be stored in the dataset, so that it is possible to also check whether the includes match, that is substructures and includes (named or unnamed) are treated the same. When importing data that was exported in a Release lower than 6.10, the includes are not checked.
    Addition 6
    ...IGNORING CONVERSION ERRORS
    Effect
    This addition has the effect that an error in the
    character set conversion does not cause a runtime error. The system uses "#" as a replacement character.
    Addition 7
    ... REPLACEMENT CHARACTER c
    Effect
    The system uses the specified replacement character if a
    character cannot be converted during a character set conversion. If this addition is not specified, the system uses "#" as a replacement character.
    This addition can only be used in conjunction with addition 6.
    Addition 8
    ... IN CHAR-TO-HEX MODE
    Effect
    No character type fields are converted. For this you
    must create a field or structure that is identical to the exported field or exported structure, except that all character type fields must be replaced with hexadecimal fields.
    This addition, which is only allowed in programs with a set Unicode flag, allows you to import binary data disguised as single byte characters. This addition cannot be used in conjunction with additions 3, 4, 5, 6, and 7.
    Addition 9
    ... CODE PAGE INTO f1
    Effect
    The codepage of the exported data is stored in the
    character-type field f1 (for example, to be able to analyze the data imported with the addition IN CHAR-TO-HEX MODE).
    Addition 10
    ... ENDIAN INTO f2
    Effect
    The byte order (LITTLE or BIG) of the
    exported data is stored in the field f2 (for example, to be able analyze the data imported using the addition IN CHAR-TO-HEX MODE). The field f2 must be of type ABAP_ENDIAN, defined in type group ABAP. You must therefore include the type group ABAP in the ABAP program with a TYPE-POOLS statement.
    Variant 3
    IMPORT obj1 ... objn FROM MEMORY.
    Extras:
    1. ... = f (for each object to be imported) 2. ... TO f (for each object to be imported)
    3. ... ID key
    4. ... ACCEPTING PADDING
    5. ... ACCEPTING TRUNCATION
    6. ... IGNORING STRUCTURE BOUNDARIES
    The syntax check performed in an ABAP Objects context is stricter than in other ABAP areas. See You Must Enter Identification and Cannot Use Implicit Field Names inClusters
    Effect
    Imports data objects obj1 ... objn (fields, structures, complex structures or tables) from a data cluster in the ABAP memory (see EXPORT). Reads in all data without an ID that was exported to memory with "EXPORT ... TO MEMORY.". In contrast to the variant IMPORT FROM DATABASE, it does not check that the structure matches in EXPORT and IMPORT.
    The Return Code is set as follows:
    SY-SUBRC = 0:
    The existing data objects in the data cluster specified were imported. The rest remain unchanged (in some circumstances, this may mean that no data objects were imported).
    SY-SUBRC = 4:
    The data objects could not be imported, probably because the ABAP memory was empty.
    The contents of all objects remain unchanged.
    Note
    You should always use the addition 3 (... ID key) with the statement. Otherwise, the effect of the variant is not certain (EXPORT statements in different parts of a program overwrite each other in the ABAP memory), since it exists only for reasons of compatibility with R/2.
    Additional methods for selecting and deleting data clusters in the ABAP memory are provided by the system class CL_ABAP_EXPIMP_MEM.
    Please consult Data Area and Modularization Unit Organization documentation as well.
    Addition 1
    ... = f (for each object to be imported)
    Addition 2
    ... TO f (for each object to be imported)
    Effect
    The object is placed in field f.
    Addition 3
    ... ID key
    Effect
    Imports only data stored in ABAP memory under the ID key.
    Notes
    The key, key, must be a character-type data object (but not a string).
    The Return Code is set as follows:
    SY-SUBRC = 0:
    The existing data objects in the data cluster specified were imported. The rest remain unchanged (in some circumstances, this may mean that no data objects were imported).
    SY-SUBRC = 4:
    The data objects could not be imported, probably because an incorrect ID was used.
    The contents of all objects remain unchanged.
    Addition 4
    ... ACCEPTING PADDING
    Effect
    This addition allows you to append new fields to the end of structures, sub-structures, and internal tables. The IMPORT statement fills the additional fields with initial values; make existing fields (C, N, X, P, I1, and I2) longer; map character-type fields to STRING-type fields; or to map byte-type fields to XSTRING-type fields.
    Addition 5
    ... ACCEPTING TRUNCATION
    Effect
    This addition allows you to shorten the last CHAR field, or to omit the last component at the top level. (Until Release 4.6, you could do this without using an addition).
    Addition 6
    ... IGNORING STRUCTURE BOUNDARIES
    Effect
    This addition means that only the fragment sequence is relevant - that is, that any sub-structures match. If you use this addition, the system ignores any alignment changes necessitated by Unicode - such as inserting named includes.
    You cannot use this addition with either addition 3 (enlarge structure) or addition 4 (shorten structure), since it specifies that structure and include boundaries are to be ignored.
    From Release 6.10 onwards, the include information is stored in datasets, so that the system can also check that includes match - that is, that sub-structures and includes (named or unnamed) are treated equally. When data is imported in a Release prior to 6.10, includes are not checked.
    Related
    EXPORT TO MEMORY, DELETE FROM MEMORY, FREE MEMORY
    Variant 4
    IMPORT obj1 ... objn FROM SHARED MEMORY itab(ar) ID key.
    Extras:
    1. ... = f (for each object to be exported) 2. ... TO f (for each object to be exported)
    3. ... CLIENT g (before ID key)
    4. ... TO wa (after itab(ar) or ID key )
    5. ... ACCEPTING PADDING
    6. ... ACCEPTING TRUNCATION
    7. ... IGNORING STRUCTURE BOUNDARIES
    The syntax check performed in an ABAP Objects context is stricter than in other ABAP areas.
    See You Cannot Use Implicit Field Names in Clusters and You Cannot Use Table Work Areas.
    Effect
    Imports the data objects obj1 ... objn (fields, structures, complex structures, or tables) from shared memory. The data objects are read using the ID key from the area ar in the table itab - c.f. EXPORT TO SHARED MEMORY). You must use itab to specify a database table although the system reads from a memory table with the appropriate structure.
    The Return Code is set as follows:
    SY-SUBRC = 0:
    The existing data objects in the data cluster specified were imported. The rest remain unchanged. (In some circumstances, this may mean that no data objects were imported).
    SY-SUBRC = 4:
    The data objects could not be imported. You may have used the wrong ID. The contents of all the objects remain unchanged.
    Notes
    The table dbtab named according to SHARED MEMORY must be declared using TABLES (except in addition 2).
    The structure of fields (field symbols and internal tables) to be imported must match the structure of the objects exported in the dataset. The objects must be imported under the same names as those under which they were exported. Otherwise, they will not be imported.
    The key length consists of: the client (3 digits, but only if tab is client-specific); area (2 characters); ID; and line number (4 bytes). It must not exceed 64 bytes - that is, the ID must not be longer than 55 characters, if the table is client- specific.
    The key, key, must be a character-type data object (but not a string).
    Additional methods for selecting and deleting data clusters in the shared memory are provided by the system class CL_ABAP_EXPIMP_SHMEM.
    Please consult Data Area and Modularization Unit Organization documentation as well.
    Addition 1
    ... = f (for each object to be imported)
    Addition 2
    ... TO f (for each object to be imported)
    Effect
    The object is stored in the field f.
    Addition 3
    ... CLIENT g (before ID key)
    Effect
    The data is imported from client g (provided the import/export table is tab client-specific). The client, g must be a character-type data object (but not a string).
    Addition 4
    ... TO wa (after itab(ar) or ID key)
    Effect
    You need to use this addition if user data fields have been stored in the application buffer and are to be read from there. The work area wa is used instead of the table work area. The target area must correspond to the structure of the called table tab.
    Addition 5
    ... ACCEPTING PADDING
    Effect
    This addition allows you to: append new fields to the end of structures, sub-structures, and internal tables. The IMPORT statement fills the additional fields with initial values; make existing fields (C, N, X, P, I1, and I2) longer; map character-type fields to STRING-type fields; or to map byte-type fields to XSTRING-type fields.
    Addition 6
    ... ACCEPTING TRUNCATION
    Effect
    This addition allows you to shorten the last CHAR fields, or to omit the last component at the top level. (Until Release 4.6, you could do this without using an addition).
    Addition 7
    ... IGNORING STRUCTURE BOUNDARIES
    Effect
    This addition means that only the fragment sequence is relevant - that is, that any sub-structures match. If you use this addition, the system ignores any alignment changes necessitated by Unicode - such as inserting named includes.
    You cannot use this addition with either addition 4 (enlarge structure) or addition 5 (shorten structure), since it specifies that structure and include boundaries are to be ignored.
    From Release 6.10 onwards, the include information is stored in datasets, so that the system can also check that includes match - that is, that sub-structures and includes (named or unnamed) are treated equally. When data is imported in a Release prior to 6.10, includes are not checked.
    Related
    EXPORT TO SHARED MEMORY, DELETE FROM SHARED MEMORY
    Variant 5
    IMPORT obj1 ... objn FROM SHARED BUFFER itab(ar) ID key.
    Extras:
    1. ... = f (for each object to be exported) 2. ... TO f (for each object to be exported)
    3. ... CLIENT g (before ID key)
    4. ... TO wa (last addition or after itab(ar))
    The syntax check performed in an ABAP Objects context is stricter than in other ABAP areas.
    See Cannot Use Implicit Fieldnames in Clusters und Cannot Use Table Work Areas.
    Effect
    Imports data objects obj1 ... objn (fields or
    tables) from the cross-transaction application buffer. The data objects are read in the application buffer using the ID key of the area ar of the buffer area for the table itab (see EXPORT TO SHARED BUFFER). You must use dbtab to specify a database table although the system reads from a memory table with an appropriate structure.
    The Return Code is set as follows:
    SY-SUBRC = 0:
    The existing data objects in the data cluster specified were imported. The rest remain unchanged (in some circumstances, this means that no data objects were imported).
    SY-SUBRC = 4:
    The data objects could not be imported, probably because an incorrect ID was used.
    The contents of all objects remain unchanged.
    Example
    Import two fields and an internal table from the application buffer with the structure INDX:
    TYPES: BEGIN OF ITAB3_LINE,
             CONT(4),
           END OF ITAB3_LINE.
    DATA: INDXKEY LIKE INDX-SRTFD VALUE 'KEYVALUE',
          F1(4),
          F2(8) TYPE P DECIMALS 0,
          ITAB3 TYPE STANDARD TABLE OF ITAB3_LINE,
          INDX_WA TYPE INDX.
    Import data.
    IMPORT F1 = F1 F2 = F2 ITAB3 = ITAB3
           FROM SHARED BUFFER INDX(ST) ID INDXKEY TO INDX_WA.
    After import, the data fields INDX-AEDAT and
    INDX-USERA in front of CLUSTR are filled with
    the values in the fields before the EXPORT
    statement.
    Notes
    You must declare the table dbtab, named after DATABASE using a TABLES statement.
    The structure of the fields, structures, and internal tables to be imported must match the structure of the objects exported to the dataset. Moreover, the objects must be imported with the same name used to export them. Otherwise, the import is not performed.
    The maximum total key length is 64 bytes. It must include: a client if the table is client-specific (3 characters); an area (2 characters); identification; and line counter (4 bytes). This means that the number of characters available for the identification of a client-specific table is 55 characters.
    The key, key, must be a character-type data object (but not a string).
    Additional methods for selecting and deleting data clusters in the cross-transaction application buffer are provided by the system class CL_ABAP_EXPIMP_SHBUF.
    Please consult Data Area and Modularization Unit Organization documentation as well.
    Addition 1
    ... = f (for each object to be imported)
    Addition 2
    ... TO f (for each object to be imported)
    Effect
    The object is placed in the field f
    Addition 3
    ... CLIENT g (after dbtab(ar))
    Effect
    Takes the data from the client g (if the import/export table dbtab is client-specific). The client g must be a character-type data object (but not a string).
    Addition 4
    ... TO wa (as the last addition or after itab(ar))
    Effect
    You need to use this addition if you want to save user data fields in the application buffer and then read them from there later. The system uses a work area wa instead of a table work area. The target area must have the same structure as the table tab.
    Example
    DATA: INDX_WA TYPE INDX,
          F1.
    IMPORT F1 = F1 FROM SHARED BUFFER INDX(AR)
                   CLIENT '001' ID 'TEST'
                   TO INDX_WA.
    WRITE: / 'AEDAT:', INDX_WA-AEDAT,
           / 'USERA:', INDX_WA-USERA,
           / 'PGMID:', INDX_WA-PGMID.
    Variant 6
    IMPORT obj1 ... objn FROM DATABASE dbtab(ar) ID key.
    Extras:
    1. ... = f (for each object to be imported)
    2. ... TO f (for each object to be imported)
    3. ... CLIENT g (before ID key )
    4. ... USING form
    5. ... TO wa (last addition or after dbtab(ar))
    6. ... MAJOR-ID id1 (instead of ID key)
    7. ... MINOR-ID id2 (with MAJOR-ID id1 )
    8. ... ACCEPTING PADDING
    9. ... ACCEPTING TRUNCATION
    10. ... IGNORING STRUCTURE BOUNDARIES
    11. ... IGNORING CONVERSION ERRORS
    12. ... REPLACEMENT CHARACTER c
    13. ... IN CHAR-TO-HEX MODE
    14. ... CODE PAGE INTO f1
    15. ... ENDIAN INTO f2
    The syntax check performed in an ABAP Objects context is stricter than in other ABAP areas. See Cannot Use Implicit Fieldnames in Clusters and Cannot Use Table Work Areas.
    Effect
    Imports data objects obj1 ... objn (fields, structures, complex structures, or tables) from the data cluster with ID key in area ar of the database table dbtab (see EXPORT TO DATABASE).
    The Return Code is set as follows:
    SY-SUBRC = 0:
    The existing data objects in the data cluster specified were imported. The rest remain unchanged (in some circumstances, this may mean that not data objects were imported).
    SY-SUBRC = 4:
    The data objects could not be imported, probably because an incorrect ID was used.
    The contents of all objects remain unchanged.
    Example
    Import two fields and an internal table:
    TYPES: BEGIN OF TAB3_TYPE,
              CONT(4),
           END OF TAB3_TYPE.
    DATA: INDXKEY LIKE INDX-SRTFD,
          F1(4), F2 TYPE P,
          TAB3 TYPE STANDARD TABLE OF TAB3_TYPE WITH
                    NON-UNIQUE DEFAULT KEY,
          WA_INDX TYPE INDX.
    INDXKEY = 'INDXKEY'.
    IMPORT F1   = F1
           F2   = F2
           TAB3 = TAB3 FROM DATABASE INDX(ST) ID INDXKEY
           TO WA_INDX.
    Notes
    You must declare the table dbtab, named after DATABASE, using the TABLES statement (except in addition 5).
    The structure of fields, field strings and internal tables to be imported must match the structure of the objects exported to the dataset. In addition, the objects must be imported under the same name used to export them. If this is not the case, either a runtime error occurs or no import takes place.
    Exception: You can lengthen or shorten the last field if it is of type CHAR, or add/omit CHAR fields at the end of the structure.
    The key, key, must be a character-type data object (but not a string).
    Additional methods for selecting and deleting data clusters in the database table specified are provided by the system class CL_ABAP_EXPIMP_DB.
    Addition 1
    ... = f (for each object to be imported)
    Addition 2
    ... TO f (for each object to be imported)
    Effect
    The object is placed in field f.
    Addition 3
    ... CLIENT g (before the ID key)
    Effect
    Data is taken from the client g (in client-specific import/export databases only). Client g must be a character-type data object (but not a string).
    Example
    DATA: F1,
          WA_INDX TYPE INDX.
    IMPORT F1 = F1 FROM DATABASE INDX(AR) CLIENT '002' ID 'TEST'
                   TO WA_INDX.
    Addition 4
    ... USING form
    Note
    This statement is for internal use only.
    Incompatible changes or further developments may occur at any time without warning or notice.
    Effect
    Does not read the data from the database. Instead, calls the FORM routine form for each record read from the database without this addition. This routine can take the data key of the data to be retrieved from the database table work area and write the retrieved data to this work area. The name of the routine has the format <name of database table>_<name of form>; it has one parameter which describes the operation (READ, UPDATE or INSERT). The routine must set the field SY-SUBRC in order to show whether the function was successfully performed.
    Addition 5
    ... TO wa (after key or after dbtab(ar))
    Effect
    You need to use this addition if you want to save user data fields in the cluster database and then read from there. The system uses the work area wa instead of a table work area. The target area entered must have the same structure as the table dbtab.
    Example
    DATA WA LIKE INDX.
    DATA F1.
    IMPORT F1 = F1 FROM DATABASE INDX(AR)
                   CLIENT '002' ID 'TEST'
                   TO WA.
    WRITE: / 'AEDAT:', WA-AEDAT,
           / 'USERA:', WA-USERA,
           / 'PGMID:', WA-PGMID.
    Addition 6
    ... MAJOR-ID id1 (instead of the ID key).
    Addition 7
    ... MINOR-ID id2 (with MAJOR-ID id1)
    This addition is not allowed in an ABAP Objects context. See Cannot Use Generic Identification.
    Effect
    Searches for a record the first part of whose ID (length of id1) matches id1 and whose second part - if MINOR-ID id2 is also declared - is greater than or equal to id2.
    Addition 8
    ... ACCEPTING PADDING
    Effect
    This addition allows you to append new fields to the end of structures, sub-structures, and internal tables. The IMPORT statement fills the additional fields with initial values; make existing fields (C, N, X, P, I1, and I2) longer; map character-type fields to STRING-type fields; or to map byte-type fields to XSTRING-type fields.
    Addition 9
    ... ACCEPTING TRUNCATION
    Effect
    This addition allows you to shorten the last CHAR fields, or to omit the last component at the top level. (Until Release 4.6, you could do this without using an addition).
    Addition 10
    ... IGNORING STRUCTURE BOUNDARIES
    Effect
    This addition means that only the fragment sequence is relevant - that is, that any sub-structures match. If you use this addition, the system ignores any alignment changes necessitated by Unicode - such as inserting named includes.
    You cannot use this addition with either addition 8 (enlarge structure) or addition 9 (shorten structure), since it specifies that structure and include boundaries are to be ignored.
    From Release 6.10 onwards, the include information is stored in datasets, so that the system can also check that includes match - that is, that sub-structures and includes (named or unnamed) are treated equally. When data is imported in a Release prior to 6.10, includes are not checked.
    Addition 11
    ...IGNORING CONVERSION ERRORS
    Effect
    This addition prevents the system from triggering a runtime error, if an error occurs when the character set is converted. '#' is used as a replacement character.
    Addition 12
    ... REPLACEMENT CHARACTER c
    Effect
    The replacement character is used if a particular character cannot be converted when the character set is converted. If you do not use this addition, '#' is used as a replacement character.
    This addition can only be used in conjunction with addition 11.
    Addition 13
    ... IN CHAR-TO-HEX MODE
    Effect
    All character-type fields are not converted. To convert a field, you must create a field (or structure) that is identical to the exported field or structure, except that all its character-type components must be replaced with hexadecimal fields.
    You can only use this addition in Unicode programs, to allow you to import camouflaged binary data as single-byte characters. Moreover, you cannot use this addition in conjunction with the additions 8, 9, 10, 11, and 12.
    Addition 14
    ... CODE PAGE INTO f1
    Effect
    The code page of the exported data is stored in the character-type field f1 - for example, to analyze data that has been imported with the IN CHAR-TO-HEX MODE addition.
    Addition 15
    ... ENDIAN INTO f2
    Effect
    The byte order(LITTLE or BIG) of the exported data is stored in the field f2 - for example, to analyze data that has been imported with the IN CHAR-TO-HEX MODE addition. The field f2 must have the type ABAP_ENDIAN, which is defined in the type group ABAP. For this reason, the type group ABAP must be included in the ABAP program using a TYPE-POOLS statement.
    Variant 7
    IMPORT obj1 ... objn FROM DATASET dsn(ar) ID key.
    This variant is not allowed in an ABAP Objects context. See Cannot Use Clusters in Files
    Note
    This variant is no longer supported and cannot be used.
    Variant 8
    IMPORT obj1 ... objn FROM LOGFILE ID key.
    Note
    This statement is for internal use only.
    Incompatible changes or further developments may occur at any time without warning or notice.
    Extras:
    1. ... = f (for each field f to be imported) 2. ... TO f (for each field f to be imported)
    The syntax check performed in an ABAP Objects context is stricter than in other ABAP areas. See Cannot Use Implicit Field Names in Clusters
    Effect
    Imports data objects (fields, field strings or internal tables) from the update data. You must specify the update key assigned by the system (with current request number) as the key.
    The key, key, must be a character-type data object (but not a string).
    The Return Code is set as follows:
    SY-SUBRC = 0:
    The existing data objects in the data cluster specified were imported. The rest remain unchanged (in some circumstances, this may mean that no data objects were imported).
    SY-SUBRC = 4:
    The data objects could not be imported. An incorrect ID may have been used.
    The contents of all objects remain unchanged.
    Addition 1
    ... = f (for each object to be imported)
    Addition 2
    ... TO f (for each object to be imported)
    Effect
    The object is placed in field f.
    Variant 9
    IMPORT DIRECTORY INTO itab FROM DATABASE dbtab(ar) ID key.
    Extras:
    1. ... CLIENT g (after dbtab(ar)) 2. ... TO wa (last addition or after dbtab(ar))
    The syntax check performed in an ABAP Objects context is stricter than in other ABAP areas. See Cannot Use Table Work Areas.
    Effect
    Imports an object directory stored under the specified ID with EXPORT TO DATABASE into the table itab. The internal table itab may not have the type HASHED TABLE or ANY TABLE.
    The key, key, must be a character-type data object (but not a string).
    The Return Code is set as follows:
    SY-SUBRC = 0:
    The directory was successfully imported.
    SY-SUBRC = 4:
    The directory could not be imported, probably because an incorrect ID was used.
    The internal table itab must have the same structure as the Dictionary structure CDIR (INCLUDE STRUCTURE).
    Addition 1
    ... CLIENT g (before ID key)
    Effect
    Takes data from the client g (only with client-specific import/export databases). Client g must be a character-type data object (but not a string).
    Addition 2
    ... TO wa (last addition or after dbtab(ar))
    Effect
    Uses the work area wa instead of the table work area. When you use this addition, you do not need to declare the table dbtab, named after DATABASE using a TABLES statement. The work area entered must have the same structure as the table dbtab.
    Example
    Directory of a cluster consisting of two fields and an internal table:
    TYPES: BEGIN OF TAB3_LINE,
             CONT(4),
           END OF TAB3_LINE,
           BEGIN OF DIRTAB_LINE.
             INCLUDE STRUCTURE CDIR.
    TYPES  END OF DIRTAB_LINE.
    DATA: INDXKEY LIKE INDX-SRTFD,
          F1(4),
          F2(8)   TYPE P decimals 0,
          TAB3    TYPE STANDARD TABLE OF TAB3_LINE,
          DIRTAB  TYPE STANDARD TABLE OF DIRTAB_LINE,
          INDX_WA TYPE INDX.
    INDXKEY = 'INDXKEY'.
    EXPORT F1 = F1
           F2 = F2
           TAB3 = TAB3
           TO DATABASE INDX(ST) ID INDXKEY " TAB3 has 17 entries
           FROM INDX_WA.
    IMPORT DIRECTORY INTO DIRTAB FROM DATABASE INDX(ST) ID INDXKEY
           TO INDX_WA.
    Then, the table DIRTAB contains the following:
    NAME     OTYPE  FTYPE  TFILL  FLENG
    F1         F      C      0      4
    F2         F      P      0      8
    TAB3       T      C      17     4
    The meaning of the individual fields is as follows:
    NAME:
    Name of stored object
    OTYPE:
    Object type (F: Field, R: Field string / Dictionary struc

  • How to Pass internal table from a program to Samrt form

    Hi Pals
    I want to pass an internal table which I have declared in the program to Smartform..can you please help
    me asap.
    Regards
    Praveen

    Hai.
    check link.
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCRSF/BCSRVSCRSF.pdf
    check this.
    How to create a New smartfrom, it is having step by step procedure
    http://sap.niraj.tripod.com/id67.html
    step by step good ex link is....
    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
    Here is the procedure
    1. Create a new smartforms
    Transaction code SMARTFORMS
    Create new smartforms call ZSMART
    2. Define looping process for internal table
    Pages and windows
    First Page -> Header Window (Cursor at First Page then click Edit -> Node -> Create)
    Here, you can specify your title and page numbering
    &SFSY-PAGE& (Page 1) of &SFSY-FORMPAGES(Z4.0)& (Total Page)
    Main windows -> TABLE -> DATA
    In the Loop section, tick Internal table and fill in
    ITAB1 (table in ABAP SMARTFORM calling function) INTO ITAB2
    3. Define table in smartforms
    Global settings :
    Form interface
    Variable name Type assignment Reference type
    ITAB1 TYPE Table Structure
    Global definitions
    Variable name Type assignment Reference type
    ITAB2 TYPE Table Structure
    4. To display the data in the form
    Make used of the Table Painter and declare the Line Type in Tabstrips Table
    e.g. HD_GEN for printing header details,
    IT_GEN for printing data details.
    You have to specify the Line Type in your Text elements in the Tabstrips Output options.
    Tick the New Line and specify the Line Type for outputting the data.
    Declare your output fields in Text elements
    Tabstrips - Output Options
    For different fonts use this Style : IDWTCERTSTYLE
    For Quantity or Amout you can used this variable &GS_ITAB-AMOUNT(12.2)&
    5. Calling SMARTFORMS from your ABAP program
    REPORT ZSMARTFORM.
    Calling SMARTFORMS from your ABAP program.
    Collecting all the table data in your program, and pass once to SMARTFORMS
    SMARTFORMS
    Declare your table type in :-
    Global Settings -> Form Interface
    Global Definintions -> Global Data
    Main Window -> Table -> DATA
    Written by : SAP Hints and Tips on Configuration and ABAP/4 Programming
    http://sapr3.tripod.com
    TABLES: MKPF.
    DATA: FM_NAME TYPE RS38L_FNAM.
    DATA: BEGIN OF INT_MKPF OCCURS 0.
    INCLUDE STRUCTURE MKPF.
    DATA: END OF INT_MKPF.
    SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.
    SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.
    MOVE-CORRESPONDING MKPF TO INT_MKPF.
    APPEND INT_MKPF.
    ENDSELECT.
    At the end of your program.
    Passing data to SMARTFORMS
    call function 'SSF_FUNCTION_MODULE_NAME'
    exporting
    formname = 'ZSMARTFORM'
    VARIANT = ' '
    DIRECT_CALL = ' '
    IMPORTING
    FM_NAME = FM_NAME
    EXCEPTIONS
    NO_FORM = 1
    NO_FUNCTION_MODULE = 2
    OTHERS = 3.
    if sy-subrc <> 0.
    WRITE: / 'ERROR 1'.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    call function FM_NAME
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    CONTROL_PARAMETERS =
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    OUTPUT_OPTIONS =
    USER_SETTINGS = 'X'
    IMPORTING
    DOCUMENT_OUTPUT_INFO =
    JOB_OUTPUT_INFO =
    JOB_OUTPUT_OPTIONS =
    TABLES
    GS_MKPF = INT_MKPF
    EXCEPTIONS
    FORMATTING_ERROR = 1
    INTERNAL_ERROR = 2
    SEND_ERROR = 3
    USER_CANCELED = 4
    OTHERS = 5.
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    Smartform
    you can check this link here you can see the steps and you can do it the same by looking at it..
    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
    SMARTFORMS STEPS.
    1. In Tcode se11 Create a structure(struct) same like the Internal table that you are going to use in your report.
    2. Create Table type(t_struct) of stracture in se11.
    3. In your program declare Internal table(Itab) type table of structure(struct).
    4. Define work area(wa) like line of internal table.
    5. Open Tcode Smartforms
    6. In form Global setting , forminterface Import parameter define Internal table(Itab) like table type of stracture(t_struct).
    7. In form Global setting , Global definitions , in Global data define Work area(wa) like type stracture(struct).
    8. In form pages and window, create Page node by default Page1 is available.
    9. In page node you can create numbers of secondary window. But in form there is only one Main window.
    10. By right click on page you can create windows or Go to Edit, Node, Create.
    11. After creating the window right click on window create table for displaying the data that you are passing through internal table.
    12. In the table Data parameter, loop internal internal table (Itab) into work area(wa).
    13. In table there are three areas Header, Main Area, Footer.
    14. Right click on the Main area create table line by default line type1 is there select it.
    15. Divide line into cells according to your need then for each cell create Text node.
    16. In text node general attribute. Write down fields of your work area(wa) or write any thing you want to display.
    17. Save form and activate it.
    18. Then go to Environment, function module name, there you get the name of function module copy it.
    19. In your program call the function module that you have copied from your form.
    20. In your program in exporting parameter of function pass the internal table(itab).
    SAP Smart Forms is introduced in SAP Basis Release 4.6C as the tool for creating and maintaining forms.
    SAP Smart Forms allow you to execute simple modifications to the form and in the form logic by using simple graphical tools; in 90% of all cases, this won't include any programming effort. Thus, a power user without any programming knowledge can
    configure forms with data from an SAP System for the relevant business processes.
    To print a form, you need a program for data retrieval and a Smart Form that contains the entire from logic. As data retrieval and form logic are separated, you must only adapt the Smart Form if changes to the form logic are necessary. The application program passes the data via a function module interface to the Smart Form. When activating the Smart Form, the system automatically generates a function module. At runtime, the system processes this function module.
    You can insert static and dynamic tables. This includes line feeds in individual table cells, triggering events for table headings and subtotals, and sorting data before output.
    You can check individual nodes as well as the entire form and find any existing errors in the tree structure. The data flow analysis checks whether all fields (variables) have a defined value at the moment they are displayed.
    SAP Smart Forms allow you to include graphics, which you can display either as part of the form or as background graphics. You use background graphics to copy the layout of an existing (scanned) form or to lend forms a company-specific look. During printout, you can suppress the background graphic, if desired.
    SAP Smart Forms also support postage optimizing.
    Also read SAP Note No. 168368 - Smart Forms: New form tool in Release 4.6C
    What Transaction to start SAP Smart Forms?
    Execute transaction SMARTFORMS to start SAP Smart Forms.
    Key Benefits of SAP Smart Forms:
    SAP Smart Forms allows you to reduce considerably the implementation costs of mySAP.com solutions since forms can be adjusted in minimum time.
    You design a form using the graphical Form Painter and the graphical Table Painter. The form logic is represented by a hierarchy structure (tree structure) that consists of individual nodes, such as nodes for global settings, nodes for texts, nodes for output tables, or nodes for graphics.
    To make changes, use Drag & Drop, Copy & Paste, and select different attributes.
    These actions do not include writing of coding lines or using a Script language.
    Using your form description maintained in the Form Builder, Smart Forms generates a function module that encapsulates layout, content and form logic. So you do not need a group of function modules to print a form, but only one.
    For Web publishing, the system provides a generated XML output of the processed form.
    Smart Forms provides a data stream called XML for Smart Forms (XSF) to allow the use of 3rd party printing tools. XSF passes form content from R/3 to an external product without passing any layout information about the Smart Form.
    SmartForms System Fields
    Within a form you can use the field string SFSY with its system fields. During form processing the system replaces these fields with the corresponding values. The field values come from the SAP System or are results of the processing.
    System fields of Smart Forms
    &SFSY-DATE&
    Displays the date. You determine the display format in the user master record.
    &SFSY-TIME&
    Displays the time of day in the form HH:MM:SS.
    &SFSY-PAGE&
    Inserts the number of the current print page into the text. You determine the format of the page number (for example, Arabic, numeric) in the page node.
    &SFSY-FORMPAGES&
    Displays the total number of pages for the currently processed form. This allows you to include texts such as'Page x of y' into your output.
    &SFSY-JOBPAGES&
    Contains the total page number of all forms in the currently processed print request.
    &SFSY-WINDOWNAME&
    Contains the name of the current window (string in the Window field)
    &SFSY-PAGENAME&
    Contains the name of the current page (string in the Page field)
    &SFSY-PAGEBREAK&
    Is set to 'X' after a page break (either automatic [Page 7] or command-controlled [Page 46])
    &SFSY-MAINEND&
    Is set as soon as processing of the main window on the current page ends
    &SFSY-EXCEPTION&
    Contains the name of the raised exception. You must trigger your own exceptions, which you defined in the form interface, using the user_exception macro (syntax: user_exception <exception name >).
    Example Forms Available in Standard SAP R/3
    SF_EXAMPLE_01
    Simple example; invoice with table output of flight booking for one customer
    SF_EXAMPLE_02
    Similar to SF_EXAMPLE_01 but with subtotals
    SF_EXAMPLE_03
    Similar to SF_EXAMPLE_02, whereby several customers are selected in the application program; the form is called for each customer and all form outputs are included in an output request
    check this:
    http://help.sap.com/saphelp_nw04s/helpdata/en/a5/de6838abce021ae10000009b38f842/content.htm
    http://www.sapbrain.com/ARTICLES/TECHNICAL/SMARTFORMS/smartforms.html
    http://www.sapbrain.com/TUTORIALS/TECHNICAL/SMARTFORMS_tutorial.html
    check this linkls------>
    https://www.sdn.sap.com/irj/sdn/collaboration
    http://help.sap.com/saphelp_erp2004/helpdata/en/a9/de6838abce021ae10000009b38f842/frameset.htm
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    Insert Images in smartforms
    regards.
    sowjanya.b.

  • PASSING INTERNAL TABLR FROM ONE SUBROUTINE TO OTHER SUBROUTINE

    hi i want to pass one internal table to other subroutine like this
    form abc
    data: begin of itab occurs 0.
              end of itab
    perform xyz tables itab.
    endform.
    form xyz tables itab like itab[].
    end form
    it is giving and error that itab is not defiend by data statement
    and also tell how to pass two internal tables to the subroutine
    thanx in advance
    its very urgent
    points wil be rewarded
    plz help its very urgent

    Hi,
    Check this Example
    PROGRAM FORM_TEST.
    TYPES: BEGIN OF LINE,
    COL1 TYPE I,
    COL2 TYPE I,
    END OF LINE.
    DATA: ITAB TYPE STANDARD TABLE OF LINE WITH HEADER LINE,
          JTAB TYPE STANDARD TABLE OF LINE.
    PERFORM FILL TABLES ITAB.
    MOVE ITAB[] TO JTAB.
    PERFORM OUT TABLES JTAB.
    FORM FILL TABLES F_ITAB LIKE ITAB[].
      DO 3 TIMES.
        F_ITAB-COL1 = SY-INDEX.
        F_ITAB-COL2 = SY-INDEX ** 2.
        APPEND F_ITAB.
      ENDDO.
    ENDFORM.
    FORM OUT TABLES F_ITAB LIKE JTAB.
      LOOP AT F_ITAB.
        WRITE: / F_ITAB-COL1, F_ITAB-COL2.
      ENDLOOP.
    ENDFORM.
    Regards,
    Satish

  • How to move the changes from one system to other without using CMS

    Hi
    In our project they are migrating NWDI 6.40 to NWDI 7.0.
    During migration CMS won't be available.
    Could you plesae tell what are the different options are there to move the WebDynpro changes from (NWDS) Development to Quality system and then production system without using CMS server?
    If i will create a development package and import this packgae in Quality package will my new changes also be available in Quality server?
    Thanks & Regards
    Susmita

    Hi Susmita
    I wasn't completely sure, but from your description of your problem, it seemed like you would have access to your DTR during your upgrade. The following solution assumes as much. If this is not the case, you'll need to do things slightly differently, but the solution will still be possible.
    Depending on the scope and size of your changes, it may be practical for your developers to deploy directly from their NetWeaver Developer Studio (or for a designated administrator to install the NWDS and do the same). To do so, from the Development Configurations perspective, create a new NWDS project for each of the DCs you want to deploy. Then right-click the project and choose from one of the deployment options. (Deploy new archive and run will allow you to see if your deployment has taken effect.) When deploying, the target server is the one set up as your J2EE engine in the NWDS properties - you'll consequently have to modify this when the target server for your deployment changes (from QA to production, or vice versa).
    Note that this is only applicable in certain situations, and only as a short term stopgap measure. This sort of practice - developers or administrators deploying haphazardly to servers other than those intended for development - is precisely what the NWDI is designed to prevent (and is one of very few things it's fairly good at doing). For instance, if your QA and production systems are attached as TEST and PROD runtimes systems respectively in your NWDI, a full assembly and subsequent full deployment would usually occur to these servers when deploying with the NWDI. This is a much stronger guarantee of consistency than the build that will be performed within your local NWDS to deploy your changes. (Conversely, the rigidity of the assembly is perhaps the NWDI's greatest design flaw.)
    (Also, Snehal: thanks for the information on the sapmake_util blog. It's not something I've encountered before and looks very useful.)
    James

  • How to send internl tab val 4m 1 prog to other without using IMPORT EXPORT

    Hi All,
    I need to send the vales of internal table from one program to other program without using IMPORT and EXPORT parameter.
    Actually i have implemented one enhancement in standared program and need to send the internal table records to one Z-Program not using memory id import and export.
    How can i do that ?
    Thanks in Advance.
    Regards,
    Umesh

    Hi Umesh,
    you might create a function group with a global internal table. Then you call one FM in standard report to fill global data and a second call of a FM can access the global data - as long as this is still running in the same process (transaction).
    "Sending to an other program" is quite general, if your own program is not part of the first process, you might need to save values in a z-table and plan your report periodically checking for new data.
    BR, Christian

  • Regarding Passing two internal Tables from Driver Program to Smartform

    hi all,
              I am Passing Two Internal Tables from Driver Program to Smartform it is going to dump and message is showing like this " one of the parameters eded according to the interface description was not specified ".
              When i am passing one Internal Table Output is coming Perfectly. Is there any restriction for passing of internal tables.
    Regards
    Rami

    HI,
    Check the names specified in the smartfrom and FM whcih you are calling in the driver program. Both might be different....

  • Transferring an Internal table from one Function Module to another

    Hi,
    I need to transfer an Internal Table from one FM to another. I've tried the statements IMPORT IT from Memory ID and EXPORT IT to Memory ID, but this is not working. I think the reason is different session or diff LUW, I can not use SET and GET Parametr syntax, as I will not be able to pass Internal Tables through it.
    Can any1 please give a solution on this? 
    Cheers
    Abhishek

    I'd agree with April that the easiest way to pass data directly from FM1 to FM2 is via "tables", but what is your overall code structure i.e. are you going:
    Program
      Call Function FM1
    back to Program
      Call Function FM1
    or are you going:
    Program
      Call Function FM1
        Call Function FM2 from FM1
    In either case, I would expect the export / import to be working fine, at least it seem to when I tried it using:
    export lt_data from lt_data to memory id 'Z:1234'.
    import lt_data to lt_data from memory id 'Z:1234'.
    Jonathan

  • How to move table from one tablespace to other tablespace?

    how to move table from one tablespace to other tablespace?

    887274 wrote:
    how to move table from one tablespace to other tablespace?
    alter table <table_name> move  tablespace <new_tablespace_name>;
    Rebuild the indexes; alter index <index_name> rebuild <new_tablespace_name> online;Example;:
    SQL> create table ttt( ID NUMBER PRimary key);
    Table created.
    SQL> insert into ttt values (1);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select index_name, status  from dba_indexes where table_name='TTT';
    INDEX_NAME                 STATUS
    SYS_C0010863                 VALID
    SQL> alter table ttt move tablespace users;
    Table altered.
    SQL> select index_name, status  from dba_indexes where table_name='TTT';
    INDEX_NAME                 STATUS
    SYS_C0010863                 UNUSABLE
    SQL> alter index SYS_C0010863 rebuild tablespace users online;
    Index altered.
    SQL> select index_name, status  from dba_indexes where table_name='TTT';
    INDEX_NAME                 STATUS
    SYS_C0010863                 VALID
    SQL>

  • How can we copy table from one schema to other schema

    Hi,
    I have create one table in one schema and i want to copy it to other schema.How we can copy table from one schema to other schema

    Hi,
    You can try something like this :-
    SQL> CONNECT SYS/SYS123@SERVER AS SYSDBA
    Connected.
    SQL> CREATE USER TEST_1 IDENTIFIED BY TEST_1;
    User created.
    SQL> CREATE USER TEST_2 IDENTIFIED BY TEST_2;
    User created.
    SQL> GRANT CONNECT,RESOURCE,DBA TO TEST_1;
    Grant succeeded.
    SQL> GRANT CONNECT,RESOURCE,DBA TO TEST_2;
    Grant succeeded.
    SQL> CONNECT TEST_1/TEST_1@SERVER
    Connected.
    SQL> CREATE TABLE TEST_COPY ( TEST_COL NUMBER );
    Table created.
    SQL> INSERT INTO TEST_COPY VALUES ( 1 );
    1 row created.
    SQL> INSERT INTO TEST_COPY VALUES ( 2 );
    1 row created.
    SQL> COMMIT;
    Commit complete.
    SQL> GRANT ALL ON TEST_COPY TO TEST_2;
    Grant succeeded.
    SQL>  CONNECT TEST_2/TEST_2@SERVER
    Connected.
    SQL> CREATE TABLE TEST_COPY AS SELECT * FROM TEST_1.TEST_COPY;
    Table created.
    SQL>  SELECT * FROM TEST_COPY;
      TEST_COL
             1
             2Regards,
    Sandeep

  • Getting error while creating table from one database to other.

    Hi,
    We are getting below error while creating the table from one database to other.
    SQL> create table fnd_lobs parallel compress as select * from [email protected];
    create table fnd_lobs parallel compress as select * from [email protected]
    ERROR at line 1:
    ORA-01555: snapshot too old: rollback segment number 28 with name "_SYSSMU28$"
    too small
    ORA-02063: preceding line from EEXIT2TEST
    ORA-01555: snapshot too old: rollback segment number 28 with name "_SYSSMU28$"
    too small
    ORA-02063: preceding line from EEXIT2TEST
    ORA-01555: snapshot too old: rollback segment number 28 with name "_SYSSMU28$"
    too small
    ORA-02063: preceding line from EEXIT2TEST
    ORA-01555: snapshot too old: rollback segment number 28 with name "_SYSSMU28$"
    too small
    Regards,
    Bhatia

    hi
    what are the apps version local and remote database???
    Snapshot too old errors occur because Oracle can 't reconstruct a consistent
    image of a block for the purposes of a consistent read.
    I feel at remote database, you are using UNDO, it will be rather easy to iincrease the undo retention time or increase the undo tablespace size.. if you are dealing with roll back segments, you may have rollback segments whose optimal values are too small...
    increase roll back segments size and select again then
    the following metalink notes might be helpful
    ORA-01555 "Snapshot too old" - Detailed Explanation Doc ID: 40689.1
    How To Avoid ORA-01555: Snapshot Too Old When Running PAAPIMP Doc ID: 603259.1
    OERR: ORA 1555 "snapshot too old (rollback segment too small)" Doc ID: 18954.1

  • How to read a table from one host to other host

    Hi Everybody,
    How to read a table from one host to other host.
    For Example,
    a/a@abcd - host 1
    b/b@xyz - host 2
    suppose im having a table called emp in a/a@abcd
    i want to read the table emp in b/b@xyz
    how to do this.??
    I know that we have to create a dblink...after that how to proceed.
    Plz help..
    Thanks in Advance,
    Gita

    connected as scott/tiger@test
    SQL>
    CREATE DATABASE LINK local
    CONNECT TO admin IDENTIFIED BY pinnet
    USING 'pinnet';
    Database link created.
    sql>
    select count(*) from
    users@local;
    COUNT(*) 
    16
    Message was edited by:
            jeneesh                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How do I transfer files from one computer to another without using cables??

    How do I transfer files from one computer to another without using cables?

    Wifi network
    Email
    Thumb Drive
    Online storage such as, iCloud Google Docs, SkyDrive, etc.

  • Pass internal table from program to another program

    hi,
    how do i pass an internal table from program to another program, then read it.
    tnx,
    laure

    Export the selected rows to the next program
    EXPORT final TO MEMORY ID 'ABC'.
    CALL TRANSACTION 'XXX'.
    XXX is the tcode for the other program where u want to import the values.
    In the second program
    INITIALIZATION.
    IMPORT the internal table from the first program
    IMPORT final FROM MEMORY ID 'ABC'.
    Dont refesh the internal table final.

  • Regarding passing an internal table from print program to smartform....

    Hi All,
    can any body let me how to pass an internal table to the smartform, i have processed the data in the print program then i want to pass the final internal table from the print program to smartform and with that data in the internal table i have to process it in the smartform (i want to get some more data based on the internal table data from the print program) and then i will display finally.
    for example: i have it_qals which contains all the lot numbers which is processed in teh printprogram, now i want to pass all these (it_qals) lotnumbers to smartform , and in the smartform i will use the lotnumbers in the it_qals table and will process other data accordingly 
    can any body help me plzz.. its very urgent

    Chek this code i am coping my whole program here.
    REPORT ZDP_SMARTFORMS_REPORT3 .
    TABLES: MARA,
    MAKT.
    DATA: FNAME TYPE RS38L_FNAM.
    DATA: BEGIN OF ITJOIN OCCURS 0.
    INCLUDE STRUCTURE ZDP_JOIN__IN_SMARTFORM.
    INCLUDE STRUCTURE MARA.
    INCLUDE STRUCTURE MAKT.
    data: END OF ITJOIN.
    *DATA: BEGIN OF ITJOIN OCCURS 0,
    MATNR LIKE MARA-MATNR,
    END OF ITJOIN.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS: MAT FOR MARA-MATNR.
    SELECTION-SCREEN END OF BLOCK B1.
    SELECT MARA~MATNR MAKTX "UP TO 5 ROWS
    FROM MARA JOIN MAKT ON MARAMATNR = MAKTMATNR
    INTO TABLE ITJOIN
    WHERE MARAMATNR IN MAT and maktspras eq 'EN'.
    into corresponding fields of table it
    *SELECT MATNR UP TO 5 ROWS FROM MARA INTO TABLE ITJOIN
    WHERE MATNR IN MAT.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    FORMNAME = 'ZDP_SMARTFORMS_3'
    VARIANT = ' '
    DIRECT_CALL = ' '
    IMPORTING
    FM_NAME = FNAME
    EXCEPTIONS
    NO_FORM = 1
    NO_FUNCTION_MODULE = 2
    OTHERS = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    not necessar y above function if u copy function name from
    **- smartforms>environment>function name
    CALL FUNCTION '/1BCDWB/SF00000037'
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    CONTROL_PARAMETERS =
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    OUTPUT_OPTIONS =
    USER_SETTINGS = 'X'
    IMPORTING
    DOCUMENT_OUTPUT_INFO =
    JOB_OUTPUT_INFO =
    JOB_OUTPUT_OPTIONS =
    TABLES
    ITJ = ITJOIN
    EXCEPTIONS
    FORMATTING_ERROR = 1
    INTERNAL_ERROR = 2
    SEND_ERROR = 3
    USER_CANCELED = 4
    OTHERS = 5
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Also check these links
    Check out this link,
    http://www.erpgenie.com/abap/smartforms.htm
    and also refer these threads,
    Passing table to smartform
    PASSING INTERNAL TABLE IN SMARTFORM
    Hope this helps.
    ashish

Maybe you are looking for