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.

Similar Messages

  • 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

  • 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

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

  • 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

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

  • Submit program - send list via email

    Hi all,
    i want to submit a program in my coding and the result (list) should be sent via email...
    I need a sample coding...
    regards

    Hi !
    consider following program as example
    TYPE-POOLS : slis.
    DATA:
      l_datum TYPE sy-datum,
      ls_docdata    TYPE sodocchgi1,
      lt_objpack    TYPE TABLE OF sopcklsti1 WITH HEADER LINE,
      lt_objhead    TYPE TABLE OF solisti1   WITH HEADER LINE,
      lt_objtxt     TYPE TABLE OF solisti1   WITH HEADER LINE,
      lt_objbin     TYPE TABLE OF solisti1   WITH HEADER LINE,
      lt_reclist    TYPE TABLE OF somlreci1  WITH HEADER LINE,
      lt_listobject TYPE TABLE OF abaplist   WITH HEADER LINE,
      l_tab_lines TYPE i,
      l_att_type  LIKE soodk-objtp.
    DATA: name(60).
    RANGES  s_vorne FOR blpk-vorne.        " Rep Opr No
    SUBMIT zirpt_daily_cost
                  WITH  p_werks EQ p_werks
                  WITH  p_udate EQ p_udate
                  WITH  p_bno EQ p_bno
                  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.
      IF sy-subrc <> 0.
      Error in function module &1
        MESSAGE ID '61' TYPE 'E' NUMBER '731'
           WITH 'LIST_FROM_MEMORY'.
      ENDIF.
    Because listobject is of size RAW(1000)
    and objbin is of size CHAR(255) we make this table copy
      CALL FUNCTION 'TABLE_COMPRESS'
        TABLES
          in             = lt_listobject
          out            = lt_objbin
        EXCEPTIONS
          compress_error = 1
          OTHERS         = 2.
      IF sy-subrc <> 0.
      Error in function module &1
        MESSAGE ID '61' TYPE 'E' NUMBER '731'
           WITH 'TABLE_COMPRESS'.
      ENDIF.
    NOTE: Creation of attachment is finished yet.
    For your report, the attachment should be placed into table
    objtxt for plain text or
    objbin for binary content.
    Now create the message and send the document.
    Create Message Body
    Title and Description
    l_datum = sy-datum - 1.
      l_datum = p_udate - p_bno .
      dd = l_datum+6(2).
      mm = l_datum+4(2).
      yy = l_datum(4).
      ls_docdata-obj_name = 'Cost Report'.
      CONCATENATE  p_subj '&Parameter= ' dd '/' mm '/' yy
           INTO ls_docdata-obj_descr .
    Main Text
      lt_objtxt = 'Daily Cost Report'. "ls_docdata-obj_descr.
      APPEND lt_objtxt.
    Write Packing List (Main)
      DESCRIBE TABLE lt_objtxt LINES l_tab_lines.
      READ TABLE lt_objtxt INDEX l_tab_lines.
      ls_docdata-doc_size = ( l_tab_lines - 1 ) * 255 + STRLEN( lt_objtxt ).
      CLEAR lt_objpack-transf_bin.
      lt_objpack-head_start = 1.
      lt_objpack-head_num = 0.
      lt_objpack-body_start = 1.
      lt_objpack-body_num = l_tab_lines.
      lt_objpack-doc_type = 'RAW'.
      APPEND lt_objpack.
    Create Message Attachment
    Write Packing List (Attachment)
      l_att_type = 'ALI'.
      DESCRIBE TABLE lt_objbin LINES l_tab_lines.
      READ TABLE lt_objbin INDEX l_tab_lines.
      lt_objpack-doc_size = ( l_tab_lines - 1 ) * 255 + STRLEN( lt_objbin ).
      lt_objpack-transf_bin = 'X'.
      lt_objpack-head_start = 1.
      lt_objpack-head_num = 0.
      lt_objpack-body_start = 1.
      lt_objpack-body_num = l_tab_lines.
      lt_objpack-doc_type = l_att_type.
      lt_objpack-obj_name = 'ATTACHMENT'.
      lt_objpack-obj_descr = 'FLASH REPORT'.                    "#EC *
      APPEND lt_objpack.
      READ TABLE email INDEX 1.
      IF sy-subrc = 0.
        LOOP AT email.
          lt_reclist-receiver = email-low.
          lt_reclist-rec_type = 'U'.
          lt_reclist-com_type = 'INT'.
          APPEND lt_reclist.
        ENDLOOP.
      ENDIF.
      READ TABLE cmail INDEX 1.
      IF sy-subrc = 0.
        LOOP AT cmail.
          lt_reclist-receiver = cmail-low.
          lt_reclist-rec_type = 'U'.
          lt_reclist-com_type = 'INT'.
          lt_reclist-copy     = 'X'.
          APPEND lt_reclist.
        ENDLOOP.
      ENDIF.
    Send Message
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = ls_docdata
          put_in_outbox              = 'X'
          commit_work                = 'X'
        TABLES
          packing_list               = lt_objpack
          object_header              = lt_objhead
          contents_bin               = lt_objbin
          contents_txt               = lt_objtxt
          receivers                  = lt_reclist
        EXCEPTIONS
          too_many_receivers         = 1
          document_not_sent          = 2
          document_type_not_exist    = 3
          operation_no_authorization = 4
          parameter_error            = 5
          x_error                    = 6
          enqueue_error              = 7
          OTHERS                     = 8.
      IF sy-subrc = 0.
      Document sent
        MESSAGE ID 'SO' TYPE 'S' NUMBER '022'.
        SUBMIT rsconn01 WITH mode = 'INT'
                   WITH OUTPUT = 'X'
                    AND RETURN.
      ELSE.
      Document <&> could not be sent
        MESSAGE ID 'SO' TYPE 'S' NUMBER '023'
           WITH ls_docdata-obj_name.
      ENDIF.
    ENDFORM.                    " f_send_mail

  • 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

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

  • EXPORTING LIST TO MEMORY / LIST_FROM_MEMORY / LIST_TO_ASCI    ?

    Hi  Guys
    I am trying to export a list to memory with the help of function module LIST_FROM_MEMORY downloading it from the memory. But its not in readable format.  Then i am LIST_TO _ASCI  functionmodule  and i am pulling data into internal table..
      when i am doing this there are some fields are blank. i am not getting the  one field value ?
       can anyone explain me ?
    Thanks in advance ..

    because it was blank or initial in database or in the list?

  • Export list of artists and their albums?

    I am trying to export a list of artists and albums on my classic. I can find the Library/Export Library to xml which is way more data than I need in a format I don't, and the Library/Export Playlist to txt which is also way more data and in such an unformatted manner I don't know how to use it.
    Is there a way to just get a list of the Artists and which Albums are in iTunes? Either by using the methods above in some way you'll need to explain, or another way?
    Thank you.

    I figured out how to bring the txt into Excel and clean it up so it only has what I want.

  • Export list of users and passwords for migration to new domain

    Hello,
    i am in the planning phases of moving a SBS2008 domain to Windows Server 2012 AD domain.  i have looked into ADMT but it refuses to install on SBS2008 (error: not a valid win32 application).  is there another avenue i can look into that will help
    me export all SBS domain users and their passwords, and import them into my 2012 domain?
    cheers,
    Jonathan Horne

    Hi,
    Regarding your request, if you want to migrate SBS 2008 to Windows Server 2012 Standard, please refer to the following article.
    Transition from Small Business Server to Standard Windows Server
    http://blogs.technet.com/b/infratalks/archive/2012/09/07/transition-from-small-business-server-to-standard-windows-server.aspx
    As it mentioned, you could first join the Windows Server 2012 Standard server to the current SBS domain and promote it as an additional DC, then it will have the user objects on it.
    Hope it helps.
    Best Regards,
    Andy Qi
    TechNet Subscriber Support
    If you are
    TechNet Subscription user and have any feedback on our support quality, please send your feedback
    here.
    Andy Qi
    TechNet Community Support

  • How To Skip Report of Submit Program

    Hello All,
    I am submitting a Report program from a Program and should return to the calling program after processing.
    I have used  SUBMIT program WITH Parameters
                                                    AND RETURN .
    with this syntax, report of the submit program is displayed first, followed by the report of main program. I do not want the list of submit program to be displayed. How can I skip the same? Please advice.
    Thanks in advance,
    Pallavi.

    Hi Pallavi,
    Use SUBMIT Program  EXPORTING LIST TO MEMORY
              AND  RETURN.
    To use this data of the submitted report follow below process.
    Than once you return to ur main program CALL FUNCTION 'LIST_FROM_MEMORY'
    than to conver this list to text format  CALL FUNCTION 'LIST_TO_ASCI'
    Finally dont forget to use CALL FUNCTION 'LIST_FREE_MEMORY'.
    Regards,
    Ganesh.
    Edited by: Ganesh Lathi on Oct 4, 2011 1:45 PM

  • How to call list from memory after submitting RCS13001

    Can anyone help me with this problem? I am submitting RCS13001 and using option exporting list to memory and return. It was successfully displayed the ALV list (which I don't want to see) and return to the caller program. Then when calling function list_from_memory, it short dumped/returned nothing. It seems that nothing is saved in the memory when submitting the program.
    So what I want to get now is call RCS13001 and process the data, don't display the ALV report but save it in memory, and then collect the memory for output.
    Any help is appreciated and points awarded. Thanks in advance
    Regards,
    Eric
    Code:
            SUBMIT ZRCS13001
              WITH PM_MTNRV INCL v_matnr
              WITH PM_WERKS INCL p_werks
              WITH PM_STLAL INCL p_stlal
              WITH PM_CAPID INCL p_capid
              WITH PM_DATUV INCL p_datuv
              WITH PM_EMENG INCL v_emeng
              EXPORTING LIST TO MEMORY
              AND RETURN.
        CALL FUNCTION 'LIST_FROM_MEMORY'
          TABLES
            LISTOBJECT       = alv_stb
        EXCEPTIONS
          NOT_FOUND        = 1
          OTHERS           = 2

    Hi Eric,
    Please check Rich's sample code.
    report zrich_0003 .
    data: begin of listout occurs 0,
          line(1024) type c,
          end of listout.
    * Submit the report and export list to memory
    submit z_your_report exporting list to memory
                and return.
    * Get list from memory and convert to ascii
    perform retrieve_list_from_memory tables listout.
    loop at listout.
      write:/ listout.
    endloop.
    * RETRIEVE_LIST_FROM_MEMORY
    form retrieve_list_from_memory tables reportlines.
      data: list like abaplist occurs 0 with header line.
      data: txtlines(1024) type c occurs 0 with header line.
      clear list.  refresh list.
      clear reportlines. refresh reportlines.
      call function 'LIST_FROM_MEMORY'
           tables
                listobject = list
           exceptions
                not_found  = 1
                others     = 2.
      check sy-subrc = 0.
      call function 'LIST_TO_ASCI'
           tables
                listobject         = list
                listasci           = txtlines
           exceptions
                empty_list         = 1
                list_index_invalid = 2
                others             = 3.
      check sy-subrc = 0.
      reportlines[] = txtlines[].
      call function 'LIST_FREE_MEMORY'.
    endform.
    Also please check this link for more sample codes.
    http://www.sapdevelopment.co.uk/reporting/rep_submit.htm
    Regards,
    Ferry Lianto
    Please reward points if helpful.

  • Need help : SUBMIT program

    Hi all,
    I am developing a custom prgram which filters the billing documents.
    These docments are submitted to another Standard SAP program which
    processes them and displays the output in POP UP ALV format.
    I am submitting the documents using SUBMIT exporting list to memory and return
    but the list is initial since it is an ALV output.
    Please suggest as to what has to be done to capture the output in my custom program

    Hi Rajinder,
    Its good that you have used Submit with Exporting List to memory and Return and I am sure that you must have populated the input parameters of the standard report bt defining the selection table and declaring its type as rparams.
    After you return to the custom report from the SAP standard with the internal table,you have to use Inporting List to Memory as the list is still in the ABAP memory ID.
    After importing,you can use ALV Function Module and display it.
    If the scenario is such that the SAP standard report is used to display the ALV,then you should only use Submit with the selection table as theri is no point in returning to your custom report once the ALV gets populated and displayed in a Pop Up window.
    Simply use Submit with the selection table without even Return and Exportng List to memory.
    In case you have any further clarifications,do let me know.
    Regards,
    Puneet Jhari.

Maybe you are looking for

  • How do I extend the end of a video clip?

    Hi, I have placed my video clip in my composition and at the end of it, I want to extend the last frame of that video all the way to the end. Just freeze the last frame. How do I do this? I searched this forum using search terms like "extend" and "fr

  • Logo/picture to menubar? simple css problem?

    Hi, I'm having a problem getting a logo to appear correctly in a horizontal menu bar. It appears to be fine in IE 8, Safari 5, Chrome, and Firefox. However in IE 7 and lower it does not seem to display correctly. The only conditional notes I have for

  • Cess not coming in J1IIN

    After billing when I'm firing J1IIN, BED, Ed Cess & High Ed Cess are not coming in J1IIN doc. What can be the reason?

  • Material Master Table

    Hello, Can any one pls let me know the tables for the following fields class / class type  / description / characteristic description / value thanks & regards Chaitanya Rayaprolu

  • How do you award duke dollars

    How do you award duke dollars