ECC6 IMPORT/EXPORT to MEMORY ID 'OPENFI00002213E'

Hi experts,
I have a problem with IMPORT/EXPORT in ECC6 within the same program. The short dump happenned at IMPORT time. Here is part of my code.
DATA: MEMID13(15) VALUE 'OPENFI00002213E',
          T_VBKPF  LIKE  VBKPF OCCURS 0 WITH HEADER LINE.
EXPORT t_vbkpf TO MEMORY ID memid13.
CALL TRANSACTION 'FV60'
     USING bdcdata
     OPTIONS FROM s_ctu_params
     MESSAGES INTO bdcmsgcoll.
IMPORT t_vbkpf FROM MEMORY ID memid13.
In 4.6C, the internal table t_vbkpf was updated with the created document from the transaction 'FV60' call but it gave a short dump in ECC6.
Runtime Errors         CONNE_IMPORT_WRONG_STRUCTURE                  
Except.                CX_SY_IMPORT_MISMATCH_ERROR                   
Date and Time          2007.12.06 15:46:46                           
Short text                                                          
     Error when importing object "T_VBKPF".                                                                               
Please help, thanks!
CHuong

Hi,
In ECC 6 for import from memory you need the import structure will be flat , character-type data
The following is from documentation.
+
If MEMORY is specified, the data cluster that was written to the ABAP Memory under the identification specified in id with the statement EXPORT is imported. For id, a flat , character-type data object is expected. This object contains the identification of the data cluster.
+
otherwise use this way
TYPES:
  BEGIN OF tab,
    col1 TYPE i,
    col2 TYPE i,
  END OF tab.
DATA:
  wa_indx TYPE indx,
  wa_itab TYPE tab,
  cl      TYPE mandt VALUE '100',
  itab    TYPE STANDARD TABLE OF tab.
IMPORT tab = itab
  FROM DATABASE indx(xy)
  TO   wa_indx
  CLIENT cl
  ID 'TABLE'.
WRITE: wa_indx-aedat, wa_indx-usera, wa_indx-pgmid.
ULINE.
LOOP AT itab INTO wa_itab.
  WRITE: / wa_itab-col1, wa_itab-col2.
ENDLOOP.

