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
Similar Messages
-
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 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. -
Problem with Import and Export Data Wizard
Downloaded and installed SQL Server Express 2008 R2 today because I want to explore how Access interacts with SQL Server (using my home computer). I'm using Access 2010 (under Windows 7), so the 2008 version of SQL Server Express seemed to be the version
to use.
After a couple of false starts, installation appeared to go okay. After the installation. My Start menu listed Microsoft SQL Server 2008 and Microsoft SQL Server 2008 R2. The latter listed Import and Export Data (64-bit). When I clicked that, the first Import
and Export Data Wizard page was displayed. I wasn't ready at that time to explore the wizard, so I closed it. An hour or so later I again attempted to open the Import and Export Data wizard. This time, the wizard didn't open. Instead this error message was
displayed: "The SSIS Runtime object could not be created. Verify that DTS.dll is available and registered."
I found DTS.dll on my computer at C:\Program Files\Microsoft SQL Server\100\DTS\Binn, so the file is available, but don't know whether it is registered.
How can I correct this problem?First can you please post all log file errors
>> I can't really give you a solution or specific recommendation since I did not saw this error yet myself, but on your own risk you can try:
1. You may try to just register 'dts.dll' using regsvr32.exe, but this error may indicate a bigger problem with setup.
If you are running SQL Server 64bit then try running this at the command prompt: %windir%\syswow64\regsvr32 "%ProgramFiles(x86)%\Microsoft SQL Server\90\dts\binn\dts.dll"
2. You can try reinstall from start (In this case you have to make sure that you un-install all)
[Personal Site] [Blog] [Facebook] -
Force Background processing with SUBMIT and keeping results in memory
Hi Everyone
I have a very tricky issue that i need some help with.
I have a developed an RFC that allows a NON-SAP front-end to execute reports in the SAP backend the result of the report is saved in memory and formatted to XML and passed to the front-end where the report is displayed.
Therefore for this to work i have added the following code
g_guid = cl_salv_export_db_storage=>create_guid( ).
" Set ALV memory parameters
export l_mode = 'M' to memory id 'ALV_EXTRACT_MODE'.
export l_guid = g_guid to memory id 'ALV_EXTRACT_GUID'.
"Execute the selected report
SUBMIT (wlv_report_name)
USING SELECTION-SET wlv_variant_name
WITH PNPTIMED EQ ' '
WITH PNPBEGDA EQ im_begda
WITH PNPENDDA EQ im_endda
WITH PNPPERNR IN wlr_employee
AND RETURN.
data: l_xstring type xstring.
l_xstring = cl_salv_export_db_storage=>import_xmlstring(
guid = g_guid ).
This allows me to get the report results to be passed to the front-end.
This works quite good for most reports but in some cases the reports has a popup message. In this case the execution fails as the report is not executed as a background job (if the report is executed in the background then the popups are ignored).
The issue is that the reports cannot be executed in the background as the memory will then not contain the report results and secondly the client does not want to use the spool for the report results at all. The second constraint is that the client does not want to alter the reports in any form to remove the popups due to the large volumes of reports.
What i have noted is that if the report is executed and i set the SY-BATCH parameter to "X" then it works perfectly (via the debugger). I can change the SY-BATCH value in my code but obviously once the SUBMIT is executed the SY parameters are reset.
My question is: Is there a way to force the SY parameter values when i perform a SUBMIT? Or is there any other possible solution to this issue?If you want to go with the option of spool, then you can use the following addition
SUBMIT <reportname> to SAP-SPOOL
SPOOL PARAMETERS <print_parameters>
WITHOUT SPOOL DYNPRO and RETURN.
and then read the spool,
if you want to go with the option of a background job, then you can use the following addition
SUBMIT <reportname> VIA JOB <name> NUMBER <num> AND RETURN.
<name> and <num> are generated using FM JOB_OPEN, and then you have to close it using JOB_CLOSE.
Thanks. -
Problems with bleed and exporting to PDF.
Hi,
I am having a slight problem exporting a file to pdf in Indesign CS3.
I have my documents set up with a 3mm bleed and I have made sure that the images and work extend passed the bleed marks as they should. The problem is that when I export to pdf, the pdf file appears to have cropped the work exactly on the bleed line leaving nothing extending passed the bleed. The 3mm bleed area is still there but nothing is extending into it which is kind of pointless. I don't know whether there is a setting I am missing or something like that but any help on this matter would be greatly appreciated.
Cheers"It appears to crop it exactly on the bleed line."
for the record, isn't that what it's supposed to do?
Your bleed line is 3mm outside the trim. Anything you bleed will be contained in that 3mm band. If you hang any more than 3mm off the edge, only the 3mm in the bleed band will show on the PDF.
k -
Problem with Queue and linked list
Hi... i've got an assignment it start like this.
You are required to write a complete console program in java includin main() to demonstrate the following:
Data Structure: Queue, Priority Queue
Object Involved: Linked-List, PrintJob
Operations Involved:
1. insert
2. remove
3. reset
4. search
Dats all... I've been given this much information... Can any1 try to help me please... How to make a start??? And wat does the print job means???
Can any1 tell me wat am supposed to do...Hi,
Why don't you start your demo like this?
import java.io.IOException;
public class Demo {
public Demo() {
public void startDemo() throws IOException {
do {
System.out.println("String Console Demo ");
System.out.println("\t" + "1. Queue Demo");
System.out.println("\t" + "2. PriorityQueue Demo");
System.out.println("\t" + "3. LinkedList Demo");
System.out.println("\t" + "4. PrintJob Demo");
System.out.println("Please choose one option");
choice = (char) System.in.read();
showDemo(choice);
} while (choice < '1' || choice > '4');
public void showDemo(char ch) {
switch (ch) {
case '1':
System.out.println("You have chosen Queue Demo ");
showOperations();
break;
case '2':
System.out.println("You have chosen Priority Queue Demo ");
showOperations();
break;
case '3':
System.out.println("You have chosen LinkedList Demo ");
showOperations();
break;
case '4':
System.out.println("You have chosen Print Job Demo ");
showOperations();
break;
private void showOperations() {
System.out.println("Please choose any operations ");
System.out.println("\t" + "1. Insert ");
System.out.println("\t" + "2. Remove ");
System.out.println("\t" + "3. Reset ");
System.out.println("\t" + "4. search ");
public static void main(String[] args) throws IOException {
Demo demo = new Demo();
demo.startDemo();
private char choice;
Write a separate classes for the data structures show the initial elements and call the methods based on the operations then show the result.
Thanks -
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,
RajeshwarHello Rajeshwar,
This is a duplicate thread. You have a thread with the same question.
[list_to_memory is not working in background;
Jayant Sahu -
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.VIt 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 -
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 youHi 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 -
Problem with branching on dependant list submit
I am a new APEX user using version 3.1. I've successfully set up a dependent LOV on a form but the logic I've applied is preventing me creating any records. (I've branched back to the page and I think this is conflicting with my primary key trigger.) I've spent a couple of days trying to solve this - can anyone help please?
THE BIT THAT WORKS
My driving LOV has been set up as a select list with submit and returns the values that I intended.
I have amended the Source used on the first LOV to : Only when the value in session state is null (so that this selection is displayed when I return to the page)
I have set up a branch back to this page before processing so that I can continue with the rest of the form input.
Both select list works but when I try to create a record the form does clear (apart from the select lists) but no record is created.
For info, the create button worked just fine until I added the branch back to the page.
I think this may be conflicting with how I've set up my primary key? I've used a trigger for this as follows:
CREATE OR REPLACE TRIGGER "BI_HEADER"
before insert on "HEADER"
for each row
begin
select "HEADER_SEQ".nextval into :NEW.HID from dual;
end;
Any help would be really appreciated.Many thanks for the quick answer. Worked great.
The key was to create the bindings for each input field:
private RichInputText richInputTextName;
private RichInputText richInputTextPhone;
Reference them in the jsp page:
<af:inputText label="Name:" binding="#{testBackingBean.richInputTextName}"
value="#{testBackingBean.currentRowData.name}"
id="it2"/>
<af:inputText label="Phone:" binding="#{testBackingBean.richInputTextPhone}"
value="#{testBackingBean.currentRowData.phone}"
id="it1"/>
Then in the change value listener that is called when you select another state, you must manually set the before and after data. Before data would be the data the user changed, the after data would be resetting correct data of the other state to the corresponding mapped state input data.
public void selectStateChanged(ValueChangeEvent event) {
if (event.getNewValue() == null) {
setSelectedItemState("VA");
} else {
// before
String beforeName = (String) richInputTextName.getValue();
String beforePhone = (String) richInputTextPhone.getValue();
currentRowData.setName(beforeName);
currentRowData.setPhone(beforePhone);
setSelectedItemState((String)event.getNewValue());
// after
currentRowData = someRowDataList.get(getSelectedItemState());
String afterName = (String) currentRowData.getName();
String afterPhone = (String) currentRowData.getPhone();
richInputTextName.setValue(afterName);
richInputTextPhone.setValue(afterPhone);
Again, you saved the day! -
when i am trying to pass selection-screen value to sapmm06e, i got this
error "IN CORRECT PROGRAM TYPE WITH SELECT".
So any one give me solution for this.
Regards,
Rajesh.Hai ,
ur useing on submit this way
SUBMIT zwjp_fc_interface
WITH pa_kunnr eq kunnr1
WITH pa_shipt eq kunnr2
WITH pa_test eq p_test
EXPORTING LIST TO MEMORY
AND RETURN.
i hope this is help u
regards
chowdary -
"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
-
Internal table with Import and Export
Hi All,
Hi all
Please let me know the use of <b>Internal table with Import and Export parameters and SET/GET parameters</b>, on what type of cases we can use these? Plese give me the syntax with some examples.
Please give me detailed analysis on the above.
Regards,
PrabhuHi Prabhakar,
There are three types of memories.
1. ABAP MEMORY
2. SAP MEMORY
3. EXTERNAL MEMORY.
1.we will use EXPORT/ IMPORT TO/ FROM MEMORY-ID when we want to transfer between ABAP memory
2. we will use GET PARAMETER ID/ SET PARAMETER ID to transfer between SAP MEMORY
3. we will use EXPORT/IMPORT TO/FROM SHARED BUFFER to transfer between external memory.
ABAP MEMORY : we can say that two reports in the same session will be in ABAP MEMORY
SAP MEMORY: TWO DIFFERENT SESSIONS WILL BE IN SAP MEMORY.
for ex: IF WE CALL TWO DIFFERENT TRANSACTIONS SE38, SE11
then they both are in SAP MEMORY.
EXTERNAL MEMORY: TWO different logons will be in EXTERNAL MEMORY.
<b>Syntax</b>
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.
ABAP programs can access the parameters using the SET PARAMETER and GET PARAMETER statements.
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 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:
GET PARAMETER ID <pid> FIELD <f>.
This statement fills the value stored under the ID <pid> into the variable <f>. If the system does not find a value for <pid> in the SAP memory, it sets SY-SUBRC to 4, otherwise to 0.
To fill the initial screen of a program using SPA/GPA parameters, you normally only need the SET PARAMETER statement.
The relevant fields must each be linked to an SPA/GPA parameter.
On a selection screen, you link fields to parameters using the MEMORY ID addition in the PARAMETERS or SELECT-OPTIONS statement. If you specify an SPA/GPA parameter ID when you declare a parameter or selection option, the corresponding input field is linked to that input field.
On a screen, you link fields to parameters in the Screen Painter. When you define the field attributes of an input field, you can enter the name of an SPA/GPA parameter in the Parameter ID field in the screen attributes. The SET parameter and GET parameter checkboxes allow you to specify whether the field should be filled from the corresponding SPA/GPA parameter in the PBO event, and whether the SPA/GPA parameter should be filled with the value from the screen in the PAI event.
When an input field is linked to an SPA/GPA parameter, it is initialized with the current value of the parameter each time the screen is displayed. This is the reason why fields on screens in the R/3 System often already contain values when you call them more than once.
When you call programs, you can use SPA/GPA parameters with no additional programming overhead if, for example, you need to fill obligatory fields on the initial screen of the called program. The system simply transfers the values from the parameters into the input fields of the called program.
However, you can control the contents of the parameters from your program by using the SET PARAMETER statement before the actual program call. This technique is particularly useful if you want to skip the initial screen of the called program and that screen contains obligatory fields.
Reading Data Objects from Memory
To read data objects from ABAP memory into an ABAP program, use the following statement:
Syntax
IMPORT <f1> [TO <g 1>] <f 2> [TO <g 2>] ... FROM MEMORY ID <key>.
This statement reads the data objects specified in the list from a cluster in memory. If you do not use the TO <g i > option, the data object <f i > in memory is assigned to the data object in the program with the same name. If you do use the option, the data object <f i > is read from memory into the field <g i >. The name <key> identifies the cluster in memory. It may be up to 32 characters long.
You do not have to read all of the objects stored under a particular name <key>. You can restrict the number of objects by specifying their names. If the memory does not contain any objects under the name <key>, SY-SUBRC is set to 4. If, on the other hand, there is a data cluster in memory with the name <key>, SY-SUBRC is always 0, regardless of whether it contained the data object <f i >. If the cluster does not contain the data object <f i >, the target field remains unchanged.
Saving Data Objects in Memory
To read data objects from an ABAP program into ABAP memory, use the following statement:
Syntax
EXPORT <f1> [FROM <g 1>] <f 2> [FROM <g 2>] ... TO MEMORY ID <key>.
This statement stores the data objects specified in the list as a cluster in memory. If you do not use the option FROM <f i >, the data object <f i > is saved under its own name. If you use the FROM <g i > option, the data objet <g i > is saved under the name <f i >. The name <key> identifies the cluster in memory. It may be up to 32 characters long.
Check this link.
http://www.sap-img.com/abap/difference-between-sap-and-abap-memory.htm
Thanks,
Susmitha.
Reward points for helpful answers. -
Problem with reports and forms
Hello,
I have a problem regarding a report and a problem regarding a form.
My tables are as follows:
Account customer account_customer (intersecting table because of N:M relationship)
Account_id Customer_id Account_id
Account_name Customer_name Customer_id
Account_date Customer_date
Account_by Customer_by
I need a report that shows all the accounts and for every account all the customers connected to it.
The results I get now is i.e:
1 Account1 2007-09-17 admin Customer1
1 Account1 2007-09-17 admin Customer2
1 Account1 2007-09-17 admin Customer3
I want it to be like this or any other suggestion you have:
1 Account1 2007-09-17 admin Customer1
Customer2
Customer3
The form-problem is that I have two select lists where the first one (group) determines what is included in the second one (group members)
I want to choose group in the first select list and then only get the selected groups members in the second select list. How have you solved this?
Best regards
//JensHi
For the form with the select list either:
1. make the GROUP item type as select list with submit and include an unconditional page process to return to that page after page processing, computation and validation. The GROUP MEMBER should be normal select list.
2. Else use AJAX select list as mentioned in the following example: http://apex.oracle.com/pls/otn/f?p=11933:37:1556916731898705::NO:::
Thanks,
Maybe you are looking for
-
My phone is frozen. What do I do?
My phone is froze and won't turn on or off. Screen black except for "working" symbol which isn't moving.
-
Profit center substitution rule
hi ,i am wondering is it possible to assign profit center substitution rule by sales org,instead controlling area?
-
win xp, downloaded ps free, had problems, now won't start, "user name, org, or serial number missing".
-
UC 7 - unable to delete distribution list
I've got this distribution list migrated over, which do not have any members, but am unable to delete it, and getting error this object is currently in use. I enabled dependency records but unable to see anywhere I can access this functionality. How
-
MAM Synchronization Error-Skip Container ID
Hi All We have implemented MAM in one of the clients places.We are facing one issue which is troubling us for the last 2 months. Few devices are throwing an error when it is synchronized.Initially we thought that this error occured when the data cabl