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

Similar Messages

  • Import and export statements

    I am trying to use import and export statements in two different programs . The control from one program goes to another program with the function modules they have . I dont see the value while importing.
    export i_field1 to memory id 'bus_ind'
    import val1 to memory id 'bus_ind'
    i gave only the memory id as common name

    Please make sure that the variables used are the same name and defined exactly the same in both programs.
    export i_field1 = i_field1  to memory id 'BUS_IND'.
    import i_field1 = i_field1  to memory id 'BUS_IND'.
    Regards,
    Rich Heilman

  • I am having a dought regarding import and export.

    I am having a dought regarding import and export.
    I am having one table called login_table where 40k rows are present and in production server. Now i want to take a export dump of login_table and want to import it into a table called table_login which has zero rows but having same table structure and it is present in another database. Please reply soon.

    Please reply soonWhy?
    This is a forum of volunteers, so no one is under any obligation to you. Please stop to be demanding and consequently insulting.
    Also what doubt do you have? It wouldn't work? This begs the question why you just didn't try? No one ever died from working.
    Sybrand Bakker
    Senior Oracle DBA

  • Regarding import and export memory

    hi, currently i have encountered this problem when i am using the import and export memory statement. After i export my table name from program1 to program2, i do an import statement at program2 to retrieve the table name but there is a problem in retrieving the name. Below are the codes.
    PROGRAM1's codes:
    EXPORT IO_TABLE TO MEMORY ID MEM_STR.
    SUBMIT PROGRAM2 AND RETURN.
    PROGRAM2's codes:
    IMPORT IO_TABLE TO MEMORY ID MEM_STR.
    P_TABLE = IO_TABLE.
    FREE MEMORY ID MEM_STR.
    CLEAR MEM_STR.

    Check these programs they are working fine, the report ZCALLING calls the report ZCALLED.
    REPORT ZCALLING.
    DATA:
    BEGIN OF IO_TABLE OCCURS 0,
       MATNR TYPE MARA-MATNR,
    END OF IO_TABLE.
    IO_TABLE-MATNR = '38'.
    APPEND IO_TABLE.
    EXPORT IO_TABLE TO MEMORY ID 'MEM_STR'.
    SUBMIT ZCALLED AND RETURN.
    REPORT  ZCALLED.
    DATA:
    BEGIN OF IO_TABLE OCCURS 0,
       MATNR TYPE MARA-MATNR,
    END OF IO_TABLE,
    P_TABLE LIKE STANDARD TABLE OF IO_TABLE WITH HEADER LINE.
    IMPORT IO_TABLE FROM MEMORY ID 'MEM_STR'.
    P_TABLE[] = IO_TABLE[].
    LOOP AT P_TABLE.
    WRITE P_TABLE-MATNR.
    ENDLOOP.

  • 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

  • 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  of  R prediction model

    hi ,
    How can i  import and export a oracle R prediction model   e.g  from/to file ?   Basically,   We need it for the following requirements
    1.  We would like to ship a sample prediction model as part a  product.      So, The product will work with sample prediction model for some time after install    till a  newer model is created   with data  in customer env.
    2. Before regenerating a prediction model,   we would like to  take a backup of the existing prediction model.   And if it turns out that  the prediction results are not as good  with new model,  we should be able  to reinstate the older model.
    3. Support a mode where oracle R prediction model can be loaded to an  environment  which is different from the  the source environment where the model was actually generated.
    Please advise
    Regards,
    Arif

    I tried the above method  but  i am facing an issue that  although the prediction model is imported in to R  using load command,   it  is not loaded in ORE environment.     Due to this i am not able to use the imported predictionmodel for scoring
    I tried the following
    #Generate the prediction model
    >  PREDICTIONMODEL <-  ore.odmKMeans(data= TEST_DATA_TABLE, formulat=  COLUMN1 ~ . )
    >  class(PREDICTIONMODEL)
    [1] "ore.odmKMeans" "ore.model"
    >  save( PREDICTIONMODEL,  file="test.model")
    After this i quit the R session  (without saving my workspace)   and then   create a   new R session  and tried the following
    # load a prediction model from a file
    > load(file="test.model")
    > ls()
    [1}  "PREDICTIONMODEL"
    > ore.ls()
    charcter(0)
    You can see from above that  ore.ls() is not printing anything after load(). However,  ls()  prints the loaded  PREDICTIONMODEL.    Now, if i try to do scoring against the loaded predictionmodel,  I get an error
    >  x <- data.frame(COLUMN2="CC_PROCESSING", COLUMN3="CallWorkflow", COLUMN4="CallWorkflow", COLUMN1=NA)
    > X <- ore.push(x)
    >
    > result<- ore.predict(PREDICTIONMODEL, X)
    Error in .oci.GetQuery(conn, statement, data = data, prefetch = prefetch,  :
      ORA-40284: model does not exist
    So, it seems that  even though i imported the  model from the file,  ORE is still not aware of it .   Any idea about this ?

  • Data importing and exporting problem between BADI's

    Hi Experts,
    I am facing a problem in importing and exporting the data between badi's.
    I am able to import and export the data between DOC CHANGE and DOC CHECK BADI's etc; but now i have a requirement to map a field from SRM to R/3.
    Supplier order key field which is added to the basic data section of Shopping Cart should be mapped to the corresponding fields in R/3. I have added the field and when i am trying to map it to R/3  i am facing the probelm.
    This Supplier order key field will be coming from ZBBP_CATALOG_TRANSFER badi and i am trying to map it in the Z_BBP_CREATE_PO_BACK Badi; i tried by using the below statement to export a single parameter to PO BACK badi from CATALOG TRANSFER Badi
      EXPORT zsupp_ord_key FROM zsupp_ord_key TO MEMORY ID 'Z_SUPP_ORD_KEY'.
    which is not working.
      IMPORT zsupp_ord_key TO zsupp_ord_key FROM MEMORY ID 'Z_SUPP_ORD_KEY'. in PO BACK BADI.
    Can any one please let me know why this is happening?
    And i have strange problem in this ...
    when a user copies a catalog which is already created then we can not map the field to R/3 PO
    and again if he tries to create a cart by selecting "Old carts which are already created" we cant map field for the above two things to happen i think we need a custom coding .....
    Thank you
    Lokesh.

    Hi Lokesh,
    BADI implementations have classes for which an instance is created at runtime and hence the import and export memory logic will not work.
    Please try to create a function module for these BADI and call them in these BADI's. Then go ahead with the import and export logic. This could help.
    I would rather advice, to figure out an option to avoid this memory manipulations.
    Regards
    Kathirvel

  • 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

  • Import and Export transport requests on Netweaver 2004s Sp11 Sneak Preview

    Hi Experts,
    I have configured the transportation system <STMS> in order to import and export transport requests on the NSP system. The configuration is working properly as files can be imported and exported out of the C:\sapmnt\trans directory. (configuration distributed by STMS -> Overview -> Systems -> Extras -> Distribute TMS Configuration, Folder SAPMNT shared).
    The problem I'm facing with the import of some example transports is given by the hanging import queues. In phase 'Import ABAP Dictionary Objects' I have the following message for almost all objects -> '... was not imported in this step'.
    I tried to solve this issue by running SE38->RDDNEWPP with DDIC user to schedule job RDDIMPDP for TP imports. I also made the config in TP_DOMAIN_NSP.PFL with SYSTEM_PF = C:\SAP\NSP\SYS\profile\DEFAULT.PFL.
    The error is still in logfile SLOG0732.NSP
    ERROR:       The following call returned with exit code 7:
    ERROR:         sapevt.exe SAP_TRIGGER_RDDIMPDP -t name=NSP
    and logfile dev_evt
    ERROR ***: MsSndTypeOnce, rc = -20
    ERROR ***: Event raise failed
    With the exports there is a similar issue in the EXPORT phase, given the note
    0 entries from WDY_APPLICATIONT exported.
    Batch process is available (parameter rdisp/wp_no_btc = 1)
    Profile has been activated by rz10->utilities->import profile->ofactive servers.
    Any ideas what still can be wrong? Does the import export and DDIC activation really work with the sneak preview?
    Thanks
    Christoph

    Hi Peter
    First of all thanks for your advice.
    I did No. 1. 2. 3. steps.
    Step 4. reacts with the folowing error message.
    Transport control program tp ended with error code 02008.
    Errors: error in transportprofile (param missing, unknown).
    My  license expires in four days. I tried to extend it via http://www.sap.com/minisap
    1. System-ID *   
    2. Hardware-Schlüssel (HWID) *   ?
    3.Systemnummer  ?
    What is to be entered in 1 and 2.
    Where should I look for HWID and Sysnr ?
    Thanks a lot again for your help
    With regards
    Fisseha

  • Import and export CRM catalogue

    Hi,
    I am neewbie in CRM.
    I would like to export CRM catalogue, and then import it into other computer.
    For example, I am in TEST environment... navigate into "COMM_PCAT_ADM" and select "SALES_CATALOGUE".
    I would like to EXPORT "SALES_CATALOGUE" to other TEST environment in a different computer.
    1.- How could I do this?
    2.- Do I have to export and import the catalogue or just tables / programs?
    3.- Do I need any other information to export and import? For example Materials...
    4.- How do I export the catalogue? Software?
    5.- How do I import the catalogue? Software?
    Thanks,
    Regards.
    Iker Espinosa.

    my import and export utility in oracle database 10g is not working. how to overcome this problem.why? Post the error with more information.
    -Anantha

  • Import and export MDM with the SAP Portal

    Hi,
    Would you have any clue on how to handle import and export from the SAP portal ?
    I need your help because I haven't found any standard iView to perform these functions
    The only information i got were some explanations on WebDynpro Java iViews using events to export from the Portal.
    Thank you in advance

    Hi,
    MDM iViews are only meant to perform MDM Data Manager operations but on limited basis. EP-MDM scenario has been designed for end users only which should not allow to perform complex data manager operations and they need not install MDM Clients.
    Thats why importing and exporting functionalities are not possible in standard MDM iviews.
    Regards,
    Jitesh Talreja

  • Import and Export Option

    When we exit from the local Developer Studio, in the next attempt to start the Developer studio we are not able to import/export the DC, because the import and export file system options are not available in the popup window.
    To achieve it we are reinstalling the JDK as well as NWDS.
    What could be the reason and please send the suggestions to resolve this issue.

    Hi,
      Close the project when exiting from the studio. So next time, you open studio, open the DC and check if you get the options.
    Regards,
    Harini S

  • Import  and export of a project.

    Hi,
    I want to know the steps of import and export of a project.
    1.I am using DTR.
    2.I selected a track, after that a SC.
    3.There are a lot of DCs.
    4.Now i am to select some DCs.
    5.there are five DCs that makes an application.
    Questions:
    1.How i am to create the application in WD prespective??
    2.After creation application in WD, how i am to deploy the application(with all DCs)??

    Hi,
    Right click on the DCs which you want to get in the IDE and select Create Inactive Project.
    If it prompts for the dependencies select them.
    Once this is done u will be able to see the project in the WD perspective.
    Now right click on the DC and select Development Component -> Build .
    then Development Component -> Deploy.
    If its there are any errors related with hard references deploy those DCs first and try.
    Regards
    Ayyapparaj.

  • Import and export in odiconsole

    Hi Guys,
    Can we do import and export the ODI scenarios using ODI console.
    I aware of that we cann't do the import/export in ODIConsole.
    Please can any one help me if it is posible, provide the steps.
    Thank you
    Regards,
    Phanikanth

    Canot explain more better than this link.
    http://docs.oracle.com/cd/E23943_01/integrate.1111/e12643/odi_console.htm#BABGCDID
    Bhabani
    http://dwteam.in

Maybe you are looking for

  • Remote could not find my itunes library

    I have try it pairing the remote app with itunes library but without succes i have delete the app few times and start over turning on home sharing in all my devices apple tv itunes and my iphone 4s but still REMOTE could not find the itunes library w

  • CREATION OF CUSTOM TABLES

    hi I AM TRYING TO CREATE A CUSTOM IN ABAP I followed the following procedure SE11 SPCIFIED THE CUSTOM TABLE NAME CLICKED ON CREATE BUTTON THEN SPECIFIED SHORT DESCRIPTION For Delivery Class I specified as C For DataBrowser and Table variant I specifi

  • Open items clearing having a currency code different from company code

    hi experts, I have a problem with regard to clearing of open items having a different currecny codes other than the company code currency. ex, we have an open item in the currecny INR company code currency SGD I want to clear the open item through F1

  • Cfldap and deleted objects container in Active Directory

    Hello, I am trying to use a CFLDAP query to bind and search in the Deleted Objects container of Active Directory. This would allow me to get the sAMAccountname values of the users who have been deleted within the last default 60 days (searching tombs

  • Authorization for transaction VL09

    Hi Experts, I have a requirement to get authorization for transaction VL09 for specific user based on document type of the delivery. Please let me know is there any specific enhancement point or user exit to add authorization group for this. Thanks,