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

Similar Messages

  • Function module Global variables not cleared from memory?

    Hi,
    This is may be simple & stupid question ( after posting  4242 posts ):)
    " Declaration in TOP
    data : begin of i_y1yatt occurs 0.
            include structure y1yatt.
    data : end of i_y1yatt.
    types: begin of t_yatt71.
           include structure yatt71.
    types: tcode like sy-tcode.
    types: dflag type c.
    types: end of t_yatt71.
    data : i_yatt71 type standard table of t_yatt71
                   with default key  with header line  initial size 0.
    This is code in the function module.
      loop at i_y1yatt.
        move-corresponding o_y1yatt to i_yatt71.
        if i_y1yatt-werks eq 'N501'.
           move space to i_yatt71-werks.
        endif.
        append i_yatt71. 
        " Here this internal contains the previous entry
        clear i_yatt71.
      endloop.
    This function module is called 25 times in a minute.
    My problem is this
    For example : 1st tranmission is called this fm with 50 records,
    and 2nd tranmission is called fm with 10 records.
    My results are showing
    last record in the 1st transmission is still on the memory while calling 2nd transmission.  ( Here in int table I_YATT71 still contains the 1st transmission's last records during the 2nd tranmission call)
    As per my knowledge if each time calls comes in to fm all gloabl variables get cleared. but some how this not happening.
    Anybody come across this scenario.
    PS. I know i need to use clear statement within the loop as first statement.

    You must understand that when calling a FM, you load the entire function group into memory. IF there are global variables, then they are "alive" for the entire duration of the program execution. Meaning if you call the function numerious times, or even if you call another function within the same function group, the functions still have access to that same global variable space, so it must always be cleared manually by the developer at the required points.  You can not rely on the runtime to clear the global variables at the end of the function call.  So you should clear all you globals as the first operation in your function module call, if that is what is required.
    Is this clear?
    Regards,
    Rich Heilman

  • Export/import to/from database

    hi,
    i do not know what is this for. i read the help but still no idea.
    i know to use export/import to/from memory id and also set/get but not export/import to/from database.
    1) what help says it stores data cluster? what is data cluster
    2) can have example of export/import to/from database?
    3) what is the different for export/import to/from memory id and database?
    thanks

    Hi,
    1) A data cluster is a set of data objects grouped together for the purpose of storage in a storage medium(Like database, local memory or shared meomory etc), which can only be edited using ABAP statements like EXPORT, IMPORT and DELETE.
    2) Suppose you want to export the data in a internal table to database.
    Here TABLE_ID is the identifer of your data cluster. You are exporting your data to a SAP table INDX and giving it an ID (TABLE_ID in this case and this ID you are giving it an area by name XY where your data will be stored). EXPORT tab = itab
      TO DATABASE indx(XY)
      CLIENT '000'
      ID 'TABLE_ID'.   
    You can get this data as follows.
    IMPORT tab = itab
      FROM DATABASE indx(xy)
      CLIENT '000'
      ID 'TABLE_ID'.
    3) The difference is simple when you use MEMORY ID the data you export is stored in the application server MEMORY where as in the case of DATABASE it is stored in the database.
    Regards,
    Sesh

  • Function module to import data from memory

    Hi,
    I am using the function module 'LIST_FROM_MEMORY' to import data and the LISTOBJECT contains values in raw format.How to convert this to char format?I dont want to use 'DISPLAY_LIST' as I want the values of the parameter 'LISTOBJECT' to be passed to block alv in the calling program.
    Please suggest me as to how to do the conversion?
    Thanks in advance
    Vasudha

    Use Function Module: LIST_TO_ASCI
    Converts the specified list (LIST_INDEX) or the provided list
    (LISTOBJECT) to ASCI.
    Here, the purely text part of the list is copied line by line to the
    prepared internal table (LISTASCI) without any attributes (color, icon,
    symbol, ...). There is no line break in this case, i.e. if the internal
    table line is not long enough, the list line is truncated.
    DATA  LISTTAB LIKE ABAPLIST OCCURS 1.
    DATA: BEGIN OF ASCITAB OCCURS 1,
           LINE(256),
           END OF ASCITAB.
    CALL FUNCTION 'LIST_TO_ASCI'
          TABLES LISTOBJECT = LISTTAB
                 LISTASCI   = ASCITAB.
    The provided list (LISTOBJECT) is taken into account only if the
    parameter LIST_INDEX = -1 (default). Otherwise, it is ignored.
    Hope this helps.
    Regards
    Vinayak

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

  • Import term_rgdir from memory id rgdirid

    Hi
    SY-SUBRC of Following statement is 4
    import term_rgdir from memory id rgdirid
    Could you please suggest me what needs to be done to rectify this issue.
    Regards
    Sri

    Either you did not export it properly or you will need some variable to import into; please see sample code below:
    Program for Export
    Data : gv_flag(1) type c,
              id(10) type c Value 'FLAG'.
      gv_flag = 'X'.
      Export gv_flag from gv_flag to memory id id.
    Program for Import
    Data : gv_flag(1) type c,
              id(10) type c Value 'FLAG'.
    Import gv_flag to gv_flag from memory id id.
    If gv_flag eq 'X'.
    Endif.

  • IMPORT lt_pgrp FROM MEMORY ID 'PGRP'.

    Can you please explain what the following syntax is doing .
    IMPORT lt_pgrp FROM MEMORY ID 'PGRP'.

    Hi,
    Letu2019s take a scenario where we need an internal table which is in program (letu2019s say Prog_name) which contains some Employee verification data in respect of one personnel no.  Now our requirement is to use the same internal table in our program, so we will first export the personnel no to a memory id. 
    Passing value of perner to Memory ID u2018Memo1u2019
    Export pernr to MEMORY id 'Memo1'.
    Now submit to the program
    Submit Prog_name  AND RETURN .
    Now we are importing u2018it_tableu2019 from Prog_name based on the value of pernr
    Import it_table  from MEMORY id 'ABC' .
    Now we have to  add Export parameter code in target program (Prog_name).
    INITIALIZATION.
    import pernr from memory id 'Memo1' .
    After the internal table is appended we need to export it to again memory id (Memo1)
    END-OF-SELECTION.
    export it_table to memory id 'Memo1' .
    Thanks,
    Krishna

  • IMPORT itab FROM MEMORY ID - doubt

    Hello all,
    In my program I am using the statement like given below.
    IMPORT  ITAB_TDR       FROM MEMORY ID 'PPI'.  I am getting Sy-subrc = 4. 
    The reason might be either Unable to import data objects or The ABAP memory was probably empty or The contents of all listed objects remain unchanged.
    Now my question is->  How to store the data in the ABAP memory so that I can get the datas in ITAB_TDR in my import stmt.
    Thanks in advance,
    Balaji

    JUST CHECK RPR_ABAP_SOURCE_SCAN REPORT IN SE38 AND GIVE THE STRING THERE IT WILL SHOW THE REPORT NAME. OR JUST PUT ABAPSOURCESCAN IN SE38 AND PRESS F4. IF IT IS A Z PROGRAM THEN GIVE PROG NAME AS Z*.
    IF YOU GET THE PROG NAME THEN YOU HAVE TO RUN THAT PROG TO EXPORT THE VALUE IN MEMORY ID.
    AFTER THAT ONLY YOU CAN USE IMPORT.
    REGARDS
    SHIBA DUTTA

  • Plz explain - IMPORT GS_MATNR_CTRL FROM MEMORY ID 'ZMEM' ?

    Hello,
    Very good evening!
    Can any one please explain me what this satement do.
    Please explain me.......
    IMPORT GS_MATNR_CTRL FROM MEMORY ID 'ZMEM'.
    Any suggestions or information will be appreciated.
    Regadrs,
    KIttu

    Hello,
    Thank you for your response and time!
    Points rewarded...
    Have a good day! 
    Regards,
    Kittu

  • Function module to convert date format from yyyymmdd to mmddyyyy format

    function module to convert date format from yyyymmdd to mmddyyyy format

    Hi Rajitha,
    Do like this
    Data: Var1 type sy-datum,
             var2(8) type c.
    var1 = sy-datum.
    Concatanate var1+4(2) var1+6(2) var1+0(4) into var2.
    write var2.
    Reward Points if this helps,
    Satish

  • Function module to get the dates from the year and the period

    Is there a function Module to get the dates from the year and the period

    Check with :
    To get last day of period use .
    LAST_DAY_IN_PERIOD_GET.
    To get last of month Use :
    RE_LAST_DAY_OF_MONTH
    HRVE_LAST_DAY_OF_MONTH
    LAST_DAY_OF_MONTHS
    ISB_PREVIOUS_PERIOD_DATE_GET
    Thanks
    Seshu

  • ABAP Function Module Example to move data from one Cube into Another

    Hi experts,
    Can any please help out in this ..?
    A Simple ABAP Function Module Example to move data from one Cube into Another Cube
    (How do i send the data from one client to another client using Function moduel).
    Thanks
    -Upen.
    Moderator message: too vague, help not possible, please describe problems in all technical detail when posting again, BI related? ("cube"), also search for information before asking.
    Edited by: Thomas Zloch on Oct 29, 2010 1:19 PM

    This is the start routine to duplicate records in two currencies.
    DATA: datew   TYPE /bi0/oidateto,
          datew2  TYPE rsgeneral-chavl,
          fweek   TYPE rsgeneral-chavl,
          prodhier TYPE /bi0/oiprod_hier,
          market  TYPE /bic/oima_seg,
          segment TYPE /bic/oizsegment.
    DATA: BEGIN OF S_DATA_PACK OCCURS 0.
            INCLUDE STRUCTURE /BIC/CS8ZSDREV.
    DATA: END OF S_DATA_PACK.
    S_DATA_PACK[] = DATA_PACKAGE[].
      REFRESH DATA_PACKAGE.
      LOOP AT S_DATA_PACK.
        move-corresponding s_data_pack to DATA_PACKAGE.
        if DATA_PACKAGE-loc_currcy = 'EUR'.
          DATA_PACKAGE-netval_inv = DATA_PACKAGE-/bic/zsdvalgrc.
          DATA_PACKAGE-CURRENCY = 'USD'.
          APPEND DATA_PACKAGE.
          DATA_PACKAGE-netval_inv = DATA_PACKAGE-/bic/zsdvalloc.
          DATA_PACKAGE-CURRENCY = 'EUR'.
          APPEND DATA_PACKAGE.
        else.
          DATA_PACKAGE-netval_inv = DATA_PACKAGE-/bic/zsdvalgrc.
          DATA_PACKAGE-CURRENCY = 'USD'.
          APPEND DATA_PACKAGE.
        endif.
      ENDLOOP.
    This is to load Quantity field
    RESULT = COMM_STRUCTURE-BILL_QTY.
    This is to load Value field
    RESULT = COMM_STRUCTURE-NETVAL_INV.
    UNIT = COMM_STRUCTURE-currency.

  • Any function module to transfer File(Excel)  from Appli Serveto Unix Server

    Hi all,
    Do you have any function module to transfer excel file from application server to Unix server.
    Can anyone have some sample code for the same.
    Thanks in Advance.
    Sreedhar Marri

    Hi,
            There is no function module ,instead use open dataset command.
    Syntax example,
    data: e_file like rlgrap-filename.
    data : txtstr type string.
    concatenate  searchpoints-dirname '/scm/' werks '/' filnam into e_file.
      open dataset e_file for output in text mode encoding default.
    loop at itab.
        concatenate itab ',' into txtstr.
         transfer txtstr to e_file.
      endloop.
    where itab is the contents u want to transfer.
    Pls check for required authorisations with ur BASIS for open dataset command.
    Regards,
    Balakumar.G.

  • Function Module for Translation of text from Lower to Upper Case

    Hi All,
    Can any one give me function module for translation of text from lower to upper case.
    If we use Translate statement for the program in the Extended Syntax check it is giving error.
    Thanks in advance.
    Regards,
    srinivas

    Hi Srinivas,
    You can use any of the Function Modules below.
    AIPC_CONVERT_TO_UPPERCASE
    2054_TRANSLATE_2_UPPERCASE
    HR_99S_CONV_UPPER_CASE
    Please reward if useful.
    regards,
    Raj

  • Functional module to Copy measurement points from one equipment to another

    HI,
    Please give some body function module to Copy measurement points from one equipment to another which is not assign to functional location.

    To Copy Measuring Points from one equipment to another , Go to transaction IE10 and copy all the relevant data that need to be copied Check the measuring point check box, it would copy the characteristic for measuring point to the newly created equipment and would create a system generated number for the measuring point. Both the measuring points would have the same characteristics and if they are attached to each other in a hierarchy then the measurement document readings could also be transferred from one measuring point to another.. You could use the following Function Module "EQUIPMENT_COPY" to copy the measuring point from one equipment to another if equipment has already been created.
    Regards...
    Edited by: Usman Kahoot on Jun 9, 2010 2:37 PM

Maybe you are looking for

  • I cant update my ipod touch 2gen. Stuck on iOS 3.1.3

    My iPod 2gen wont update. It says its up to date but is on iOS 3.1.3. I've tried to press update and restore it (several times) but still refuses to update. Hope someone can help

  • Can no longer create custom page size for printing to PDF?

    When printing from FrameMaker to PDF in Windows, I used to be able to create a custom page size by clicking on the Add button that appeared to the right of the Adobe PDF Page Size window, in the Adobe PDF Document Properties dialog box. With Frame 9,

  • Some images are not loading after update and have explored options and settings without result

    a lot of sites visited do not show images. ie google, weather maps, my home page for isp. have tried most suggestions and has occurred only since f/fox update.

  • VAT calculated differently

    Hi All, In MC$4 the PO value is value is coming as zero. Please guide me how to bring the actual PO value in MC$4 report. Thanks in advance Pavan

  • Change Form Title.

    Dear Expert., Pls tell me the method to change form title i have code as below : If (pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_LOAD) Or (pVal.EventType = SAPbouiCOM.BoEventTypes.et_ALL_EVENTS) Then If pVal.FormTypeEx = "149" Then oForm.Title =