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.

Similar Messages

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

  • 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

  • Import/Export - How to get Quick Access Token?

    I am trying to create/submit an import/export job for the azure storage.  I located the place to activate the import/export service in the Preview Features.
    After clicking "Try it Now" button, I am prompted for the subscription name (no problem), but it is also asking for a Quick Access Token". 
    How / Where do I get the Quick Access Token?  There is an article about getting tokens from the API, but that does not appear to be related to my issue.
    Any help is greatly appreciated.
                Windows Azure Import/Export Service         
    Charges may be included
    <label for="subscription-selector">Subscriptions</label>             <select id="subscription-selector"><option selected="selected" value="06608935-fe6f-4336-bc3c-0239aae71ebf">Pay-As-You-Go</option><option
    value="167d8420-6b2f-4764-86a3-2e3b6eb39d18">SDI</option></select>        
    <label for="token">Quick Access Token                </label><input id="token" type="text" value="" />            
    You will receive an e-mail when this feature is enabled for your subscription.

    hi Dwight,
    From error message, I guess your subscription may didn't enable this features. I suggest you contact our azure support team to solve this question.
    SUPPORT CHANNEL:
    Please contact support team by creating a support ticket at http://www.windowsazure.com/en-us/support/contact/
    Or if that doesn't work because you don't have an active subscription you will need to contact general customer support to have them create a support ticket for you
    http://support.microsoft.com/gp/customer-service-phone-numbers?wa=wsignin1.0
    Please try it. Any questions, please let me know free.
    Regards,
    Will
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

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

  • Submit and return exporting list to memory is not working in background

    Hi gurus,
    i am using submit statement and exporting list to memory. it works fine in foreground and i am able to get the output. but in case of background , it is not exporting the list.PLease help me on this.
    Thanks and regards,
    Rajeshwar

    Hello Rajeshwar,
    This is a duplicate thread. You have a thread with the same question.
    [list_to_memory is not working in background;
    Jayant Sahu

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

  • What license is required for import/export AcroForms and Submit button

    I want to know what kind of license do I need to programmatically interact with AcroForms and AcroFields for a asp.net web application.
    I use a third party software (Aspose) to import/export AcroField data value and also dynamically modify some of the fields.
    I also want to place a Submit button on the PDF so users can submit field data to a web server with free PDF readers.
    Have anyone done this before?

    Here are the steps I'm invisioning:
    1. The PDF form template is created with Acrobat Pro and Reader Rights is DISABLED.
    2. The user logins in to a web page and then clicks on a link to download the PDF template.
    3. Before the PDF is streamed to the client browser, the PDF template is modified with Aspose to fill in some personalized user data.
    4. User downloads a PDF with his/her data pre-filled.
    5. User saves and opens the PDF with PDF reader, fill in some more data and clicks on the Submit button on PDF.
    6. Submit button sends all the AcroFields that has data filled in back to a web server.
    7. Server processes the data accordingly.
    So, will a regular Acrobat Pro license be enough for this use?

Maybe you are looking for

  • Cant log in to my wrt150N router after hard reset with default login

    Hello all, I have a router that I upgraded the firmware a while ago, I stopped using it several months ago, I was going to give this router to my sister,  i tried a hard reset(30 seconds press reset, unplug, hold hold the reset, wait 20 sec, plug pow

  • Workflows | Defining sub-workflows and capturing wfActions

    Hi All, I am trying to define a sub-workflow post which I want to make a jump based on the action taken in the one step sub-workflow. I tried to use the wfActions to find the action taken at a step, but the applet shows the following error: Offset in

  • Connecting external 56k modem to ISP

    Hello, I'm new with Solaris 10 and x86. I have a Sportster MessagePlus Pro V90 PnP 3com u.s. robotics (56k Professional Message Modem) attached to Com1 port. I'd want to connect this analogic modem to ISP for navigate.I read the guide System Administ

  • Should I enable OS X built-in firewall ?

    Coming from a Windows platform I am adjusting to OS X security. I noticed that the Mac's firewall is disabled by default and got me thinking as to why ? On Windows you had it configured for both home and public networks. Do you recommend to enable OS

  • Is it possible to Aperture Library by copying over the Contents?

    Hi, My new Drobo 5D is having issues, and i'm not able to copy the Aperture File Directly over directly as its 530GB and the hard drive keeps failing in the last 30GB or so. so I was wondering is it possible to copy over the contents bit by bit by us