Table in import and export parameters

Hi,
this is a general doubt. can we pass an internal table in import/export parameters of FMs. I know there are table parameters, but can this be done in import export parameters.
Regards,
Vijay

Hi vijay,
1. if we pass thru TABLES,
  then we can pass an internal table,
  WITH HEADER LINE
2. But if we use import/export,
   it has to be a TABLE TYPE
   defined in the data dictionary.
  (This table type will not have any header line).
regards,
amit m.

Similar Messages

  • Internal table with Import and Export

    Hi All,
    Hi all
    Please let me know the use of <b>Internal table with Import and Export parameters and SET/GET parameters</b>, on what type of cases we can use these? Plese give me the syntax with some examples.
    Please give me detailed analysis on the above.
    Regards,
    Prabhu

    Hi Prabhakar,
    There are three types of memories.
    1. ABAP MEMORY
    2. SAP MEMORY
    3. EXTERNAL MEMORY.
    1.we will use EXPORT/ IMPORT TO/ FROM MEMORY-ID when we want to transfer between ABAP memory
    2. we will use GET PARAMETER ID/ SET PARAMETER ID to transfer between SAP MEMORY
    3. we will use EXPORT/IMPORT TO/FROM SHARED BUFFER to transfer between external memory.
    ABAP MEMORY : we can say that two reports in the same session will be in ABAP MEMORY
    SAP MEMORY: TWO DIFFERENT SESSIONS WILL BE IN SAP MEMORY.
    for ex: IF WE CALL TWO DIFFERENT TRANSACTIONS SE38, SE11
    then they both are in SAP MEMORY.
    EXTERNAL MEMORY: TWO different logons will be in EXTERNAL MEMORY.
    <b>Syntax</b>
    To fill the input fields of a called transaction with data from the calling program, you can use the SPA/GPA technique. SPA/GPA parameters are values that the system stores in the global, user-specific SAP memory. SAP memory allows you to pass values between programs. A user can access the values stored in the SAP memory during one terminal session for all parallel sessions. Each SPA/GPA parameter is identified by a 20-character code. You can maintain them in the Repository Browser in the ABAP Workbench. The values in SPA/GPA parameters are user-specific.
    ABAP programs can access the parameters using the SET PARAMETER and GET PARAMETER statements.
    To fill one, use:
    SET PARAMETER ID <pid> FIELD <f>.
    This statement saves the contents of field <f> under the ID <pid> in the SAP memory. The code <pid> can be up to 20 characters long. If there was already a value stored under <pid>, this statement overwrites it. If the ID <pid> does not exist, double-click <pid> in the ABAP Editor to create a new parameter object.
    To read an SPA/GPA parameter, use:
    GET PARAMETER ID <pid> FIELD <f>.
    This statement fills the value stored under the ID <pid> into the variable <f>. If the system does not find a value for <pid> in the SAP memory, it sets SY-SUBRC to 4, otherwise to 0.
    To fill the initial screen of a program using SPA/GPA parameters, you normally only need the SET PARAMETER statement.
    The relevant fields must each be linked to an SPA/GPA parameter.
    On a selection screen, you link fields to parameters using the MEMORY ID addition in the PARAMETERS or SELECT-OPTIONS statement. If you specify an SPA/GPA parameter ID when you declare a parameter or selection option, the corresponding input field is linked to that input field.
    On a screen, you link fields to parameters in the Screen Painter. When you define the field attributes of an input field, you can enter the name of an SPA/GPA parameter in the Parameter ID field in the screen attributes. The SET parameter and GET parameter checkboxes allow you to specify whether the field should be filled from the corresponding SPA/GPA parameter in the PBO event, and whether the SPA/GPA parameter should be filled with the value from the screen in the PAI event.
    When an input field is linked to an SPA/GPA parameter, it is initialized with the current value of the parameter each time the screen is displayed. This is the reason why fields on screens in the R/3 System often already contain values when you call them more than once.
    When you call programs, you can use SPA/GPA parameters with no additional programming overhead if, for example, you need to fill obligatory fields on the initial screen of the called program. The system simply transfers the values from the parameters into the input fields of the called program.
    However, you can control the contents of the parameters from your program by using the SET PARAMETER statement before the actual program call. This technique is particularly useful if you want to skip the initial screen of the called program and that screen contains obligatory fields.
    Reading Data Objects from Memory
    To read data objects from ABAP memory into an ABAP program, use the following statement:
    Syntax
    IMPORT <f1> [TO <g 1>] <f 2> [TO <g 2>] ... FROM MEMORY ID <key>.
    This statement reads the data objects specified in the list from a cluster in memory. If you do not use the TO <g i > option, the data object <f i > in memory is assigned to the data object in the program with the same name. If you do use the option, the data object <f i > is read from memory into the field <g i >. The name <key> identifies the cluster in memory. It may be up to 32 characters long.
    You do not have to read all of the objects stored under a particular name <key>. You can restrict the number of objects by specifying their names. If the memory does not contain any objects under the name <key>, SY-SUBRC is set to 4. If, on the other hand, there is a data cluster in memory with the name <key>, SY-SUBRC is always 0, regardless of whether it contained the data object <f i >. If the cluster does not contain the data object <f i >, the target field remains unchanged.
    Saving Data Objects in Memory
    To read data objects from an ABAP program into ABAP memory, use the following statement:
    Syntax
    EXPORT <f1> [FROM <g 1>] <f 2> [FROM <g 2>] ... TO MEMORY ID <key>.
    This statement stores the data objects specified in the list as a cluster in memory. If you do not use the option FROM <f i >, the data object <f i > is saved under its own name. If you use the FROM <g i > option, the data objet <g i > is saved under the name <f i >. The name <key> identifies the cluster in memory. It may be up to 32 characters long.
    Check this link.
    http://www.sap-img.com/abap/difference-between-sap-and-abap-memory.htm
    Thanks,
    Susmitha.
    Reward points for helpful answers.

  • Import and export parameters of an FM are passed by value---why?

    Q]      By default the import and export parameters of an FM are passed by value---what is  the advantage of this system?

    Hi,
    Import and export parameters are, by default, passed by value. However, they can also be passed by reference. Tables parameters can only be passed by reference.
    Pass by reference means, passing the address itself rather than passing the value.
    I guess passing by value is easier and advantageous

  • Difference between Import and Export parameters in Function Module

    Hi All,
    I am unclear about the import and export parameters, when i create a function module. Can anyone explain abt this. However when i call the function module in any program the import parameters in Function module are displayed as exporting in program amd the export parameters as importing.
    Any help on this would be appericiated.
    Shejal.

    HI,
    Import parameter in FM is the value u provide to FM for processing.
    export is the value u get from FM after processing.
    when u call a FM in a progam the import parameter will appear as Export bcos u r giving value to the FM.
    and u r getting value from FM in import parameter(bcos u r importing).
    rgds,
    latheesh
    Message was edited by: Latheesh Kaduthara

  • JCA IConnection call to BAPI with table in table as import and export param

    Is it possible to call a BAPI with a table in table as import and export data?
    Please give small code example if this is possible.
    Thanks in advance.

    Inner tables can be handled with:
    IRecordSet innerTable = (IRecordSet)outerTable.getObject("INNER_TABLE");

  • Import and Export Parameters READ_TEXT

    Hi ALL
    I have to read Standard Text through this Function Module and populate that Standard Text into an Internal Table. Kindly let me know about the Import and Export parameterto do this. Also pls let me know a way to accomplish this
    Thanks

    What text are u reading and from which transaction.
    The following are the main parameters,
    ID:
    this is text id(U can find it in ur transaction,generally it will start with z)
    LANGUAGE:
    This depends on the language in which the text is maintained.For example En(english)
    NAME:
    No for which the text id is maintained,it may be deliver no or transport no.Depends on ur case.
    OBJECT:
    This represents mostly wether it is header data or item data respectively.so u can check this in ur transaction.
    A short example as follows,
    FORM read_text1 TABLES   g_t_lines STRUCTURE tline
                    USING    p_var TYPE c
                             p_obj TYPE c.
      READ TABLE xvttp INDEX 1.
      g_f_tdname1 = xvttp-vbeln.
      g_f_obj1 = p_obj.
      g_f_langu1 = 'DE'.
      REFRESH g_t_lines.
      CLEAR g_t_lines.
      CALL FUNCTION 'READ_TEXT'
           EXPORTING
                id                      = p_var
                language                = g_f_langu1
                name                    = g_f_tdname1
                object                  = g_f_obj1
           TABLES
                lines                   = g_t_lines
           EXCEPTIONS
                id                      = 1
                language                = 2
                name                    = 3
                not_found               = 4
                object                  = 5
                reference_check         = 6
                wrong_access_to_archive = 7
                OTHERS                  = 8.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    endform.
    Check this and let me know if u face any problenm.
    Regards

  • Import and export parameters.

    Hi Experts,
    If I am using import n export parameters for getting data from a different program into my main program, do i have to declare the variables again in the second program.
    For ex:
    The main report has the following piece of code:
    data: int1 type I,
            int 2 type I.
    export: int1 to memory id 'mem1',
               int2 to memory id 'mem2'.
    submit report 'call_report' and return.
    The call_report has the following piece of code:
    import: int1 from memory id 'mem1',
               int2 from memory id 'mem2'.
    So if I am not declaring int1 n int2 explicitly in this report, i get the syntax error that they r not defined.
    My confusion is that when v r exporting int1 n int2 from the main report, then y is the explicit declaration required?
    Is ther no other way out than decalring int1 n int2 in the call_report.
    I will reward all the helpful answers.
    Thanks,
    Ajay.

    Hi Ajay,
    With EXPORT u r not exporting the variable and its definition but the content(data) of the variable u r exporting. So if u want to get the content in another program then u have to declare the variables of same type in the calling program also. Similarly with IMPORT u are not downloading the attributes of the field but only the content of variable u exported earlier.
    Another point to remember is u have declare the variable in the second report with the same name and type as of first report.
    Also check below piece of code which is similar to ur req
    First report
    REPORT Z75694_TEST .
    DATA: i_data TYPE i VALUE '1111'.
    EXPORT i_data TO MEMORY ID 'VINOD'.
    CHECK sy-subrc IS INITIAL.
    WRITE: 'Exported'.
    SUBMIT Z75694 AND RETURN.
    Second report
    REPORT z75694.
    DATA i_data TYPE i.
    IMPORT i_data FROM MEMORY ID 'VINOD'.
    WRITE:/ i_data.
    It is working fine.
    Hope this clarified ur doubt.
    Thanks,
    Vinod.
    Edited by: Vinod Kumar Vemuru on Apr 11, 2008 10:35 AM
    Edited by: Vinod Kumar Vemuru on Apr 11, 2008 10:44 AM

  • Import and Export Vs. Tables in a Function module interface

    Hi,
    i need to import and export internal tables to/from a Function Module.
    Passing internal tables using import and export is good enough or do i need to use 'Tables' option. Please let me know the reasons if possible.
    thanks for your help.
    GK.

    you can use changing but you have declare a table type and use it in changing..
    however TABLES is declared aas oblselete in ECC version 6.0
    No Points Plz

  • Import and export the database table

    I would like to know what is the syntax of using imp.exe and exp.exe to import and export the database table?
    Could anyone teach me what is the syntax and how could do the export and import in the Forms?
    Thanks a loT~

    try: imp help=yes
    Or read the documentation online on OTN.

  • Issue while importing table from oracle to sql server using import and export wizard

    Hi All,
    I am trying to populate oracle table to sql server using import export wizard  and i am getting the below error.the table is allready present in the database but still it throwing error like table doesn't exists.
    Could not connect source component.
    Error 0xc0202009: Source - JOB_ACTION_HISTORY [1]: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.
    Error 0xc02020e8: Source - JOB_ACTION_HISTORY [1]: Opening a rowset for ""FLXUSER"."JOB_ACTION_HISTORY"" failed. Check that the object exists in the database.
     (SQL Server Import and Export Wizard)
    Kindly help me out
    Thanks in advance

    Hi Snehasis,
    Please check whether the table name in the Oracle database has lower case letters. The table name should be exactly correct. 
    In addition, the issue might be related to the Oracle driver. What provider/driver do you use? If you use Microsoft OLE DB Provider for Oracle, you can try the
    Oracle OLE DB Provider. If you use Enterprise or Developer edition of SSIS 2008 or higher, you can also try the
    Microsoft Connectors for Oracle by Attunity. The  Oracle OLE DB Provider and Microsoft Connectors for Oracle are proved to have better performance.
    Regards,
    Mike Yin
    TechNet Community Support

  • How to import and export the screen parameters

    hi all
    how to import and export the parameters of the screen
    i need to export all the parameters and then import it
    and also how to export and import a variable to the memory
    thanks and regards
    naval bhatt

    Hi,
    Check this example for exporting and importing to memory..
    DATA: V_VALUE(2) VALUE '2'.
    EXPORT V_VALUE = V_VALUE TO MEMORY ID 'ZTEST'.
    IMPORT V_VALUE = V_VALUE FROM MEMORY ID 'ZTEST'.
    Thanks,
    Naren

  • Any example to import and export itab to function module

    hi all,
    as the table parameter in function module is obsolete, please advise an example on how to pass in an internal table
    and return back the result in an internal table as well.
    for example, i have itab1 and itab2. By using table parameters i got the following code. Please advise alternative way by using import and export.
    ""Local Interface:
    *"  TABLES
    *"      itab1 STRUCTURE  Zitab1
    *"      itab2 STRUCTURE  Zitab2
    loop at itab1 into wa_itab.
    **do some logic here to assign value to itab2 and return.
      wa_itab2-a = xxx .
      wa_itab2-b = xxx.
    append wa_itab2 to itab2.
    endloop.
    thank you.

    hi,
    suppose you have two structure name struc1 and struc2.
    create table type zitab1 & 2 for both.
    please do the following:
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(itab1) TYPE  Zitab1
    *"  EXPORTING
    *"     VALUE(itab2) TYPE  Zitab2
    you can avoid to use the obsolete table parameters as well as LIKE in function module creation.
    cheers

  • Regarding import and export statement

    hi experts,
    how to import and export the internal table between programs...
    Nice solutins with maximum points.....

    Example of a program exporting an internal table to ABAP memory.
    Prog 1
    parameters: pa_vbeln like vbak-vbeln.
    data: itab type standard table of vbak.
    * get data to fill the table
    select * from vbak into table itab
                where vbeln = pa_vbeln.
    * now store the internal table to ABAP memory
    export itab to Memory ID 'table''.
    * here we call another program, prog 2
    submit prog2 and return.
    Prog 2  -> This imports the internal table exported by prog 1 and writes the content of the internal table to a list
    data: jtab type standard table of vbak,
           wa_vbak type vbak.
    * importing the itab that was exported by prog1
    import itab to jtab from memory id 'table'.
    loop at jtab into wa_vbak.
    write:/ wa_vbak-vbeln,
            wa_vbak-erdat.
    endloop.
    * clear the specific memory id after required processing is complete
    free memory id 'table'
    Hope this solves your problem.
    Cheers,
    Sougata.
    Subas,
    Copy/paste your code, I'll have a look. First check if data is being selected before Export command.
    Edited by: Sougata Chatterjee on Jan 11, 2008 12:31 PM
    Also make sure you create prog2 as an executable program. Then, run prog1 with a valid Sales Order number. To understand it more clearly run it in debugging mode and step through. It should work fine in any system.
    Edited by: Sougata Chatterjee on Jan 11, 2008 12:42 PM

  • Import and Export in 4.6b

    Hi All,
    I have a syntax regarding Import and Export statements which are not working in 4.6b. Below is the statement.
    IMPORT ID = (Internal Table) FROM DATA BUFFER ( String Variable ).
    EXPORT ID = (Internal Table) TO DATA BUFFER ( String Variable ).
    What can we have alternate to above statements ?
    Actually I need to transfer or export some internal table content to String and Import the same data from string.
    I am looking perticularly about buffer only. If not that what can we have alternate to that ?
    Thanks,
    Ram

    Hi
    You can try to use Field symbols also, for example
    you need to code in the target program.
    field-symbols <fs_itab> type standard table.
    assign '(PROGRAMNAME)ITAB[]' TO <FS_ITAB>.
    example, i did this in user exit
    assign '(SAPMV50A)XLIPS[]' to <FS_ITAB>.
    if <FS_ITAB> is assigned.
    code will continue
    make sure program name is in capital letters.
    Regards
    Madhan

  • SQL Server Import and Export Wizard Issue

    i am trying to export SQL data into excel to send out weekly reports.  I have created a view and a SQL account has access to this view; however, I am unable to successfully export the data.  In preview I see all of the data yet it fails on the
    Pre-execute with the below.  It creates the excel file with just the header.  I am using SQL 2014 and loaded the 64 bit AccessDatabaseengine.  I am selecting excel 2007.  Any ideas welcome.
    Messages
    Error 0xc0202009: Data Flow Task 1: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E37.
     (SQL Server Import and Export Wizard)
    Error 0xc02020e8: Data Flow Task 1: Opening a rowset for "WeeklyList" failed. Check that the object exists in the database.
     (SQL Server Import and Export Wizard)
    Error 0xc004701a: Data Flow Task 1: Destination - WeeklyList failed the pre-execute phase and returned error code 0xC02020E8.
     (SQL Server Import and Export Wizard)

    Hi astro,
    Please ensure that you haven’t renamed or moved the destination excel file during the exporting process. Also make sure that “Create destination table” option is checked as below screenshot and the SQL statement is correct.
    For more details about using SQL Server Import/Export Wizard to export data from a SQL Server database to an Excel spreadsheet, please review the below blog.
    http://www.mssqltips.com/sqlservertutorial/202/simple-way-to-export-data-from-sql-server/
    Thanks,
    Lydia Zhang
    If you have any feedback on our support, please click
    here.
    Lydia Zhang
    TechNet Community Support

