Export Memory

Hi ,
I have to use one variable's value into another program (in BADI). For that I am exporting that variable from main program and using IMPORT I am using into BADI. Code is shown below,
FREE MEMORY ID 'REFPO'.
EXPORT pa_doc2 FROM v_podoc TO MEMORY ID 'REFPO'.
This is working fine.
Now I have to pass one Internal table to the same BADI from main program.
Shall I pass the Internal table with contents by using EXPORT and IMPORT statements from Memory......??
Please guide me on the same ASAP.
Thanks,
Jay.

Hi  jaywant,
If u want to use EXPORT and SUBMIT in the first report, ur internal table data will be first moved to Mem ID and after SUBMIT, it will go to the 2nd report and execution happens in report 2. There if u use IMPORT, the internal table data will be used there and the control will be back to ur report1.
So, the output of Report 2 will be written at first as a result of ur import in report 2. Then the content of report 1 will be wrtten in output.
See this..
Report 1:
report zscr_navigate.
data: a type i value 10,
b type string,
c type string.
data: int_tab type standard table of zprod with header line.
select * from zprod into table int_tab.
export int_tab to memory id 'TEST'.
submit zscr_navigate1 and return.
write / 'back to main'.
Report 2
REPORT ZSCR_NAVIGATE1.
DATA : b TYPE string VALUE 'hello'.
DATA : int_tab TYPE STANDARD TABLE OF zprod,
fs TYPE zprod.
WRITE / b.
IMPORT int_tab FROM MEMORY ID 'TEST'.
CLEAR fs.
LOOP at int_tab INTO fs.
WRITE / fs.
clear fs.
ENDLOOP.
Hope it helps u..
Reward points if helpful
Thanks,
Aditya

