Export list to SAP memory.

Hello experts,
I'm trying to excute the following sample:
http://www.geocities.com/mpioud/Z_EMAIL_ABAP_REPORT.html
I replaced the program in the SUBMIT STATEMENT with the name of my program which displays the reportt in an ALV format.
But my code gives me a dump on the submit statement and follwoing is the dump:
A RAISE statement in the program "CL_GUI_CONTROL================CP" raised the exception condition "CNTL_ERROR".                                                     
Since the exception was not intercepted by a superior program               
in the hierarchy, processing was terminated.                                
is there any other way i can export my list to the memory without using submit statement.

Hi Manoj this is wat the dump says:
The termination occurred in the ABAP program "CL_GUI_CONTROL================CP" 
in "SET_VISIBLE".                                                              
The main program was "ZP_PERSONALREPORT ".                                                                               
The termination occurred in line 18 of the source code of the (Include)         
program "CL_GUI_CONTROL================CM009"                                  
of the source code of program "CL_GUI_CONTROL================CM009" (when       
calling the editor 180).                                                                               
Source code extract                                                                               
000010                                                                          
000020   METHOD SET_VISIBLE .                                                   
000030   * (visible)                                                            
000040                                                                          
000050     data: temp_visible(1).                                               
000060     temp_visible = cl_gui_control=>visible_true.                         
000070     case visible.                                                        
000080       when '1'.                                                          
000090       when 'X'.                                                          
000100       when 'x'.                                                          
000110       when 'TRUE'.                                                       
000120       when others.                                                       
000130         temp_visible = cl_gui_control=>visible_false.                    
000140     endcase.                                                             
000150                                                                          
000160   * check handle                                                         
000170     IF ME->H_CONTROL IS INITIAL.                                         
     >       RAISE CNTL_ERROR.                                                  
000190     ENDIF.                                                               
000200                                                                          
000210   * set properties                                                       
000220     CALL METHOD SET_WINDOW_PROPERTY                                      
000230          EXPORTING                                                       
000240            PROPERTY_ID    = CL_GUI_CONTROL=>PROPERTY_VISIBLE             
000250            VALUE          = temp_VISIBLE                                 
000260          EXCEPTIONS                                                      
000270            CNTL_ERROR = 1                                                
000280            CNTL_SYSTEM_ERROR = 2                                         
000290            OTHERS = 3.                                                   
000300     CASE SY-SUBRC.                                                       
000310       WHEN 0.                                                            
000320       WHEN 1. RAISE CNTL_ERROR.

