Import/export in abap oo

i want to write import and export in method.
what is thye syntax.
i write:
get free memory : zflag.
if zflag is initial.
bla bla.....
zflag= 1
endif.

Try as below:
IMPORT zflag = zflag FROM MEMORY ID <mid>.
and
EXPORT zflag = zflag TO MEMORY ID <mid>.
Make sure the definition of ZFLAG is same in both methods should they be used in different methods.
Regards
Eswar

Similar Messages

  • Import/Export webdynpro ABAP application

    Hi all,
    I was wondering whether there is any way to export/import the local object/web dynpro application that we have created(like the import/export in web dynpro java). I would like to keep a copy of the application developed in my local machine using this method.
    Thanks
    Kukku

    even me also tried imported webdynpro plug in but not showing in object type.
    i am getting only class and program.
    please let me know what to do.
    Regards,
    Mahesh

  • How to export my ABAP web dynpro content to another server

    Hi,
      I need to export my ABAP webdynpro application from one server to New server. Can any one please guide me how to do this.
    Regards,
    SPK.

    Hi
    You mean transporting your web dynpro comopnent across your landscape, use the transport system.
    Web Dynpro Object is like any other object you can transport.
    If the destination server is not maintained or is in other networks use this link will be helpful
    Import/Export webdynpro ABAP application
    Abhi

  • ABAP command IMPORT/EXPORT

    Hi!
    I would like to know whats the replacement for the IMPORT and export commands used in 4.7c  in ECC6. Can anyone tell me whats the replacement commands for import and export command that is used in abap/4 4.7c for ECC6.
    Thanks

    Hi Aarav,
    there is nothing like replacement for import/export.there is another statements to transferdata which are Set/Get.
    when you are working with sap you have sessions.so in between session if you want to transfer data then you will use set/get parameters.import/export are used within the session.means you opened se38 and written a program and then go back to se38 initial screen and entered another program name and in that program you want the data which is in the previous program you have written in the se38 in same session.
    reward points if helpful.

  • ABAP for Super Dumps: Import- & Export-Parameter for a Table in a FM

    Hello ABAP Profs,
    sorry I am BW.
    <b>Import- & Export-Parameter for a Table in and out of an Function Modul.</b>
    I want to import a table into a Function Module, change it and export it again.
    How do I have to define the Import- and Export- Parameters in the FM ?
    The table looks looks this:
    DATA: zvpshub_tab TYPE SORTED TABLE OF /bic/pzvpshub WITH UNIQUE KEY
    /bic/zvpshub objvers /bic/zvpsoursy INITIAL SIZE 0.
    Thanks a lot
    Martin Sautter

    Hi Clemens,
    <u>in SE11</u> I defined a datatype of Type Structure: ZVPSHUB_ROW.
    <u>in SE11</u> I defiend a datatype of Type Tabletype: ZVPSHUB_TAB,
    bases on Rowtype ZVPSHUB_ROW.
    <u>in SE 80</u> I creates an FM with a CHANGEING Parameter referencing ZVPSHUB_TAB:
    FUNCTION ZVP_SHUB_TAB_LOAD.
    ""Lokale Schnittstelle:
    *"  CHANGING
    *"     VALUE(SHUB_TAB) TYPE  ZVPSHUB_TAB
    <u>in RSA1</u> in BW in the Startroutine of the Upload Rules in defined the table:
    DATA:shub_tab          TYPE zvpshub_tab.
    <u>in RSA1</u> in BW in the Startroutine of the Upload Rules in defined the table:
    DATA:shub_tab          TYPE zvpshub_tab.
    <u>in RSA1</u> in BW in the Startroutine i called the FM
    CALL FUNCTION 'ZVP_SHUB_TAB_LOAD'
        CHANGING
          shub_tab = shub_tab.
    and it works ..
    Thank You
    Martin Sautter

  • HR ABAP : Need more information for Import/Export files in HR

    Hi Everybody,
    I have been in ABAP programming for pretty long but very new to ABAP HR.I am making a Self-Learning attempt in ABAP HR where I have been able to acheive a fair understanding of Infotype,LDB,Screen Modifications,RMAC macros... But presently I cannot very clearly understand the accessing of PCLn files specially PCL2 (payroll derivations).I am using SAP Help for it. I would highly appreciate if anybody could provide me with some documents to understand Import/Export files in HR.
    Any kind of personal tricks or tips to understand the same would also be very helpful.
    Best Regards,
    Sangeeta.

    Hi Suresh,
    Your reply was very comforting... I have been literally struggling to understand the includes for data definitions and Key.It would be great if you could just provide me a sample program with the Read Payroll and Write Payroll in case you have any.
    Other than that as per your suggestions I would then just concentrate on the modules..
    Once again I would like to thank you for your reply.
    Best Regards,
    Sangeeta

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

    Hi,
    I want to import 2 internal tables (Declared with Header Line) and 1 variable from the memory. These 2 internal tables are exported separately at different points using separate Export Statements. I am not sure, why my Import statement is not working correct. Can you please give me the correct syntax?
    Thanks in advance
    Kannan.

    Hi,
    This code is from which program you want to export to the ABAP memory:          
       export ist_resb to memory id 'ZPPC0122_FD'.
                 where ist_resb is the internal table name &
                       ZPPC0122_FD is the include name of my program ZPPC0122.
    This code is from which program you want to import from the ABAP memory
            import *ist_resb *= ist_resb from memory id 'ZPPC0122_FD'.
                  where  ist_resb This internal table is the importing program internal table.
                        ist_resb This internal table is the exporting program internal table.
    But remember in both the program you have defined the same internal table with same structure
    Refer this link-
    IMPORT:
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3bde358411d1829f0000e829fbfe/content.htm
    http://abaplovers.blogspot.com/2008/04/passing-data-from-one-abap-program-to.html
    http://help.sap.com/saphelp_45b/helpdata/en/34/8e73a36df74873e10000009b38f9b8/content.htm
    Check this
    EXPORT an internal table  and  IMPORT an internal table in another program
    Hope it will help you.
    Regards,
    Sujit

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

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

  • How to import/export value for ekko-netwr

    Hi friends,
    amount value 'ekko-netwr'  from incude LV61AA43 should pass to include LV61AA43 for this iam using import/export paramters but there is no parameter id for netwr . How can i pass this amout to this rountine.
    Thank u ,
    prasad.

    hi,
    A simple example of ABAP memory is using the EXPORT/IMPORT statements.
    Here in this program, I get the data, export it to memory,
    clear out the internal table in my progam, then reimport the data into it and write out the data.
    You probably wounldn't do this in a normal program,
    but this is how you can pass data from program a to program b when A Submits program B.
    report zxy_0002 .
    data: it001 type table of t001 with header line.
    select * into table it001 from t001.
    export it001 = it001 to memory id 'ZXY_TEST'.
    clear it001. refresh it001.
    import it001 = it001 from memory id 'ZXY_TEST'.
    loop at it001.
    write:/ it001-bukrs, it001-butxt.
    endloop.
    SAP Memory
    SAP memory is a memory area to which all main sessions within a SAPgui have access.
    You can use SAP memory either to pass data from one program to another within a session,
    or to pass data from one session to another.
    Application programs that use SAP memory must do so using SPA/GPA parameters (also known as SET/GET parameters).
    These parameters can be set either for a particular user
    or for a particular program using the SET PARAMETER statement.
    Other ABAP programs can then retrieve the set parameters using the GET PARAMETER statement.
    The most frequent use of SPA/GPA parameters is to fill input fields on screens
    ABAP/4 Memory
    ABAP memory is a memory area that all ABAP programs within the same internal session can access
    using the EXPORT and IMPORT statements.
    Data within this area remains intact during a whole sequence of program calls. To pass data
    to a program which you are calling,
    the data needs to be placed in ABAP memory before the call is made.
    The internal session of the called program then replaces that of the calling program.
    The program called can then read from the ABAP memory.
    If control is then returned to the program which made the initial call, the same process operates in reverse.
    SAP memory
    The SAP memory, otherwise known as the global memory,
    is available to a user during the entire duration of a terminal session.
    Its contents are retained across transaction boundaries as well as external and internal sessions.
    The SET PARAMETER and GET PARAMETER statements allow you to write to, or read from, the SAP memory.
    ABAP/4 memory
    The contents of the ABAP/4 memory are retained only during the lifetime of an external session
    (see also Organization of Modularization Units).
    You can retain or pass data across internal sessions.
    The EXPORT TO MEMORY and IMPORT FROM MEMORY statements allow you to write data to, or read data from, the ABAP memory.
    ABAP Memmory & SAP Memmory
    http://www.sap-img.com/abap/difference-between-sap-and-abap-memory.htm
    http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm
    Set
    http://www.geocities.com/SiliconValley/Campus/6345/set_para.htm
    GET
    http://www.geocities.com/SiliconValley/Campus/6345/get_para.htm
    EXPORT
    http://www.geocities.com/SiliconValley/Campus/6345/export01.htm
    Other Imp Help
    http://www.geocities.com/SiliconValley/Campus/6345/abapindx.htm
    Thanks & Regards
    ilesh 24x7

  • Import / Export problems

    Hi team.
    I have a 4.6 C version an the import / export works fine.
    But in the SAP ERP Central Component 5.0
    I do the Export.
    Review the abap memory and se the areas, but empty.
    And when I do the import the data are clear.
    Do you have any idea.
    And i can't change for a SET parameter Id, becuase the data are numeric.
    Thanks

    Hi David, could you please post the a sample of the code that is not working?
    Best regards
    Edited by: Fernando Ariel Villa on May 17, 2011 11:05 PM

  • How to pass import/export parameters while event handler call in OOABAP?

    Hi Experts,
    Is it possible to use export parameter in set handler method?
    Actually my requirement is while creating customer through XD01 after committing to data base i want that customer.
    So i exporting  customer no. in one of the badi before commit  and importing in my custom class (zabc) after commit.
    Using event TRANSACTION_FINISHED and checking KIND eq C.
    My question is instead of using import export abap command  is it possible to pass those parameters in ??
    Sample : SET HANDLER zcl_sd_after_commit=>get_kunnr.
    Regards,
    Raj....

    Yes it can
    but the event should be defined in the BADI so why do you need to do it?
    CLASS MY_CLASS_1 DEFINITION FINAL.
       PUBLIC SECTION.
         METHODS GET_KUNNR IMPORTING KUNNR TYPE KUNNR.
         EVENTS MY_EVENT EXPORTING VALUE(KUNNR) TYPE KUNNR.
    ENDCLASS.
    CLASS MY_CLASS_2 DEFINITION FINAL.
       PUBLIC SECTION.
         METHODS MY_METHOD FOR EVENT MY_EVENT OF MY_CLASS_1
            IMPORTING KUNNR.
    ENDCLASS.
    CLASS MY_CLASS_1 IMPLEMENTATION.
       METHOD GET_KUNNR.
         RAISE EVENT MY_EVENT EXPORTING KUNNR = KUNNR.
       ENDMETHOD.
    ENDCLASS.
    CLASS MY_CLASS_2 IMPLEMENTATION.
       METHOD MY_METHOD.
         WRITE KUNNR.
       ENDMETHOD.
    ENDCLASS.
    So it can move KUNNR from class1 to class2
    DATA: MY_OBJ_1 TYPE REF TO MY_CLASS_1.
    DATA: MY_OBJ_2 TYPE REF TO MY_CLASS_2.
    PARAMETERS: P_KUNNR TYPE KUNNR.
    START-OF-SELECTION.
       CREATE OBJECT MY_OBJ_1.
       CREATE OBJECT MY_OBJ_2.
       SET HANDLER MY_OBJ_2->MY_METHOD FOR MY_OBJ_1.
       MY_OBJ_1->GET_KUNNR( P_KUNNR ).

  • 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

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

Maybe you are looking for