Similar Messages

  • Export memory statement not working between two methods

    hello all
    i m implementing one BADI MB_MIGO_BADI .this BADI is having 2 methods 1)LINE_MODIFY and 2)PBO_DETAIL.
    the followng is the code in LINE_MODIFY methd
    DATA : c_flag TYPE c .
      TYPES:BEGIN OF tp_ecppa,
            prvsy     TYPE /sapsll/prvsy_spi,
            ecpid     TYPE /sapsll/ecpid_spi,
      END OF tp_ecppa.
      DATA:wl_ecppa TYPE tp_ecppa.
      IF cs_goitem-matnr IS NOT  INITIAL.
       SELECT  prvsy ecpid UP TO 1 ROWS FROM /sapsll/ecppa INTO wl_ecppa WHERE prvsy = cs_goitem-matnr.
       ENDSELECT.
       IF wl_ecppa-ecpid EQ 'DE3203CWIP'.
          c_flag = 'X'.
       ENDIF.
      ENDIF.
    SET PARAMETER ID 'PMEM' FIELD c_flag.
      export c_flag from c_flag  to memory id 'mem1'.
    the following is the code in PBO_DETAIL method
    METHOD IF_EX_MB_MIGO_BADI~PBO_DETAIL.
      IF SY-UNAME = 'E494049' or sy-uname = 'E491754'.
        DATA:C_FLG TYPE C .
        CLEAR C_FLG.
        if gf_class_id eq i_class_id.
    GET PARAMETER ID 'PMEM' FIELD c_FLG.
       Import c_flg to c_flg from memory id 'mem1'.
    IF C_FLG = 'X'.
    E_CPROG = 'ZP1_SCREEN'.
    E_DYNNR = '0001'.
    E_HEADING = 'GTS'.
    ENDIF.
    endif.
    endif.
    free memory id 'PMEM'.
    ENDMETHOD.                    "IF_EX_MB_MIGO_BADI~PBO_DETAIL
    but the new tab is not displayed in MIGO . so i think there is some mistake in  export memory statement .
    so could you please check if i have used export/import statements correctly.

    If problem is rectified, Please mark as answered.
    Sujay

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

  • Export memory using shared buffer

    Hi
    Lets say a user opens the PO screen ME22N in 2 separate windows accessing 2 separate PO numbers. If  i use the export memory using shared buffer , how can i ensure that the data will not get mixed up ?
    Any ideas?

    YOu would have to get the session id to distinguish between the two.  You can then use this id as part of your key to pass to the export statement.
    Check this thread.
    Quickest way to retrieve modeinfo[n],context_id_uuid from an ABAP pgm
    Regards,
    RIch Heilman

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

  • Has Lr 5 fixed the Export memory leak?

    Has anyone confirmed that the memory leak in Lr 5 Beta when exporting images has been fixed in the Lr 5 release? In the Beta all 16Gb of my machine's RAM could be quickly consumed if I exported a large number of images. I could release the memory by simply clicking an image in Grid view but it would be nice to have the export behave properly.

    No, still nothing. This is about halway in, and for good measure I threw in a second export on top.
    You can see the CPU getting a lot busier (confirming that breaking an export into two speeds it up) - but memory usage is still rock solid. Incidentally, this last one is exporting to TIFF, which seems to use a little less memory than exporting to PSD. No idea why that should be.
    Do you have any plugins that could cause leaks?
    Edit: OK, so that's cleared up then. I never tried the beta.

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

  • Lightroom 3 exporting/memory problem

    Hi there, hoping someone here can help solve what is a mystery (to me)...
    I am running Lightroom 3.3, 64 bit, on a Windows 7 machine.  Has always worked relatively well (exept for LR3 being slower than LR2, grr...).  I don't know when this problem started for sure, but the last few times I have tried to export images (600-800 jpegs from RAW files) LR3 will take up ALL the remaining free space on my main drive while exporting, and then stop exporting and give me a message saying the drive is critically low on space, and to make more room so it can continue.  I have always run my catolog off my main dirve, especially now since it is a solid state drive, and none of my other are.  And to be clear: before the export starts, I have 12-15gb free space on the drive.
    Any ideas what is going on?  Thanks!
    Chris

    15 GB free space not a good idea for running LR.
    Use your SSSD for the OS and applications. Move the catalog and image files to a separate drive (preferably two separate drives, one for the catalog and another for the image file) and export to a separate drive.
    The OS and the application itself benefit most from the speed of a SSSD. The catalog is best placed on a separate drive and a standard fast (7200 rpm) drive with lots of space will be almost as fast as a SSSD, but a second SSSD can be used. The image files can be on the slowest of your drives or even an external drive as can be your exports without any serious loss of speed.
    Putting everything on a single drive, no matter how fast it is, will always be slower than multiple drives.
    Trying to run LR on one drive systems will always be limited and a large drive with lots of free space is what is required.
    Check out this link for setting up drives, it relates to video editing, but much the same applies to LR.

  • 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

  • How to find EXPORT MODE of MEMORY ID with ref to IMPORT  MODE of MEMORY ID

    HI ,Friends,Iam not able to find Export memory ID with ref to available IMPORT Memory ID in particular SD routine of a program.
    Plz let me know how to find Export Memory ID reference program with available import memeory ID as I need to do changes for exiting routine program done by somebody .

    As it's an SD routine probably the simplest way is to set a breakpoint on the keyword 'EXPORT' when you first enter the transaction.  May need to skip a few but eventually you will come across the correct one.  When you do find it I would also suggest placing a comment on the IMPORT statement to say where the value has come from for future reference.

  • Memory Allocation Problems

    My application seems to not free resources the way I would like it to. The main interface consumes somewhere around 40MB. The application has an option to export data to a few PDFs (via itext and JFreeChart). This is handled through a popup JFrame where the user can select options for export. During the export, memory usage spikes to near 105MB, which though concerning, isn't the main problem. Once the export JFrame has been disposed and control is returned the main window, memory usage stays at ~ 105MB and if you export again, the memory usage doesn't budge, leading me to believe that the Objects used during the export aren't being released. I know that memory management is temperamental in Java, but I can't figure out what's going on here.
    Here is an overview of what's happening:
    MainViewer -> SaveView -> ExportFileController:
    I am currently exporting two PDFs: One containing graphs created by JFreeChart and another containing a table created by itext. I've tested them independently and both seem to stay in memory even after I've called document.close() and SaveView.dispose().
    Here is how I'm writing my charts:
    public void writeCharts()
              Iterator chartIter = allCharts.iterator();
              try
                   System.out.println("Writing Charts: Total Number: " + allCharts.size());
                   String outputFile = outputDir.getPath()+"/curvefits.pdf";               
                   writer = PdfWriter.getInstance(document, new FileOutputStream(outputFile));
                   document.open();
                   while(chartIter.hasNext())               
                        numpages++;
                        JFreeChart currentChart = (JFreeChart)chartIter.next();
                        PdfContentByte cb = writer.getDirectContent();
                        PdfTemplate tp = cb.createTemplate(width, height);
                        Graphics2D g2d = tp.createGraphics(width, height, new DefaultFontMapper());
                        Rectangle2D r2d = new Rectangle2D.Double(0, 0, width, height);
                        System.out.println("Writting Chart: " + currentChart.getTitle().getText());          
                        currentChart.draw(g2d, r2d);
                        g2d.dispose();
                        cb.addTemplate(tp, 0, 0);
                        document.newPage();
                        writer.releaseTemplate(tp);  //I had heap errors before I added this
              catch(Exception e)
                   e.printStackTrace();
              document.close();
              writer.flush();
              writer.close();
              allCharts.clear();
              allCharts.trimToSize();          
              System.gc();    //I'm explicitly trying to free up the resources here
              System.runFinalization();
    }

    warnerja wrote:
    Hard to say.
    Once it loads classes, it won't give that memory back, but any memory used on the heap which is no longer needed may be reclaimed.
    Does it keep climbing on repeated exports, or does it basically peak on one export and remain at that usage level upon repeated exports?It peaks on one export and then remains the same on repeated exports (roughly ~105MB). What scares me is the my test set is relatively small (perhaps as small as 1%) of what this application could be used for. I can do some things to minimize memory usage (like writing one page at a time and then appending so I don't have to keep the whole output stream open) at the expense of speed, but some where there has to be a data structure containing all of the items to be written. If the JVM NEVER gives the memory back then this will pretty much cripple the user's system.

  • RFC function module with call transaction  and Import memory ID

    Hi,
    I am calling RFC function module from R/3 which exists in BW.
    In BW stand alone function module works fine.
    When I am Calling from R/3 it is not working,
    Can you tell me is it because of the below code, And suggest if any corrections required.
    I am calling the call transaction and using EXPORT memory iD inside the program
    and IMPORT in after that.
    And populating RFC table's table  " p_i_tcode_user" finally.
    set parameter id 'TCD' field p_tcode.
    call transaction 'Z_BW_RSUSR002' AND SKIP FIRST SCREEN.
      ENDIF.
    get the final user data from submitted program
    import gt_users_complete from memory id tcode_userid.
    LOOP AT gt_users_complete.
          lwa_tcode_user-tcode =  p_tcode.
          lwa_tcode_user-uname = gt_users_complete-Bname.
          APPEND lwa_tcode_user TO p_i_tcode_user.
    ENDLOOP.
    Thanks,
    Veerendra.

    HI,
       Can you just exaplin it clearly plz..
    Thanks
    Mahesh

  • Exporting in Premiere Pro with a GTX 980 CUDA takes 4 hours

    Okay, this problem has been plaguing me ever since I upgraded to a new PC with some very high end hardware. I'm trying to export a 25 minute h.264 encoded mp4 file from an AVI video and PCM audio source, however, exporting it using YouTube 1080p preset takes over 4 hours. This used to never happen before, even on my old laptop which had a GTX 675M card and would take 1.5 hours at most.
    The source files I use through video capture is AVI with MPEG-1(VBR) 1920x1080 resolution with 29.97 frames/second. The audio source is PCM WAV 48.0KHz stereo.
    The preset I have for exporting in Premiere Pro/AME CC 2014 is:
    video: h.264 format, 1.0 square pixel, 29.97 frames/second, Progressive scan
    bitrate: VBR(1 pass), target/max: 8.0 Mbps
    audio: AAC 192kbps, 48kHz stereo
    The hardware I am using is a Gigabyte x99 ud-4 motherboard with G.Skill Ripjaws 16GB DDR4 2400Mhz RAM, i7-5820K CPU 3.30 GHz, Windows 7 64bit OS, with an Nvidia GTX 980 card with CUDA enabled in both Premiere and the Nvidia Control Panel. Yet, I am still getting over 4 hours rendering time during my exports for a 20-30min video source? I  am completely stumped on this and it's unbelievably frustrating to see my top of the line system take so long to render this file when my 2-3 year old laptop did the export in 1/3rd of that time? I do this as a hobbyist and any help on trying to get this fixed would be a major help to me. Thank you in advance!

    Hmmm...
    I did a quick test in your behalf with a test project with and without "alpha glow" applied to all of the media.
    The results were actually kind of strange:
    - export to .mp4 utilized all cores (6-core box w/ Hyperthreads) with a smooth 82% utilization for the whole export; memory usage (also from task manager) went up and once it hit a maximum, it stayed there
    - export to .mp4 with "alpha glow" applied -> CPU usage started out pretty good, then memory usage maxed out and then actually cam down; after a bit, the CPU usage stabilized at around 22%, or about 25% of what it had been at the start of the export
    Smells to me like an Adobe bug or design-flaw.
    Anyway, good luck with your testing.
    I totally agree with Bill's suggest to do a full PPBM7 test on your new rig and report the scores back here - and to the PPBM7 site of course. This will help you to have confidence in your new hardware and setup. Once your hardware and configuration (for Win7, drive caching, Premiere settings, etc.) are working fine, then your particular workflow, etc. can be a separate troubleshooting step.
    Good luck!
    Regards,
    Jim

  • SHARED MEMORY AND DATABASE MEMORY giving problem.

    Hello Friends,
    I am facing problem with EXPORT MEMORY and IMPORT MEMORY.
    I have developed one program which will EXPORT the internal table and some variables to the memory.This program will call another program via background job. IMPORT memory used in another program to get the first program data.
    This IMPORT command is working perfect in foreground. But  it is not working in background.
    So, I have reviewed couple of forums and I tried both SHARED MEMORY AND DATABASE MEMORY.  But no use. Still background is giving problem.
    When I remove VIA JOB  parameter in the SUBMIT statement it is working. But i need to execute this program in background via background job. Please help me . what should I do?
    pls find the below code of mine.
    option1
    EXPORT TAB = ITAB
           TO DATABASE indx(Z1)
                FROM   w_indx
                CLIENT sy-mandt
                ID     'XYZ'.
    option2
    EXPORT ITAB   FROM ITAB
      TO SHARED MEMORY indx(Z1)
      FROM w_indx
      CLIENT sy-mandt
      ID 'XYZ'.
       SUBMIT   ZPROG2   TO SAP-SPOOL
                      SPOOL PARAMETERS print_parameters
                       WITHOUT SPOOL DYNPRO
          *_VIA JOB name NUMBER number*_
                       AND RETURN.
    ===
    Hope every bidy understood the problem.
    my sincere request is ... pls post only relavent answer. do not post dummy answer for points.
    Thanks
    Raghu

    Hi.
    You can not exchange data between your programs using ABAP memory, because this memory is shared between objects within the same internal session.
    When you call your report using VIA JOB, a new session is created.
    Instead of using EXPORT and IMPORT to memory, put both programs into the same Function Group, and use global data objects of the _TOP include to exchange data.
    Another option, is to use SPA/GPA parameters (SET PARAMETER ID / GET PARAMETER ID), because SAP memory it is available between all open sessions. Of course, it depends on wich type of data you want to export.
    Hope it was helpful,
    Kind regards.
    F.S.A.

Maybe you are looking for

  • Change documents for created for Customer Master

    An existing program makes changes to the Customer master table KNA1. The changes are made at the table level using the UPDATE command. Since the changes are being made at table level, the change documents are not created. I need to create IDocs for a

  • Quotation marks and special characters

    Hello, Does anyone know why quotations marks are rendered as a box (space?) character on JSP page when displayed as a portlet? They are displayed fine as a standalone JSP page. Thank you, Makoto

  • Key Press CTRL+Space

    How do I view a JInternalFrame by pressing CTRL+Space from a JTextFeild in another JInternalFrame? Using isControlDown() works but throws NullPointerException. Can it be done by using KeyStroke ? If Yes then how?

  • Intranet display wrong

    My crystal report comes up fine on local development machine, but when I publish to our intranet server and view report, the report viewer toolbar is missing its graphics, and grouping at left no graphic either Wish I could incude picture here

  • HT5824 how to sync photos

    My photos from my iPhone 4 is not porting over to my iPhone 5.  I am not sure why.  How do I reset my settings to include my photos in icloud?