Maybe you are looking for

  • Data settings problem

    Hi All, I have a problem with a query (result rather). 1) SELECT TO_char(To_Date('05/10/05','DD/MM/YY'),'D') FROM dual; 2) SELECT To_Char(start_date,'D') FROM TableA WHERE Col_A = 899 I run both these queries locally, it yields me 7 (say) (because st

  • Repository Manager To access Content Server Documents

    Hi All,      I need to access the documents from the content server in KM.      Can anyone suggest me which repository manager is best to access the contenet server docs in KM?      I mean which repository manager can be created in KM ? Regards Siree

  • Using Xellerate User as trusted Resource Object -  11G Release 2

    Hi all, I want you use Xellerate User as trusted Resource Object for trusted reconciliation. From design console I try to add my custom attributes to this RO, but when I try to save I get error that it is not permmited.Is this a kinda bug or in Relea

  • XITRON 2801

    Does anyone know how to use the VB to capture the date from Xitron 2801 through USB port? Thanks a lot. Joshua So

  • I purchased Keynote on ipad and then tried to install on mac mini and it asks me to pay again, help?

    I had purchased Keynote on my ipad and recently upgraded a new SSD hard drive in my mac mini. When I began to reinstall my programs it wouldn't let me download Keynote without wanting me to repay. I can't find the purchase under either username I hav