Similar Messages

  • 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

  • Will SUBMIT report EXPORTING LIST TO MEMORY work, when Run in Background?

    You can use SUBMIT <report> EXPORTING LIST TO MEMORY, and then Call the FM LIST_FROM_MEMORY to get the Data.
    This works fine, when the Program is Run in Foreground. My question is, will it work when I Run the Program in Background? i.e. When I Run the Program in Background, will the SUBMIT Statement, Export the List to Memory? Because only then the FM LIST_FROM_MEMORY will get the Data.
    Any alternate solution to meet the same requirement will be appreciated.

    It works for me... my spool output looked like:
    11.01.2008          JC: Calling program - test list to memory                  1                                                                               
    ZLOCAL_JC_SDN_CALLING_PROGRAM                started at 12:54:29                        
    ZLOCAL_JC_SDN_CALLING_PROGRAM                call complete 12:54:30                     
    ZLOCAL_JC_SDN_CALLING_PROGRAM                started at 12:54:30                                                                               
    11.01.2008           JC: Called program - testing list to memory                                                                               
    ZLOCAL_JC_SDN_CALLED_PROGRAM                 was called at: 12:54:29                    
    for the following code:
    report zlocal_jc_sdn_calling_program.
    parameters:
      p_start(1)            type c.
    start-of-selection.
      perform testcase.
    *&      Form  testcase
    form testcase.
      data:
       lt_list              type table of abaplist.
      write: / sy-repid, 'started at', sy-uzeit.
      submit zlocal_jc_sdn_called_program
        exporting list to memory
        and return.
      write: / sy-repid, 'call complete', sy-uzeit.
      call function 'LIST_FROM_MEMORY'
        tables
          listobject = lt_list.
      write: / sy-repid, 'started at', sy-uzeit.
      call function 'WRITE_LIST'
        tables
          listobject = lt_list.
    endform.                    "testcase
    and
    report zlocal_jc_sdn_called_program.
    start-of-selection.
      write: / sy-repid, 'was called at:', sy-uzeit.

  • Submit  ALV report in Background & exporting list to memory and return

    Dear all,
    I created one Z program (ZPROGRAM2). 
    Here i use SUBMIT ZPRORAM1_ALV exporting list to memory and return.
    call function 'LIST_FROM_MEMORY'.
    call function 'TABLE_COMPRESS' .
    ZPRORAM1_ALV output i send mail.
    This all are working in foreground.
    If i schedule ZPROGRAM2 in background. that SUBMIT ZPRORAM1_ALV statement not working.
    Please give me the Solution.
    Thanks,
    Durai.V

    It is because of the ALV output that you are using. Check the condition sy-batch = 'X' (background processing) and then display a classical report. It will work then.
    Thanks,
    Jayant

  • Submit program exporting list to memory and return in background

    Dear Experts,
    I am using the following code in one of my program to get opening and closing stock of a material.
    SUBMIT RM07MLBD
             WITH MATNR IN LOC_R_MATNR
             WITH WERKS IN LOC_R_WERKS
             WITH DATUM IN LOC_R_DATE
             WITH PA_SUMFL = WL_X
             AND RETURN
             EXPORTING LIST TO MEMORY.
    The program is working fine when executed in foreground. however when executed in background the job is cancelled. I tried to debug in background through SM50 and found that the program is terminated(No short dump but debug screen is closed and i dont see this program running in SM50) when the above code is executed.
    I found in the forum that when an ALV report is submitted in background it does not work. In my case the standard program is producing an ALV list (not ALV grid though).
    How would i avoid this situation because the program i am submitting is a standard program.
    What is the best solution to avoid from background jobs being cancelled when the above code is executed. Is there an alternate way that i can use to submit the program  and get data.
    Thanks in advance.
    Rajesh.

    Hi Rajesh,
    Just excute your standard program with the same input in back ground mode and check
    out put is coming or not .
    If output is not coming search by sy-batch and make the break points there and Ideantify
    the problem.
    When you execute the standard program  in back ground mode If the output is come it should in your Zreport also.
    I tried in my system in background mode also the output is coming for me.
    Thnx,
    Sam.

  • In internal sessions sap memory will not use {export to...} statment

    SAP memory does not use "Export tou2026" statement for internal sessions

    hi,
    ABAP memory
    Within the same internal session
    SAP memory
    Across internal sessions
    IN SAP MEMORY
    SET PARAMETER ID <pid> FIELD <f>.-     Writes the contents of the field f to the global SAP memory under the key pid . If the key already contains a value, it is overwritten. 
    GET PARAMETER ID <pid> FIELD <f>.-     Transfers the value stored under the key pid from the global user-related SAP memory to the field f .
    IN ABAP memory
    EXPORT obj1 ... objn TO MEMORY.
    IMPORT f itab FROM MEMORY.
    hope it may help you.
    Thanks
    Sachin

  • Need help in Exporting list to memory and return in background

    Hello Experts,
    I have a program which reads data from mc.9 by exporting list to memory.When I run it in foreground its working fine . However if I schedule it as a  background program it is unable to get list from memory.
    Any help will be appreciable.
    Thank you

    Hi jayaram,
    I tried to do as you said. Its creating spool request and status to completed (sm37 instead of sm36 bcoz i don't hv authorization in production server). Now I didn't see any errors in job log. But data coming to ztable is as usual ( all are ZEROS).
    Hey when i tried doing it as below
      SUBMIT RMCB0300 WITH SL_WERKS-LOW = P_WERKS
                      WITH SL_LGORT = 'W001'
                      WITH SL_SPMON-LOW = P_FPERIOD
                      WITH SLV_NO = 'MC.9N'
                      WITH SL_SPMON-HIGH = P_FPERIOD EXPORTING LIST TO MEMORY AND RETURN .
      CALL FUNCTION 'LIST_FROM_MEMORY'
        TABLES
          LISTOBJECT = LISTOBJECT
        EXCEPTIONS
          NOT_FOUND  = 4
          OTHERS     = 8.
      IF SY-SUBRC <> 0.
        if SY-SUBRC = 4.
          message 'not_found' type 'i'.
        ELSEIF SY-SUBRC = 8.
          message 'others' type 'a'.
        endif.
      ENDIF.
    I found that my job with completed status but with in job log i found error of type I means that the error is with notfound type in exceptions.
    Hey sorry for the postings may be due to some issues Im unable to see what i have replied in postings that's why im posting repeatedly..
    Edited by: Praveen Pathuri on Apr 23, 2009 7:30 AM
    Edited by: Praveen Pathuri on Apr 23, 2009 7:55 AM

  • "EXPORTING LIST TO MEMORY"  doesn't work

    Hi experts!
    In my program I need to update a vew deliveries using transaction VT04 and get from log numbers of updated deliveries. My code is:
    SUBMIT RV56TRGN USING SELECTION-SET 'VAN SALE/VT04'
    EXPORTING LIST TO MEMORY AND RETURN.
    CALL FUNCTION 'LIST_FROM_MEMORY'
    TABLES
    listobject = list_tab
    EXCEPTIONS
    not_found = 1
    OTHERS = 2.
    I get error:
    "Set screen is not allowed in subscreens"
    But when I run code:
    SUBMIT RV56TRGN USING SELECTION-SET 'VAN SALE/VT04' AND RETURN.
    It runs OK.
    Where may be the problem?

    test

  • Problems with SUBMIT and EXPORTING LIST TO MEMORY

    Hi,
    I have a program that executes another report using a submit call, then the output of this submit is retrieved to the program using the LIST_TO_MEMORY FM. Source code it's something like this:
    SUBMIT rptime00
                 EXPORTING LIST TO MEMORY AND RETURN
                 WITH SELECTION-TABLE t_params
                 USER 'my_user'.
    CALL FUNCTION 'LIST_FROM_MEMORY'
         TABLES
             listobject = t_table
         EXCEPTIONS
             not_found  = 1
             OTHERS     = 2.
    This code works fine if I execute the program in foreground. But when I try to execute the report in background (F9 instead of F8 for example), submit works fine but LIST_FROM_MEMORY returns a NOT FOUND exception instead of the output of submitted program.
    So, is it possible to retrieve the output of a program called via submit when the report that executes the submit is executed in background?, how can I retrieve the output of submit when the report is executed in background?
    thanks in advance

    try
    SUBMIT rptime00
                 EXPORTING LIST TO MEMORY AND RETURN
                 WITH SELECTION-TABLE t_params.
    without user
    hope that helps
    Andreas

  • Export list object to xxl in sap

    Dear Team
    when downloading to spread sheet , i unknowingly pressed the "Always use selected format". Now i am getting the pop up for export list object to xxl. i want it to deactivated and and want the "option of select format"
    please help me.
    Regards
    Hamsa Jananee

    Hi Hamsa Jananee
    You do following:
    Re: "Always Use Selected Format" check box in line items report
    and
    Re: Export to excel popup after SP upgrade
    Hope it helps.
    Thanks and Regards,

  • SAP Memory, Set and Get parameter

    Hi All,
         I am running two programs in background from program1
    Eq: Program1 --> Calls 2 programs
                              Program1_01.(First Program)
                              Program2_01(Second Program).
    Programs1 schedules Program1_01 and Program1_02 in background. These two programs are interdependent.
    Program1_01 extracts data, evaluates and sets the Flag. This Flag is exported to SAP Memory using
    Set parameter id 'p_id_flag' field Flag.
    Program1_02 checks for Program1_01 is completed in background. If complted gets the Flag value from SAP Memory using "Get paramter id 'p_id_flag' field Flag.
    When i checked this is not happning. When saw Flag in Program1_01 is set as Flag = 'X'.
    When I came and checked in Program1_02 after Get Parameter statement Falg value is SPACE.
    Cn hlp on this?

    Hi,
    The problem simply lies in fact that pid was provided in lowercase.
    Use:
    SET PARAMETER ID 'P_ID_FLAG' FIELD flag.
    GET PARAMETER ID 'P_ID_FLAG' FIELD flag.
    It works fine then.
    Note!
    Though SAP claims it is mandatory to create pid in TPARA table, in fact this is not required. Each time SET PARAMETER is executed, system checks if data object P_ID_FLAG was defined in SAP memory. If not it will automatically create it for us. But be carefull here. If there is such data object, its value will be overwritten.
    As for your last question, your statement (FREE MEMORY ....) is ok.
    Regards
    Marcin
    Edited by: Marcin Pciak on Jan 22, 2009 1:14 PM

  • How to remove a grobal parameter in SAP memory

    As known to all, we can use SET/GET PARAMETER to pass parameters among multiple programs.
    Now I'm just curious about how to remove a grobal parameter in SAP memory, and how can I get the list of all grobal parameter in SAP memory.
    Any idea?

    Hi william,
    1. how to remove a grobal parameter in SAP memory
      Well, i dont think we can REMOVE.
       At most, we can RESET it to blank(initial)
    2. set parameter  id 'BUKRS' FIELD ''.
    regards,
    amit m.

  • SAP Memory

    hi all,
    Please tell me the code for passing a particular flag value to a SAP memory . Then calling the memory at any other location and freeing the memory thereafter.
    Also please let me know the code for disabling/enabling  a particular screen field .
    Thanks ,
    Paul

    To fill the input fields of a called transaction with data from the calling program, you can use the SPA/GPA technique. SPA/GPA parameters are values that the system stores in the global, user-specific SAP memory. SAP memory allows you to pass values between programs. A user can access the values stored in the SAP memory during one terminal session for all parallel sessions. Each SPA/GPA parameter is identified by a 20-character code. You can maintain them in the Repository Browser in the ABAP Workbench. The values in SPA/GPA parameters are user-specific.
    <b>SPA/GPA Parameters as Default Values</b>
    The SPA/GPA Parameter Technique is a general procedure for filling the initial screen when a program is called. To use this technique for parameters on selection screens, you must link the parameter to an SPA/GPA parameter from the SAP memory as follows:
    PARAMETERS <p> ...... MEMORY ID <pid>......
    If you use this addition, the current value of SPA/GPA parameter <pid> from the global user-related SAP memory is assigned to parameter <p> as a default value. Description <pid> can contain a maximum of twenty characters and must not be enclosed in quotation marks.
    REPORT DEMO.
    <b>PARAMETERS TEST(16) MEMORY ID RID.</b>
    ABAP programs can access the parameters using the SET PARAMETER and GET PARAMETER statements.
    To fill one, use:
    <b>SET PARAMETER ID <pid> FIELD <f>.</b>
    This statement saves the contents of field <f> under the ID <pid> in the SAP memory. The code <pid> can be up to 20 characters long. If there was already a value stored under <pid>, this statement overwrites it. If the ID <pid> does not exist, double-click <pid> in the ABAP Editor to create a new parameter object.
    To read an SPA/GPA parameter, use:
    <b>GET PARAMETER ID <pid> FIELD <f>.</b>
    <b>Passing Data Between Programs</b>
    There are two ways of passing data to a called program:
    Passing Data Using Internal Memory Areas
    There are two cross-program memory areas to which ABAP programs have access (refer to the diagram in Memory Structures of an ABAP Program) that you can use to pass data between programs.
    <b>SAP Memory</b>
    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 (see below).
    <b>ABAP Memory</b>
    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. For further information, refer to Data Clusters in ABAP Memory.
    Filling Input Fields on an Initial Screen
    Most programs that you call from other programs have their own initial screen that the user must fill with values. For an executable program, this is normally the selection screen. The SUBMIT statement has a series of additions that you can use to fill the input fields of the called program:
    Filling the Selection Screen of a Called Program
    You cannot fill the input fields of a screen using additions in the calling statement. Instead, you can use SPA/GPA parameters. For further information, refer to Filling an Initial Screen Using SPA/GPA Parameters.
    regards
    vinod

  • Examples for SAP Memory and ABAP Memory

    Hi all,
        can u give me one example of sap memory and abap memory.
                                              Ranjith

    Hi,
    <b>SAP Memory</b>
    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 at the time of logon 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 .
    <b>example:</b>
    ABAP programs can access the parameters using the SET PARAMETER and GET PARAMETERstatements.
    To fill one, use:
    SET PARAMETER ID pid FIELD f
    This statement saves the contents of field f under the ID pid in the SAP memory. The ID pid can be up to 20 characters long. If there was already a value stored under pid, this statement overwrites it. If you double-click pid in the ABAP Editor, parameters that do not exist can be created as a Repository object.
    To read an SPA/GPA parameter, use:
    GET PARAMETER ID pid FIELD f.
    This statement places the value stored under the pid ID into the variable f. If the system does not find any value for pid in the SAP memory, sy-subrc is set to 4. Otherwise, it sets the value to 0.
    <b>ABAP Memory</b>
    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 memory area remains throughout a sequence of program calls, with the exception of LEAVE TO TRANSACTION. To pass data to a program that you are calling, the data needs to be placed in ABAP memory before the call is made from the internal calling session using the EXPORT statement. The internal session of the called program then replaces that of the calling program. The program called can then read from the ABAP memory using the IMPORT statement. If control is then returned to the program that made the initial call, the same procedure operates in reverse.If a transaction is called using LEAVE TO TRANSACTION, the ABAP memory and the call stack are deleted. They cannot be used for data transfer.
    Since objects belonging to ABAP objects can only be accessed within an internal session, it does not make sense and is therefore forbidden (from a syntax point of view) to pass a reference to an object to a calling program through the ABAP memory.
    <b>Example:</b>
    Export hello to memory id 'Hello_world'.
    Import hello from memory id 'Hello_world'
    Regards
    Sudheer

  • ABAP / SAP memory

    Hi Friends,
    Kindly give me  sample programs, for ABAP Memory and SAP memory.
    TIA.
    Regards,
    MARK K

    Hi,
    DATA TEXT1(10) VALUE 'Exporting'.
    DATA ITAB LIKE SBOOK OCCURS 10 WITH HEADER LINE.
    DO 5 TIMES.
      ITAB-BOOKID = 100 + SY-INDEX.
      APPEND ITAB.
    ENDDO.
    EXPORT TEXT1
           TEXT2 FROM 'Literal'
      TO MEMORY ID 'text'.
    EXPORT ITAB
      TO MEMORY ID 'table'.
    In this example, the text fields TEXT1 and TEXT2 are stored in the ABAP memory of program SAPMZTS1 under the name "text". The internal table ITAB is stored under the name "table".
    DATA TEXT1(10) VALUE 'Exporting'.
    DATA ITAB LIKE SBOOK OCCURS 10 WITH HEADER LINE.
    DO 5 TIMES.
      ITAB-BOOKID = 100 + SY-INDEX.
      APPEND ITAB.
    ENDDO.
    EXPORT TEXT1
           TEXT2 FROM 'Literal'
      TO MEMORY ID 'text'.
    EXPORT ITAB
      TO MEMORY ID 'table'.
    SUBMIT SAPMZTS2 AND RETURN.
    SUBMIT SAPMZTS3.
    The first part of this program is the same as the example in the section Saving Data Objects in Memory. In the example, the programs SAPMZTS1 and SAPMZTS2 are called using SUBMIT. You can create and maintain the programs called using the SUBMIT statement by double-clicking their names in the statement. For further information about the SUBMIT statement, refer to Calling Executable Programs (Reports)
    Example for SAPMZTS2:
    PROGRAM SAPMZTS2.
    DATA: TEXT1(10),
          TEXT3 LIKE TEXT1 VALUE 'Initial'.
    IMPORT TEXT3 FROM MEMORY ID 'text'.
    WRITE: / SY-SUBRC, TEXT3.
    IMPORT TEXT2 TO TEXT1 FROM MEMORY ID 'text'.
    WRITE: / SY-SUBRC, TEXT1.
    Example for SAPMZTS3:
    PROGRAM SAPMZTS3.
    DATA JTAB LIKE SBOOK OCCURS 10 WITH HEADER LINE.
    IMPORT ITAB TO JTAB FROM MEMORY ID 'table'.
    LOOP AT JTAB.
      WRITE / JTAB-BOOKID.
    ENDLOOP.
    DATA: TEXT(10) VALUE '0123456789',
          IDEN(3)  VALUE 'XYZ'.
    EXPORT TEXT TO MEMORY ID IDEN.
    TEXT = 'xxxxxxxxxx'.
    IMPORT TEXT FROM MEMORY ID IDEN.
    WRITE: / SY-SUBRC, TEXT.
    FREE MEMORY.
    TEXT = 'xxxxxxxxxx'.
    IMPORT TEXT FROM MEMORY ID IDEN.
    WRITE: / SY-SUBRC, TEXT.
    The output is
    0 0123456789
    4 xxxxxxxxxx
    The FREE MEMORY statement deletes the data cluster "XYZ". Consequently, SY-SUBRC is 4 after the following IMPORT statement, and the target field remains unchanged.
    sap memory
    TABLES SBOOK.
    START-OF-SELECTION.
      WRITE: 'Select a booking',
      SKIP.
    GET SBOOK.
      WRITE: SBOOK-CARRID, SBOOK-CONNID,
             SBOOK-FLDATE, SBOOK-BOOKID.
      HIDE:  SBOOK-CARRID, SBOOK-CONNID,
             SBOOK-FLDATE, SBOOK-BOOKID.
    AT LINE-SELECTION.
      SET PARAMETER ID: 'CAR' FIELD SBOOK-CARRID,
                        'CON' FIELD SBOOK-CONNID,
                        'DAY' FIELD SBOOK-FLDATE,
                        'BOK' FIELD SBOOK-BOOKID.
      CALL TRANSACTION 'BOOK'.
    Thanks, 
    Das............

Maybe you are looking for

  • Sold to party showing editble mode in sales contract

    Hi all, I created a sales contract and followed by sales order, delivery billing the movement i am checking sales contract SOLD TO Party its showing editable  mode in contract over view screen and i check in header  partners it showing sold to party

  • IPhone\iTunes in the Enterprise

    We are looking into deploying iPhones into our environment. Presently we do not have iTunes on any of our systems. Got around the activation delema using Apple info, which was great... My question is as follows: If a member takes the iPhone that is a

  • Insert Statement is not working in Oracle Form

    Hi all, I have developed a custome form from the scarch. I have one button on that for called "PROCESS" when I cick on the PROCESS button it should insert record in to one custome table. I have created custom table in custom schema and given grant to

  • HT204053 I only have mobile me in my system preferences and not icloud, how do I set this up on my macbook

    Hi, I am having problems conecting my iphone to my computer, there is a problem with the connection. I have signed up for Icloud on my phone and have purchased more storage. I am having trouble syncing all of it together. In my system pref I only hav

  • Macy's Card Approval

    I was supposed to be gardening (dang!) but the Macy's card was the last card I actually really wanted (only because at my lowest low in my credit journey, I was denied by them MORE than once) and today, I got it! It's only a $600 limit (I've got scor