Export statement in user-exit??

I have used the following export statement in a user-exit:"EXPORT xaccit TO MEMORY ID 'ZCACHEPPA'."-I have doubt that - will this statement export the contents of the table XACCIT to memory and those contents in the memory will be imported by the IMPORT statement in other user-exit.....??
If no,then which EXPORT/IMPORT statement should be used....is there any other keyword that can be used to export the contents to the memory?

Hi
See the doc related to SAP Memory and ABAP 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
SAP global memory retains field value through out session.
set parameter id 'MAT' field v_matnr.
get parameter id 'MAT' field v_matnr.
They are stored in table TPARA.
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.
ABAP memory is temporary and values are retained in same LUW.
export itab to memory id 'TEST'.
import itab from memory Id 'TEST'.
Here itab should be declared of same type and length.
http://www.sap-img.com/abap/difference-between-sap-and-abap-memory.htm
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
Reward points if useful
Regards
Anji

Similar Messages

  • Commit statement in user exit

    Hi All,
    We found that while doing PGI , it takes some time to COMMIT the table VBUK. Due to which we are getting old values of VBUK-KOSTK field while executing select query at later point of time in the flow.
    My question --
    Can I use COMMIT WORK statement in user exit MV50AFZ1 --> FORM USEREXIT_SAVE_DOCUMENT so that all the related tables
    get committed immediately.
    Thanks
    Saurabh

    Hi Saurabh ,
    Normally , you shoud not specify COMMIT stmt in any user exit , badi etc..
    SAP has its own COMMIT statement while execuiting the standard transactions .
    Addition of a COMMIT might lead to problems elsewhere .
    Thanks
    Supriya

  • Can it be used commit statement in user-exits?

    Can it be used commit statement in user-exits?
    How to badi is different from other enhancement?
    What are the two default components systems automatically creates when we create a new badi?
    What is the business object for purchase order?

    Hi,
       1) commit statement in userexit:
    You should not do that.
    After the user exits code is triggered, the transaction's own commits statements will commit the database anyway
    2)You could say: BAdI = enhancement using interfaces
    It is just the most up-to-date version of SAP's enhancement concept.
    go thru this.
    http://www.esnips.com/web/BAdI
    http://www.allsaplinks.com/badi.html
    New to Badi
    Regards
    Kiran Sure

  • User Exit for saving Invoice

    Hi Experts,
    My req, is I have to check billing date with order date/ delivery date while creating the invoice in VF01.
    For that I have done codig in user exit RV60AFZZ, so it gives error ,but the billing date field get disable.
    & this invoice no. alsp get created.
    So can anybody plz tell me in which user exit i have to put my code ???
    I have tried with RV60AFZC.But it is not working.
    My code is
    FORM userexit_pricing_prepare_tkomp.
    *  TKOMP-zzfield = xxxx-zzfield2.
    * structure for vbak
    TYPES:BEGIN OF ty_vbak,
          vbeln TYPE vbak-vbeln,
          audat TYPE vbak-audat,
          END OF ty_vbak.
    *likp structure
    TYPES:BEGIN OF ty_likp,
          vbeln TYPE likp-vbeln,
          lfdat TYPE likp-lfdat,
          END OF ty_likp.
    *vbrp structure
    TYPES:BEGIN OF ty_vbrp,
          vgbel TYPE vbrp-vgbel,
          vgpos TYPE vbrp-vgpos,
          aubel TYPE vbrp-aubel,
          aupos TYPE vbrp-aupos,
          END OF ty_vbrp.
    DATA:it_vbak TYPE STANDARD TABLE OF ty_vbak,
         it_likp TYPE STANDARD TABLE OF ty_likp,
         it_vbrp TYPE STANDARD TABLE OF ty_vbrp.
    DATA:wa_vbak TYPE ty_vbak,
         wa_likp TYPE ty_likp,
         wa_vbrp TYPE ty_vbrp.
    ***** take reference document no & delivery no. *****
    LOOP AT xvbrp.
      wa_vbrp-vgbel = xvbrp-vgbel.
      wa_vbrp-vgpos = xvbrp-vgpos.
      wa_vbrp-aubel = xvbrp-aubel.
      wa_vbrp-aupos = xvbrp-aupos.
      APPEND wa_vbrp TO it_vbrp.
    ENDLOOP.
    IF it_vbrp IS NOT INITIAL.
    SELECT vbeln audat FROM vbak
          INTO TABLE it_vbak
          FOR ALL ENTRIES IN it_vbrp
          WHERE vbeln = it_vbrp-aubel.
    SELECT vbeln lfdat from likp
           INTO TABLE it_likp
           FOR ALL ENTRIES IN it_vbrp
           WHERE vbeln = it_vbrp-vgbel.
    ENDIF.
    **** check for invoice date with order date *****
    LOOP AT it_vbak INTO wa_vbak.
      IF xvbrk-fkdat IS NOT INITIAL AND xvbrk-fkdat < wa_vbak-audat.
        MESSAGE 'Invoice Date is less than Order Date' TYPE 'E'.
      ENDIF.
    ENDLOOP.
    **** check for invoice date with delievery date *****
    LOOP AT it_likp INTO wa_likp.
      IF xvbrk-fkdat IS NOT INITIAL AND xvbrk-fkdat < wa_likp-lfdat.
        MESSAGE 'Invoice Date is less than Delivery Date' TYPE 'E'.
      ENDIF.
    ENDLOOP.
    ENDFORM.                    "USEREXIT_PRICING_PREPARE_TKOMP
    Thanks & Regards,
    Anagha Deshmukh

    Hello,
    These are the user exits for the tcode.
    J_3RSINV            Export sales
    SDVFX007            User exit: Billing plan during transfer to Accounting
    SDVFX008            User exit: Processing of transfer structures SD-FI
    SDVFX009            Billing doc. processing KIDONO (payment reference number)
    SDVFX010            User exit item table for the customer lines
    SDVFX011            Userexit for the komkcv- and kompcv-structures
    V05I0001            User exits for billing index
    V05N0001            User Exits for Printing Billing Docs. using POR Procedure
    V60A0001            Customer functions in the billing document
    V60P0001            Data provision for additional fields for display in lists
    V61A0001            Customer enhancement: Pricing
    Keep the break point and try in the debugging in each and every exit and see which user exit is triggred.

  • Making parmanent changes to a internal table inside a user exit

    Hi All,
    I am having a User exit to which I am passing a structure as importing parameter.
    The user exit is not exporting the same structure, but is exporting some other values.
    My problem is that I want to make parmanent changes in the structure I am passing to the user exit.
    Currently what is happening:
    I am passing the structure to the user exit. It has got 6 rows. Inside the user exit I am making some changes to a particular field of all the rows. Till the program control is inside the user exit the changes in the structure are visible. As soon as the control come out of the user exit, the values for the field are switched to teh old values(values before passing to teh user exit).
    My question is, is there any method to make changes to a internal table inside a user exit and these changes are visible outside it when the program control come out of the user exit. (This is when the internal table to which the change is made in not exported by the user exit)

    Hi Dear,
    Your changes done in import parameters will not reflect outside exit. You can only change the values of export parameters...
    If you have very urgent requirement then make changes in SAP''s Standard code.
    For your problem you can write to SAP. In many cases SAP provides the solution.
    Award Points If Useful.

  • Cost center in FB01 - User exit or BADI

    Hi,
    I would like to change the cost center field data in transaction FB01 with some other data based upon some conditions.
    Please suggest with user exits or badi.
    thanks.

    Thanks for reply.
    In the user exits mentioned, checking for cost center value in the import parameter DOC_ITEM_TAB and based on some validations i have changed the it to other value. But this new value is not considered by the program still it is creating with the old value.
    The changed value has to be exported from the user exit right? this is not happening as we know dont have cost center field in export or changing parameters
    Please suggest

  • EXIT statement in custome exit

    Hi All,
    I have written EXIT statement in routine XXX of Sales order custom include MV45AFZZ.
    does this EXIT statement inside user exit do any internal commits or incorrect commits. Please explain.
    i heard that output of messages (except message type u201CAu201D) inside user exits triggers an incorrect commit work, the result
    *could be a loss of transactional integrity and possible data inconsistencies,
    Is this above statement is true. Please provide the links that could talk about commits in user exits.
    Thanks,
    Shaik

    hi
    jus have a look at this documentation
    http://help.sap.com/saphelp_nw04/helpdata/en/f1/0a56f5e09411d2acb90000e829fbfe/content.htm
    hope this helps
    regards
    Aakash Banga

  • User Exit or Badi for VF02 Transaction

    Hi Friends,
    I need to do Billing Date validation while chnging the Billing Document. so can u plz provide me some on the user exit which will get triggered for VF02 tran.
    I checked with some of the exit like,
    V61A0001
    V60P0001
    V60A0001
    V05N0001
    V05I0001
    SDVFX011
    SDVFX010
    SDVFX009
    SDVFX008
    SDVFX007
    SDVFX006
    SDVFX005
    SDVFX004
    SDVFX003
    SDVFX002
    SDVFX001 but nothing seems to be triggering for me. Plz help me...

    Hi Please find the below list of userexits.
    Exit Name           Description (VF02)
    J_3RSINV            Export sales
    SDVFX007            User exit: Billing plan during transfer to Accounting
    SDVFX008            User exit: Processing of transfer structures SD-FI
    SDVFX009            Billing doc. processing KIDONO (payment reference number)
    SDVFX010            User exit item table for the customer lines
    SDVFX011            Userexit for the komkcv- and kompcv-structures
    V05I0001            User exits for billing index
    V05N0001            User Exits for Printing Billing Docs. using POR Procedure
    V60A0001            Customer functions in the billing document
    V60P0001            Data provision for additional fields for display in lists
    V61A0001            Customer enhancement: Pricing
    LV60A001            vf

  • Export internal table to memory in User Exit FM

    Hi all,
    My scenario here is to export an internal table in one user exit FM and import it back in another user exit FM.
    I was trying to use
    Export lt_table to memory id 'LABEL'.
    then
    Import lt_table from memory id 'LABEL'.
    But then i hit error in the import statement. How can I rectify this?
    Thanks. Answer will be rewarded.

    Refer to the below related threads
    Export an internal table to memory and import from memory into an internal
    http://help.sap.com/saphelp_erp2005/helpdata/en/fc/eb3bf8358411d1829f0000e829fbfe/frameset.htm
    Regards,
    Santosh

  • Export from User exit.

    hi Guru's
    I am using this is a user exit:
    DATA: lv_diff TYPE n.
    lv_diff = TRUNC( wmara-mhdhb - lv_mhdhb ).
      EXPORT lv_diff TO MEMORY ID 'ZXXXXX'.
    and importing in a custom program:
    DATA: lv_diff TYPE n.
    IMPORT lv_diff FROM MEMORY ID 'ZXXXXX'.
    Th sy-subrc eq 0 in Export but not at import... I searched the forum and found I am doing right... why is this lv_diff not filled in import program?
    Thanks.

    Hi,
    Try using these statements..
    IMPORT <f1> TO <g1> <f2> TO <g2> ... FROM DATABASE dbtab <ar> ID <key>
    EXPORT <f1> TO <g1> <f2> TO <g2> ... TO DATABASE dbtab <ar> ID <key>

  • Using a variable not in the Export,Import, table Parameters in USER EXIT

    Hi all,
       During the Invoice Creation, I need to add an entry in the VBFS table, so that it will be displayed in the system log.  In the FM 'RV_INVOICE_CREATE', the structure corresponding to it is XVBFS.  There is a user-exit   CALL CUSTOMER-FUNCTION '002', in this FM 'RV_INVOICE_CREATE'.  But the import, export or Table Parameters does not have XVBFS.
      How can I use XVBFS inside the User exit?..
    Please help.
    Regards,
    Asha

    Hi,
    I dont know whether this will help u...
    write this in user exit...to access variables/tables of main program..
    FIELD-SYMBOLS: <komv>.
    ASSIGN ('(SAPLMEPO)TKOMV[]') TO <komv>.
    where.. SAPLMEPO is the main program...and TKOMV[] is a internal table in SAPLMEPO.
    regards
    Sukriti....

  • Export/Import Parameters dissapear when using user-exit

    I am using some import/export parameters in a dynamic action when I create a new record (infotype). I am also using a user exit to avoid modifying BEGDA and ENDDA when I modify the record (IPSYST = 'MOD'). Using this user-exit, the parameters dissapear from memory so the dynamic action does not execute well. What can I do to use the user-exit?? Anything to add?

    In the dinamic actions when I create, I delimit records on infotype with export/import parameters defined in infotype Module Pool. When I delete, I avoid deleting the record if it is not the last one. With the user-exit the modification of begda endda in infotype is not allowed. If I use the user-exit, the dinamic actions which use export/import parameters, don't work.
    I have tried to do in MP what I do in user-exit but it is not easy because I haven´t got in PSAVE what I want.

  • Export Control /Legal control: need user exit to customize

    I have a situation where I want to determine the export control license for a sales order. SAP uses the function module RV_EXPORT_CONTROL to carry out the required check.
    The FM uses the country defined for the ship-to-party as the destination country and carries  out checks to determine if there is an embargo for the good in the line item to destination country.
    My requirement is that the actual destination country or the ultimate destination country ( which is known and not same as the country of the ship to party ) be used to carry out the embargo check.
    I could not find any user exit/badi for the same. Is there a way to achieve this functionality. It has been hard coded in the FM. Can we do any customizing settings to achieve this? I could find two partner function EU ( End user for foreign trade ) and UC ( Ultimate Consignee )...can these be somehow used/ configured to achieve the desired functionality? Or is there any other different approach to the issue.
    Currently I plan to copy the standard FM and add my functionality. I will turn off the standard export control and then I i will call the custom FM in the end ( userexit_save ) as the export control is carried out at save.
    Any suggestion/approaches will be appreciated.

    I too have same issue,  from where the Fm  RV_EXPORT_CONTROL is triggering
    Edited by: erakarthi on Jul 14, 2011 8:44 AM

  • Statement not accessible in include called in a user-exit

    I am working on an upgrade project, and we receive an error 'Statement not accessible.
    In the following user exit:
    FUNCTION EXIT_SAPLZLWB_002.
    INCLUDE ZZLWBU02 .
    ENDFUNCTION.
    If I go to the include, I get an the error 'statement not accessible'.
    I tried to put all the code in the include between a form...endform statement,
    but then I get an incorrect nesting error because the form...endform is between a function...endfunction.
    How can I solve this?
    Thx!
    Edited by: christophe latinne on Jan 9, 2009 4:31 PM

    this seems to be a clone of a standard SAP function group, and thats why you can;t access the exits here.
    EXIT_SAPLZLWB_002
    you can create the exits starting with Z* in order to access those at runtime.

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

Maybe you are looking for

  • How do I remove a card from my apple account?

    I Added a pre paid gift card to my account that I had got for my birthday a while ago and spent some money, now, the card has no money on it but the iTunes Store and App Store require me to put in the security code and redeem my card again, i cannot

  • Apple Remote Desktop and Bluetooth

    Hi, does anyone know if Apple Remote Desktop can be connected between two computers over a bluetooth equipped Mac computers. Thank you very much.

  • Error IllegalArgumentException in java.sql.Date used PreparedStatement

    I'm found bug (probably). I have a table with column DATA type. Now I connect do database use JDBC in Java, and create PreparedStatement: PreparedStatement stmt = conn.prepareStatement("insert into \"Appuser\" (\"IDUser\", \"createAccountDate\") valu

  • Contract create screen

    We have a requirement to create a contract with reference to another contract. But we have a custom tab in the contract create screen. This information is stored in a custom table. So when I want to create the contract with reference to another contr

  • IPhoto 11 writes in Events "No photos"

    I have many pictures in iPhoto events. One week ago iPhoto doesn't open picteres in Event menu My pictures still availble in Pictures menu, but not availble at Events? Why?