Similar Messages

  • Import/export to memory and global variables

    Hi,
    Im working on some functionality using import/export to memory. One of the statements is:
    import gf_memid_exit = g_exit_flag gf_memid_result = t352r from memory id 'ZREV_EXT'.
    Im using global variables to contain the cluster names. But this is not working. When I change the global variables into local variables, it works. It this normal? Because I would like to have global variables (even better I would like to have global constants) to declare in order to use them within the program.
    Any ideas?
    With regards,
    Mike

    Hi Mike...
    I think with import u can use global or local variables..in debug mode pl. check when u r using global variables..whether it is getting cleared or overwritten by some other values or not. Or try with global constants..it should work...
    Regards,
    Joy.

  • Memory Limit for "IMPORT/EXPORT from MEMORY ID" statement

    Hi All,
    Can anyone tell me whether there is any memory limit exists for "IMPORT/EXPORT from MEMORY ID" statement.
    Like may be we can transfer xx MB of data via this......or it is open, we can transfer any amount of data to ABAP memory via this.
    Regards
    Munish Garg

    1. Each user sessions have external sessions and each external sessions have internal sessions.
    2. The programs being executed in the internal sessions can access ABAP memory
    3.ABAP memory is a storage area for internal program variables like fields, structures, internal tables,,They can be passed  between internal sessions of an external session.
    4. you can transfer data through ABAp memory using IMPORT and EXPORT statements
    5. after IMPORT FROM MEMORY ID <id> , you can use sy-subrc to check the existance of the cluster ID. here sy-subrc is not used to check whether the Import was successful or not.

  • Import/Export from Memory ID

    hie guys
    im in a program that is importing values from a memory id however there are no values being imported and thus i want to find out wer the memory id is being given data. i tryd the wer used list and it dd not give me anything, please assist

    I managed to find the program where the export statement for the memory ID was and also where the import statement was and managed to resolve my error.
    many thanks.

  • IMPORT/EXPORT through classes

    Hi,
    I have to export dynamic internal tables to another program, but client has asked not to use import/export.
    Searched on google and SDN, got to know that it may be acheived through classes.
    Please help me if someone has worked on that, also if some has sample code for that, please let me know.
    Thanks and Regards
    Manu

    You can use the Shared Objects instead of the IMPORT/EXPORT to shared buffer. But, the Shared Objects is not the ultimate solution to replace the IMPORT/EXPORT to memory ID.
    Check this WIKI on Shared Objects: http://wiki.sdn.sap.com/wiki/display/ABAP/ABAPObjectsShareMemoryEnable+%28SHMA%29
    Regards,
    Naimesh Patel

  • Exporting and importing data from memory

    Hi Gurus,
    Written 2 programs.
    1st program executes and submits 2nd program in background.
    Now the output in internal table which we get in 2nd program has to be displayed in 1st program.
    My taught is to use Set ID and GET ID to retrieve the data.
    How can we achive this?

    Hi,
    You can pass the internal table by using
    export to memory id
    and import that internal table in the called program.
    Use SUBMIT ....AND RETURN.

  • Import/Export code using Memory ID in BO Method

    Hi experts,
    I am having a approver name and other relevant data in my report. I don't want to write the entire code I want to bring it into my BO method by using import/export memory id. Pl. guide me what should I do ? Is it possible or not?
    Thank you,
    Saquib

    I am a bit confused that what you are trying to achieve. In any case I think you can forget any export/import memory ID related solutions - they will not work!
    The workflow (or its step/task) is executing your BO method, right? You want this method to have some data when it gets executed? Normally you would want to populate the data to the workflow (or task) container, for example with function SAP_WAPI_WRITE_CONTAINER (you just need the work item ID). Then when this data is in the container, you can use it in your method (binding required).
    Somehow I feel that you looking a difficult solution for a simple problem. If you need some relevant data in your workflow, let the workflow to find it (add a new step to the workflow, and copy/paste the relevant part of the code of your report to this step). (Or try to give the data to the workflow already when it gets started, if possible). Don't try to mix things with some separate report, unless it is completely necessary, and if it is, then writing into the container is most likely the best approach.
    Regards,
    Karri

  • Import / export memory ID

    Hello.
    While customizing WM screens I noticed that using the memory ID / parameter ID doesn't work for me.
    I get sy-subrc 4 even though I made set/export before that.
    Examples:
    1. export gv_matnr to memory id '/XLRF/4100'.
        import gv_matnr from memory id '/XLRF/4100'.
    2. set parameter id '/XLRF/4100' field gv_matnr.
        get parameter id '/XLRF/4100' field gv_matnr.
    I don't understand how come.
    Any ideas anyone ???
    Regards,
    Rebeka

    Hi,
    Try using this syntax for exporting:
    e_data_storage_out    =    the variable of the data type you want to export your data in
    e_data_storage_in  =    the variable of the data type you want to import your data in
    e_memory_id             =    memory id where you want to store the data
    export e_data_storage_out
       from input
       to memory id e_memory_id.
    Try using this syntax for importing:
    IMPORT e_data_storage_out
         to e_data_storage_in
         from memory id e_memory_id.

  • How to Export data to memory and Import data from memory?

    hi
    I have the follwoing some code of program.
    The data is not filled from memory. I have to find what is the wrong in code.
    REPORT ZIFT_TEST1..
    SELECT-OPTIONS : so_budat FOR bkpf-budat,
                     sd_saknr FOR ska1-saknr.
      EXPORT so_budat TO MEMORY ID 'ZBUDAT'.
      EXPORT sd_saknr TO MEMORY ID 'ZSAKNR'.
      SUBMIT ZIFT_TEST2 AND RETURN.
    REPORT ZIFT_TEST2..
    SELECT-OPTIONS so_budat FOR bsis-budat NO DATABASE SELECTION.
    SELECT-OPTIONS: SD_SAKNR    FOR  SKA1-SAKNR MATCHCODE OBJECT SAKO.
      import so_budat = so_budat from memory id 'ZBUDAT'.
      import sd_saknr from memory id 'ZSAKNR'.
    Regards
    Iftikhar Ali
    Islamabad.

    Program1----
    REPORT demo_program_rep3 NO STANDARD PAGE HEADING.
    DATA: number TYPE i,
    itab TYPE TABLE OF i.
    SET PF-STATUS 'MYBACK'.
    DO 5 TIMES.
    number = sy-index.
    APPEND number TO itab.
    WRITE / number.
    ENDDO.
    TOP-OF-PAGE.
    WRITE 'Report 2'.
    ULINE.
    AT USER-COMMAND.
    CASE sy-ucomm.
    WHEN 'MBCK'.
    EXPORT itab TO MEMORY ID 'HK'.
    LEAVE.
    ENDCASE.
    Program2----
    REPORT demo_programm_leave NO STANDARD PAGE HEADING.
    DATA: itab TYPE TABLE OF i,
    num TYPE i.
    SUBMIT demo_program_rep3 AND RETURN.
    IMPORT itab FROM MEMORY ID 'HK'.
    LOOP AT itab INTO num.
    WRITE / num.
    ENDLOOP.
    TOP-OF-PAGE.
    WRITE 'Report 1'.
    ULINE.
    end of program 2----
    Now you copy this programs with same name as i mentioned and execute demo_programm_leave Program.you will understnad clearly.
    Notes::: A logical memory model illustrates how the main memory is distributed from the view of executable programs. A distinction is made here between external sessions and internal sessions .
    An external session is usually linked to an R/3 window. You can create an external session by choosing System/Create session, or by entering /o in the command field. An external session is broken down further into internal sessions. Program data is only visible within an internal session. Each external session can include up to 20 internal sessions (stacks).
    Every program you start runs in an internal session.
    To copy a set of ABAP variables and their current values (data cluster) to the ABAP memory, use the EXPORT TO MEMORY ID statement. The (up to 32 characters) is used to identify the different data clusters.
    If you repeat an EXPORT TO MEMORY ID statement to an existing data cluster, the new data overwrites the old.
    To copy data from ABAP memory to the corresponding fields of an ABAP program, use the IMPORT FROM MEMORY ID statement.

  • Export to memory"  (bukrs) in one user exit and import to memory in other.

    I have to "export to memory"  (bukrs) in one user exit and import to memory in other.
    Does anyone has an example

    in one user exit:
    EXPORT field TO MEMORY ID 'Z_BUKRS'.
    in another user exit:
    IMPORT field FROM MEMORY ID 'Z_BUKRS'.
    what is the problem?

  • Function module to EXPORT/IMPORT to/from MEMORY?

    Hi Gurus,
    As EXPORT /IMPORTstatements come under obsolete statements.SO i am getting error in code when i compile using code inspector.
    PLease let me know if there is any function module that does the work of EXPORT and IMPORT.
    It woukl be kind if you explain how to put values in those function module to get desired output.
    Thanks

    Hi ,
      You can use these FM
    Export  to Memory
    C14Z_EXPORT_field_TO_MEMORY
    C14Z_EXPORT_TO_MEMORY
    Import From Memory
    C14Z_IMPORT_FIELD_FROM_MEMORY
    C14Z_IMPORT_FROM_MEMORY
    Regards,
       Seema

  • Problems with EXPORT TO MEMORY / IMPORT FROM MEMORY

    Hello.
    we've just made a SAP OS/DB migration of our 46C system from UNIX/Oracle to Windows/SQL.
    Our FI consultant has realized a processs failed.
    The ABAP program that files (it is a Z program) is using EXPORT TO MEMORY and IMPORT TO MEMORY.
    It seems the import is failing because the export to memory fails also.
    Of course we have changed memory parameters ..do you know what memory parameters are involved?
    Thanks very much for your help.

    It seems the import is failing because the export to memory fails also.
    Can you explain?
    Did you check the extended debugger facilities like memory areas?
    What is the structure/amount of data for ex- and import, same name, same data object?
    Just reveal what you are really doing, post a few code lines.
    Or not.
    Regards,
    Clemens

  • Export to memory/Import from memory

    When you're exporting to memory and there are multiple users on an online transaction.  Does memory mean the users own memory.  If multiple users are on AS02 and you have to custom sub screens and you want to export a field to memory on the 1st custom screen and import it on the other screen, is it possible to import another users memory if they're in that transaction doing the same thing?

    Hi,
      There are two types of Memories
    ABAP memory is a temporary memory which can store data for a session. In this case each user will have his own memory.
    For more information on ABAP Memory click the below link
    http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3bc4358411d1829f0000e829fbfe/content.htm
    SAP Memory is used to store and access data from different sessions. Users accessing the memory will have the same data.
    Regards,
    Vara

  • Submit or Import / Export Memory?

    Hi Forums,
    I have to two reports which are exactly the same. One is called from the Portal (which is a Function Module) and one is run in ECC (so it is an ABAP report). These both exist now today.
    To avoid duplicate effort I would like to have the Portal Report (Function Module) call the ABAP report where I would like to keep all main report logic and any future changes.
    What I would like to accomplish is to have the FM call the ABAP report passing in a table of records (what would be entered on selection screen on ECC report) and then the ABAP report would pass back a table of COMPLETED records and leaving the function module only to pass back this table to calling program.
    Would a SUMBIT <program> etc work for this? OR would this be better suited for a using a import \ export?
    Any further questions let me know.
    Cheers

    My code is currently setup like this and I am now getting the error:
    IMPORT_ALIGNMENT_MISMATCH
    Error analysis
        An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_SY_IMPORT_MISMATCH_ERROR', was
         not caught in
        procedure "IMPORT_SELTAB_FROM_MEM" "(FORM)", nor was it propagated by a RAISING
         clause.
        Since the caller of the procedure could not have anticipated that the
        exception would occur, the current program is terminated.
        The reason for the exception is:
        When importing object "%_SELTAB", the structure did not match the
        structure of the target object. The error occurred in component
        no. 2.
        This may be due to one of the following reasons:
        - the structure is actually different (the next field has, for
          example, a different data type) or
        - the same sequence of components were exported and imported,
          but the fields were from other include units.
      DATA: txtlines(3000) TYPE c OCCURS 0 WITH HEADER LINE.
      DATA:lt_listobject TYPE TABLE OF abaplist.
      DATA: lt_passed_ee TYPE RANGE OF pernr WITH HEADER LINE,
            ls_passed_ee LIKE LINE OF lt_passed_ee.
      "ls_passed_ee-selname = 'PNPPERNR'.
      ls_passed_ee-sign    = 'I'.
      ls_passed_ee-option  = 'EQ'.
    *load each pernr that is passed in from the UI and pass to report
      LOOP AT lt_ee INTO ls_direct_ee.
        ls_passed_ee-low = ls_direct_ee-objid.
        APPEND ls_passed_ee TO lt_passed_ee.
      ENDLOOP.
      SET PARAMETER ID 'PER' FIELD space.
      SUBMIT zhrecm_spend_ee WITH SELECTION-TABLE lt_passed_ee
                                     WITH  pnppernr IN lt_passed_ee
                                     EXPORTING LIST TO MEMORY
                                     AND RETURN.
    * read list from memory into table
      CALL FUNCTION 'LIST_FROM_MEMORY'
        TABLES
          listobject = lt_listobject
        EXCEPTIONS
          not_found  = 1
          OTHERS     = 2.

  • Import and Export to Memory

    hi guys, im currently making a program that imports and exports data into a memory so that when the user logs out that would still remain in the memory. The data would be use for the slection screen but i can't seem to make it work.  Could you please help me. Or if you have other ideas on how to store data that would also be ok. The thing is when Im running the program through se38 its working fine but if i run it through its transaction code the import does not work. Please help.
    here is my code:
    DATA: begin of i_memory,
                 memory_id(31),
               end of i_memory.
    initialization.
    IF p_prem IS INITIAL.
         CONCATENATE c_memory_id sy-uname into v_memory_id
                     SEPARATED BY c_underscore.
         IMPORT i_memory FROM MEMORY ID v_memory_id.
         IF sy-subrc = 0.
            p_prem = i_memory-memory_id.
         ELSE.
            p_prem = '0.04'.
         Endif.
      ENDIF.
    at selection-screen.
      i_memory-memory_id = v_memory_obj.
      CONCATENATE c_memory_id sy-uname into v_memory_id
                  SEPARATED BY c_underscore.
      EXPORT i_memory to MEMORY ID v_memory_id.
      IF sy-subrc = 0.
      Endif.
    Please help. Thanks in advance guys.

    Shekhar Kulkarni 
    I need help understanding your code.
    Im trying to do same thing as you described in the post.
    My main purpose is to IMPORT variant contents from cluster table VARI for all the selection screen variables dynamically.
    I can IMPORT individual screen variables :: For ex :
    st_key-report = 'ZNIDHS20'.
    st_key-variant = 'TEST_VAR'.
    IMPORT slsin_p TO TMP_VAR FROM DATABASE VARI(VA) ID ST_KEY.
    This will get me the contents of slsin_p parameter in variant TEST_VAR of program ZNIDHS20.
    But If I use same statement in a loop, im not able to get the data. : see below
    LOOP AT i_selection_table..
    IMPORT i_selection_table-name TO TMP_VAR FROM DATABASE VARI(VA) ID ST_KEY.
    ENDLOOP.
    I found your post interesting and started to test this way....As said, I have extracted selection screen variable table, and then tried to EXPORT the contents to Share Memory from database table VARI(VA), unfortunately program fails. Pls see code below....Pls see if you can help me out...
    DATA: BEGIN OF st_key,
            report LIKE rsvar-report,
            variant LIKE rsvar-variant,
          END OF st_key.
    data : i_selection_table like rsparams occurs 0 WITH HEADER LINE,
    v_rsvar like rsvar-report.
    st_key-report  = 'ZNIDHS20'.
    st_key-variant = 'VJ_TEST'.
    V_RSVAR = 'ZNIDHS20'.
    data : begin of itab occurs 0,
           COL1(40) type c,
           COL2(40) TYPE C,
           end of itab.
    CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
      EXPORTING
        CURR_REPORT           = V_RSVAR
      TABLES
        SELECTION_TABLE       = i_selection_table
    EXCEPTIONS
       NOT_FOUND             = 1
       NO_REPORT             = 2
       OTHERS                = 3.
    LOOP AT I_SELECTION_TABLE.
      MOVE I_SELECTION_TABLE-SELNAME TO ITAB-COL1.
      APPEND ITAB.
    ENDLOOP.
    EXPORT (ITAB) TO SHARED MEMORY VARI(VA) ID ST_KEY.
    IMPORT ITAB = JTAB FROM SHARED MEMORY VARI(VA) ID ST_KEY.
    Pls help.....

Maybe you are looking for

  • How can we get a value in a drop down box without refreshing the page

    In my application i am having 14 drop down boxes. On selcting a particular value in a drop down box i am doing its corresponding functionality. I would like to get these values without refreshing the page each and every time i select a text box, Is i

  • How can i Know the email linked to icloud

    Please can anyone help me how to know teh email linked to my phone ?? it shows me h********@hotmail.com i tried to logged in with my account that belong to h********@hotmail.com and it says inocrrect password or email i tried to reset my id but no re

  • Pricing Condition Type PR00.

    Hi experts, I have a scenario where condition type PR00 shoul be mandatory in sales order   and document should not proceed further unless the basic price  is put while creating sales order. Also,  system should not allow double entry of PR00. I have

  • Mass Cancel/ Mass change of a product across all orders

    Dear Friends, We have a typical requirement at our client: 1.How to cancel a product across multiple orders (Mass Cancel) ? 2.How to change a product acorss multiple orders (Mass change in all orders) They had a issue with one of the product and to b

  • Adding packages and classpath

    Hi there all, Having finished by first Java application for work, I'm trying to create an executable jar file for it. The current directory structure is: - +---- programs |        | |        |---- GateKeeper | |---- commonfilesThe commonfiles directo