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.

Similar Messages

  • 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/Export Memory ID not working correctly.

    Hi,
    I have the following code. Export in one program (1st process), Import in the other (2nd process).
    Program 1:
    DATA: EXP_PLANT TYPE BE_EWERK,
              EXP_CO_CODE TYPE BUKRS.
    EXP_PLANT = IS_ITEM-BE_PLANT.
    EXP_CO_CODE = IS_ITEM-BE_CO_CODE.
    EXPORT EXP_PLANT FROM 'EXP_PLANT' EXP_CO_CODE FROM 'EXP_CO_CODE' TO MEMORY ID 'IDONE'.
    Program 2:
    DATA: IMP_PLANT TYPE BE_EWERK,
              IMP_CO_CODE TYPE BUKRS.
    IMPORT EXP_PLANT TO IMP_PLANT EXP_CO_CODE TO IMP_CO_CODE FROM MEMORY ID 'IDONE'.
    However, when I import EXP_PLANT TO IMP_PLANT, IMP_PLANT comes back as "EXP_".
    At the end of program 1, EXP_PLANT is filled properly.
    What am I doing wrong?

    Try:
    EXPORT EXP_PLANT FROM EXP_PLANT EXP_CO_CODE FROM EXP_CO_CODE TO MEMORY ID 'IDONE'.
    Rob

  • 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

  • EXPORT/IMPORT  to MEMORY

    Hi,
    I want to know if a parameter ID  of "export/import to memory" instruction is available in two differents session with different user's login?
    tks
    Carlos

    The use of the shared buffer may be of some interest to you.
    <b>From F1 help</b>
    <i>EXPORT obj1 ... objn TO SHARED BUFFER dbtab(ar) ID key.
    Additions:
    1. ... = f (for each field you want to export)
    2. ... FROM f (for each field you want to export)
    3. ... CLIENT g (before ID key)
    4. ... FROM wa (as last addition or after dbtab(ar))
    In an ABAP Objects context, a more severe syntax check is performed that in other ABAP areas. See Implicit field names not allowed in clusters and Table work areas not allowed.
    Effect
    Stores a data cluster in the cross-transaction application buffer.The specified objects obj1 ... objn (fields, structures, or tables) are stored as a single cluster in the buffer.
    The specified table dbtab must have a standard structure.
    The buffer area for the table dbtab is divided into various logically-related areas (ar, two-character ID).
    You can export a collection of data objects (data cluster) to an area of the buffer under a key of your own choosing (key field).
    You can import individual data objects from this collection using the IMPORT statement (as long as the data has not been deleted from the buffer).
    Notes
    In classes, you must always specify explicit names for the data objects. Addition 1 or addition 2 is therefore obligatory.
    In classes, you must always specify the work area explicitly. Addition 4 is therefore obligatory.
    The table dbtab that you specify after SHARED BUFFER must be declared under TABLES (except in addition 4).
    You cannot export the header line of an internal table. If you specify the name of an internal table with a header line, the system always exports the actual table data.
    You cannot export data, object, and interface references.
    Please consult Data Area and Modularization Unit Organization documentation as well.
    Example
    Exporting two fields and an internal table to the buffer with structure INDX:
    TABLES INDX.
    TYPES: BEGIN OF ITAB3_TYPE,
              CONT(4),
           END OF ITAB3_TYPE.
    DATA: INDXKEY LIKE INDX-SRTFD VALUE 'KEYVALUE',
          F1(4), F2 TYPE P,
          ITAB3 TYPE STANDARD TABLE OF ITAB3_TYPE WITH
                     NON-UNIQUE DEFAULT KEY INITIAL SIZE 2,
          WA_INDX TYPE INDX.
    Fill data fields before CLUSTR
    before the actual export
    INDX-AEDAT = SY-DATUM.
    INDX-USERA = SY-UNAME.
    Export data.
    EXPORT F1    FROM F1
           F2    FROM F2
           ITAB3 FROM ITAB3
           TO SHARED BUFFER INDX(ST) FROM WA_INDX ID INDXKEY.
    Addition 1
    ... = f (for each object you want to export)
    Effect
    Exports the contents of the field f and stores them under the specified name.
    Addition 2
    ... FROM f (for each field you want to export)
    Effect
    Exports the contents of field f and stores them under the specified name.
    Addition 3
    ... CLIENT g (before ID key)
    Effect
    The data objects are stored in client g (as long as the import/export table dbtab is client-specific).
    Addition 4
    ... FROM wa (as last addition or after dbtab(ar))
    Effect
    Use this addition if you want to store user data fields in the application buffer. Instead of the table work area, the system uses the specified work area wa. The specified work area must have the same structure as the table dbtab.
    Example
    DATA WA LIKE INDX.
    DATA F1.
    WA-AEDAT = SY-DATUM.
    WA-USERA = SY-UNAME.
    WA-PGMID = SY-REPID.
    EXPORT F1 = F1 TO SHARED BUFFER INDX(AR)
                   CLIENT '001' ID 'TEST'
                   FROM WA.
    Note
    Catchable runtime error
    EXPORT_BUFFER_NO_MEMORY: The EXPORT data cluster is too big for the application buffer. This error should not occur often, since the buffer uses a procedure similar to the LRU(Least Recently Used) procedure to monitor the buffer contents. However, if the error does occur, you can increase the profile parameter rsdb/obj/buffersize (see Profile Parameter Attributes), which may help.</i>
    Regards,
    Rich Heilman

  • 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.

  • 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.

  • 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?

  • 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/Import from Memory

    Sometimes after I export from one program, user exit, etc., then I import in another program, user exit, etc. the field value does not show up. It is usually in two totally unrelated programs, or other, that are in different function groups, but sometimes it works? I need to capture a value in a PAI screen, that later  goes into another user exit. Has anyone had this issue with Import/Export? Is there another way I can tru to pass this parameter to the second program?
        Thank-You.

    Hi TMM,
    You have to consider that the Memory Variables from Program 1 will be released if the session is over and that's why maybe our Program 2 might not get them correctly. If that is the scenario you will need to save your data in maybe a table then use it in program 2.
    Regards,
    Gilberto Li

  • 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.

  • 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/EXPORT statement in Background Mode

    Hey dudes,
    I am facing a problem in my coding. I am dealing with coding in several events in IS-U, transaction FPY1.
    However, it's not so important ya. Now I am written some code on IMPORT and EXPORT some parameters between 2 program code. It's work very fine only in 'DEBUG MODE', but when it's running not debug mode (Is BACKGROUND MODE), coz it's massive run program.
    I suspect it's because of the background job. Does background job using ABAP Memory? IMPORT/EXPORT is only for dialog work process, not background work process?? I have a lot of question mark on my head now..
    Hope anyone facing dis issue before can help.
    Cheers,
    Isaac.

    Are you trying to pass data via EXPORT/IMPORT between two programs that are both running in background, or from an online session to a background process?... i.e. what are the two lots of program code that you are wanting to pass parameters between? 
    It would be fine for a background program to "export" data to a memory ID, then for the same batch program to submit another program that does the "import" from the same memory ID... but this method won't work for an online user doing an "export" and a batch job doing an "import" -> for this to work, you would need to persist the parameters so that the batch job can retrieve them.
    If you can explain the scenario a bit more, will try to offer more help...
    Jonathan

  • Import & Export of Internal table

    Hello All,
    In my requirement I need to call the MB5B program RM07MLBD. I used the code like this.
    SUBMIT rm07mlbd AND RETURN
                WITH matnr   IN  so_matnr
                WITH werks   IN  so_werks
                WITH datum   IN  so_budat.
    Now from the RM07MLBD program I need the get the values of the table * g_t_totals_flat * to my zprogram.
    Is it possible to import & export the Internal table from one program to other.
    Regards,
    Anil.

    Hi,
    You can export the internal table ot memory id and can access the (Import) in the called program.
    Consider this small code from ABAPDOCU.
    DATA text1(10) TYPE c VALUE 'Exporting'.
    DATA: itab TYPE TABLE OF sbook,
          wa_itab LIKE LINE OF itab.
    DO 5 TIMES.
      wa_itab-bookid = 100 + sy-index.
      APPEND wa_itab TO itab.
    ENDDO.
    EXPORT text1
           text2 = 'Literal'
      TO MEMORY ID 'text'.
    EXPORT itab
      TO MEMORY ID 'table'.
    Regards
    Bikas

  • Is there a way to see a list of what has been imported to memory?

    Memory Experts,
    The prorgram I am working with has an Import from Memory ID statement that is coming up empty.
    I am in a user exit in the include MV45AFZZ.
    I can not find what program/include/function module/etc. did the export to this memory ID.
    Does anyone know a way to find out what program did the export on this data?
    When in debug - is there a command (we are running ECC 6.0) to list what is in memory at that point in time?
    <REMOVED BY MODERATOR - REQUEST OR OFFER POINTS ARE FORBIDDEN>
    Thanks.
    Scott
    Edited by: Alvaro Tejada Galindo on Oct 9, 2008 4:03 PM

    Hi,
    In the debugger, follow the menu path
    Goto -> System -> System area
    In the input box for Area , Input DSEG and press enter.
    Goto -> System -> System area
    Dubble click MEMORIES
    Thanks,
    Senthil
    Edited by: senthil kumar on Oct 10, 2008 12:07 AM

Maybe you are looking for